What Is An ExtJS Plugin?

Here are some facts that will help you understand Ext JS plugins.

  • An ExtJS plugin is a class that defines and encapsulates behavior to be added to one or more ExtJS components.
  • Plugins are attached to their target component(s) via the plugins configuration option
  • Instead of exposing services that the target component can use, a plugin gains access to the component via a required function, init(), that takes a reference to the component
  • A plugin's init() function is called at a specific point of its target component's lifecycle: after the component is initialized and before it is rendered
  • A plugin can be lazy-instantiated if its target is lazy-instantiated

Can you spot the differences and similarities with other ways of modifying component behavior in ExtJS, for example, subclassing and configuration options?

E-mail   Permalink    Comments(0)   Trackback

Tags: ,