3 Replies Latest reply on Feb 15, 2008 5:08 AM by bm97

    Problem with rich:message

    oyesiji77

      I have an input text and a list Shuttle on a page, whenever i select an item in the listShuttle, it seems the page is submitted and the rich:message component displays "Please enter a value for this field" for the inputText, problem is the rich:message is only supposed to display theis value when the user submits the page and not when i select an item, Please how can i resolve this

        • 1. Re: Problem with rich:message
          ilya_shaikovsky

          code snippet will be helpfull.

          • 2. Re: Problem with rich:message
            oyesiji77

            This is the inputText and message

            <h:inputText size="40" required="true" id="resumeTitle"
             value="#{newApplicant.resumeTitle}"></h:inputText>
             <rich:message for="resumeTitle" id="rm118">
             <f:facet name="passedMarker">
             <h:graphicImage value="/images/passed.gif" id="hgi120" />
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage value="/images/error.gif" id="hgi123" />
             </f:facet>
             </rich:message>
            Its suppose to validate the inputText only when i submit the page and not when i select an item in the listShuttle listed below

            <rich:listShuttle
             sourceValue="#{newApplicant.sourceCategories}"
             targetValue="#{newApplicant.targetCategories}" var="items"
             sourceCaptionLabel="Available Industries"
             targetCaptionLabel="Selected Industries" sourceListWidth="150"
             targetListWidth="150" id="rls295"
             converter="industryListShuttleConverter">
             <rich:column>
             <h:outputText value="#{items.industry}" id="hot297"></h:outputText>
             </rich:column>
            
             <a4j:support event="onlistchanged" reRender="toolBar" />
             </rich:listShuttle>




            • 3. Re: Problem with rich:message

              Remembering the developer documentation the <rich:message> tag has the default attribute "ajaxrendered=true". When interacting with a shuttle component will do an ajax request, the validation in the jsf lifecycle will occur and the messages will be presented.

              Try to restrict the rerender-behaviour with the "limitToList"attribute.