4 Replies Latest reply on Jan 21, 2008 10:52 PM by Matt Schrader

    rich:message/rich:messages

    Matt Schrader Newbie

      I am seeing an issue where the message bundle I load is not being used for my rich:messages for inputText. Below is snippets of the tags I am working with.

      <rich:panel style="border-style: none;">
      <a4j:form id="homeownerInsuranceQuoteForm">
      <a4j:loadBundle basename="web.forwardspin.ddr.bundle.messages" var="msg"/>
      <h:inputHidden value="#{ApartmentBuildingInsuranceQuoteFace.quoteName}" />
      <rich:messages ajaxRendered="true" showDetail="true" />
      <t:panelGrid columns="2" columnClasses="formHeader,formField" >
      <t:panelGroup>
      <h:outputLabel for="firstName" value="#{msg.firstName}" />
      <h:outputText value=": " />
      </t:panelGroup>
      <t:panelGroup>
      <h:inputText id="firstName" value="#{ApartmentBuildingInsuranceQuoteFace.quoteForm.personForm.firstName}" maxlength="50" required="true">
      <a4j:support event="onblur" reRender="homeownerInsuranceQuoteForm:firstName"/>
      </h:inputText>
      <rich:message for="firstName" tooltip="true" showSummary="false" showDetail="false" ajaxRendered="true">
      <f:facet name="passedMarker">
      <h:graphicImage value="/IMAGES/passed.gif" />
      </f:facet>
      <f:facet name="errorMarker">
      <h:graphicImage value="/IMAGES/error.gif" />
      </f:facet>
      </rich:message>
      </t:panelGroup>
      </t:panelGrid>
      </a4j:form>
      </rich:panel>

        • 1. Re: rich:message/rich:messages
          Matt Schrader Newbie

          I am also seeing a different problem with a4j:support in that tag. I have middle initial and last name tags below the given first name that I posted, when I leave the first name it should only rerender the first name inputText, but it rerenders all 3.

          Any ideas for either of these problems?

          • 2. Re: rich:message/rich:messages
            Matt Schrader Newbie

            By the way, the labels work fine when just using f:loadBundle, but I want ajax support on my pages.

            • 3. Re: rich:message/rich:messages
              Sergey Smirnov Master

              rich:messages tag, as well as h:messages tag, takes the messages from bundle registered in the faces-config.xml. Why you expect loadBundle should work ?

              • 4. Re: rich:message/rich:messages
                Matt Schrader Newbie

                Thank you for responding! Maybe I do not completely understand your comments. My understanding is the messages bundle needs to be configured in faces config as well as loaded on each page. In my faces config I have:


                <locale-config>
                <default-locale>en_US</default-locale>
                <supported-locale>en_US</supported-locale>
                </locale-config>
                <message-bundle>
                web.forwardspin.ddr.bundle.messages
                </message-bundle>


                Then on each face I have:
                <a4j:loadBundle basename="web.forwardspin.ddr.bundle.messages" var="msg" />

                So I can do:
                <h:outputLabel for="firstName" value="#{msg.firstName}" />

                The label shows First Name. But when I validate the page I see:
                "firstName": Value is required. Validation Error