Versions Compared

Key

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

...

Section
Column

Excerpt

Decorators allow users of the Renderer to attach various things, such as functions, class names, etc., to the components at render time. A number of different types of decorators are currently supported.

Using Decorators

To use a decorator, include it in the component tree for the component in question, using the decorators field. This field contains an array of objects providing configuration information for the desired decorators. The contents of each object will vary based on the decorator type. For example, the addClass decorator will specify a string of class names, the jQuery decorator will specify a function name and a list of parameters.

Decorators are specified using a notation similar to that of Subcomponents in an options structure. They include a type field and whatever other fields are necessary, based on the type:

Code Block
javascript
javascript
{
  ID: "my-id",
  value: aValue,
  decorators: [
      {type: "typeName",
       field: value,
       field: value
      }
  ]
}
Column
width30%
Panel
borderColor#566b30
bgColor#fff
titleBGColor#D3E3C4
borderStylesolid
titleOn This Page
borderStylesolid
Table of Contents
maxLevel5
minLevel2
Panel
borderColor#321137
bgColor#fff
titleBGColor#c1b7c3borderStylesolid
titleSee Also
borderStylesolid
Panel
borderColor#321137
bgColor#fff
titleBGColor#ccccccborderStylesolid
titleStill need help?
borderStylesolid

Join the fluid-talk mailing list and ask your questions there.

...