This content has been marked as final.
Show 4 replies
-
1. Re: Binding data on elements in an ArrayList
mars1412 Mar 25, 2008 2:03 PM (in response to damatrix) -
2. Re: Binding data on elements in an ArrayList
damatrix Mar 25, 2008 3:05 PM (in response to damatrix)I just tried it. It is able to display the set of name,specificatino fields just like the ui:repeat, but data entered into the inputText fields are not bound to the underlying entities contained in the ArrayList after the form is submitted.
Am i missing something here? This is how the section of the facelet looks now
<c:forEach items="#{specifications}" item="#{specification}"> <h:panelGrid columns="2"> <s:decorate template="/layout/edit.xhtml"> <ui:define name="label">Label</ui:define> <h:inputText value="#{specification.name}"/> </s:decorate> <s:decorate template="/layout/edit.xhtml"> <ui:define name="label">Detail</ui:define> <h:inputText value="#{specification.detail}"/> </s:decorate> </h:panelGrid> </c:forEach>
-
3. Re: Binding data on elements in an ArrayList
mokua Mar 25, 2008 4:46 PM (in response to damatrix)Try this:
<c:forEach items="#{specifications}" var="specification"> <h:panelGrid columns="2"> <s:decorate template="/layout/edit.xhtml"> <ui:define name="label">Label</ui:define> <h:inputText value="#{specification.name}"/> </s:decorate> <s:decorate template="/layout/edit.xhtml"> <ui:define name="label">Detail</ui:define> <h:inputText value="#{specification.detail}"/> </s:decorate> </h:panelGrid> </c:forEach>
-
4. Re: Binding data on elements in an ArrayList
damatrix Mar 25, 2008 5:27 PM (in response to damatrix)Thanks. I should not have put the word specification in EL quotes.
This worked perfectly.