更新时间:2023-09-20 14:08:10
The <p:commandButton>
submits and processes by default the entire form. This will indeed validate all input fields. You can control this with the process
attribute which thus defaults to @form
. In your particular case, you could just use @this
so that only the command button's own action is invoked.
<p:commandButton value="Add another price" process="@this" update="pricesList" action="#{productBean.addNewPrice()}" />