I don't like controlling that kind of processing with boolean return values. What's wrong with the current state implementation of Form?
Eelco On 10/1/05, Johan Compagner <[EMAIL PROTECTED]> wrote: > I am planning to support this better in wicket in 1.2 > For example i need to know which fields was used for the enter... > So i want to have an action on the field if a field was used for the submit > button. > > You could use default form processing property for handeling everything in > the button > or use the submit. > > I was also thinking about returning a boolean on the onSubmit() of the > button > If that is false then onSubmit of the form is not called anymore. > > johan > > > > > On 9/28/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 9/28/05, Phil Kulak <[EMAIL PROTECTED]> wrote: > > > I really don't think so. With browsers like IE it's easy to submit a > > > form with no button (hit return, for example). In this case it's nice > > > to put the default behavior in the form, but if it's always called you > > > can't do that. > > > > Sometimes IE sends the first submit element defined in an HTML form > > along with request, sometimes it does not. Mozilla seems to always > > send the first declared submit element (or it does not at all? Damn, I > > do not remember). Submitting form with hitting Enter (default submit) > > is unreliable if you have several handlers. > > > > I think that a handler of submit event can be marked as default. Only > > one handler can be marked as default for a form. When a form is > > submitted (POST) with no submit elements activated, then handler, > > marked as default, is called. > > > > If no handlers are marked as default, then exception should be thrown, > > and application code should be able to catch it, if it is OK to do > > nothing or to do something else if there is no default handler. Or > > maybe another flag should be set that the first submit handler defined > > in the form is a default one. This would work similar to browsers, > > which send the first submit element for default submit. > > > > Michael. > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Power Architecture Resource Center: Free content, downloads, discussions, > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > _______________________________________________ > > Wicket-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
