Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Section
Column
width50%

In Fluid Infusion, any function may act as a subcomponent creator function. To say that a particular thing is a subcomponent does not say something about the thing, but rather about the context in which the creator function is invoked. A subcomponent, in particular, need not be a Component or "View" - it may simply be any old that.

Some subcomponents, however, are components - for example, the Undo subcomponent is a component. It calls the fluid.initView initialisation function on creation, since it is associated with a particular piece of DOM real estate in which it maintains a small (decorative) UI. On the other hand, a LayoutHandler, part of the configuration for a Reorderer, whilst it is instantiated as a subcomponent, is itself not a component. Since it is not specifically associated with a particular area of the UI, it enjoys a specialised instantiation contract with its parent component.

Note that nothing about a function which is invoked as a subcomponent constructor is intended to particular tie it to a particular parent component, or indeed to the Infusion framework as a whole - any function which could be invoked as a subcomponent constructor via fluid.initSubcomponents could just as easily be invoked as a free function.

A subcomponent encapsulates functionality that is intendend to be independent of the component that is using it (the parent component). By defining subcomponents separately and allowing parent components to identify them declaratively, subcomponents can be reused or interchanged.

The identification and configuration of subcomponents is carried out through the parent component's options. As part of the creation of the parent component, any necessary subcomponents are created according to the configuration information provided in the options.

Column
solid
Panel
borderStyle
borderColor#566b30
bgColor#fff
titleBGColor#D3E3C4
borderStylesolid
titleOn This Page
Table of Contents
toc
maxLevel
maxLevel
5
minLevel25
Panel
borderColor#321137
bgColor#fff
titleBGColor#c1b7c3
borderStylesolid
titleSee AlsoborderStylesolid
Panel
borderColor#321137
bgColor#fff
titleBGColor#cccccc
borderStylesolid
titleStill need help?borderStylesolid

Join the infusion-users mailing list and ask your questions there.

...