4 Replies Latest reply on Dec 8, 2007 3:07 AM by djo.mos

    ModalPanel with user input

      I have a modal panel that contains a inputText element where the user needs to enter a name. After this name is received a call is made to load a pane using an ajax call. I have tried setting this inputText elements value in a backing bean with a session scope. But once the new page loads using ajax, I can't see that backing bean value. It just doesn't exist. Is there a way to set this variable so that I can access it in the pane that is loaded via ajax. I apologize if this is a trivial question, I am fairly new to Richfaces and JSF. Thanks

        • 1. Re: ModalPanel with user input

          Hard to tell something without looking at the code. May be it is something like http://labs.jboss.com/wiki/RichFacesTwoInputText problem

          • 2. Re: ModalPanel with user input

            Sorry about this, it was just a problem with netbeans interacting with glassfish. It wasn't redeploying correctly. I created a project from scratch and it worked fine.

            • 3. Re: ModalPanel with user input

              Actually. I am still having a problem. I cant get a bean property to set after I hide the modal dialog. Here is the code for what I am doing with the ModalPanel.

              <rich:modalPanel id="mp" minHeight="130" minWidth="250"
              height="130" width="300" zindex="2000">

              <f:facet name="header">
              <h:outputText value="Enter A Mode Name" />
              </f:facet>


              <h:outputText value="Enter a name" />
              <h:inputText id="defmodename" style="width:98%;" value="#{DeviceInfoBean.modeName}"/>
              <a4j:commandButton id="submit" onclick="hideModal();" value="OK" />

              </rich:modalPanel>

              I have tried enclosing the inputText and button in a form but still no luck. What happens is that the hideModal() closes the dialog and then loads a pane in the page using ajax. I just cant get the bean property to follow to that page, or any page for that matter. I assume I am just missing something here

              • 4. Re: ModalPanel with user input
                djo.mos

                Hi,
                First of all, yes, you should definitely put your inputText and commandButton in a form inside the modalPane.
                Then, in the abscence of the hideModal() code, one may ask : IS your form actually getting submitted ? I mean, output a message in the modeName setter to check this up.