Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
namit2013
Posts: 53
Registered: ‎02-15-2013
My Device: Z10

Sending data from XMLdatamodel down QML heirarchy

I'm trying to understand how to send data from XMLdatamodel into lower heirarchy QML files

In the Cascades QML example file main.qml the following lines are creating the RecipePage and setting its title to whatever is in chosenItem.title

 

    var page = recipePage.createObject();
     page.title = chosenItem.title;

 

But the recipePage doesn't have a "title" id? How does this work?
If there was an imageview in a container in the recipePage, could you use the following to change the imageSource?

 

page.<containerID>.<ImageviewID>.imageSource = chosenItem.image;

 

Please use plain text.
Regular Contributor
namit2013
Posts: 53
Registered: ‎02-15-2013
My Device: Z10

Re: Sending data from XMLdatamodel down QML heirarchy

I figured it out.

I'm using the "property alias" to bring out variables and changing them in the herirarchy above

Please use plain text.