0 Replies Latest reply on Jun 25, 2011 6:18 AM by ssher

    ajax:command button call action method thrice

    ssher

      Hello

       

      I am using ajax:command button onto which i call clearform methiod to reset form fields this button also reRender other components. problem is that method define in action attribute is call twice or some times thrice. i made many hit and trials but use lesss ....

       

       

      <ajax:commandButton id="btn_reset" value="Reset" ajaxSingle="true" limitToList="true" action="#{orgTreeManager.clearForm}" reRender="panel_crud,txt_msg,btn_save" styleClass="button" />

       

      public void clearForm(){

             

              this.hospitalCode = "";

              this.parentCode = "";

              this.orgCode = "";

              this.orgName = "";

              this.orgAddress = "";

              this.orgDesc = "";

              this.orgPhoneno = "";

              this.orgFax = "";

              this.orgEmail = "";

              this.orgStatus = "";

              this.orgType = "";

              this.message = "";

              this.nodesList.clear();

              this.mode = "";

              this.orgTreeEntity = null;

              this.parentNodeEntity = null;

              this.levelList.clear();       

          }

       

       

      any help is highly appreciated