Search code examples
jsfjsf-2richfaces

JSF2 convertNumber on Facelet Composition Component can't read resource bundle


I have the below that tries to validate a users input as Integer and the error text is not displayed. If I don't use a resource bundle (hard code it), it will display. I'm able to use an outputText with a value attribute="#{bundle['INVALID_ENTRY']}" and it displays on the same page. Any ideas?

<h:inputSecret required="true" redisplay="true"
                               converterMessage = "#{bundle['INVALID_ENTRY']}"
                               value = "#{backingBean.code}" maxlength="4">
                    <f:validateLength maximum="4"/>
                    <f:convertNumber integerOnly="true"/>
                    <rich:ajaxValidator event="onblur" />
 </h:inputSecret>

Solution

  • The fix was to load the resource bundle on the facelet composition component as well as the page containing the composition component. The h:inputSecret was a component on a (Facelet composition component) and for some reasone the converterMessage of the inputSecret lost reference to the bundle.