0 Replies Latest reply on Jan 20, 2008 5:40 AM by Panaya Making ERP Easy

    submitting a form using ajax

    Panaya Making ERP Easy Newbie

      Posted: Thu Jan 17, 2008 12:15 PM Post subject: submitting a form using ajax


      I have a file containing form and submit button. Some of the input fields of the form are required ("required= true").
      if I submit all data (and all is valid) - everthing is great.

      But if I submit partial data, get "validation: field required" error, and then go to another page and go back to the form - the displayed data in the form holds the values I got validation error on, even though this is not the values of the attached managed bean.

      If I change the form and the submit button to non-ajax components, everything works fine.

      does anyone know why?

      <f:subview id="content">
       <a4j:form id="profileForm" ajaxSubmit="false" reRender="profileForm,resultMsg,content:profileForm" >
      <h:inputText id="firstName" value="#{UserManager.userDetailsBean.firstName}" required="true">
       <f:validateLength maximum="25"/>
       <a4j:commandButton action="#{UserManager.changeProfile}" id="changeProfile" type="submit" image="app/images/continue0.gif"
      reRender="internalPanel" />