You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Francois Armand <fa...@linagora.com> on 2008/12/22 15:33:05 UTC
[T5] Exposing child component parameters : inherit, autoconnect...
Nothing better ?
In my component building, I have a really common pattern which is:
- I have a child component, which has a parameter, like :
<t:ChildComponent childParameter="..." />
- I have a parent component, in which I use ChildComponent (standard
component composition), and I want to expose some or all parameters of
ChildComponent as parameter for ParentComponent.
For now, I believe that there is only two way of dealing with it:
- the ChilParameter parameter may be marked as "autoconnect", and so
if ParentComponent has a parameter named ChildParameter, the binding is
done for me ;
- the ChilParameter parameter is not marked as "autoconnect". So in my
ParentComponent, I can have a parameter named ParentParameter, and use
inherit as bindind for the ChildParameter:
@Parameter private ParentParameter pp;
@Component(parameters={"ChilParameter=inherit:ParentParameter"}) private
ChildComponent cc;
That seems not good, because in each case, I have to declare in the
parent all the exposed parameter (and for the autoconnect, I have to be
able to modify the child component, what ease not always possible if it
is in the core lib, or in a third party one). So, if I want to expose a
lot of parameter from child in parent, I have a lot of copy/paste to do,
and this kind of stuff is really error and refactoring prone.
I also understand that it is unwanted to expose child parameters without
warning, so what I need is an "expose" parameter for the Component
annotation that takes a list of properties names and make the
"@Paramater private ParentParameter /
"ChilParameter=inherit:ParentParameter"})" for me.
Is there already somethink like that in T5, or do I have to copy/paste
parameters ?
--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] Exposing child component parameters : inherit, autoconnect...
Nothing better ?
Posted by Francois Armand <fa...@linagora.com>.
Francois Armand wrote:
> In my component building, I have a really common pattern which is:
>
> - I have a child component, which has a parameter, like :
> <t:ChildComponent childParameter="..." />
> - I have a parent component, in which I use ChildComponent (standard
> component composition), and I want to expose some or all parameters of
> ChildComponent as parameter for ParentComponent.
[...]
Nobody on that subject ? Nobody has a better pattern to expose child
parameters in parent components ?
Or perhaps that the period of the year isn't well suited for asking
about computer things other than Christmas gifts :)
--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org
FederID - http://www.federid.org/
Open Source identities management and federation
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org