I have a
displaying a product catalog in Proudcts.xhtml
:
Each line of your h:datatable
references the same variable ViewProductsManagedBean.quantityPurchased
. If the form is submitted, the value of ViewProductsManagedBean.quantityPurchased
will be set for each line again and again. That's why the value of the last row defines the final state of quantityPurchased
and this is the value you get in your method.