jsf - richfaces 4.0.0 丰富 :popupPanel not showing

标签 jsf richfaces jsf-2

如何在 richfaces 4 m5 中显示 rich:popupPanel?下一个代码对我不起作用。

<a4j:commandLink value="#{bean.phone}" render="popDiv" execute="@this" >
    <f:setPropertyActionListener target="#{personController.person}" value="#{bean}" />
    <rich:componentControl target="personModalPanel" operation="show" event="onclick" />
</a4j:commandLink>
<rich:popupPanel id="personModalPanel" modal="true" width="200" height="200">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="Edit Person" />
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
                <h:graphicImage value="/resources/img/x.png" styleClass="hidelink" id="hidelink" >
                    <rich:componentControl target="personModalPanel" operation="hide" event="onclick" />
                </h:graphicImage>
            </h:panelGroup>
        </f:facet>
</rich:popupPanel>

最佳答案

在 Richfaces 4 中,您需要编写不带“on”一词的事件名称。所以给定的代码应该适合你。

<a4j:commandLink value="#{bean.phone}" render="popDiv" execute="@this" >
    <f:setPropertyActionListener target="#{personController.person}" value="#{bean}" />
    <rich:componentControl target="personModalPanel" operation="show" event="click" />
</a4j:commandLink>
<rich:popupPanel id="personModalPanel" modal="true" width="200" height="200">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="Edit Person" />
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
                <h:graphicImage value="/resources/img/x.png" styleClass="hidelink" id="hidelink" >
                    <rich:componentControl target="personModalPanel" operation="hide" event="onclick" />
                </h:graphicImage>
            </h:panelGroup>
        </f:facet>
</rich:popupPanel>    

关于jsf - richfaces 4.0.0 丰富 :popupPanel not showing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4823500/

相关文章:

jsf - 如何使用 f :viewParam? 对 GET 请求执行操作

javascript - Primefaces p :datatable - Change {CurrentPageReport}

java - JSF + RichFaces 在我的页面中提供 HTTP 状态 404

java - 使用 JSF 2.0 的用户登录

java - 跳过重新渲染的验证并仅在表单提交时应用

java - RichFaces 中的服务器端数据表排序

java - JSF2 国际化属性文件

sorting - 评估 Richfaces 排序中 Facelets 组件的表达

java - 如何移动/重命名上传的文件?

ajax - jsf 监听器未在嵌套 ui 内调用 :repeat