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

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

<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调用方式

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

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

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

 

 

评论
发表评论

您还没有登录,请登录后发表评论

rockjava
搜索本博客
博客分类
我的留言簿
  • NameError: name 'admin' is not defined ...
    -- by hqman
存档
最新评论