2

I am using gwtbootstrap3 Version: 0.9.4 in a gwt project. I want to use the bootstraps tooltip for the navigation bar symbols.

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui">...

If I wrap the Tooltip around an Anchor in an ui.xml file of its corresponding Java Class, it works fine:

<b:Tooltip ui:field="someName" text="TEST">
    <g:Anchor ui:field="someOtherName">someText</g:Anchor>
</b:Tooltip>

But now comes the problem: If I want to wrap an Anchor which contains another element like a span, the Tooltips text is not displayed anymore (by hover) when running the project. In fact, no tooltip appears at all for this icon. But the project still compiles and runs.

<b:Tooltip text="TEST">
    <g:Anchor ui:field="someName">
        <span class="glyphicon glyphicon-someglyph white" aria-hidden="true"></span>
        <span class="white">someText</span>
    </g:Anchor>
</b:Tooltip>

I read the documentation from the Tooltip class: https://gwtbootstrap3.github.io/gwtbootstrap3-demo/apidocs/org/gwtbootstrap3/client/ui/Tooltip.html

but as far as I saw it is not explicitly said that Tooltip allows only one element inside, so does anyone now how to solve this?

Thanks!

Johannes Krämer
  • 317
  • 1
  • 3
  • 13
  • Your code works for me... i can see the Tooltip. – Raz Zelinger Apr 30 '17 at 07:27
  • thanks for the answer. that's strange because for me it didn't work, but I figured another way to solve this by using the internal NavbarButton from gwtbootstrap3 which can easily be wrapped by a Tooltip widget! With the NavbarButton you don't need the spans inside because it has integrated enum Icons (glyphs) which can chosen – Johannes Krämer Apr 30 '17 at 21:39

0 Answers0