2012-04-13 111 views
0

我遇到了一个问题,例如,当呈现弹出面板的回调窗口或页面的调用已经被渲染。我们如何停止渲染后窗。另请注意,我正在使用Jsf 2.0和Richfaces 4.0。如何防止渲染或显示弹出窗口时渲染后窗?

<h:form> 
<rich:panel id="propertyPanel"> 

<rich:messages id="propertyFormMsg"></rich:messages> 

<a4j:commandLink 
       action="#{addPropertyBean.createPropertyPreAction}" 
       title="Add New Property" 
       oncomplete="#{rich:component('savePropertyPopUp')}.show()" 
       render="propertyPopUpOutPutPanel" 
       > 
       <a4j:param 
       assignTo="#{addPropertyBean.selectedPropertyId}" 
       value="#{addPropertyBean.selectedPropertyId}"></a4j:param> 
       <h:graphicImage styleClass="imageLink" library="images" 
       name="add.png" /> 
</a4j:commandLink> 

</rich:panel> 
</h:form> 

这里是我的弹出面板:

<rich:popupPanel id="savePropertyOfferPopUp" modal="false" 
    resizeable="true" height="430" width="800"> 

    <f:facet name="header"> 
     <h:outputText value="Save Property " /> 
    </f:facet> 
    <f:facet name="controls"> 
     <h:outputLink value="#" 
     onclick="#{rich:component('savePropertyPopUp')}.hide()"> 
       <h:graphicImage styleClass="noImageBorder" library="images" width="16" height="16" name="close.png" title="close" /> 
     </h:outputLink> 
    </f:facet> 

    <h:form id="propertyPopUpForm"> 
............ 
</h:form> 
</rich:popupPanel> 

的人谁可以帮助我非常感谢......

回答

1

在A4J:commandLink,显示弹出窗口,添加属性:limitRender =“true”。这会将渲染限制为仅在render =“xxxx”列表中指定的元素。

+0

谢谢你的答案。 – 2012-04-13 20:03:53

1

使用onclick="#{rich:component('savePropertyPopUp')}.hide();return false;">里面的富人:popup

+0

,这有助于....感谢您的答案 – 2013-03-04 05:46:54