3 Replies Latest reply on Sep 10, 2010 4:05 AM by ilya_shaikovsky

    Using rich:toolTip in Panel Header

    jjmiller

      I'm having some troubling using a rich:toolTip inside of a panel header.  Using the code below:

       

      <rich:panel>
           <f:facet name="header">
                <h:outputText value="Details for #{user.name} />
                <rich:toolTip>
                     <h:outputLink target="_blank" value="">
                          <h:outputText value="Show this user info" />
                     </h:outputLink>
                </rich:toolTip>         
           </f:facet>

       

      Blah Blah


      </rich:panel>

       

      Ideally, I want the tooltip to only show up when you hover over the header text itself.

       

      If I use the code as shown, then the header facet collapses and the tooltip shows up when you hover anywhere on the entire panel. 

       

      If I remove the rich:toolTip and the code inside it, the header shows up fine.

       

      When I add an ending tag to the outputText tag, and put the rich:toolTip inside of that, the header shows up fine, but there is no tooltip anywhere.

       

      Anyone have any ideas?  Thanks

        • 1. Re: Using rich:toolTip in Panel Header
          jjmiller

          As an FYI, I changed the code to what I have below and it works like a champ now:

           

          <rich:panel>
               <f:facet name="header">
                    <h:outputText id="outputName" value="Details for #{user.name} />         
               </f:facet>
               <rich:toolTip>
                  <h:outputLink for="outputName" target="_blank" value="">
                       <h:outputText value="Show this user info" />
                   </h:outputLink>
               </rich:toolTip>


          Blah Blah


          </rich:panel>

          • 2. Re: Using rich:toolTip in Panel Header
            ilya_shaikovsky

            moving to proper space (RichFaces).. RichFaces development - for RF development and design discussions but not for usage ones.

            • 3. Re: Using rich:toolTip in Panel Header
              ilya_shaikovsky

              Facets in JSF supports only one child component. So defining more than one - wrap them to panelGroup.