0 Replies Latest reply on Nov 23, 2011 6:14 PM by Márcio Kabke Pinheiro

    Questions about the <rich:messages> component in Richfaces 4.0.0

    Márcio Kabke Pinheiro Newbie

      Hi, everyone. New member in the group here. (and sorry for the bad english, I'm from Brazil)


      The <rich:messages> component was deeply modified in Richfaces 4.0.0, in comparison to the 3.3.x version - a bunch of attributes were sacked, especially some that were used in a custom component that we use here in our company, as the classes for severities (errorClass, fatalClass, infoClass, etc) and the possibility to use <f:facet> to define markers, as far as I understood.


      I've understood some of the reasons for the changes after reading this document (https://issues.jboss.org/browse/RFPL-1123). The classes for severities now are mapped through CSS, but we used a button to close the message as a marker, through <f:fact>. With some code it could be easier to understand:


      <div id="message">

      <rich:messages id="messages" globalOnly="true" errorClass="messages

                alert" fatalClass="messages alert" infoClass="messages success"

                warnClass="warnMessage" showSummary="true" showDetail="false">

           <f:facet name="errorMarker">

                <input type="button" class="alertClose closedMessages" value="" />


           <f:facet name="fatalMarker">

                <input type="button" class="alertClose closedMessages" value="" />


           <f:facet name="infoMarker">

                <input type="button" class="successClose closedMessages" value="" />


           <f:facet name="warnMarker">

                <input type="button" class="alertClose closedMessages" value="" />





      With CSS and the code above, the result was messages like these:


      where the "X"s were clickable markers buttons that closes the message (the markers on the left were just background images).


      I've realized how to make all the changes overridding the .rf-msgs-* classes, but don't know how to solve the "marker button" issue. Any ideas?


      And how works the newer facets and attributes attributes?


      (suggestion: an article explaining the modifications in the <rich:messages> component could be useful for other people in the future)


      Thanks in advance for any help!