1 Reply Latest reply on Feb 16, 2010 6:54 PM by superfis

    SEAM @Validator question

    garcimouche

      I have a SEAM component acting as a JSF Validator with the @Validator annotation. However I've got an error when I referenced it through EL. (I have a similar impl. with a converter that's working fine).


      the error


      EntryEdit.xhtml @63,138 validator="#{carrierCodeValidator}": Identity 'carrierCodeValidator' does not reference a MethodExpression instance, returned type: com.xxxxxxx.validator.CarrierCodeValidator



        • 1. Re: SEAM @Validator question
          superfis

          Use in your validator component:


          ...
          @Validator(id="customValidator")
          
          ...
          



          and in xhtml:


          ...
          <h:inputText ... >
            <f:validator validatorId="customValidator" />
          </h:inputText>
          ...
          



          If you want to use the validator directly in <h:inputText ... /> tah just use it like this:


          <h:inputText ... validator="customValidator" />
          



          it shouldn't be used like EL expression