i just can't follow this discussion any more. please let me know when everyone agrees
so i can think and/or vote on the proposal.

thanks,

     jon

Igor Vaynberg wrote:

Its not that I don't trust the user, the point is to automate the 90% use
case which is to have something happen after the default form processing
updates your model.

The internalOnClick will be finalized. So if you don't want default form
processing you extend from Button, and if you do want it you extend from
SubmitButton and onclick in that class gets called AFTER the form has been
processed and model updated.

-Igor


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Jouravlev
Sent: Thursday, August 11, 2005 4:30 PM
To: [email protected]
Subject: Re: [Wicket-user] Problem with CompoundPropertyModel and multiple Submit Buttons

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







-------------------------------------------------------
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



-------------------------------------------------------
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