Javascript 如何将rich:effect与a4j:support和reRender一起使用
在我的JSF页面上,我根据复选框的值显示一些内容。重新播放此内容时,如何附加效果(如淡入淡出)?是否有类似onRender之类的事件 这是我到目前为止得到的结果,但效果并没有显现出来Javascript 如何将rich:effect与a4j:support和reRender一起使用,javascript,jsf,javascript-events,richfaces,ajax4jsf,Javascript,Jsf,Javascript Events,Richfaces,Ajax4jsf,在我的JSF页面上,我根据复选框的值显示一些内容。重新播放此内容时,如何附加效果(如淡入淡出)?是否有类似onRender之类的事件 这是我到目前为止得到的结果,但效果并没有显现出来 <t:selectBooleanCheckbox title="Yes" label="Yes" value="#{myBean.booleanValue}"> <a4j:support ajaxSingle="true" event="onchange" reRender="panel"/
<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" />
更多详细信息可在此处找到,umm。。你在hideDiv呼叫后忘记了括号。。应该如此