Showing tool-tip on a component in Wicket

Few days back I was working on an application which was using Apache Wicket and there was a requirement to show tool-tip on a component. After googling it for hours I found this really easy solution for my requirement. 

The following code snippet shows how you can add a tool tip on a Label component.

...
Label lbl = new Label("myLable", "My Label Value");
lbl.add(new AttributeModifier("title", true, new Model<String>("My Tool-Tip"))); 
...

Comments

Popular posts from this blog

Custom PagingNavigator for SEO friendly URL

Importing / Indexing MySQL data into Solr

The Externalizable Interface