ok. i see your point. but setImmediate still means nothing to me. how about something more like setProcessForm?

Igor Vaynberg wrote:

setSubmitForm() is not precise enough since the form is submitted anyways.
All setImmediate(true) really does is bypass the default form processing.

-Igor


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Locke
Sent: Tuesday, August 09, 2005 3:01 PM
To: [email protected]
Subject: Re: [Wicket-user] Problem with CompoundPropertyModel and multiple Submit Buttons


you would only ever call the method to turn form submitting off on a button like you're trying to do.

Button cancelButton = new Button("...")
cancelButton.setSubmitForm(false);

this makes a lot of sense to me. and you could even make a class to deal with it...

public class CancelButton extends Button {
   public CancelButton(...)
   {
      setSubmitForm(false);
   }
}

if you'd prefer it could be just setSubmit(). the difference though really is whether the button submits or not.

Jonathan Locke wrote:

still makes no sense to me.  bypass changes to what?
Button.setSubmitForm is exactly right. it determines if the button should submit the form or not. right?

David Liebeherr wrote:

Okay, this fix isn't good since it can be only used with
javascript.
So i changed it so the setImmediate(true) solution
Jonathan mentioned.
I got a new idea for a rename of this method: setBypassChanges(). What about that?

Cu,
Dave

David Liebeherr wrote:

Hi Johnatan,

i think immediate is realy  bit confusing.
So what about setDisableEffect or setNoEffect? is that better?

Well, anyway, i have implementet a fix for my situation
this way now:
I got a normal Submit-Button and a special cancel Button:

           add(new Link("cancel") {
               public void onClick() {
                   setResponsePage(new PageAfterNoChange());
               }
           });

I think this is the must clear solution under the current circumstances.
Any commest to that fix?

Thanks,
Dave

Jonathan Locke wrote:

try setting the isImmediate value on the cancel button to true. this will cause the button to call onSubmit without
validating the
form or updating the model.

this is a new feature, and while the functionality makes
sense, i'm
not so sure about the name. maybe something more like a boolean property Button.submitForm where the default is true....
that would
make more sense to me. isImmediate is kindof nonsensical to my ear... how can a button be "immediate"?

David Liebeherr wrote:

Hi!

I have a Form wich has two Submit Buttons ("Update" and
"Cancel").
The form uses a CompundPropertyModel to get the changes of the form automaticly represented in the Model. But when i click the Cancel Button i have to discard the changes to the Model Object.
How can i do this?

I was searching for something like CompoundPropertyModel.discardChanges(), but i have
found nothing.
Thanx,
Dave





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







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