tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Stampoultzis <gst...@iinet.net.au>
Subject Re: Deferred listeners -- backward incompatibility
Date Wed, 08 Jun 2005 11:22:26 GMT

What about a deferred boolean parameter.  The default being false so it 
matches existing behavior.

Mind Bridge wrote:

> Hi,
>
> I am finding out that deferring listeners is rather backward 
> incompatible -- a lot of the code that I am looking at is assuming 
> that the form is rewinding at the time of the listener invocation and 
> additional parameters to the Submits are needed to make things work 
> again. This is particularly true for components located in loops. 
> What's even worse -- the code may render okay, but generate an 
> exception only when a button/link is pressed.
>
> In general, the combination listener/defer is slightly problematic, as 
> the context of the 'listener' parameter gets changed depending on the 
> value of 'defer'.
>
> I would suggest the submit components instead to have two listener 
> parameters -- 'listener', as it is works now, and 'action' which is 
> deferred. If the deferred approach is needed, then 'action' is used 
> instead:
>
> <a jwcid="@Submit" action="handleSubmit">....</a>
>
> This approach is fully backward compatible, and it is shorter as well.
>
> Do you think it makes sense?
>
> -mb
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message