Thank you Thiago and Christian, I now switched over to use an action link scenario. With that the desired implementation is easier to obtain.
Am 31/01/2012 19:50, schrieb Thiago H. de Paula Figueiredo: > Why don't you just add a listener to the 'submit' function of the form > using Prototype's Element.observe() or the similar function in jQuery? > Anyway, adding onXXX attributes to attach listeners to HTML elements > isn't recommended at all. > > On Tue, 31 Jan 2012 15:51:30 -0200, Christian Köberl > <tapestry.christian.koeb...@gmail.com> wrote: > >> 2012-01-29, Michael Gerzabek: >>> The form tag automagically renders a javascript handler for the >>> onSubmit >>> event [1, line 388]. It uses the same snippet that's declared for >>> onclick handler in MarkupConstants.WAIT_FOR_PAGE >>> <http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/MarkupConstants.html> >>> >>> [2] described in [3]. >>> >>> How could I contribute my own javascript snippet to onSubmit attribute >>> of forms? How can I override this setting? >> >> The problem is that this is no setting and therefore cannot be >> overwritten. >> >> One solution is to override the default JavaScriptStack of Tapestry and >> provide another implementation of the onSubmit handler: >> 1. copy CoreJavaScriptStack >> 2. change tapestry.js in array to a modified copy in your project >> 3. contribute the overridden configuration >> public static void >> contributeJavaScriptStackSource(MappedConfiguration<String, >> JavaScriptStack> configuration) >> { >> configuration.overrideInstance(InternalConstants.CORE_STACK_NAME, >> MyCoreJavaScriptStack.class); >> } >> >> Has anybody a better idea? >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org