Hi all,
I have the following snippet of code:
JSF | JAVA |
---|---|
<ui:repeat value="#{searchForm.screenPopulationBean.operatorBeans}" var="operator"> <h:panelGroup rendered="#{operator.checked}"> <a4j:outputPanel id="operatorSearchResult"> <a4j:region> <h:form> <a4j:poll id="poll" interval="1000" enabled="true" action="#{searchForm.test}"/> </h:form> </a4j:region> <rich:simpleTogglePanel switchType="ajax" label="#{operator.name}" height="100%"> <h:panelGroup id="loadingStatus" rendered="#{operator.searchProgress}"> <div class="circle_loading">Searching...</div> </h:panelGroup> <h:panelGroup id="resultStatus" rendered="#{!operator.searchProgress}"> Done </h:panelGroup> </rich:simpleTogglePanel> </a4j:outputPanel> </h:panelGroup> </ui:repeat> <ui:repeat value="#{form.users}" var="user"> <h:panelGroup rendered="#{user.male}" <a4j:region> <h:form> <a4j:poll id="poll" interval="1000" enabled="true" action="#{searchForm.test}"/> </h:form> </a4j:region> </panelGroup> </ui:repeat> | public class User{ private boolean male = true;
setters/getters ...... public void test(){ System.out.println("test"); } } |
There is also Form managed bean that contains many users.
As you can see, I want to fire several actions by <a4j:poll> tag.
But when I run the application the request is not fired by <a4j:poll> tag.
What can be wrong in this code?
Any help is appreciated! Thanks!
1) I think that <a4j:region> should be inside form but not outside.
2) Make sure that you don't have another form which wrapps all these components.