a quick background first: I'm creating a component which can display a 'list
of lists'. For flexibility I want to implement this as a composite-pattern
in which a CompositeFlexList-component can render one or more
FlexList-components as it's childs. (CompositeFlexList extends FlexList).
This works well when I define the list-component as @Component in the
CompositeFlexList-component.
However for flexibility I need to extract the FlexList-component-definition
from the CompositeFlexList-component and define it in an enclosing page.
So want i want is this:
page
|[EMAIL PROTECTED](..some config here.....,childlist=childlist)
CompositeFlexList
list;
|[EMAIL PROTECTED](some config here....) FlexList childlist;
Now CompositeFlexList has the following definition:
@Parameter
private FlexList childlist;
public FlexList getChildlist() {return childlist;}
My problem/question:
although component childlist is entirely defined in the enclosing page, and
this component is bound (???) to field childlist in the CompositeFlexList I
keep getting an "unbound error", see below.
Am I missing something, or is it impossible to pass a defined
component-instance as a parameter to another component?
Thanks in advance,
Geert-Jan
/////
Parameter(s) results are required for
com.wrappt.test.tap5springstry.components.FlexList, but have not been bound.
location
classpath:<path_removed>/CompositeFlexList.html, line 4, column 43
1 <div class="${rowClass}"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
2 <t:body/>
3 <t:block t:id="childblock">
4 <div t:type="flexlist" t:id="childlist">
5 </div>
6 </t:block>
7 </div>
--
View this message in context:
http://www.nabble.com/T5%3A-how-to-pass-a-component-as-a-parameter----%3E-getting-unbound-errors-tf4721073.html#a13497068
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]