javascript - how to use rich:effect with a4j:support and reRender -
on jsf-page, i'm showing content based on value of checkbox. how can attach effect (like fading in , out) when content rerendered? there event onrender or something?
here got far, effect not showing.
<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>
what you've forgotten event property.
<rich:effect event="onmouseout" name="hidediv" for="mypanelgrid" type="opacity" params="duration:0.8,from:1.0,to:0.1"/>
also can show effect js call if like.
<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" />
more details can found here, richfaces-demo
Comments
Post a Comment