<h: inputText> не работает в <ui: repeat>, только последняя запись отправлена

у меня есть<ui:repeat> с участием<ui:inputText>:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"    
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="./templates/masterLayout.xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="content">
        <ui:repeat value="#{genproducts.dbList()}" var="itemsBuying">
            <div class="indproduct">
                <p class="center">#{itemsBuying.name}</p>
                <div class="center">
                    <h:form style="margin-left: auto; margin-right: auto;">
                        <h:inputText value="#{itemsBuying.amount}" />
                        <h:commandLink action="#{shoppingCart.addToCart(itemsBuying)}" value="add" />
                    </h:form>
                </div> 
            </div>
        </ui:repeat>
    </ui:define>
</ui:composition>

Это#{genproducts} поддерживающий боб:

@ManagedBean(name = "genproducts")
@ViewScoped
public class Genproducts{

    public List<Product> dbList() throws SQLException {
        List<Product> list = new ArrayList<>();
        ...
        return list;
    }

} 

ЭтоProduct организация:

@ManagedBean(name = "product")
@RequestScoped
public class Product {

    private int amount;

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

}

В моем случае есть четыре продукта изdbList() метод. Для первых трех продуктов, когда я ввожу другое значение, значение по умолчанию появляется в методе действия. Только для последнего продукта, он работает как положено.

Как это вызвано и как я могу решить это?

Ответы на вопрос(1)

Ваш ответ на вопрос