O'Reilly logo

Ext JS 3.0 Cookbook by Jorge Ramon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using code modules to achieve encapsulation

This recipe demonstrates how to achieve encapsulation by organizing your code into modules where you can have private, privileged, and public members.

You will be building two modules, each with a private Action instance and a public run() method.

Calling a module's public run() method will cause the module to build and render a panel:

Using code modules to achieve encapsulation

The first module's private Action, which is accessible only by the code within the module, will be assigned to the panel's Import toolbar button:

Using code modules to achieve encapsulation

The second module's private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required