aspose file tools*
The moose likes Struts and the fly likes Tooltip in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tooltip in struts 2" Watch "Tooltip in struts 2" New topic
Author

Tooltip in struts 2

rahulJ james
Ranch Hand

Joined: Oct 03, 2008
Posts: 123
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Nov 22, 2003
Posts: 185
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

Joined: Sep 29, 2008
Posts: 12617

That's something quite different than S2's tooltip support.
vishwa venkat
Ranch Hand

Joined: Nov 22, 2003
Posts: 185
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

Joined: Sep 29, 2008
Posts: 12617

That's the standard HTML hover text; the tooltip support of S2 is JavaScript-based. The tag docs have tooltip info.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tooltip in struts 2