Metadata
- Source
- FLUID-5758
- Type
- Bug
- Priority
- Critical
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Antranig Basman
- Reporter
- Colin Clark
- Created
2015-09-10T00:21:22.236-0400 - Updated
2017-02-27T15:49:17.606-0500 - Versions
-
- 2.0
- Fixed Versions
-
- 2.0
- Component
-
- Framework
Description
It appears that in the current framework, expanders can't be used when they are defined within an event listener record. Arguments to the listener are resolving as undefined via IoC expressions such as "{arguments}.0"
Here's a simple (though hastily-assembled) example that illustrates the problem:
fluid.defaults("test.component", {
gradeNames: "fluid.component",
events: {
onDoIt: null
},
listeners: {
onDoIt: {
funcName: "test.component.doingIt",
args: [
{
expander: {
funcName: "test.component.expandValue",
args: ["{arguments}.0"]
}
}
]
}
}
});
test.component.expandValue = function (value) {
return "Katze " + value;
};
test.component.doingIt = function (value) {
console.log(value);
};
var comp = test.component();
comp.events.onDoIt.fire("Hugo");