Created
November 21, 2012 18:23
-
-
Save dridk/4126663 to your computer and use it in GitHub Desktop.
Comment remplir une listView avec un ArrayDataModel ? 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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