question

Aviram avatar image
Aviram asked

How to render data binding inside an object with bind data in APL (sequence within a sequence) ?

Hi,
I want to create the following layout:
An horizontal Sequence:

That each child is a "container" that contains child as well

The problem is that i'm putting my main data \ json in the "data" attribute of the main sequence

and then in the inner Sequence in his data attribute I'm putting the child array, when I'm using "${data}" from the child of the second sequence I'm referring the root element and not the child.

How can I achieve such an outcome?

I'm getting +- what I want in the auth tool but in my echo show it not working,

For example this layout I build will show only black screen in my echo show but in the auth tool it's working:

{
    "type": "APL",
    "version": "1.0",
    "theme": "dark",
    "import": [],
    "resources": [],
    "styles": {},
    "layouts": {},
    "mainTemplate": {
        "items": [
            {
                "type": "Sequence",
                "width": "100%",
                "height": "100%",
                "data": [
                    {
                        "innerList": [
                            {
                                "t": "1.1"
                            },
                            {
                                "t": "1.2"
                            },
                            {
                                "t": "1.3"
                            }
                        ]
                    },
                    {
                        "innerList": [
                            {
                                "t": "2.1"
                            },
                            {
                                "t": "2.2"
                            },
                            {
                                "t": "2.3"
                            }
                        ]
                    }
                ],
                "scrollDirection": "horizontal",
                "items": {
                    "type": "Container",
                    "spacing": "50px",
                    "data": "${data.innerList}",
                    "items": {
                        "spacing": "100px",
                        "type": "Text",
                        "text": "${data.t}"
                    }
                }
            }
        ]
    }
}

And in a much more complex example (my real layout ) when referring to the "second"\"child" "${data}" I'm getting the root data and not the child.

Any though regarding this issue?

alexa skills kitalexahow-toaplalexa skills challenge
auth-took.png (81.6 KiB)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sungyoo avatar image
sungyoo answered

Hey @Aviram are you still seeing this issue on your Echo Show?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.