Igor,
Thanks, that gets me almost there, in onError() how do I get the
component that the error is being thrown against?
form.add(new AjaxSubmitButton("ajax-submit-button", form) {
...
protected void onError(AjaxRequestTarget target, Form form)
{
// repaint the feedback panel so errors are shown
target.addComponent(feedback);
}
});
Jeremy
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Vaynberg
Sent: Monday, December 04, 2006 12:22 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Modifying form feedback behavior
if you want to validate the form via ajax you have to submit the form
via ajax. see AjaxSubmitButton, then in onsubmit(AjaxRequestTarget
target) you can start adding all kinds of javascript - like
scriptaculous effects targetted at the proper form components
-igor
On 12/4/06, Levy, Jeremy <[EMAIL PROTECTED]> wrote:
I would like to change the default behavior for the way form
validation feedback is reported to the end user.
At the moment this form does two types of validation, one using
the default validatators and the other in the onSubmit method of the
form. (I can move the later into custom validation, this form was built
while I was first getting started w/ Wicket). Feedback is reported
using the default FeedBackPanel. I would like to change the behavior so
that if there is an error, when the page reloads I can modify it's
class/style, specifically the input's border color and size.
Best case I would like to do it like the Ajax Effect example and
use some script.aculo.us effects without having to reload the page. I
have trouble figuring out where to get started. Should I implement
IFeedBack and add that to the components? Can someone point me in the
right direction?
Jeremy
________________________________
Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize
or effect the purchase or sale of any security or commodity, to send
fund transfer instructions, or to effect any other transactions. Any
such request, orders, or instructions that you send will not be accepted
and will not be processed by Morgan Stanley.
------------------------------------------------------------------------
-
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=DEVDE
V
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
--------------------------------------------------------
Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize or effect the
purchase or sale of any security or commodity, to send fund transfer
instructions, or to effect any other transactions. Any such request, orders, or
instructions that you send will not be accepted and will not be processed by
Morgan Stanley.
-------------------------------------------------------------------------
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