i think the best thing to do is to use javascript for this rather then an
ajax trip back to the server. i have done this exact thing in the past with
mootools and it worked out very nicely.
check out mootools and their tooltips class. what i did was copy and paste
and rename that class, change the events from onmousein/out to onfocus/blur.
i also changed it to read its tooltip from a tooltip property, so all i have
to do is to have something like this:
<input type="text" wicket:id="foo" tooltip="Enter the first name of your
pet"/>
-igor
On 2/15/07, spencer.c <[EMAIL PROTECTED]> wrote:
I have a form on my page, and I would like to display a usage hint to the
user when they enter the field, and remove it when they exit the field.
This isn't validating behavior, just some rich interaction. As best I can
tell, the correct thing to do would be:
i) Create two AjaxFormComponentUpdatingBehavior, one bound to "onfocus"
and one to "onblur".
ii) Override the onUpdate() of the behaviors.
iii) Add the behaviors to my form element.
My questions are:
1) Is this the easiest/correct method for this?
2) If I have multiple form elements I want to behave like this, can I
somehow determine which form control fired the onUpdate(), and switch
based
on that, or do I have to create a pair of
AjaxFormComponentUpdatingBehavior's for each control I am interested in?
(This seems way too verbose!)
3) All the examples I see seem to only add components to the target. Is
it
not possible to remove the components during the onblur? Do I just re-add
the component, but add a hidden style to it?
Thanks for any insight.
--
View this message in context:
http://www.nabble.com/Ajax-Component-Display-Question-tf3234442.html#a8987695
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user