如何结合 JSF togglePanel 来触发其他 div/element/ 的可见性?
我浏览了许多网站,但我找不到如何使用切换面板来更改另一个元素的可见性。请参阅示例。
<rich:togglePanel switchType="client"
stateOrder="panelOneOff, panelOneOn">
<f:facet name="panelOneOff">
<rich:toggleControl>
<h:outputText value="Start"/>
</rich:toggleControl>
</f:facet>
<f:facet name="panelOneOn">
<rich:toggleControl switchToState="panelOneOff">
<h:outputText value="Close"/>
</rich:toggleControl>
</f:facet>
</rich:togglePanel>
<rich:effect name="hideDiv" for="toggleAccordingToTheTogglePanel" type="Fade" />
<rich:effect name="showDiv" for="toggleAccordingToTheTogglePanel" type="Appear" />
<div id="toggleAccordingToTheTogglePanel">
please show me on start and hide me on Close
</div>
哪些侦听器将调用 hideDiv() 或 showDiv() javascript 函数,以便末尾的 DIV 元素出现或淡出?
更新它可以使用richfaces 3.3.2在jboss 5.1上运行
I was looking through a number of websites, but i couldn't find out how to use a toggle panel to change the visibility of another element. Please see the example..
<rich:togglePanel switchType="client"
stateOrder="panelOneOff, panelOneOn">
<f:facet name="panelOneOff">
<rich:toggleControl>
<h:outputText value="Start"/>
</rich:toggleControl>
</f:facet>
<f:facet name="panelOneOn">
<rich:toggleControl switchToState="panelOneOff">
<h:outputText value="Close"/>
</rich:toggleControl>
</f:facet>
</rich:togglePanel>
<rich:effect name="hideDiv" for="toggleAccordingToTheTogglePanel" type="Fade" />
<rich:effect name="showDiv" for="toggleAccordingToTheTogglePanel" type="Appear" />
<div id="toggleAccordingToTheTogglePanel">
please show me on start and hide me on Close
</div>
What listeners will work to call the hideDiv() or showDiv() javascript functions so the DIV-Element at the end will appear or fade out?
update It be run on jboss 5.1 using richfaces 3.3.2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)