Yea, turns out that method is terrible. Sorry about that. Anyway, it
would be really nice to add another method to Button, like "boolean
validates()", that can return false for a button that is meant to
supress vallidation. Then the form can always find the submitting
button, and if it validates, call validate on the form before calling
the button's onSubmit(). Then the default method could return true and
the current behavior wouldn't change at all. Just my take.

-Phil

On 6/21/05, SourceForge.net <[EMAIL PROTECTED]> wrote:
> Patches item #1225049, was opened at 2005-06-21 11:42
> Message generated for change (Tracker Item Submitted) made by Item Submitter
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1225049&group_id=119783
> 
> Please note that this message will contain a full copy of the comment thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: core
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Submitted By: Phil Kulak (pkulak)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Form validates on multiple buttons.
> 
> Initial Comment:
> This method brings the class in line with it's
> documentation, which says that a form with multiple
> buttons does not automatically validate. This is the
> most sensible action in my opinion (and whomever wrote
> the docs) since other buttons usually include a "cancel".
> 
> wicket.markup.html.form.Form:
> 
> protected void onValidate()
> {
>         // If there is more than one button, we call the Button's
>         // onSubmit() handler
>         if (countButtons() > 1)
>         {
>                 final Button button = findSubmittingButton();
>                 if (button == null)
>                 {
>                         throw new WicketRuntimeException("Unable to find
> submitting button");
>                 }
>                 button.onSubmit();
>         }
>         else
>         {
>                 validate();
>         }
> }
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1225049&group_id=119783
> 
> 
> -------------------------------------------------------
> 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
>


-------------------------------------------------------
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_idt77&alloc_id492&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to