Titanium JIRA Archive
Alloy (ALOY)

[ALOY-394] Model-view binding on Views using collections

GitHub Issuen/a
TypeStory
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2012-12-11T23:47:05.000+0000
Affected Version/sn/a
Fix Version/sAlloy 0.3.4, 2012 Sprint 25
ComponentsRuntime, XML
LabelsGA-candidate, notable
ReporterTony Lukasavage
AssigneeUnknown
Created2012-11-15T18:48:33.000+0000
Updated2018-03-07T22:25:58.000+0000

Description

We need to be able to use model-view binding on generic view components just as we do on TableViews in ALOY-104. This will allow views in Alloy do render a repeated series of UI components based on a Collection.
<Collection src="myModel"/>
<View layout="horizontal" dataCollection="myModel">
    <ImageView image="{image}"/>
</View>
We also need to determine if all Titanium views should be able to do this or if we should reserve this for the basic ones like Window, View, etc...

Comments

  1. Tony Lukasavage 2012-12-11

    collection binding now works on arbitrary titanium views (Ti.UI.View, Ti.UI.ScrollView, etc...), just as with TableViews. A full test app showing how a Ti.UI.ScrollView can be used to contain collection-generated UI components can be found here: https://github.com/appcelerator/alloy/tree/master/test/apps/models/journal

JSON Source