9 Replies Latest reply on Aug 21, 2012 6:19 AM by Brendan Healey

    Rich Popup Panel inside a h:form is  posting null values to the server.

    Muruga boopathy Newbie

      Hi ,

        Using Richfaces 4.0 and JSF 2.0  I am trying to display the rich:popup panel inside a form and inside the panel there is  a form with fields and buttons , when i click on the a4j/h:commandButton inside the panel it executes the method added to it but in the server side , the variables which are binded to the fields are giving null , here is my code. if i move the rich:popupPanel outside the <h:form> then it is working as expected , but i have requirement to use the panel inside the form.

       

       

      
      
      <h:form prependId="false">
      
      
      <h:panelGrid columns="2">
      
      
      <h:outputLabel value="Name:" for="nameInput" />
      
      
      <h:inputText id="nameInput" value="#{richBean.formVariable}" />
      
      
      <h:commandButton value="Click Me " action="#{richBean.formAction()}">
      
      
      <a4j:ajax event="keyup" render="output" />
      
      
      </h:commandButton>
      
      
      <a4j:commandLink value="pop me" execute="@this" render="pgAddWrapper" oncomplete="#{rich:component('test')}.show(); return true;"/>
      
      
      
      
      <h:panelGroup id="output">
      
      
      <h:outputText value="Hello #{richBean.formVariable}!"
      
      
      rendered="#{not empty richBean.formVariable}" />
      
      
      </h:panelGroup>
      
      
      </h:panelGrid>
      
      
      
      
      <rich:popupPanel id="test" width="400" height="600">
      
      
      <f:facet name="header">
      
      
      <h:outputText value="Test Popup Panel"/>
      
      
      </f:facet>
      
      
      <f:facet name="controls">
      
      
      <a4j:commandLink
      
      
      execute="@this" 
      
      
      value="X"
      
      
      oncomplete="#{rich:component('test')}.hide(); return false;">
      
      
      </a4j:commandLink>
      
      
      </f:facet>
      
      
      
      
      <h:panelGrid columns="2">
      
      
      <h:outputLabel value="Name:" for="nameInput" />
      
      
      <h:inputText id="panelInput" value="#{richBean.panelVariable}" />
      
      
      <h:commandButton value="Click Me " action="#{richBean.panelAction()}" />
      
      
      </h:panelGrid>
      
      
      
      
      </rich:popupPanel>
      
      
      </h:form>