close

Filter

loading table of contents...

Studio Developer Manual / Version 2210

Table Of Contents
5.2.5.1.1 Simple Ext JS Config System (Version 3.4)

When we started with Ext JS 3.4, Configs were a simple concept: To specify the properties of some object to create, plain JavaScript object literals are used – a bit more than JSON, because their values may be more complex. These objects are passed around and eventually used to derive a class to instantiate, in Ext 3.4 based on their xtype property. The class constructor is then called with the Config object and essentially "applies" (copies) all properties onto itself (this).

For example, you could specify a button with a label as a config object and then let Ext create the actual Ext.Button instance from that Config:

var buttonCfg = {
  xtype: "button",
  label: "Click me!"
};
var button = Ext.create(buttonCfg);
console.log(button.label); // logs "Click me!"

Example 5.6.  Ext Config example


So in Ext 3.4, Configs were nothing but properties/fields of the target class which were "bulk applied" through a JSON-like object.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.