6 Replies Latest reply on Dec 20, 2008 4:38 AM by ilya_shaikovsky

    From Submission

    yogesh_dabhi

      I have to try to submit form but value was not submited

      for that i use <rich:modalPanel >

      jsp code

      <rich:modalPanel id="ModalPanel" moveable="true" binding="#{backingBean.addModal}">
      
      <f:facet name="header">
      <h:outputText value="Selected Rows"/>
      </f:facet>
      <f:facet name="controls">
      <h:commandButton value="Close" actionListener="#{backingBean.hideaddModal}" onclick="javascript:Richfaces.hideModalPanel(ModalPanel)"/>
      </f:facet>
      
      <h:panelGroup styleClass="scrolls" id="panelgroup">
      <rich:panel id="newpanel">
      
      ..........
      <h:inputText id="id" value="#{backingBean.newItem.id}" />
      ..........
      
      <a4j:commandButton value="#{msg.ok}"
      action="#{backingBean.createItem}" type="button" oncomplete="javascript:Richfaces.hideModalPanel(ModalPanel)" />
      
      </rich:panel>
      </h:panelGroup>
      
      </rich:modalPanel>
      
      
      BackingBean.java code
      
      
      public class BackingBean {
      
       private UIModalPanel addModal;
       private Item newItem= new Item();
      
      public Item getNewItem() {
       return newItem;
       }
      
       public void setNewItem(Item newItem) {
       this.newItem= newItem;
       }
      
       public UIModalPanel getAddModal() {
       return vpnAddModal;
       }
      
       public void setAddModal(UIModalPanel addModal) {
       this.addModal = addModal;
       }
      
       public String createVpn() {
      System.out.println(" get create ++++++++++++++++++++++++++");
      System.out.println("ctreate vpn"+newItem.getId() );
       }
      
      
      
      }
      
      Item.java code
      
      public class Item {
      
      
      private String id = "";
      
       public VPN() {}
      
      public String getId() {
       System.out.println("set ssid"+id);
       return ssid;
      
       }
      
       public void setId(String id) {
      
       this.id = id;
       System.out.println("set ssid"+this.id);
       }
      
      
      }
      
      
      
      


      but out is null for id when i submit button

      so please help me out
      as quick as possible

      Regards
      Yogesh N Dabhi

        • 1. Re: From Submission
          liuliu

          there is a form in your modalpanel?

          • 2. Re: From Submission
            yogesh_dabhi

            yes

            • 3. Re: From Submission
              ilya_shaikovsky

              you sure that there are no external forms? (nested forms not allowed)

              • 4. Re: From Submission
                yogesh_dabhi

                one form is use in login page
                and one form in admin page used


                <navigation-rule>
                <from-view-id>/index.jsp</from-view-id>
                <navigation-case>
                <from-action>#{backingBean.validUser</from-action>
                <from-outcome>adminsuccess</from-outcome>
                <to-view-id>/console-new/view/admin.jsp</to-view-id>
                </navigation-case>
                <navigation-case>
                <from-action>#{data.controller.validUser}</from-action>
                <from-outcome>failure</from-outcome>
                <to-view-id>/index.jsp</to-view-id>
                </navigation-case>

                </navigation-rule>

                • 5. Re: From Submission
                  yogesh_dabhi

                  <navigation-rule>
                  <from-view-id>/index.jsp</from-view-id>
                  <navigation-case>
                  <from-action>#{backingBean.validUser}</from-action>
                  <from-outcome>adminsuccess</from-outcome>
                  <to-view-id>/console-new/view/admin.jsp</to-view-id>
                  </navigation-case>
                  <navigation-case>
                  <from-action>#{backingBean.validUser}</from-action>
                  <from-outcome>failure</from-outcome>
                  <to-view-id>/index.jsp</to-view-id>
                  </navigation-case>
                  </navigation-rule>

                  • 6. Re: From Submission
                    ilya_shaikovsky

                    1) I can't see the form in your initial snippet. Please update the thread with actual code.
                    2) you sure that there are no messages during request?
                    3) you did not answered you checked that your forms (at main view and inside modal panel) not nested?