1 Reply Latest reply on May 9, 2008 1:12 PM by Jason Long

    rich:message with tooltip example

    Mark French Newbie

      Hi,

      I was wondering if anybody has got tooltips working with the message tag. Basically I need to display and error icon and when the user hovers over it the details are displayed in a tooltip. Is this possible?

      Cheers

      Mark

        • 1. Re: rich:message with tooltip example
          Jason Long Master

          I use the following. <t:buffer> is the only tomahawk component I am still using.

          Is there and EL what to tell if there is a message for a component?

          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:t="http://myfaces.apache.org/tomahawk"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:rich="http://richfaces.org/rich"
           xmlns:a4j="http://richfaces.org/a4j">
          
           <t:buffer into="#{errorFieldMessage}"><h:message for="#{id}" /></t:buffer>
          
           <h:inputText id="#{id}"
           value="#{value}"
           class="#{width} #{(! empty errorFieldMessage) ? 'redbg' : ''}"
           rendered="#{editable}">
           <rich:toolTip styleClass="w150 wrap" followMouse="true" rendered="#{! empty errorFieldMessage}"><h:message for="#{id}" /></rich:toolTip>
           </h:inputText>
          
           <h:outputText value="#{value}" rendered="#{!editable}">
           <f:converter converterId="#{formatter}" />
           </h:outputText>
          
          </ui:composition>