So the call chain would be:

Button.internalOnClick()
  form.process();
  onClick();

Where I can override onClick() for regular button, or override
internalOnClick() for Cancel button, right?

I still cannot get why it cannot simply be like your previous version,
but without onSubmit():

Button {
  public void onClick() {}
}

SubmitButton {
  public void onClick() {
    form.process();
    // add custom code here
  }
}

What, you do not trust a user, who might throw away form.process() call?

Michael.

On 8/11/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> OR
> 
> To make it cleaner the button can have an internal method
> 
> 
> Button {
>         public void internalOnClick() {
>                 onClick();
>         }
> 
>         public void onClick() {}
> }
> 
> SubmitButton {
>         public void internalOnClick() {
>                 form.process();
>                 onClick();
>         }
> 
>         public void onClick() {}
> }
> 
> 
> Yes, I think that's much better


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to