<p:tooltip> graphic image does not display properly.

UI Components for JSF
Post Reply
burferd
Posts: 234
Joined: 01 May 2010, 16:15

04 Apr 2011, 01:56

Using PF 2.2.1, Glassfish 3.0.1, IE8.

On my main page, when I use
<p:graphicImage value="/resources/Images/CCIDimage.jpg" />
The image displays properly - the size is correct.

However, when I include that same line inside a <p:tooltip> component to display the image as a tool tip, only part of the image is displayed.
The code:

Code: Select all

                    <h:outputLink id="olink" style="position: absolute; top: 825px; left: 275px;" value="#" >
                        <h:outputText value="what's this" />
                    </h:outputLink>
                    <p:tooltip for="olink" targetPosition="topRight" position="bottomLeft"  >
                        <p:graphicImage value="/resources/Images/CCIDimage.jpg" />
                    </p:tooltip>
will only display the left portion of the image - the right portion is truncated.

I tried setting the height and width parameters, but that does not work for the width either.
The height appears to work, but not the width.

Any suggestions?

Thanks.
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

04 Apr 2011, 05:42

Tooltip is really notorious, I faced many strange problems with tooltip. I has situations where I simply removed tooptips.
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

burferd
Posts: 234
Joined: 01 May 2010, 16:15

05 Apr 2011, 17:42

The situation is that I need to display an image when the mouse is over a certain link.

Any other way to do that besides tooltip?
Using PrimeFaces 3.4, Mojarra 2.1.6, Glassfish 3.1.2, NetBerans 7.2, Hibernate 3.2.5 (sometimes)
Windows 7.

FloatOverflow
Posts: 1
Joined: 05 Apr 2014, 20:48

05 Apr 2014, 20:54

I used p:tooltip in this way and the image is not trucated:

Code: Select all

<p:graphicImage id="test" value="#{resource['img/appbar.arrow.left.png']}" title="Test title"/>
<p:tooltip id="toolTip" for="test" value="This is my tooltip" />
You should not enclose the graphic by tooltip.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests