I am using Wicket 1.4.18.
I need to add custom tool tips to many fields in my application. The
spec requires a help image with the tool tip (like the question mark
JIRA uses) at the end of my field label that displays the tool tip on
mouseover. The tool tip messages must be localized. The goal is to
make this as simple as possible for programmers to add. To make it
simple, I want to avoid adding code to both the Java and the markup on
each page. I can use my base page to contribute jQuery (see Step 7 in
https://cwiki.apache.org/WICKET/how-to-add-tooltips.html) and I would
only like to touch the html file on the extending pages.
Is there a way I can make a custom xhtml tag to allow me to replace the
tag with markup? I am thinking of something like AutoLabelResolver and
<wicket:message>.
Here is an example of the markup (just assume I am already contributing
the JavaScript I need):
<label wicket:for="firstName"><wicket:label>[First
Name]</wicket:label></label><*/wicket:tooltip/* key="firstNameTip">
<input type="text" wicket:id="firstName">
Properties file:
firstName=First Name
firstNameTip=This is the first name
Rendered it would look something like this:
<label for="firstName221" class="required">First Name</label><img
src="blah" id="img323" title="This is the first name" />
<input type="text" name="balh:firstName" id="firstName221">
Thanks for taking the time to read this!
Jered Myers