For my Blackberry 10 application, what I would like to do is to connect a tabbed pane to a navigation pane. However how can I do this when the user chooses an item from a list? I have created a list view where the source of items is based on an XML file but I want to know what needs to change within the onTriggered event for my ListView because I think it has something to do with that and at the moment it only pushes pages.
QML
import bb.cascades 1.2
Page {
id: waterlooandcity
Container {
ListView {
dataModel: XmlDataModel {source: "asset:///models/WC.xml"}
listItemComponents: [
ListItemComponent {
type: "item"
content: Container {
StandardListItem {
title: ListItemData.title
description: ListItemData.zone
}
}
}
]
onTriggered: {
var chosenItem = dataModel.data(indexPath);
Qt.pageTitle = chosenItem.title;
chosenPage.source = chosenItem.file;
nav.push(chosenPage.createObject());
}
}
}
}
XML
<root>
<item title="Bank" zone="Fare zone 1" file="Bank_(WC).qml"/>
<item title="Waterloo" zone="Fare zone 1" file="WAT_(WC).qml"/>
</root>