8 Replies Latest reply on Nov 21, 2011 3:19 AM by yinbr

    richfaces 4 rich:message as icon with tooltip

    Frederic Gerber Newbie

      In Richfaces 3 we used this facelet composition to display a message as icon with a tooltip for the message text

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:rich="http://richfaces.org/rich">
      
          <rich:message id="${id}" for="${for}" showDetail="false" showSummary="false"
                  tooltip="true">
                  <f:facet name="errorMarker">
                      <h:graphicImage id="${id}-error-img"
                          value="icons/error.gif">
                          <rich:toolTip for="${id}-error-img" followMouse="false">
                              <rich:message for="${for}" showDetail="true" />
                          </rich:toolTip>
                      </h:graphicImage>
                  </f:facet>
                  <f:facet name="warnMarker">
                      <h:graphicImage id="${id}-warning-img"
                          value="icons/warning.png">
                          <rich:toolTip for="${id}-warning-img" followMouse="false">
                              <rich:message for="${for}" showDetail="true" />
                          </rich:toolTip>
                      </h:graphicImage>
                  </f:facet>
                  <f:facet name="infoMarker">
                      <h:graphicImage id="${id}-info-img"
                          value="icons/info.png">
                          <rich:toolTip for="${id}-info-img" followMouse="false">
                              <rich:message for="${for}" showDetail="true" />
                          </rich:toolTip>
                      </h:graphicImage>
                  </f:facet>
              </rich:message>
      
      </ui:composition>
      

       

      Does anyone knows something similar that works for Richfaces 4?