Versions Compared

Key

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

Overview

The Undo subcomponent is a special class of subcomponent called a component decorator. It can be used to provide undo support for any component that bears a model.

Currently, the Fluid components that support Undo are:


Enabling Undo on Components that Support it

The Undo subcomponent can be added to a parent component that supports it by specifying the subcomponent type and options in the componentDecorators option parameter to the parent component. (See Subcomponents for more information.)

Code Block
javascript
javascript
var opts = {
    componentDecorators: {
        type: "fluid.undoDecorator",
        options: {
            selectors: myUndoSelectors,
            renderer: myUndoRenderer
        }
    }
};

var myComponent = fluid.component(container, opts);

If no customized options are desired, the string type can be provided as the componentDecorators value instead:

Code Block
javascript
javascript
var opts = {
    componentDecorators: "fluid.undoDecorator"
};

var myComponent = fluid.component(container, opts);
Column
width35%
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.

...