Skip to content

Instantly share code, notes, and snippets.

@dridk
Created November 21, 2012 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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