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

    From Submission

    Yogesh Dabhi Newbie

      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