This documentation is currently being moved to our new documentation site.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

_demands spec format

The demands specification object can occur in a few forms:

Recommended:

funcName

the string name of the creator function for the demanding subcomponent.
NOTE: If this property is not present, the original function name (agreeing with the first argument to fluid.demands()) is to be used instead

options

an object specifying how the options argument to a component's creator function (identified as a pseudoargument is to be assembled

container

an IoC-resolved reference (most likely of the form {parentComponent}.dom.selectorName expressing where the container argument to a View is to be taken from

any pseudoargument name

The name of any pseudoargument defined by the grade of the component which is to be created, representing the slot of a positional argument in the transformed argument list

Alternative:

funcName

the string name of the creator function for the demanding subcomponent.
NOTE: If this property is not present, the original function name (agreeing with the first argument to fluid.demands()) is to be used instead

container

an IoC-resolved reference (most likely of the form {parentComponent}.dom.selectorName expressing where the container argument to a View is to be taken from

mergeOptions

an array of objects composing the options argument to a component's creator function is to be assembled by merging several different IoC-resolved records together

any pseudoargument name

The name of any pseudoargument defined by the grade of the component which is to be created, representing the slot of a positional argument in the transformed argument list

mergeOptions is a rarely-used alternative to options. It may be useful in cases where a user wants to write a single demands block, yet have several values merged together in a particular sequence if the demands block acts.

Note that mergeOptions and options are mutually exclusive: Use one or the other, but not both.

Alternative:

funcName

the string name of the creator function for the demanding subcomponent.
NOTE: If this property is not present, the original function name (agreeing with the first argument to fluid.demands()) is to be used instead

args

array of parameters to the function, or a single argument.
IMPORTANT NOTE: If the args property is used, its contents will be merged with the component's defaults, but options specified through a parent component's components object will be ignored completely.

Note: If the args record is used, NONE of the other mentioned elements can be present (none of options, mergeOptions, container, etc.).

Alternative:

args

array of parameters to the function, or a single argument.
IMPORTANT NOTE: If the args property is used, its contents will be merged with the component's defaults, but options specified through a parent component's components object will be ignored completely.

In this case, the funcName entry is interpreted as being empty.