Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tooltip in struts 2

 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using struts 2. I wanted to have the tooltip attribute with <html:a tag. I tried doing that by ><html:a href="/test.action" required="true" tooltip="Tool tip here">, but it doesnt work.

Any advise on this.. I searched the forum and I dont find the exact answer..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of S2? Are you really using "html" as the S2 tag prefix?! I would strongly advise against that, since it will create confusion (S1 used "html" as the traditional prefix for the S1 HTML-oriented tags) and it's inaccurate, since many S2 tags don't produce HTML.
 
vishwa venkat
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Struts2 you can do something like this for tooltip -

<a href="<s:url action='logout'/>" title="click here to log out">Sign Out</a>

make sure you have struts tags loaded -
<%@ taglib prefix="s" uri="/struts-tags" %>
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's something quite different than S2's tooltip support.
 
vishwa venkat
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

I know thats a tweak that we did for displaying the tooltip, served our purpose. let me know if you have any ideas.

Thanks,
-Visu
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the standard HTML hover text; the tooltip support of S2 is JavaScript-based. The tag docs have tooltip info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic