jstl - How to construct dynamically attribute name in xhtml - JSF -
i want assign dynamic value input in xhtml page. managedbean contains 3 string attributes: customfield1, customfield2 , customfield3
in xhtml page i'm looping on list of values custruct components:
<ui:repeat value="#{listbean.customfields}" var="item" varstatus="status"> <div > <p:outputlabel value="#{item.label}" /> <br /> <c:set var="test" value="#{'mybean.customfield'.concat(status.index)}"/> <p:inputtext value="#{test}" /> </div> </ui:repeat>
what did concatenation not work since concider whole expression string unable bind "#{test}" bean attribute.
you think possible in jsf ?
thanks in advance !
please try
<p:inputtext value="#{mybean['customfield'.concat(status.index)]}"/>
Comments
Post a Comment