Richfaces 中<rich:modalPanel >的开启与关闭方式

xiaoxiao2022-06-22  43

Richfaces 中<rich:modalPanel />有3中开启与关闭的方式分别如下

1.使用<rich:componentControl />标签

Xml代码 <h:graphicImage value="/open.png" id="showlink"/>      <rich:componentControl for="modalPanelId" attachTo="showlink" operation="show" event="onclick"/>  <h:graphicImage value="/close.png" id="hidelink"/>     <rich:componentControl for="modalPaneld" attachTo="hidelink" operation="hide" event="onclick"/>    <h:graphicImage value="/open.png" id="showlink"/> <rich:componentControl for="modalPanelId" attachTo="showlink" operation="show" event="onclick"/> <h:graphicImage value="/close.png" id="hidelink"/> <rich:componentControl for="modalPaneld" attachTo="hidelink" operation="hide" event="onclick"/>

 

 

 

2.使用含有EL的js调用方式

 

Xml代码 <a href="#" onclick="#{rich:component('modalPaneld')}.show() ">开启</a>    <a href="#" onclick="#{rich:component('modalPaneld')}.hide()">关闭</a>   <a href="#" οnclick="#{rich:component('modalPaneld')}.show() ">开启</a> <a href="#" οnclick="#{rich:component('modalPaneld')}.hide()">关闭</a>

 

3.js方式(调用richefaces内置的js)

 

Xml代码 Richfaces.showModalPanel('modalPaneld')//开启    Richfaces.hideModalPanel('modalPaneld')//关闭   Richfaces.showModalPanel('modalPaneld')//开启 Richfaces.hideModalPanel('modalPaneld')//关闭

 

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-4951181.html

最新回复(0)