Nov 10, 2018

JSF: AJAX in Grouping of Components Example

<f:ajax event="click" render="@form">
        <h:inputText id="input1" value="#{}"/> 
        <h:commandButton id="Submit">
            <f:ajax event="keyup"/>

        <h:commandButton id="Submit2">
            <f:ajax event="mouseover"/>
All components are grouped by using the f:ajax tag.

When the user clicks either component, the updated results will be displayed for all components in the form.

Ajax functionality is cumulative. For command button "Submit", either click or keyup will fire an Ajax action.  For command button "Submit2", either click or mouseover will fire an Ajax action.