Is there any way to specify, via JavaScript what "listener" method to call
upon form submit?  That'd be just as good as having an EventSubmit
component.

-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 10:32 PM
To: Tapestry users
Subject: Re: How to do Tapestry 4.1 form cancel listener?

sighh...... in the last example, "this" should be "this.form".

On 7/13/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>
> Oops...That doesn't help you as much in the context of the example you
> gave, you can also do it this way ~if~ the context is within an html
> on<Event> attribute (such as your example.P.S. you don't need to add
> javascript: anymore):
>
> onClick="tapestry.form.submit(this,'cancel')"
>
> The first parameter will take a node id or actual node. This should be
> true for almost all js functions you see in tapestry now as well.
>
>
> On 7/13/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> >
> > Ah. You have got me there, I've failed to provide explicit function
> > calls for cancel/refresh. For now, you can call:
> >
> > tapestry.form.submit("your form name/id", "cancel");
> >
> > So, if your rendered page had a form element that looked like:
<DEFANGED_form
> > name="MyTapForm" method="POST"> , the script would be:
> >
> > tapestry.form.submit("MyTapForm", "cancel");
> >
> > I will provide specific function calls for cancel/refresh before
> > officially releasing though, thank you for reminding me.
> >
> > As for the form.events logic, I don't plan on providing backwards
> > compatible support for it unless there is a very compelling reason to
modify
> > native js objects. I could go into a big tirade about it if anyone is
> > interested but will save the list from it unless prompted.
> >
> > The memory footprint required to to display forms (for the browser)
> > should now be much smaller. Not important for the majority of users but
very
> > important for some.
> >
> > (P.S., You can see most of the new form related functions here:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src
/js/tapestry/form.js?view=markup
> > )
> >
> >
> > On 7/13/06, Jun Tsai < [EMAIL PROTECTED]> wrote:
> > >
> > > In Tapestry 4.0.2,I use
onClick="DEFANGED_javascript:this.form.events.cancel
> > > ();",But
> > > after I upgrade to 4.1,I find the method doesn't work?
> > >
> > > How to ?
> > >
> > > Thanks
> > >
> > > --
> > > Welcome to China Java Users Group(CNJUG).
> > > http://cnjug.dev.java.net
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>



-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to