Sunday 8 September 2013

How does the Enyo Repeater kind duplicate its children components?

How does the Enyo Repeater kind duplicate its children components?

I am trying to integrate the Repeater kind with my Framework. Because of
this I can't just place the children components inside of the repeater
kind itself where I initially define it. The following is in my custom
kind ui.RobustList:
components: [
{ name: "outerScroll", kind:"Scroller", touch: true, classes:
"enyo-fit", components: [
{name: "list", kind: "Repeater", onSetupItem: "setupItem",
components: [
{name: "item", fit:true, components: []}
]}
]}
],
I am using this custom kind (ui.RobustList) in another custom kind that is
just a screen (list_test):
components: [
{name:"Generated0", kind:"ui.block",
components: [
{name:"mylist", kind:"ui.RobustList",
components: [
{name:"Generated1", kind:"ui.dropDown",
},
]
},
]
},
],
Generated0 is a generated component and it can have more or different
types of kinds within ui.RobustList.
Now the problem I am having is that only one dropdown is showing. The fact
that one is showing and working as it should it leads me to assume its a
duplication issue. Since the dropdown is owned by the parent, I must move
it to ui.RobustList. But thats when I get the issue. Its only showing the
initial dropdown but not duplicating it the number of times I set it to. I
am basically moving the children myListin ui.RobustList at runtime.
Hopefully what I am saying is clear. I don't want code answers but rather
an explanation of why this may be happening and how the Repeater kind
actually duplicates its children. Thanks.

No comments:

Post a Comment