Skip to content

Instantly share code, notes, and snippets.

@dridk
Created November 21, 2012 18:23
Show Gist options
  • Save dridk/4126663 to your computer and use it in GitHub Desktop.
Save dridk/4126663 to your computer and use it in GitHub Desktop.
Comment remplir une listView avec un ArrayDataModel ? 1
// Drilldown navigation project template
import bb.cascades 1.0
Page {
Container {
Button {
text: "add"
onClicked: {
var data = {"nom":"sacha", "age":"23"};
model.append(data);
}
}
ListView {
dataModel: ArrayDataModel {
id:model
}
listItemComponents: [
ListItemComponent {
Button {
text: ListItemData.nom
}
}
]
} // end listview
} // end container
} //end page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment