0 Replies Latest reply on Jan 26, 2012 1:21 AM by Leon Suarez

    s:validateEquality not working!

    Leon Suarez Newbie

      Hello all, I've some problems working with
      s:validateEquality
      in SEAM Reference Guide
      says that is enough use like this:


      <h:inputText id="name" value="#{bean.name}"/> 
      <h:inputText id="nameVerification" > 
        <s:validateEquality for="name" /> 
      </h:inputText>



      I've installed Seam 2.2.2 Final, and is running on Jboss 4.2.2 I've tried with


      <s:decorate id="contrasennaField" template="/layout/edit.xhtml">
              <ui:define name="label">Contraseña</ui:define>
              <h:inputText id="contrasenna"
                      value="#{usuarioHome.instance.contrasenna}">
              </h:inputText>
              <h:inputText id="contrasennaComp">
                      <s:validateEquality for="contrasenna"
                              message="Las contraseñas no coinciden!" />
              </h:inputText>
      </s:decorate>



      and


      <s:decorate id="contrasennaField" template="/layout/edit.xhtml">
              <ui:define name="label">Contraseña</ui:define>
              <h:inputText id="contrasenna"
                      value="#{usuarioHome.instance.contrasenna}">
              </h:inputText>
      </s:decorate>
      <s:decorate id="contrasennaCompField" template="/layout/edit.xhtml">
              <ui:define name="label">Repetir Cont</ui:define>
              <h:inputText id="contrasennaComp">
                      <a:support event="onblur" reRender="contrasennaCompField"
                              bypassUpdates="true" ajaxSingle="true" />
                      <s:validateEquality for=":#{rich:clientId('contrasenna')}"
                              message="Las contraseñas no coinciden!" />
              </h:inputText>
      </s:decorate>



      and finnaly


      <s:decorate id="contrasennaField" template="/layout/edit.xhtml">
              <ui:define name="label">Contraseña</ui:define>
              <h:inputText id="contrasenna"
                      value="#{usuarioHome.instance.contrasenna}">
              </h:inputText>
      </s:decorate>
      <s:decorate id="contrasennaCompField" template="/layout/edit.xhtml">
              <ui:define name="label">Repetir Cont</ui:define>
              <h:inputText id="contrasennaComp" value="#{usuarioHome.compContr}">
                      <a:support event="onblur" reRender="contrasennaCompField"
                              bypassUpdates="true" ajaxSingle="true" />
                      <s:validateEquality for=":#{rich:clientId('contrasenna')}"
                              message="Las contraseñas no coinciden!" />
              </h:inputText>
      </s:decorate>



      but I've to add compContr to my usuario home, and always says that the field doesn't match!
      I can do it by my count , but the idea is use what seams provide.. so I really wish it could work as supose to be!


      If anybody else had got this working please post some help!