alloy-sync-restapi
Version:
RestAPI Sync Adapter for Titanium Alloy
22 lines (18 loc) • 633 B
text/xml
<Alloy>
<Collection src="users"/>
<Window class="container">
<Button id="addButton" onClick="addUser"/>
<ListView id="userList" defaultItemTemplate="user" onItemclick="userProfile">
<Templates>
<ItemTemplate bindId="user" name="user">
<Label bindId="name" class="name"/>
</ItemTemplate>
</Templates>
<ListSection id="section" dataCollection="users">
<!-- We need to add the ID of each model in the Collection
so that we can use it later to get a specific user by their ID -->
<ListItem template="user" user:id="{id}" name:text="{name}"/>
</ListSection>
</ListView>
</Window>
</Alloy>