PDA

View Full Version : Using the "update" and "render" methods of Ext.Component



savsw
12 Sep 2010, 8:48 PM
Hello,

Sometimes when perform some actions on elements, that extend Ext.Compoment class,
it seems update does not work correctly. (either layout is broken or some display features are not updated correctly)
I'd like to have possibility explicitly update element's layout.

First, I don't understand why the update() method of Ext.Component takes three arguments.
Can I call something like:
var panel = new Ext.Panel(...);
panel.update();
?

Or concerning render(). If component is within container I should not invoke the method manually.
But can I call it like:
panel.render(/*How to access its container here?*/ container);

Regards.

Condor
12 Sep 2010, 11:14 PM
1. What are you expecting that update() does?

2. Do NOT render components inside a container!!! Instead, add() them to the container and call doLayout().