01-13-2013 09:36 AM
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
01-15-2013 10:50 PM
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/document
Second, the version on github in cascade-samples does this a bit differently:
https://github.com/blackberry/Cascades-Samples/tre
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
01-16-2013 07:10 AM - edited 01-16-2013 07:13 AM
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 ![]()