[Wicket-user] Form validation with multiple submit buttons.
Hi. Is there any way to disable automactic form validation when using multiple submit buttons? I remember some time ago one had to call validate on form manually form each handler. Now it's called automatically. I want to have a cancel button and having the form validated first means that user can't leave the form using this button if form isn't valid. Would be great to have something like new Button("cancel") { boolean validateForm() { // this would return true by default return false; } void onSubmit() { } } -Matej --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Form validation with multiple submit buttons.
Yes, in 1.1. there is (was part of the refactoring I did on Form). Button now has property 'immediate', which is false by default. When true, validation AND model updating is skipped. There are some convenience methods in Form to do this manual now if you want to do it your own way. Eelco Matej Knopp wrote: Hi. Is there any way to disable automactic form validation when using multiple submit buttons? I remember some time ago one had to call validate on form manually form each handler. Now it's called automatically. I want to have a cancel button and having the form validated first means that user can't leave the form using this button if form isn't valid. Would be great to have something like new Button("cancel") { boolean validateForm() { // this would return true by default return false; } void onSubmit() { } } -Matej --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Form validation with multiple submit buttons.
Thank you. 1.1 Is going to be a great release :) For now I've soved it by overriding onFormSubmitted method, maybe not the best way but enough until 1.1. Matej Eelco Hillenius wrote: Yes, in 1.1. there is (was part of the refactoring I did on Form). Button now has property 'immediate', which is false by default. When true, validation AND model updating is skipped. There are some convenience methods in Form to do this manual now if you want to do it your own way. Eelco Matej Knopp wrote: Hi. Is there any way to disable automactic form validation when using multiple submit buttons? I remember some time ago one had to call validate on form manually form each handler. Now it's called automatically. I want to have a cancel button and having the form validated first means that user can't leave the form using this button if form isn't valid. Would be great to have something like new Button("cancel") { boolean validateForm() { // this would return true by default return false; } void onSubmit() { } } -Matej --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Form validation with multiple submit buttons.
Imho doing this manually is better. I never liked automatic reset/populate/validate sequence in Struts. On 7/19/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Yes, in 1.1. there is (was part of the refactoring I did on Form). > Button now has property 'immediate', which is false by default. When > true, validation AND model updating is skipped. There are some > convenience methods in Form to do this manual now if you want to do it > your own way. > > Eelco --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Form validation with multiple submit buttons.
Then you must like this option :) What I hated about Struts, is that conversion and validation was not integrated well enough. Only thing to work really well with it was to have string properties in your form beans, and then manually casting/ checking them. Never liked commons-validator too. Glady, those days are over! :) Eelco Michael Jouravlev wrote: Imho doing this manually is better. I never liked automatic reset/populate/validate sequence in Struts. On 7/19/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Yes, in 1.1. there is (was part of the refactoring I did on Form). Button now has property 'immediate', which is false by default. When true, validation AND model updating is skipped. There are some convenience methods in Form to do this manual now if you want to do it your own way. Eelco --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user