<p:outputPanel id="panel">
<ui:repeat value="#{dataController.display()}"
var="item" rendered="#{Bean.showtable}">
<b:row>
<b:column col-md="5">
<h:outputText value="#{item.name}" style="font-family: verdana;font-size:16px;margin-bottom:15px;"></h:outputText>
</b:column>
<b:column col-md="7">
<h:inputText style="width:200px;height:30px;margin-bottom:15px;"
autocomplete="off"></h:inputText>
</b:column>
</b:row>
</ui:repeat>
In the above code, I have used ui:repeat for displaying the names of the items in a list in output text alongwith the input text for entering the values of the items.
The input text depends on the values in the list i.e dynamically generated.
I need to access the values from the input text and add them to List.
Can anyone please suggest me an approach to access the values from input text to bean/list despite using ui:repeat once to display the input text?
I have tried to create an empty list and again using ui:repeat only for input text.. tried to access values from input text.But ui:repeat doesnot work again.. as it was already used once for displaying.
I am new to JSF.Any help would be appreciated.Thankyou.
Don't use empty list. Initialize it with null or empty values.
Let's say we have
inputsas your list, your bean should look like this.xhtml
Hope this helps.