Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7072491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:48:55+00:00 2026-05-28T05:48:55+00:00

I’ve created a custom component that display some data to the page according to

  • 0

I’ve created a custom component that display some data to the page according to the bean. The problem is I cand’t bind the bean to my component. I use ValueExpresion in UIComponentELTag class. I am receiving this error:

org.apache.jasper.JasperException: PWC6338: Cannot convert “#{helloBean.color}” for the attribute color of the bean javax.el.ValueExpression: PWC6348: Property editor not registered with the PropertyEditorManager

index.jsp

<d:hello name="Something"
    color="#{helloBean.color}" 
    welcome="#{helloBean.welcome}">
</d:hello>

hello.tld

<tag>
    <name>hello</name>
    <tag-class>custom.HelloTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
        <name>name</name>
        <type>java.lang.String</type>
    </attribute>
    <attribute>
        <name>color</name>
        <type>java.lang.String</type>
    </attribute>
</tag>

HelloTag.java`

public class HelloTag extends UIComponentELTag {
    ValueExpression color;
    ValueExpression welcome;
    String name;

    public ValueExpression getColor() {
        return color;
    }

    public void setColor(ValueExpression color) {
        this.color = color;
    }
    @Override
    protected void setProperties(UIComponent component) {System.out.println("IN");
        super.setProperties(component);
        UIHello componentCst = (UIHello) component;
        if (color.isLiteralText()) {
        componentCst.setValueExpression("color", color);
        } else {
        component.getAttributes().put("color", color.getExpressionString());
    }

        componentCst.getAttributes().put("color", "color:" + getColor() + ";");
        componentCst.getAttributes().put("name", getName());
    }
}

UIHello.java – extends UIOutput

public class UIHello extends UIOutput {
    ...
}

faces-config.xml

<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
    version="1.2">
    <component>
        <component-type>hello</component-type>
        <component-class>custom.UIHello</component-class>
    </component>
    <managed-bean>
        <managed-bean-name>helloBean</managed-bean-name>
        <managed-bean-class>dto.HelloBeanDTO</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
        <property-name>color</property-name>
        <property-class>java.lang.String</property-class>
        <value>green</value>
    </managed-property>
    <managed-property>
        <property-name>welcome</property-name>
        <property-class>java.lang.String</property-class>
        <value>Bine ai venit</value>
    </managed-property>
    </managed-bean>

    <render-kit>
        <display-name>Hello Render</display-name>
    <renderer>
        <display-name>Hello Render</display-name>
        <component-family>hello</component-family>
        <renderer-type>hello</renderer-type>
        <renderer-class>custom.HelloRender</renderer-class>
        </renderer>
    </render-kit>
</faces-config>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:48:55+00:00Added an answer on May 28, 2026 at 5:48 am

    You forgot to surround <type> of the color attribute with <deferred-value> in hello.tld.

    <tag>
        <name>hello</name>
        <tag-class>custom.HelloTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
            <name>name</name>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <name>color</name>
            <deferred-value>
                <type>java.lang.String</type>
            </deferred-value>
        </attribute>
    </tag>
    

    With the <deferred-value> you’re basically specifying that the attribute accepts a deferred value expression and should be treated as such instead of as a plain vanilla string.

    Note that your welcome attribute is missing. You might want to add it as well.

    See also:

    • Java EE 5 tutorial – Creating custom components – Defining the TLD
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.