• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to use tooltip in Struts2

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I want to use tooltip functionality with anchor tag so that when user hovers over the link it will popup saml box with description of that link. I tried following but I am not much familiar with tooltip concept.



Any sample code or help in this matter is really appreciated.

Thank you,
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
- Which version of Struts 2? Tooltips have changed over time.
- Do you have the <s:head/> tag in the <head> of your document? You need it.
- Are you getting any JavaScript errors? Have you checked using a tool like Firebug?
- Are you saying what you're doing doesn't work? If so, what specifically doesn't work?
 
abi chitnis
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am really not familiar with the concept of tooltip, so please excuse my ignorance. Following is the jsp I have and when I move the mouse over link I do not see any tooltip or popup. I am using struts2.1.6 and do not have <s:head> tag. What do I need to put it in <s:/head> tag?

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My mistake; you don't (strictly) need the <s:head/> tag; the tooltip JavaScript include is emitted by the closing form tag.

Looking through the form tag templates it looks like there's a property "jsTooltipEnabled" that must be set to "true" for the JavaScript tooltips to work. I'm not sure if you need to set that for every tag (which seems horrible) or set it on the enclosing <s:form...> tag--I'd try the form tag first.

If adding that property to the form or individual element tags doesn't work then I'm not sure; there might be a problem with either the tag(s), the documentation, or something else.

Again, it'd be really helpful to know if there are any JavaScript errors. These are most easily visible using something like Firebug under Firefox.
 
reply
    Bookmark Topic Watch Topic
  • New Topic