https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/jquery-parent/jquery-examples/src/main/java/org/wicketstuff/jquery/demo/Page4JGrowl.java

On Sun, Mar 27, 2011 at 5:22 PM, Josh Kamau <joshnet2...@gmail.com> wrote:

> Hi.
>
> I know there could be many ways of achieving that . But i would do this.
>
> I would create my component. e.g TextField<String> username = new
> TextField<String>("username");
>
> Then add validators to the textfield. e.g username.setRequired(true) ;
> //add
> the wicket validators e.g email validators,StringValidators etc
>
> then add a tooltip if the field is valid
>
> eg. if (username.isValid()){
>         username.add(new BeautyTipBehavior(username.getFeedbackMessage()).
> setPositionPreference(TipPosition.left)));
>     }
>
>  The BeautyTipBehavior is from visural-wicket project  see
> http://wicket.visural.net/examples/app/tooltips
>
> NOTE: the code above is for illustration purposes. It may not be correct.
>
> Hope you get the idea.
>
> Josh.
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to