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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

DRAFT; still incomplete


One of the primary functions of the Infusion Preferences Framework is to allow you to create a Preferences Editor: a collection of adjusters that users can use to set their interface preferences.

The Preferences Framework provides a utility that creates and instantiates a preferences editor in a single step, given primary and auxiliary schemas.

var prefsEditor = fluid.prefs.create(container[, options]);


container(required) (String) A CSS-style selector that will contain the preferences editor markup.


(optional) (Object) Configuration options. See Options below for more information.

Return Value


(Object) The preferences editor instance.


build(Optional) Configuration options for the builder; see Builder Options below for more information.Object



(Optional) Configuration options for the preferences editor itself. See PrefsEditor Options below for more information.Object{}

Builder Options


(Optional) A list of grade names to be used for the builder.

This option can be used to specify the names of grades that define schemas, as an alternative to specifying the schemas through the direct options. If you do not provide the auxiliarySchema option, you must include the grade name of a grade that includes an auxiliary schema.

Array of stringsnone
primarySchema(Optional) A JavaScript object providing primary schema details. See Processing the Schemas below for more details.Object


auxiliarySchema(Optional) A JavaScript object providing auxiliary schema details. See Processing the Schemas below for more details. If you do not specify the grade name of a grade that includes an auxiliary schema, you must include this option.Object


NOTE: You must provide at least one of

  • the auxiliarySchema option, or
  • gradeName indicating an auxiliary schema.

If you provide both, they will be merged (with the auxiliarySchema overriding anything in the grade schema), but you must provide at least one.

PrefsEditor Options



(Optional) The string name of a grade of preference editor.

The Preferences Framework provides three built-in types of editor:


Integrators can use one of these grades, or define their own grade, using one of these grades as a base grade.



The simplest way to create a separated panel preferences editor is to provide the primary and auxiliary schema using the options:

var prefsEditor = fluid.prefs.create({
    build: {
        primarySchema: {...},
        auxiliarySchema: {...}

The preferences editor will be instantiated and rendered into the container specified as the first argument to fluid.prefs.create().


 fluid.prefs.create("#myPrefsEditor", {
    build: {
        gradeNames: ["fluid.prefs.auxSchema.starter"],
        auxiliarySchema: {
            "template": "prefsEditorPreview.html",
            "tableOfContents": {
                "enactor": {
                    "tocTemplate": "../../../components/tableOfContents/html/TableOfContents.html"
    prefsEditor: {
        prefsEditorType: "fluid.prefs.fullPreview"



  • No labels