0 Replies Latest reply on Oct 27, 2008 3:46 PM by mykey.asdf.asdf.de

    javax.faces.converter vs. validator

    mykey.asdf.asdf.de

      Hello Folks,


      I am having a hard time with Seam's validation. My EntityBean has an byte property myProperty. To limit its value I annotated it with "@Max(value=99)". But when I enter a value, larger than 99 I get the error message from javax.faces.converter.ByteConverter.BYTE_detail, announcing that the value has to be smaller than 255 (because that's where Byte ends) - but not the validator.max message. So, the validator checks properly for values smaller than 99, but it delivers a wrong error message.


      Is there a certain precedence for the validator calls? I am working with the default Seam messages_*.properties file. Same problem occurs if I use @Range instead of @Max.


      My EntityBean:


      @Range(max=99, min=0)
      private byte myProperty;
      
      getMyProperty(){return this.myProperty; };
      setMyProperty(byte newProperty){ this.myProperty = newProperty; }
      




      My JSF:


      <s:decorate>
          <h:inputText value="#{entityname.myProperty}" />
      </s:decorate>