1 Reply Latest reply on Feb 25, 2006 1:45 PM by Andrew

    @Valid and t:messages...

    Andrew Apprentice

      t:messages (the messages tomahawk component) has the functionality to render the summary with the label for description by replacing the component's id in the message summary with the label name. What I have noticed is that the validation interceptor tag doesn't add the component ID to the message. Since the component is not part of the validator properties, I can't add it to the message either using the bundle.

      So, if possible, can the functionality be added to the interceptor to add the component id to the valid message?


      <t:messages />
      <t:outputLabel value="Testing" for="testInput" />
      <t:intputText id="testInput" value="#{mybean.prop}" />
      public class MyBean
      public String getProp() {}

      This results in "length must be between 4 and 25" in the t:messages. Normally, JSF would print something like "testInput: length must be between 4 and 25" and t:messages would print "Testing: length must be between 4 and 25". This way the user knows which component a message in the global messages is for. I could fake this by putting a custom message on every validated property that contains the property name, but then I can't change it in the XHTML.