Binding data to datalist within a panel and moonstone videoplayer components

Hello everybody,

I recently started with Enyo (and Javascript) to create a TV application for my WebOS tv, but mostly to learn something.
As a base I took this template:

The structure I was imagining is like this:
1. mainview uses a collection to fetch the channel & EPG data collection into mainview.channels;
2. thanks to a binding from mainview.channels a datalist (channel list) will be filled in a panel;
3. when selecting a channel this will be stored into and the source of the player is set and will start playing;
4. more bindings will set the $.player.infoComponents subcomponent data;
5. a channelChanged function will populate a ContextualPopup list with audio streams and a second one for subtitles;

Fetching the channel / EPG data from within the panel and binding to $.datalist.collection is no problem. Also using events from child to parent works alright, so selecting a channel will get the videoplayer running.

The problem starts when I try to bind children, here is a list of issues I run into:
2. Binding a channel collection from the mainview to panels.$.channelpanel.$.datalist.collection doesn't work.

The panels.$ doesn't seem to hold the panel collection but panels.collection does? Also doing this in two steps doesn't work:
binding 1: mainview.channels > panels.channels,
binding 2: panels.channels > collection.channelpanel.$.datalist.collection.

4. I can't seem to bind to $.player.infoComponents and also manually changing the contents with raw javascript using events doesn't work. The data is updated but not shown? Using doesn't work?

5. I really don't know how to get to the ContextualPopup to add the audio + subtitle streams. Do I need to somehow include a datarepeater into it?

I didn't include any code because it feels like my chain of thought is completely wrong. I checked the documentation and "building a moonstone app". Please help!


  • Alright, so I just learned all children and nested are available at mainview.$.name. And the name should be set within the mainview object not within the derived kind itself. This solves 90% :smiley:

    Maybe somebody could point me to a guide that describes such basics before I waste a lot more time? :smile:
Sign In or Register to comment.