Adding <f:attribut> to dynamic created componten
Hello,
I want to add an attribut-Tag to a dynamic created component.
What I need (when it is build static) is:
<h:inputText value="#{Ctrl.email}" id="email" >
<f:attribute name="Msg" value="Enter Email" />
</h:inputText>
what I tried was:
javax.faces.webapp.AttributeTag myAttributeTag =new AttributeTag();
myAttributeTag.setName("Msg");
myAttributeTag.setValue("Enter Email");
HtmlInputText edit_email =new HtmlInputText();
edit_email.setId("email");
edit_email.getChildren().add(myAttributeTag);
When I try to open the page I get an:
javax.servlet.ServletException: javax.servlet.jsp.JspException:javax.faces.el.EvaluationException: Error getting property 'x' from bean of type com.mybean
java.lang.ClassCastException
Has anyone an idea how I can add this attribute to my HtmlInputText ?
Greets and thanks
PS.: <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %> ;-)

