Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Div
classfloatRight
Panel
borderColor#ccc
bgColor#fff
titleOn This Page
borderStylesolid
Table of Contents
maxLevel5
minLevel2
maxLevel5

Overview

A component "grade" component grade extends on the notion of component defaults (fluid.defaults). Where a fluid.defaults is used to store and retrieve a component's default settings, the grade is a form of type definition : a name for a particular collection of default configuration options. Developers can identify a grade for their component: this will add the default configuration options to those defined by the developer, as well as automate some things like the creation of event firersthat represents a collection of component defaults and is intended for reuse in other component's defaults definition. In other words, a particular component's fluid.defaults can be called a grade when the component name is used as a base grade within another component's defaults.

Grades essentially build upon each other, and can be composed as needed. The following table describes the exiting grades offered by the Framework and how they relate to each other.

...

Code Block
javascript
javascript

fluid.defaults("fluid.uploader.demoRemote", {
    gradeNames: "fluid.eventedComponent",
    ...
});
Code Block
javascript
javascript

fluid.defaults("cspace.messageBarImpl", {
    gradeNames: ["fluid.rendererComponent"],
    ...
});

...

Code Block
javascript
javascript

fluid.defaults("cspace.util.relationResolver", {
    gradeNames: ["fluid.modelComponent", "autoInit"],
    ...
});

...

Code Block
javascript
javascript

fluid.defaults("fluid.uploader.fileQueueView", {
    gradeNames: ["fluid.viewComponent", "autoInit"],
    ...
});

...

Code Block
javascript
javascript

fluid.defaults("cspace.tabs", {
    gradeNames: ["fluid.viewComponent"],
    ...
});
cspace.tabs = function (container, options) {
    var that = fluid.initView("cspace.tabs", container, options);
    that.refreshView = function () {
       ...
    };
    ...
};