PDA

View Full Version : Dynamic config params update



webarts-pl
3 Sep 2010, 2:20 AM
Hi,
How can I dynamically update exsisting component config params value.

I try:
Ext.getCmp('myToolTipCmp').update({closable:true});
Ext.getCmp('myToolTipCmp').doLayout();

But unfortunatelly it doesn't work.

Condor
3 Sep 2010, 2:43 AM
It is not that easy.
1. Some properties can be changed at runtime
2. Some have their own setter method
3. Some properties can be changed, but require an extra method to be called to notify the component of the change
4. Some properties can only be changed by running a lot of extra code.

The problem is, you need to look at the component source code to see which one applies.

Ext.Window.closable is category 4 - You need to add or hide the close tool and add or disable the Esc keymap.

webarts-pl
3 Sep 2010, 2:49 AM
As I thought I will be a road straight to code.hell ;)
Btw thanks for a tip ;)