0

Iam iterate a list of objects with ui:repeat. For each Object h:form, h:inputText (for order value) and the commandLink for adding the Item will be generated.

<ui:repeat var="article" value="#{someDataBean.myArrayList}">
<h:form>
Value: <h:inputText value="#{baskedBean.articleValue"} />
<h:commandLink value="add" action="#{baskedBean.addArticel(article)}" />
</h:form>
</ui:repeat>

Lets suppose we have only one article, the order value (baskedBean.articleValue) is submitted and setted correctly.

If we have more than one article in the ui:repeat value list, the submitted value isnt setted. Expect i use the last article.

It looks like, that the other h:inputText components (under the current) will overwrite the value (baskedBean.articleValue)

I tought, that i could handle the problem by sourrunding the related article h:input and commandLink components by a dedicated h:form (only for the article) but it didn't work. Iam using mojarra 2.2.4 (and testet it also with 2.2.3) thanks

thanks for your help

Sence
  • 115
  • 8
  • got it working, i have to use c:forEach or h:dataTable instead of ui:repeat. Where is the difference between the components, when the content becomes rendered? thx – Sence Nov 03 '13 at 07:46
  • Related: http://stackoverflow.com/a/19523436/1530938 – kolossus Nov 04 '13 at 16:18

0 Answers0