1 Reply Latest reply on Oct 26, 2017 9:35 PM by anijhawa

    I a have a probleme with jboss (wildfly 10) with jsf ajax

    naelslug

      Hi

      I a have a probleme with jboss (wildfly 10) with this code

      the call ajax never return success ?
      the ajax return the state 'begin' and 'complete' but never 'success' ?
      i think the DOM is not updated with JBOSS

       

      On WEBLOGIC , this code works , the ajax return state  'begin', 'complete' and 'success' and the DOM is updated
      i don't understand why with JBOSS  the ajax not completelly succesfully ? the status code is 200 OK 

       

       

      //JSF
      <h:form id="aForm" >
      <h:inputHidden id="idShowPopup" value="#{aBean.showPopupConfirm}" />
      <h:commandButton id="validerdDecaissement" value="Validate"  onclick="validateForm();return false;">
      </h:commandButton>

      <h:commandLink id="validatorFormLink" value="" >
        <f:ajax render="idShowPopup" onevent="handleAjaxValidatorForm" listener="#{decaissementController.validateSubmitDecaissement}" execute="@form" />
      </h:commandLink>
      </h:form>

      //JS
      function validateForm() {
        document.getElementById('aForm:validatorFomrLink').click();
      }

      function handleAjaxValidatorForm(data) {
      var status = data.status;

      switch(status){
      case "begin": 
        alert('begin');
        break;
      case "complete": 
        alert('complete');
        break;
      case "success":
        alert('success');
        break;
      }
      }

       

      best regards