Page 1 of 1

Tooltip not displaying near component

Posted: 28 Jan 2011, 20:48
by WolinDesign
I'm trying to use non-global tooltips. My page is using a template, and displays two <ui:define> sections. The tooltip is in the top/first <ui:define> section. This section contains a toolbar which itself contains a commandButton/arrow. I want the tooltip to appear next to the arrow/button. It appears an inch or so below the button, and at least two inches to the right. Is there a fix for this?

Code: Select all

<ui:define name="main_base_content_top">
                <h:form>
                    <p:toolbar>
                        <p:toolbarGroup align="left">
                            <h:commandButton id="nav_arrow_back" image="/resources/images/arrow_left_24x24.png" value="Return to Report Main Selection" action="report_main_selection?faces-redirect=true" />
                        </p:toolbarGroup>

                        <p:toolbarGroup align="right">
                            <h:outputLabel value="#{userListReportInputPageBean.toolbarDescription}" />&nbsp;&nbsp;
                        </p:toolbarGroup>
                    </p:toolbar>
                    <p:tooltip for="nav_arrow_back" value="Return to Report Main Selection" />
                </h:form>
            </ui:define>

Re: Tooltip not displaying near component

Posted: 07 Feb 2011, 21:30
by bitec
The same thing for me. Using PF 2.2. Only global tooltip displays at the correct position

Re: Tooltip not displaying near component

Posted: 07 Feb 2011, 21:33
by WolinDesign
That's what I realized. Then I took out the <p:tooltip> component, and realized that the browser was displaying a tooltip using the individual components' title attribute. I don't know if that is why the non-global tooltip has issues, but it works the same so I'll use it.