[ALOY-443] Enable more complex notation in binding
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-07-16T16:43:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.5.0 |
Components | Models, XML |
Labels | notable, qe-automation, qe-manualtest |
Reporter | Tony Lukasavage |
Assignee | Feon Sua Xin Miao |
Created | 2012-12-21T13:41:13.000+0000 |
Updated | 2016-03-16T12:55:33.000+0000 |
Description
Allow developers to use syntax like the following in collection/model bindings:
<Alloy>
<Model src="someModel"/>
<Window title="{someModel.title} {someModel.subtitle}"/>
</Alloy>
Basically, instead of assuming the whole property needs to be wrapped in \{\}, allow developers to put as many of them in the attribute as they want.
ALOY-599 is mostly a duplicate of this ticket but also includes additional information regarding its usage. They should probably be separated into multiple tickets, but for now I'll simply leave this linked ticket here.
PR: https://github.com/appcelerator/alloy/pull/479 Test app: https://github.com/feons/alloy/tree/ALOY-443/test/apps/testing/ALOY-443 Functional Test: 1. Run the test app on iOS 2. There are multiple data binding notation in the tag attribute, data should be displayed without {}. These 3 test cases failed, which is expected because there are some changes in the generated code. {noformat} advanced/proxy_property_requires [android] matches known good generated code for alloy/widgets/com.foo.widget/controllers/row_bind.js advanced/proxy_property_requires [ios] matches known good generated code for alloy/widgets/com.foo.widget/controllers/row_bind.js advanced/proxy_property_requires [mobileweb] matches known good generated code for alloy/widgets/com.foo.widget/controllers/row_bind.js {noformat}
Was your intention that this PR support the notation formats shown in ALOY-599? Such as:
(It does not) Would you also open a separate ticket to update the _generated code for the advanced/proxy_property_requires test app?
I'll open a separate ticket to update _generated code. Thanks Tim!
Updated PR to support these:
PR merged