I have two forms in view with two ajaxed buttons. Clicking testAjax button i see that two evaluations are made, but only one is required. How to make that only <evaluate expression="browseProductsListBean.getElems()" result="viewScope.products"/> will be triggered ?
In other words - how to rerender only one form ?
users-products.xhtml:
main-flow.xml:Code:<!-- products --> <h:form> <ui:repeat value="#{products}" var="product" id="products" varStatus="i"> </ui:repeat> <h:commandLink action="testAjax" value="testAjax"> <f:ajax render="@form" /> </h:commandLink> </h:form> <!-- users --> <h:form> <ui:repeat value="#{users}" var="user" id="users" varStatus="i"> </ui:repeat> </h:form>
Code:<view-state id="users-products"> <var name="browseUsersListBean" class="beans.BrowseUsersListBean"/> <var name="browseProductsListBean" class="beans.BrowseAllProductsListBean"/> <on-render> <evaluate expression="browseUsersListBean.getElems()" result="viewScope.users"/> <evaluate expression="browseProductsListBean.getElems()" result="viewScope.products"/> </on-render> <transition on="testAjax"/> </view-state>


Reply With Quote