1

私の 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>
4

1 に答える 1

0

忘れていたのは、イベント プロパティです。

<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をご覧ください。

于 2010-12-07T14:28:32.933 に答える