View Full Version : Makes Ext components re-read its initialConfig?

12 Nov 2010, 9:22 AM
If I have something like:

localization_options = 'Options';

id: 'myform',
xtype: 'fieldset',
title: localization_options,
items: [{
localization_options = 'Opções';

Ext.getCmp('myform').reSet(config); <- Magic method goes here!!!

And wold be better if the magic method cold be called after the component has been rendered.

There is a way to make the components re-read their options or a better solution to make things dynamic?


ps. I wold love JS to have the options to do like in PHP... (title: @localization_options) :)

12 Nov 2010, 9:39 AM
After the component has been created, you will need to use the appropriate setter/getter to make these types of changes.



re-reading the config and updating the Component is not a realistic option.

12 Nov 2010, 5:14 PM
A component is built with an initial config. Then you have an object where you can't change private properties any longer.
It's the same in php where you set internal values in constructor, but you can't call the constructor 2nd time with your instance.