It's because you're in the remove button ajax-updating the entire form without processing the newly submitted input values. The immediate="true"
on ajax listener skips the processing of all input components which do not have immediate="true"
set. You need to remove the attribtue. The absence of execute
attribute will cause only the current component (@this
) to be processed by default. You need to explicitly specify @form
.
So, just do the same as in your add button. Replace immediate="true"
by execute="@form"
.
<f:ajax listener="#{bean.onButtonRemoveFieldClick(field)}" execute="@form" render="@form" />