I'm trying to create a domino like effect when rendering different panelGroups using JSF2 and Ajax. The idé is that depending on the outcome a certain panel will be rendered and shown which in turn renders a third panel, is it possible to create a domino开发者_C百科 like effect with Ajax to render each panel in succession?
I'm sure I've read about this somewhere, I just can't to find the article again :(
Bind the group components to the view scope and use UIComponent#isRendered()
.
<h:panelGroup binding="#{group1}" rendered="#{bean.someCondition}">
...
</h:panelGroup>
<h:panelGroup binding="#{group2}" rendered="#{group1.rendered}">
...
</h:panelGroup>
<h:panelGroup binding="#{group3}" rendered="#{group2.rendered}">
...
</h:panelGroup>
...
精彩评论