1 Reply Latest reply on Dec 30, 2010 12:51 AM by ravinandan

    messages disappear when tooltip via ajax mode is displayed

    ravinandan

      Hello All,

      This is my firt post in this forum.

      I had initially posted this question in seam forum and later realised this is more of richfaces question.

      Am currently working on a small project based on seam 2.2.

      Sorry for lengthy explanation. But here is the problem.

       

      I'm using tooltip with ajax mode to show dynamic help based on user input.

      But this is creating problem for rich messages. The error messages disappear whenever the user mouseover the tooltip enabled control.

      Using h:messages seems to resolve the issue but am losing all the good stuff that comes with rich message like error icons.

      Also am not able to use limitToList attribute for rich:toolTip.

      Also tried ajaxRendered="false" on rich:messages. No luck again.

      Also implemented (seam)phase listener by following this guide.

      http://ocpsoft.com/java/persist-and-pass-facesmessages-over-page-redirects/

      But again got into another issue where  facesContext.getMessages(null) was returning empty list eventhough faces messages were added correctly.

       

      Any help/suggestion/pointer to solution is greately appreciated.

       

      My code:

      Inside template.xhtml

      <rich:messages globalOnly="true" labelClass="message" id="globalMessage" ajaxRendered="false">
                  <f:facet name="infoMarker">
                      <h:graphicImage url="/img/messageOk.gif" />
                  </f:facet>
                  <f:facet name="warnMarker">
                      <h:graphicImage url="/img/messageWarning.gif" />
                  </f:facet>
                  <f:facet name="errorMarker">
                      <h:graphicImage url="/img/messageError.gif" />
                  </f:facet>
      </rich:messages>

       

      Inside my.xhtml

      <h:graphicImage value="/img/conInfo.gif" id="raillengthtip" />
      <rich:toolTip direction="top-right" mode="ajax"
                                  styleClass="tooltip" showDelay="500" layout="block"
                                  for="raillengthtip">                           
                                  <span style="white-space: nowrap"> Rail length:<br />
                                  </span>
                                  <h:panelGrid columns="1">
                                      <rich:dataList
                                          value="#{railModelManager.railDesignToolTip.railLengthTooltip}"
                                          var="railLength">
                                          <h:outputText style="white-space:nowrap" value="#{railLength}"></h:outputText>
                                      </rich:dataList>
                                  </h:panelGrid>
      </rich:toolTip>

       

       

      Thanks,

      Ravi