0 Replies Latest reply on Jan 8, 2008 2:36 PM by Deibys Quintero

    Submittng AJAX form and displaying validations

    Deibys Quintero Newbie

      Hello guys,
      I am stuck in some code, and I have tried several things. I hope someone knows the trick

      I want to submit an form through AJAX.....that is fine...but when so....validations messages are not submitted , instead I get the following in the log

      14:20:28,593 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=j_id_jsp_1029581384_11:createUserForm:username[severity=(ERROR 2), summary=(j_id_jsp_1029581384_11:createUserForm:username: Error de Validación: Valor es necesario.), detail=(j_id_jsp_1029581384_11:createUserForm:username: Error de Validación: Valor es necesario.)]
      sourceId=j_id_jsp_1029581384_11:createUserForm:password2[severity=(ERROR 2), summary=(j_id_jsp_1029581384_11:createUserForm:password2: Error de Validación: Valor es necesario.), detail=(j_id_jsp_1029581384_11:createUserForm:password2: Error de Validación: Valor es necesario.)]
      sourceId=j_id_jsp_1029581384_11:createUserForm:password1[severity=(ERROR 2), summary=(j_id_jsp_1029581384_11:createUserForm:password1: Error de Validación: Valor es necesario.), detail=(j_id_jsp_1029581384_11:createUserForm:password1: Error de Validación: Valor es necesario.)]
      


      My form is :

      <a4j:form ajaxSubmit="true" reRender="messages2" id="createUserForm" >
       <a4j:outputPanel ajaxRendered="true">
       <h:messages />
       </a4j:outputPanel>
       <h:panelGrid columns="2" cellspacing="5" >
       <h:outputLabel value="Usuario" for="username" />
       <h:inputText id="username" required="true" value="#{CreateUserBean.userName}" />
       <h:outputLabel value="Contraseña" for="password1" />
       <h:inputSecret id="password1" required="true" value="#{CreateUserBean.password1}" />
       <h:outputLabel value="Confirmar Contraseña" for="password2" />
       <h:inputSecret id="password2" required="true" value="#{CreateUserBean.password2}" />
       <h:outputLabel value="Estado" for="status" />
       <h:selectOneMenu value="#{CreateUserBean.status}" id="status">
       <f:selectItem itemLabel="Activo" itemValue="A" />
       <f:selectItem itemLabel="Inactivo" itemValue="I" />
       </h:selectOneMenu>
       <h:outputLabel value="Fecha Inicio" for="start_date" />
       <rich:calendar id="start_date" datePattern="yyyy-MM -dd HH:mm" value="#{CreateUserBean.startDate}" />
       <h:outputLabel value="Fecha Expiracion" for="expire_date" />
       <rich:calendar id="expire_date" datePattern="yyyy-MM-dd HH:mm" value="#{CreateUserBean.expireDate}" />
      
       <h:commandButton value="Crear Usuario" action="#{CreateUserBean.create}" />
       </h:panelGrid>
      </a4j:form>