4 Replies Latest reply on Jun 21, 2013 6:17 PM by Brian Leathem

    Issue with showing error messages in tool tip

    Jaya S Newbie

      Hi,

       

      We are using Richfaces 4.3.1 for development. We have the following requirement to show validation error and facing some issues.

      1. Show validation errors in pop-up

      2. Highlight the component having error

      3. After closing the pop-up, show the error message in tooltip.

      Is there any component that behaves like error pop-up panel?

       

      We have implemented as follows,

       

      1. Popup panel

      <rich:popupPanel id="messagePanel" modal="true"

      show="#{facesContext.maximumSeverity != null}">

      <rich:messages>

      <rich:message for="userNumber" />

      </rich:messages>

      <f:facet name="controls">

      <h:outputLink value="#"

      onclick="#{rich:component('messagePanel')}.hide(); return false;">

      X

      </h:outputLink>

      </f:facet>

      </rich:popupPanel>

       

      2. Highlighting the component

      Style= #”{not component.valid ? ‘border-color : red;’ : ‘border-color : none;’};”

       

      3. Show message in tool tip

      <rich:tooltip followMouse="false" styleClass="tooltip-custom-body" layout="block">

      <rich:message  for="userNumber" style="color:red;"  />

      </rich:tooltip>

       

      The problem is tooltip is shown always i.e., even before the form is submitted. Is there a way to disable the tool tip when there is no error?

       

      Any suggestion is appreciated.

       

      Thanks!