I have a bean with a List:
@Named
@ViewScoped
public class Bean {
private List- items;
private String value;
@
Your problem is caused because you're basically collecting all submitted values into one and same bean property. You need to move the value property into the bean behind var="item".
<h:form>
<ui:repeat value="#{bean.items}" var="item">
<h:inputText value="#{item.value}" /> <!-- instead of #{bean.value} -->
</ui:repeat>
<h:commandButton action="#{bean.submit}" />
</h:form>
In the bean action method, simply iterate over items in order to get all submitted values via item.getValue().
public void submit() {
for (Item item : items) {
System.out.println("Submitted value: " + item.getValue());
}
}