dev@jsftemplating.java.net

Re: JSFTemplating: foreach component support

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Tue, 07 Nov 2006 16:14:12 -0800

Hi Ken,
This is a really great feature provided by jsftemplating. Even with all
the limitation that you specified, the current support makes putting
varied # of same components inside a table cell so easy.
Thanks for the sample that shows clearly how to use this feature.

Anissa.

Ken Paulsen wrote:
>
> I have finished an initial implementation of a foreach component.
> There are some things it doesn't do the way I feel it should, mostly
> around events. The equivalent foreach LayoutElement used during
> component creation provides events for "beforeLoop" / "afterLoop" and
> treats "encode" / "beforeEncode" / "afterEncode" differently. Please
> do not rely on these events for the "component version" of "foreach".
> I have to finish implementing this behavior and your code will break
> if you use these features.
>
> Events inside components, inside a foreach are fine, though.
>
> Another feature that does *not* exist is "decode behavior" for
> components inside a foreach. In other words, you cannot handle
> actions (or command events) for any component that is inside a
> foreach. If you do, the results are not supported at this time. You
> may get around this by using hyperlinks that pass information to the
> server via QUERY_STRING parameters.
>
> Attached is an example page that uses the loop inside a table.
>
> Thanks!
>
> Ken