Sometimes, it may be useful to group multiple components under the same <f:ajax>
tag. For example, the following code snippet groups two <h:inputText>
components under the same <f:ajax>
tag (you can nest other components as well):
<f:ajax event="click" execute="submitFormId" render="submitFormId"> <h:form id="submitFormId"> Name: <h:inputText id="nameId" value="#{ajaxBean.name}" validator="nameValidator"/> <h:message id="msgNameId" showDetail="true" showSummary="true" for="nameId" style="color: red;"/> Surname: <h:inputText id="surnameId" value="#{ajaxBean.surname}" validator="nameValidator"/> <h:message id="msgSurnameId" showDetail="true" showSummary="true" for="surnameId" style="color: red;"/> </h:form> </f:ajax>
So, how does...