tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Question about form actions handling
Date Wed, 27 Oct 2004 12:14:41 GMT
The blessing and the curse of OGNL is that we don't have an easy way
of knowing where data comes from or goes; this makes a second rewind
phase a chancy proposition.

Where we're headed with this is that components such as Submit will
automatically defer their invocation of the listener method until the
end of the rewind. For the rare case where Tapestry 3.0 behavior is
necessary, an "execute" parameter will be added (that defaults to
"deferred" but can be set to "immediate" for 3.0 behavior).


On Tue, 26 Oct 2004 17:56:15 +0200, Mikaƫl Cluseau <nwrk@nwrk.dyndns.org> wrote:
> Hello people,
> 
> I remember that Howard asked the list about how to make form handling
> more intuitive. I think about a kind of "two-pass" rewind.
> 
> Something intuitive is something that matches what the developer thinks
> of the reality when his (her) code is ran.
> 
> In the context of a form action, it means that the page's data must
> reflect the form's data that the user entered. From the operational
> point of view, the action takes place at the "position" of the action in
> the page (for example, the 10th iteration of a ForEach).
> 
> To achieve that, I suggest to use two rewinds :
>      1. Rewind the form to update the data ;
>      2. Rewind the form to reach the component who caused the action
>         (i.e. Submit or LinkSubmit) and execute it as usual.
> 
> This way, we have the data reflecting the form's data and the action
> executed within the right context. Side effect : any clic in the form
> will update the full form, so "update" buttons may be placed anywhere,
> even before the first link (without ugly hacks the action handling).
> 
> I plan to do this work in my apps and, if it works well, I'll do a patch
> and (try to) port it to Tapestry 3.1. But, I have two questions :
>      1. People of the list : what do you think of this approach ? (real
>         performance issues? better ways ?)
>      2. I don't know enough about Tapestry 3.1 internals, is this work
>         relevant in this context ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
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