Ext JS plugin methods in the web UI framework

The sc.plat.PluginRegistry class that is used by Ext JS plugins includes the following methods for registering and deregistering plugins:
  • registerPlugin(plugin, boolOverride)

    Adds plugin to registry.

  • registerTypePlugin(name, id)

    Registers the type with the plugin corresponding to the ID passed. Before a type is registered with an ID corresponding to a plugin, a plugin with that ID must be registered using the registerPlugin method.

  • unregisterTypePlugin(name, id)

    Unregisters the plugin for the component type if a plugin has been registered with the ID passed.

The following table describes the parameters for these methods:

Parameter Method(s) Description
plugin registerPlugin
An object/array plugin object or array of plugin objects that includes:
  • (Required) An init method that accepts a reference of the type Ext.Component.
  • A property ID (id) that is the unique ID of the plugin object.
The order of plugin objects formed in the array is:
  1. Plugins registered under xtype (if any).
  2. Plugins registered under sctype (if any).
  3. Plugins registered under binding data (default implementation).
  4. Plugins passed while creating the component (if any).
boolOverride registerPlugin

An optional boolean value.

  • true - If the ID of the plugin passed is already registered against a different plugin, then the new plugin replaces the old plugin and the new plugin is registered against this ID.
  • false (default) - If two plugins are registered with the same id, then the first plugin takes precedent over the second plugin. The following message appears:

    ID already exists

lululu
  • registerTypePlugin
  • unregisterTypePlugin
(String) Component type name:
  • xtype or sctype
  • Custom type such as sourceBinding in bindingData of component
id registerTypePlugin (String) ID of the plugin.
id unregisterTypePlugin (String) The unique ID for each plugin that it was registered against.