View Full Version : Problem to view Tree on viewportmenu

31 Mar 2011, 8:35 PM

I am very novice to Ext JS, and trying to develop a form using it.
I am able to see the whole treepanel and its elements (parents and children in tree and in expanded form), when I set thw window as show(0 on the same JS page, but NOT ABLE to view Treepanel when set window as show() from viewportmenu.

In my code -
I have used textfields, combos, buttons etc. and also have taken TreePanel in the same form.
The JS page, say MyJS.js comprises of one window say myWin, 3 formpanels in that.
1) In first formpanel I've taken some textfields, combos, and buttons
2) In 2nd formpanel, some radio buttons
3) 3rd formpanel, have taken Treepanel

I have created login and hence maintained session. After user login he will be navigated through some menu link to MyJS.js. So all JS pages are loaded at the starting, and I've set myWin.show() on viewpportmenu.js and have kept rest of the windows hidden.

when I set myWin.show() on the same JS page, I can view the whole tree strutcture along with parents and children. But when I try to do the same from viewportmenu.js, I got the following error -

uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: :: anonymous :: line 35452" data: no]

Line 0

Code for tree is -

GLtree_EXT = new Ext.tree.TreePanel({
//renderTo : GLtreeform_EXT,
height : 240,
width : 335,
useArrows : true,
dragConfig : false,
draggable : false,
autoScroll : true,
animate : true,
enableDD : false,
trackMouseOver : true,
containerScroll : true,
//rootVisible : false,
rootVisible : true,
frame : true,
//hidden : true,
hidden : false,
root : {
nodeType : 'async'
// auto create TreeLoader
dataUrl : 'json/glExt.json'
listeners : {'checkchange' : function(node, checked) {
if (checked) {
// node.getUI().addClass('complete');
} else {


GLtree_EXT.filter = new Ext.ux.tree.TreeFilterX(GLtree_EXT);

//GL Tree Panel
GLtreeform_EXT = new Ext.FormPanel({
//x : '400px',
title: '<font color=#15428B size=2><b>Entire GL List</b></font>',
x: '355px',
y: '0px',
width: 340,
//height : 403,
//height : 535,
//height : 313,
height: 293,
renderTo : winGLHeadingExtension,

tbar:['Search For:', {
,onTriggerClick:function() {
keyup:{buffer:150, fn:function(field, e) {
if(Ext.EventObject.ESC == e.getKey()) {
else {
var val = this.getRawValue();
var re = new RegExp('.*' + val + '.*', 'i');
GLtree_EXT.filter.filter(re, 'text');
items: [GLtree_EXT]

Please do the needful on this, already have spent enough time on it. I hope I would get the solution from the experts over this.

Thanks in advance,