Yeah, send in your patches please. I had some ideas myself, so lets see
what our combined effort results in. Can apply tonight.
Eelco
Phil Kulak wrote:
haha, that's almost exactly what I was thinking. I actually added a
method to button called "validatesForm". It seems to work well with
this onValidate() method:
protected void onValidate()
{
final Button button = findSubmittingButton();
if (button == null)
{
validate();
}
else
{
if (button.validatesForm())
{
if (validate())
{
button.onSubmit();
}
}
else
{
button.onSubmit();
}
}
}
On 7/5/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
When do you guys think this will be semi-finished in HEAD?
Here is the functionality im looking for:
I would like to be able to specify whether or not the form should validate
based on the submitting button and to have the button's onsubmit handler
called before the forms onsubmit handler.
For example:
Button can have a boolean validateForm() and a boolean onSubmit(), if false
is returned from the button's onSubmit() the form's onSubmit() doesn't get
called.
My usecase is a wizard. When the user presses the back button in the wizard
I would like to record the user's input and go back a step w/o validation
and onsubmit() being called.
If this is on par with what you guys had in mind I would be happy to submit
a patch.
Thanks,
Igor
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop