JBoss Richfaces ModalPanel - 基于条件的调用

时间:2009-03-03 10:50:17

标签: jsf

我正在使用JBoss Richfaces 我需要调用rich:modalPanel 当特定情况发生时。

示例代码在这里 -

这是模式面板

<rich:modalPanel  id="show_alert" height="125" width="325" zindex="2000">
                <h:outputText value="shamik testing"/><br/>
                <a4j:commandButton value="#{uiLabel.no}" onclick="#             {rich:component('show_alert')}.hide()" styleClass="button"/>
</rich:modalPanel>

我想在有人点击此链接时显示模态面板。

<a4j:commandLink value="#{uiLabel.config_ret}" id = "aaa"

actionListener="#{aging.configureRetention}"                            reRender="cp_tab_form">
<rich:componentControl for="show_alert" attachTo="aaa" operation="show" event="onclick"/>           
</a4j:commandLink>

我正在尝试make operation =“#{bean.cond}”,以便动态的名称动态出现。但是没有用。

我想在bean.cond = false时调用operation = hide and operation = show when bean.cond = true。

我可能会在这里做一些非常愚蠢的事情: - (

2 个答案:

答案 0 :(得分:0)

很抱歉发布它..我没有重新发布commandLink :-(抱歉。

答案 1 :(得分:0)

您还可以查看使用a4j:commandLink的“data”属性来返回bean.cond的值。