KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a regionContent panel which I add to my viewport. How can I replace its content with new content? ... var regionContent = new Ext.Panel({ id: 'contentArea', region: 'center', padding:'10', autoScroll: true, html: 'this is the original content' }); var viewport = new Ext.Viewport({ layout: 'border', items: [ regionMenu, regionContent ] }); var newPanel = new Ext.Panel({ region: 'east', title: 'Info Panel', width: 300, html: 'this is a panel that is added' }); // regionContent.update(newPanel); //renders as javascript code ??? // regionContent.remove(...) //how do I remove ALL CONTENT, I will not know what is in this panel to remove it specifically regionContent.add(newPanel); //adds to original content but does not replace it regionContent.doLayout(); ... .update() does this: .add() does this:
Tags (comma-separated)
Save Edits
Cancel