[英]Creating a “domino effect” with Ajax in JSF2
I'm trying to create a domino like effect when rendering different panelGroups using JSF2 and Ajax. 当使用JSF2和Ajax渲染不同的panelGroups时,我试图创建类似多米诺骨牌的效果。 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 like effect with Ajax to render each panel in succession? 问题是,根据结果将渲染并显示某个面板,然后依次渲染第三个面板,是否可以使用Ajax创建类似多米诺骨牌的效果来连续渲染每个面板?
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()
. 将组组件绑定到视图范围,并使用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>
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.