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
Developer
jeswinsimon
Posts: 63
Registered: ‎11-12-2012
My Device: BB10 DevAlpha

Help: Blackberry 10 XML data source and Navigation Pane

My application has a XML list on a Navigation Pane. When I tap on a list item, the naviagtion pane has to push another page on top of it with the description of the item. I followed the steps given here and I'm able to obtain the second page but I'm not sure how to display the data from the list in this page.

 

I know this is a bit silly to ask but please do help me out as I'm new to native development.

 

Thanx

Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..
Developer
nonesuchnick
Posts: 103
Registered: ‎02-13-2012
My Device: Z10 LE

Re: Help: Blackberry 10 XML data source and Navigation Pane

Hi,

 

I had some difficulty getting my head around this at all, but there are a couple of really good examples that helped.  Have you seen the "Quotes" sample app?  There are a couple of versions which actually show 2 different ways of doing this.  

 

First, the list tutorial actually gives a walkthrough:

https://developer.blackberry.com/cascades/documentation/ui/lists/lists_set_up_project.html

 

Second, the version on github in cascade-samples does this a bit differently:

https://github.com/blackberry/Cascades-Samples/tree/master/quotes

 

I chose to use the second way, but it isn't as straightforward as the tutorial.  In fact if you are still new to cascades and QML it's actually pretty confusing.  In both cases they use SQL data but the basics are the same.  The most confusing part is that you define functions on the List Object in the definition of the navPane, but the List itself is described in it's own QML file.  Both the List and the new Page have top level property variants defined to hold the selected data.  Then, you define a function (slot) on the List in the navPane which actually creates the second page as a new object, and then assigns the value of the List's data property to the Page's data property. In the onTriggered for the item on the list, you set the List's data property to the value of the selected data from your data model, and then call the function on the navPane which creates the page.

 

I hope that helps.  Again if the second way it too confusing, then just follow the tutorial.

 

Nick

 

Learn to run and get in shape with Couch 2AnyK Pro, a Built for BlackBerry native Couch to 5K (C25K) app for BlackBerry 10, available in BlackBerry World.
Developer
jeswinsimon
Posts: 63
Registered: ‎11-12-2012
My Device: BB10 DevAlpha

Re: Help: Blackberry 10 XML data source and Navigation Pane

[ Edited ]

Hey Thanx, I was getting the fuction wrong, somehow I figured it it out by going through nearly all the sample applications. Anyways Thanx for your reply :smileyhappy:

Click Accept as Solution if this post that have solved your issue(s)!
Like if you found this post useful..