main.qml Example File
filtereddatamodel/assets/main.qml
import bb.cascades 1.0
Page {
Container {
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
ListView {
horizontalAlignment: HorizontalAlignment.Center
dataModel: _model
listItemComponents: [
ListItemComponent {
type: "header"
Label {
text: (ListItemData.expanded ? "\u25BC " : "\u25B6 ") + ListItemData.data
textStyle {
base: SystemDefaults.TextStyles.BigText
color: Color.Black
fontWeight: FontWeight.Bold
}
}
}
]
onTriggered: {
clearSelection()
select(indexPath)
}
onSelectionChanged: {
_app.selectionChanged(indexPath, selected)
}
}
}
}