FLUID-5982: Allow injected subcomponent definitions to consist of expanders

Metadata

Source
FLUID-5982
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2016-10-15T20:40:41.336-0400
Updated
2016-10-20T09:59:08.810-0400
Versions
  1. 1.5
Fixed Versions
  1. 2.0
Component
  1. Framework

Description

An irregularity in our "configuration grammar" (if we had one) allows injected subcomponents to be represented by IoC references but not by expanders. This is one of the few places where we accept one but not the other. This appeared like an esoteric use case but in fact arose during the authoring work, where we wanted to write a definition like this:

fluid.defaults("fluid.author.arrowForComponentView", {
        components: {
            sourceView: {
                expander: {
                    func: "{componentGraph}.idToView",
                    args: "{arrowForComponentView}.options.sourceId"
                }
            },
...

This allows us to avoid passing components wholesale as arguments - they are not serializable and therefore should not appear unannounced in configuration. In general we should make sure that when we fix FLUID-5556 we indeed do support the # id-based form of IoCSS selector since in highly dynamic contexts it seems that there really are use cases.

Comments