[ALOY-1545] Broken Widget event translation. Custom events on Widgets are being applied to the Widget's root View instead of the Widget's Controller itself, causing an error.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-04-09T05:33:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | alloy 1.9.11 |
Components | n/a |
Labels | defect |
Reporter | Ranando King |
Assignee | Feon Sua Xin Miao |
Created | 2017-03-03T18:13:46.000+0000 |
Updated | 2017-04-10T17:18:45.000+0000 |
Description
It only occurs when data binding. *Steps to reproduce:*Create an app.
Create a widget that triggers an event against its own controller, say "event".
Create a Model.
Add a TableView to index.js
Add a Collection for the model to index.js
Configure the TableView for data binding.
Add a TableViewRow as a template for the databound TableView.
Add the widget to the template TableViewRow using the Alloy tag.
Add an onEvent handler to the widget tag.
Build the app.
*Actual Result:* App throws "*{color:red}undefined is not a function{color}*" error Resources/onEvent ? test.getViewEx({
recurse: true
}).on("event", <yourhandlermethod>) : __defers["test.getViewEx({recurse:true})!event!<yourhandlermethod>"] = true;
*Expected Result:*
App runs as expected.
Resources/onEvent ? test.on("event", <yourhandlermethod>) : __defers["test!event!<yourhandlermethod>"] = true;
Attachments
File | Date | Size |
---|---|---|
errorDemo.zip | 2017-03-03T20:50:19.000+0000 | 9685212 |