gpt4 book ai didi

javascript - 如何使用富:effect with a4j:support and reRender

转载 作者:行者123 更新时间:2023-11-28 10:25:51 25 4
gpt4 key购买 nike

在我的 JSF 页面上,我根据复选框的值显示一些内容。当重新渲染此内容时,如何附加效果(例如淡入和淡出)?是否有类似 onRender 之类的事件?

这是我到目前为止得到的,但效果没有显示:

<t:selectBooleanCheckbox title="Yes" label="Yes" value="#{myBean.booleanValue}">
<a4j:support ajaxSingle="true" event="onchange" reRender="panel"/
</t:selectBooleanCheckbox>

<t:div id="panel">
<rich:effect name="hideDiv" for="myPanelGrid" type="Opacity" params="duration:0.8,from:1.0,to:0.1"/>
<rich:effect name="showDiv" for="myPanelGrid" type="Opacity" params="duration:0.8,from:0.1,to:1.0"/>
<t:panelGrid columns="2" rendered="#{myBean.booleanValue}" id="myPanelGrid">
...
...
...
</t:panelGrid>
</t:div>

最佳答案

您忘记的是事件属性。

<rich:effect event="onmouseout" name="hideDiv" for="myPanelGrid" type="Opacity" params="duration:0.8,from:1.0,to:0.1"/>

如果您愿意,您还可以通过 js 调用来显示效果。

<rich:effect name="hideDiv" for="myPanelGrid" type="Opacity" params="duration:0.8,from:1.0,to:0.1"/>

<input type="button" onclick="hideDiv" value="Hide" />

更多详细信息可以在这里找到,Richfaces-demo

关于javascript - 如何使用富:effect with a4j:support and reRender,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4326060/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com