EXT JS toLayout on Viewport doesnt show anything...

Posted by Nazariy on Stack Overflow See other posts from Stack Overflow or by Nazariy
Published on 2009-10-27T12:34:49Z Indexed on 2010/05/23 14:01 UTC
Read the original article Hit count: 305

Filed under:
|
|

After reading many example about adding new components in to existing container without reloading whole page I run in to small problem while combining tree and tabs inside Viewport component.

What I'm trying to do is to register on click event to tree node and load in to content container new component, depending on node type it can be tabpanel, gridpanel or any other available component.

here is short example of tree object:

{

xtype: 'treepanel', id: 'tree-panel', listeners: { click: function(n) {

var content = Ext.getCmp('content-panel');

content.setTitle(n.attributes.qtip);

//remove all components from content-panel content.removeAll();

content.add(dummy_tabs2);

content.doLayout();

return; } }} All DOM manipulation went fine, everything registered properly, new Title shown, but dummy_tabs2 are not shown. I did try to set various properties for doLayout(true|false, true|false) but nothing happens.

Am I doing something wrong?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about extjs