2 Replies Latest reply on Nov 23, 2008 5:15 AM by Ingo Jobling

    s:validateEquality vs. s:decorate (with workaround)

    Ingo Jobling Master

      Using the new <s:validateEquality> in conjunction with <s:decorate> results in the following exception:


      <s:decorate template="/layout/edit.xhtml">
              <ui:define name="label">Password</ui:define>
              <h:inputText id="password" value="#{bean.name}"/>
      </s:decorate>
      
      <s:decorate template="/layout/edit.xhtml">
              <ui:define name="label">Password Verification</ui:define>
              <h:inputText id="passwordVerification" >
              <s:validateEquality for="password" />
              </h:inputText>
      </s:decorate>
      
      



      java.lang.IllegalStateException: forId must reference an EditableValueHolder ("input") component
              at org.jboss.seam.ui.validator.EqualityValidator$OtherComponent.<init>(EqualityValidator.java:168)
              at org.jboss.seam.ui.validator.EqualityValidator.validate(EqualityValidator.java:74)
              at org.richfaces.component.html.HtmlInputText.validateValue(HtmlInputText.java:35)
              at javax.faces.component.UIInput.validate(UIInput.java:867)