DojoFeedbackIndicator


FXFeedbackIndicator tutorial

This is our new creation in the quest for adding Ajax Components to Wicket. We can hear you think, "oh no.. yet another tooltip tutrial..". Well this one really is different then the other two tutorials. Ok, it's still simple to add this component and it still doesn't have ajax functionality, but it is different. This component is pretty much ready for ajax functionallity, unfortunatly Wicket isn't quite. In the nearby future this will be fixed and we will add the ajax functionality to the component.

I guess now you are wondering where all the fuzz is about. Well.. this is a validation tool! As you would probably know, Wicket has a validation Indicator and we use it in our tooltip. So the idea is that when you add our tooltip to a texfield that contains validation. When the validation was unsuccesfull, it displays an icon (or whatever you like) and when you hover over this icon, you'll see a tooltip containing the error. The messages in the tooltip are Wicket error messages.

Enough said about this component, let's get building!!

Yes, it is that simple...

Ok, when you have a page with a formComponent with validation (like a textField) you can add our feedbackIndicator Tooltip. And this is how its done:

Ok, when you have a page with a formComponent with validation (like a textField) you can add our feedbackIndicator Tooltip. And this is how its done: First you have to add the FXFeedbackInidcator to the TextField:

        RequiredTextField integerTextField = new RequiredTextField("integerProperty", Integer.class);
	FXFeedbackIndicator f = new FXFeedbackIndicator("fc");
	f.setIndicatorFor(integerTextField);
	add(f);
	add(integerTextField);

Then add a wicket id to the HTML, and you're finished.

        <label for="integerProperty">Integer</label><span wicket:id="fc">*</span>
	<input wicket:id="integerProperty" id="integerProperty" type="text" size="40"/>

Customization

Ofcourse you might want a different icon, or symbol as the indicator.....

- Just extend our FXFeedbackIndicator and provide your own HTML and fill it up in the initIndicator() method.

Or you might want to personalize the contents or the style of the tooltip....

- Just extend our FXFeedbackTooltip.java or FXFeedbackTooltipPanel.java and customize it to your needs.

This component is fully customizable. If you have any problems with it, please drop a mail in the user-list.


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced
- Activity

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

or Sign Up  

Other Features

Add Content