dojox/grid/enhanced/_PluginManager (version 1.10)

Summary

Singleton plugin manager

Plugin manager is responsible for:

  1. Loading required plugins
  2. Handling collaboration and dependencies among plugins

Some plugin dependencies:

Usage

var foo = new _PluginManager(inGrid);
dojox/grid/enhanced/_PluginManager
Parameter Type Description
inGrid undefined

Property Summary

Method Summary

  • _init(pre) Find appropriate plugins and load them
  • _initView(view) Overwrite several default behavior for each views(including _RowSelector view)
  • _normalize(p,plugins,registry,loading) Normalize plugin properties especially the dependency chain
  • _parseProps(plugins) Parse plugins properties
  • destroy() Destroy all resources
  • forEach(func,args)
  • getPlugin(name) Get plugin("name")
  • getPluginClazz(clazz) Load target plugin which must be already required (require(..))
  • isFixedCell(cell) See if target cell(column) is fixed or not.
  • loadPlugin(name) Load required plugin("name")
  • pluginExisted(name) Check if plugin("name") existed
  • postInit() Load plugins after DataGrid.postCreate() - the default phase when plugins are created See EnhancedGrid.postCreate()
  • preInit() Load appropriate plugins before DataGrid.postCreate().
  • registerPlugin(clazz,props) Register plugins - TODO, a better way rather than global registry?
  • startup()

Properties

_connects

Connection list

_options

Normalized plugin options

_plugins

Plugin list

Methods

_init(pre)

Find appropriate plugins and load them

Parameter Type Description
pre Boolean

True - preInit | False - postInit(by default)

_initView(view)

Overwrite several default behavior for each views(including _RowSelector view)

Parameter Type Description
view undefined
_normalize(p,plugins,registry,loading)

Normalize plugin properties especially the dependency chain

Parameter Type Description
p String

Plugin name

plugins Object

Plugin properties set by user

registry Object

The global plugin registry

loading Object

Map for checking process state

Returns:undefined
_parseProps(plugins)

Parse plugins properties

Parameter Type Description
plugins Object

Plugin properties defined by user

destroy()

Destroy all resources

forEach(func,args)
Parameter Type Description
func undefined
args undefined
getPlugin(name)

Get plugin("name")

Parameter Type Description
name String

Plugin name

Returns:Object | undefined | null

Plugin instance

getPluginClazz(clazz)

Load target plugin which must be already required (require(..))

Parameter Type Description
clazz Class | String

Plugin class

Returns:Class|String | undefined

Plugin class

isFixedCell(cell)

See if target cell(column) is fixed or not.

Parameter Type Description
cell Object

Target cell(column)

Returns:Boolean | undefined

True - fixed| False - not fixed

loadPlugin(name)

Load required plugin("name")

Parameter Type Description
name String

Plugin name

Returns:Object | null | undefined

The newly loaded plugin

pluginExisted(name)

Check if plugin("name") existed

Parameter Type Description
name String

Plugin name

Returns:Boolean | boolean

True - existed | False - not existed

postInit()

Load plugins after DataGrid.postCreate() - the default phase when plugins are created See EnhancedGrid.postCreate()

preInit()

Load appropriate plugins before DataGrid.postCreate(). See EnhancedGrid.postCreate()

registerPlugin(clazz,props)

Register plugins - TODO, a better way rather than global registry?

Parameter Type Description
clazz String

Full class name, e.g. "dojox.grid.enhanced.plugins.DnD"

props Object
Optional

Plugin properties e.g. {"dependency": ["nestedSorting"], ...}

startup()
Error in the documentation? Can’t find what you are looking for? Let us know!