0 Replies Latest reply on May 5, 2011 6:42 PM by Chris Mathrusse

    validation messages for viewParam

    Chris Mathrusse Newbie

      I'm using RichFaces 4.0.0-final and I'm having a small issue with <f:viewParm> tag. I have several request parameters that are required for the page to be rendered. I've defined that each viewParam is required and I've specified the requiredMessage and validatorMessage along with the validator.




        <!-- Organization Alias is required, otherwise we can't continue -->

        <f:viewParam id="org-param" name="org"

        value="#{requestController.organizationAlias}" required="true"

        requiredMessage="#{msgs.error_missing_org}" validatorMessage="#{msgs.error_validate_org}">

        <f:validateLength minimum="3" />


      Everything appears to work very well but I can only get the error message to render if I include the following tag on the page:


      <h:messages errorClass="validation-error-class"/>


      This works as expected except that I want the h:messages defined as globalOnly:

      <h:messages errorClass="validation-error-class" globalOnly="true"/>


      When I make it globalOnly=true, the validation messages from the viewParams are not displayed. And when I have h:messages defined as global then the validation messages on the rest of the page are rendered twice: once next to the component and once at the top of the page in the global space.


      So how can I display my viewParam validation messages when h:messages is defined as globalOnly=true?


      Thanks for the help...