2 Replies Latest reply on Apr 12, 2010 9:19 AM by lillith

    rich:modalPanel problem

    lillith

      Hello,

       

      I've got a problem when a rich:modalPanel invokes another rich:modalPanel. The latter has a textfield which sets a value on a property and on closing the second rich:modalPanel, the value should be displayed on the first rich:modalPanel. But this value is never set. This is the code for the second rich:modalPanel

       

      <rich:modalPanel id="panelNewCommunication" width="350"
                  height="150" resizeable="false" moveable="false">
                  <f:facet name="header">
                      <h:outputText value="Communication" />
                  </f:facet>

                  <h:panelGrid columns="2">

                      <h:panelGrid>
                          <h:outputText value="*Value" />
                          <h:inputText id="valueOfNewComm" value="#{mBTest.newComm}"></h:inputText>
                          <h:outputText value="*Communication Kind" />
                          <rich:comboBox defaultLabel="Choice..." enableManualInput="false">
                              <f:selectItems value="#{mBTest.communicationKind}" />
                          </rich:comboBox>
                      </h:panelGrid>
                      <h:panelGrid>
                          <h:outputText value="*Communication Type" />
                          <rich:comboBox defaultLabel="Choice..." width="150">
                              <f:selectItems value="#{mBTest.communicationType}" />
                          </rich:comboBox>
                          <h:panelGroup>
                              <h:selectBooleanCheckbox value="#{mBTest.default}" />
                              <h:outputText value="By default />
                          </h:panelGroup>
                      </h:panelGrid>
                  </h:panelGrid>
                  <h:panelGroup>
                      <a4j:commandButton value="Add" id="addNewCommunication"
                          action="#{mBTest.addNewCommunication}" reRender="tableContacts">
                          <rich:componentControl for="panelNewCommunication"
                              attachTo="addNewCommunication" operation="hide" event="onclick" />
                          <a4j:keepAlive beanName="mBTest" />
                      </a4j:commandButton>
                      <h:commandButton value="Cancel" />
                  </h:panelGroup>
              </rich:modalPanel>

       

      Currently I am using rich 3.3.3

        • 1. Re: rich:modalPanel problem
          ilya_shaikovsky

          1) please read about form's and modal panels limitation in development reference. (to cut story short - by default form should be inside the modal instead of wrapping it)

          2) I believe just oncomplete of button could be used instead of

                           <rich:componentControl for="panelNewCommunication"
                                  attachTo="addNewCommunication" operation="hide" event="onclick" />

          3) this

                       <h:commandButton value="Cancel" />

          would cause full page reload.

          1 of 1 people found this helpful
          • 2. Re: rich:modalPanel problem
            lillith

            Thank you so very much for the helpfull tips