Forum Discussion
6 Replies
- tim_beynartChannel SurferWhy do you need the data when the item is created? For information that's not available until render time, one solution is to apply it when an item is selected on itemFocused or itemSelected events.
- johnmarsdenVisitorIt can't be at selection or focus. It's about theming, colors, size, etc.
Defining different types of RowLists won't do the trick. I need to pass custom data to the individual component items at instantiation (or immediately after). - tim_beynartChannel SurferitemComponentName lets you define a component to use as the individual rowlist items. You could use the init() function of the component to do stuff, though I am not sure how you would pass anything into it.
- drinkrainVisitorHas anybody found a solution to passing data to an itemComponentName?
I have worked around this by adding to the itemContent's metadata. Also I have used the global scope.
I would much prefer to pass data through a specific field however.
Ideas anybody? - joetestaRoku Guruhttps://sdkdocs.roku.com/display/sdkdoc ... LComponent
Sounds like you could add a field / fields to the itemContent and use that field
"Typically, an observer of the itemContent field is used to update the list item when the content changes." - drinkrainVisitor
"joetesta" wrote:
https://sdkdocs.roku.com/display/sdkdoc/MarkupList#MarkupList-MarkupListXMLComponent
Sounds like you could add a field / fields to the itemContent and use that field
"Typically, an observer of the itemContent field is used to update the list item when the content changes."
I am trying to avoid this because when I update the itemContent the parents observer fires because the parent is observing the same content. To me it would make more sense to pass a separate field down to it.