1 Reply Latest reply on Feb 11, 2008 5:33 AM by shooali

    modalPanel + region +rendering

    shooali Newbie


      I have the following problem:

      I have a page that has a modalPanel defined in it, outside of the page form. in the modal panel content I use a4j:include to include another xhtml that contains the modalpanel content. in the modal panel xhtml, there is another form, which inside of it I use a4j:support to catch an 'onclick' event and to reRender another component on that same modalpanel xhtml.

      the problem is that whatever I do, the a4j/richfaces components on the main page gets reRendered as well. putting a4j:region selfRendered=false and/or a4j:outputPanel ajaxRendered=flase on the main page, and/or limitToList=true on the a4j:support on the modalPanel page, does not help.

      What am I missing?

      I am using rich3.1.2GA, myfaces 1.2 and facelets 1.1.13.

      please find attached a code example

      main page:

       <rich:modalPanel id="modalPanel" width="400" height="300">
       <f:facet name="header"><h:outputText value="Modal Panel"/></f:facet>
       <f:facet name="controls">
       <a href="#" style="cursor:pointer" onclick="Richfaces.hideModalPanel('modalPanel')">X</a>
       <a4j:outputPanel ajaxRendered="false">
       <a4j:include viewId="modalPanel.xhtml"/>
       value="open modal panel"
       <a4j:outputPanel ajaxRendered="false">
       <a4j:repeat value="#{mainBean.items}" var="item">
       <h:outputText value="#{item}"/>

       <a4j:form id="mp_form">
       <h:outputText value="hello">
       <a4j:support event="onclick" reRender="description" onsubmit="alert('onsubmit')" limitToList="true"/>

      clicking the hello text will result in creating a new instance of the mainBean and the getItems property called.