FLUID-5155: The invoker that returns dynamic grades is not resolved when its host component being passed down via IoCSS

Metadata

Source
FLUID-5155
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Cindy Li
Created
2013-09-24T15:47:08.431-0400
Updated
2014-03-03T11:27:59.361-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. Framework

Description

The host component that has dynamic grade:

fluid.defaults("fluid.tests.dynamicGrade", {
gradeNames: ["fluid.littleComponent", "autoInit", "{that}.computeGrade"],
invokers: {
computeGrade: "fluid.tests.computeDynamicParent"
}
});

When this host component is passed down to a subcomponent as a grade:

fluid.defaults("fluid.tests.root5154", {
gradeNames: ["fluid.littleComponent", "autoInit"],
components: {
subComponent: {
type: "fluid.littleComponent"
}
},
distributeOptions: {
source: "{that}.options.subComponent",
removeSource: true,
target: "{that subComponent}.options"
}
});

...
var that = fluid.tests.root5154({
subComponent: {
gradeNames: "fluid.tests.dynamicGrade"
}
});

The invoker for dynamic grade, which is "{that}.computeGrade", doesn't get resolved correctly in the final instantiated root.

Examining the grade name list of the subComponent "that.subComponent.options.gradeNames", "{that}.computeGrade" was shown as a grade rather than the actual returned value from the "computeGrade" invoker.

A pull request to demonstrate this issue: https://github.com/fluid-project/infusion/pull/410

Comments