4 Replies Latest reply on Nov 29, 2006 10:13 AM by Yogesh

    JSF requiredMessage does not work with seam bundle

    Yogesh Novice

      Hello,
      I have to input a "required" field in a JSF form. As such i am using the following code in my XHTML file.

      <h:form>
      <h:inputText
       value="#{userEditorBean.user.displayName}"
       required="true"
       requiredMessage="#{messages.RequiredUserName}"
      />
      
      <h:commandButton value="Add" action="#{userEditorBean.addUser}"/>
      </h:form>
      
      


      However, when nothing is entered in the input textbox and the form is submitted, the desired error message from the seam resource bundle is not displayed. Instead the message "Validation Error" is displayed !!

      Can anyone suggest where i am wrong and how to fix this. I was previously using <f:loadBundle> and i was told to try this with Seam Resource Bundle but it still fails!!

      Regards,
      Yogesh