You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Gruber <ch...@gmail.com> on 2007/10/19 16:58:44 UTC
component list parameters?
Hi,
So I'm wondering if this is possible, and if not, has this been
thought of? I'm wanting to add a variable list of parameters to a
component, because it can take an arbitrary number of them and loop
overthem. So I'm looking at something like this.
A.tml
<div xmlns:t="blah">
<t:b id=${literal:b1}">
blah content 1
</t:b>
<t:b id=${literal:b2}">
blah content 2
</t:b>
</div>
And then in A.java have something like
public class A {
@Parameter
private List<B> _bs;
}
So then all the Bs that are direct children of A are added in as
parameters.
It woudl be less convenient, but still cool to do something like:
<div xmlns:t="blah">
<t:parameter name="bs">
<t:b id=${literal:b1}">
blah content 1
</t:b>
<t:b id=${literal:b2}">
blah content 2
</t:b>
</t:parameter>
</div>
But have each B handled seperately and added to the list. It would
make it much easier to do complex things like tabviews (with arbitrary
tabs) or other such things, I think, though there may be other ways to
skin this cat.
Christian.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org