1 Reply Latest reply on Jan 5, 2012 6:33 PM by Brendan Healey

    RF4 - Ajax doesn't fire inside of a rich:popupPanel

    Mark Robinson Newbie

      I have a RF4 page with an input text set to fire when a user changes the data.  Problem is, it won't fire inside the popupPanel.  If I remove it from the popupPanel it works fine.

       

      Am I doing this correctly inside a popupPanel?

       

       

          
      
          
      <rich:popupPanel id="issueReportPopUp" autosized="true" moveable="true">
            
      <f:facet name="header">
              
      <h:outputText value="Report an Issue"/>
            
      </f:facet>
      
        
            
      <h:panelGrid id="mygrid" columns="2">
            
      
              
      <h:outputLabel value="Summary"/>
              
      <h:inputText id="summary" value="#{IssueRow.shortDesc}">
                
      <a4j:ajax event="change" render="shotDescOut" execute="shotDescOut"  />
              
      </h:inputText>
              
      
              
      <h:outputLabel value="Summary"/>
              
      <h:outputText id="shotDescOut" value="#{IssueRow.shortDesc}" />
              
      
            
      </h:panelGrid>
      
        
          
      </rich:popupPanel>
      
      
        • 1. Re: RF4 - Ajax doesn't fire inside of a rich:popupPanel
          Brendan Healey Master

          The problem is that your popupPanel content needs to be inside a form. Whilst you may have nested

          the popupPanel inside a form, it gets moved in the DOM to be a child of the body, and hence isn't in

          a form anymore, and ajax won't work. This is done to allow the dialog to be positioned relative to the

          viewport, due to certain CSS features.

           

          To work around this use a construct like this:

           

          <rich:popupPanel>

            <h:form>

            </h:form>

          </rich:popupPanel>

           

          or you can take a look at <rich:popupPanel domElementAttachment="form or parent"> (one or the

          other) which should prevent the dialog content being relocated in the DOM (read the documentation for

          restrictions with this approach).

           

          Regards,

          Brendan.