开发者

What is Ext.Component.initialConfig, what does it do, and in what context is it used?

When does initialConfig 开发者_如何学Pythonget called? What's the difference between it and initComponent?


initialConfig never gets called, because it is not a function. It's the configuration object, that was used to configure the component when it was actually created.

For example when you do:

var textField = new Ext.form.TextField({
  fieldLabel: 'A textfield',
  itemId: 'textField'
});

the

{
  fieldLabel: 'A textfield',
  itemId: 'textField'
}

object becomes a read only property textField.initialConfig

initComponent() is a private function, that is responsible for configuring the component during creation.


Your initialConfig is what is used when the component fires it's constructor in initComponent().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜