A has many required inputs and validations. A couple of command buttons control different inputs.
I can change required attibrute with the value of
You seem to be using JSF 2.x already. So just use <f:ajax execute>
or <p:commandButton process>
to specify client IDs of components which are to be executed/processed when the button is pressed. All components which are not included in this will just be ignored and not converted/validated.
E.g.
<h:inputText id="input1" ... required="true" />
<h:inputText id="input2" ... required="true" />
<h:inputText id="input3" ... required="true" />
<h:inputText id="input4" ... required="true" />
<p:commandButton value="Submit inputs 1 and 2" process="input1 input2" ... />
<p:commandButton value="Submit inputs 3 and 4" process="input3 input4" ... />
In case of <p:commandButton>
it defaults to @form
(i.e. the entire current form).