myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Spencer <pau...@apache.org>
Subject How to set a component value to an EL Expression in Java?
Date Fri, 26 Sep 2008 19:40:36 GMT
I need to dynamically add a child component inside a bean. I have access 
to the component via a binding and have successfully added the child 
component.  What I have not been able to do is set the value of the 
child component to an EL Expresion so it is resolve by JSF 1.2.

The equivalent tag for the child component is:
   <tr:inputText value="#{foo.bar}"/>

So far I have:
    CoreInputText childComponent;
    childComponent = (CoreInputText) 
application.createComponent(CoreInputText.COMPONENT_TYPE);
    // Set the value to an EL Expression
    childComponent.setValue("#{foo.bar}"); // Does not work


Suggestions?

Paul Spencer


Mime
View raw message