[AC-2697] Setting dataCollection or dataFilter on a Ti.UI.View via <Widget> or <Require> doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2014-06-30T07:30:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | alloy, arguments |
Reporter | Lee Driscoll |
Assignee | Mauro Parra-Miranda |
Created | 2013-11-08T11:28:23.000+0000 |
Updated | 2016-03-08T07:41:48.000+0000 |
Description
Hi there,
I wish to set-up custom binding logic for a widget using as much standard TiAPI principles as possible.
I have the following XML:
views/scheduler.xml
tag. The results were always the same.
Lee.
<Alloy>
<Collection src="job" />
<Window title="Scheduler" navBarHidden="false" layout="vertical">
<Widget src="uk.co.mycompany.scheduler" dataCollection="job" dataTransform="transformFn" dataFilter="filterFn" startDate="Date.today()" id="schedulerWidget" />
</Window>
</Alloy>
In my widget's controller I have the following (lazy) tests:
widgets/uk.co.mycompany.scheduler/controllers/widget.js
var args = arguments[0] || {};
args['dataCollection'] || Alloy.Globals.Log.error('[FAIL] dataCollection required parameter');
args['dataFilter'] || Alloy.Globals.Log.error('[FAIL] dataFilter required parameter');
args['dataTransform'] || Alloy.Globals.Log.error('[FAIL] dataTransform required parameter');
When I run the code, only dataTransform is present in the arguments object.
I have tested in a variety of scenarios, also using the
Hello Lee! Can you please help us with a complete test case? Currently your test case fails because there is no model. Best, Mauro
Hi Mauro ! Apologies for that - here's is the model file What else do you need? models/job.js
Hello Lee, we will need the widget as well, so we can test exactly the same code than you. Best, Mauro
We didn't get a response from customer.