4 Replies Latest reply on Sep 3, 2009 10:10 AM by frer

    Customize rich:message to remove component ids

    frer

      Hello,

      I'd like to modify the validation messages in my application in order to not show the component id path to the end user.

      For example when I have a required input, I get the following error message:

      The value is required for 'product-edit-form:product-name-locales:0:product-name-value'


      I have modified my properties file for the following:

      javax.faces.component.UIInput.REQUIRED=The value is required for ''{0}''


      As you can see the error message generated is very helpful for a developer but for a client its gibberish. An appropriate error message would be:

      The value is required for 'Name'


      Is this possible? I looked in the variables {1} {2}... but there is nothing in there. How can I customize my message to be the name of the property and not the component id path?

      Thanks for any help or workaround on this.

      Francois