The goal
*index.xml*
<Alloy>
<Window>
<ListView>
<Require src="foo" />
</ListView>
</Window>
</Alloy>
*foo.xml*
<Alloy>
<Templates>
<ItemTemplate name="tpl">
<Label bindId="label" />
</ItemTemplate>
</Templates>
<ListSection>
<ListItem template="tpl" label:text="Hello World" />
</ListSection>
</Alloy>
Current situation
If the
come first, nothing is added to the index-controller. If the comes first, the index-controller will act like the *foo* is only providing a ListSection. In the foo-controller it tries to do both but cannot handle the tag.
Proposed solution
For all situations in which is used under a , we should pass both the object holding the templates (*__itemTemplate*) and the array (which would then need to become an object as well) holding the sections. This way, the required controller can add multiple ListSections (TC-2692) and/or Templates.
No comments