You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Callender <ge...@mac.com> on 2007/07/20 15:59:06 UTC

Why does cancel kill its listener?

Is there a reason why submitType kills its component's listener?  For  
example, whereas this listener works...

	<input jwcid="@Submit" type="submit" value="Cancel"  
action="listener:doCancel">

... the listener in this one is ignored...

	<input jwcid="@Submit" type="submit" value="Cancel"  
action="listener:doCancel" submitType="cancel"/>

...and the listener has to be specified on the Form instead...

	<form jwcid="@Form" cancel="listener:doCancel">

Why is this so?  What if I want more than one button of type cancel,  
each one with its own listener, and possibly its own parameters?  I  
think submitType="refresh" behaves this way, too.

Regards,

Geoff

Re: Why does cancel kill its listener?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Dunno.  If you file a bug report with a specific version && example it can
be looked in to.

On 7/20/07, Geoff Callender <ge...@mac.com> wrote:
>
> Is there a reason why submitType kills its component's listener?  For
> example, whereas this listener works...
>
>         <input jwcid="@Submit" type="submit" value="Cancel"
> action="listener:doCancel">
>
> ... the listener in this one is ignored...
>
>         <input jwcid="@Submit" type="submit" value="Cancel"
> action="listener:doCancel" submitType="cancel"/>
>
> ...and the listener has to be specified on the Form instead...
>
>         <form jwcid="@Form" cancel="listener:doCancel">
>
> Why is this so?  What if I want more than one button of type cancel,
> each one with its own listener, and possibly its own parameters?  I
> think submitType="refresh" behaves this way, too.
>
> Regards,
>
> Geoff




-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com