I am working with JSF 2.2 and I would like to build dynamic forms with jsf; this is my code:
<h:form id="myForm">
<ui:repeat value="#{bean.list}" var="object">
<h:panelGroup id="something#{object.id}">
<h:commandButton value="update" action="#{bean.doSomething}">
<f:ajax render="another#{object.id}" execute ="something#{object.id}"/>
</h:commandButton>
</h:panelGroup>
<h:panelGroup id="another#{object.id}">
<!--....-->
</h:panelGroup>
</ui:repeat>
</h:form>
It not working. I checked html generated and something#{object.id}
is represented as :myForm:j_idt93:0:something, without object.id
. For this reason not working.
I changed the h:form
into ui:repeat
and this solution working, but as I need update another#{object.id}
, with h:form
I can't point which another
update.
Thank you!