Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27072] When using Alloy Data Binding, allow the dataCollection to be set in the controller

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsdata-binding
ReporterRyan Aston
AssigneeShak Hossain
Created2019-04-03T08:59:19.000+0000
Updated2019-05-09T23:17:12.000+0000

Description

In our application we have a composite view that shares models/collections across many sub views. We also like to utilize data binding wherever possible, however this presents a bit of a challenge. We can only bind to Collections and Models defined in the XML markup, and we cannot replace those Collections/Models with shared references across each sub controller. It appears today our only option is to use a singleton Collection/Model which is not ideal if you need multiple instances of Collections/Models to be accessed across multiple view bindings. If setting the Collection/Model inside the sub controller is not an option perhaps we could introduce a method of passing a reference to the Collection/Model in the createController statement.

Comments

  1. Sharif AbuDarda 2019-04-09

    Hello, can you share some native guide or docs link on how this is handled natively? or a similar native equivalent of the Alloy data building in the native environment. Thanks.

JSON Source