PDA

View Full Version : Error on treepanel



Jangla
25 Feb 2010, 3:54 AM
I've got a treepanel that I'm having issues with.

The panel is loaded from XMetaForm.

Here's the returned JSON for the tree:



[{"text":"England","leaf":false,"checked":false,"children":
[{"text":"South-East of England","leaf":false,"checked":false,"children":
[{"text":"Oxfordshire","leaf":true,"checked":false}]
}]
}]


Here's the XMetaForm setup:




...
{
xtype:checktreepanel,
useArrows:true,
autoScroll:true,
animate:true,
title: "Countries\/regions",
id:regions,
msgTarget:region-error,
deepestOnly:true,
width:245,
height:250,
rootVisible:false,
root:
[{
nodeType:async,
id: root,
text: root,
expanded:true
}],
dataUrl:"/regions.php"
...


The problem is that the tree really misbehaves, doesn't open nodes properly and when it does finally open one you get an error: cs[index] is undefined (ext-all-debug.js (line 47290))

Here's the URL to the actual component: http://dev.booking.five-star-systems.co.uk:89/pm-search/wizard.aspx?pid=1

Just click Continue to get to the first step with the tree in it.

So, is anyone able to help or seen this error before?

25 Feb 2010, 12:46 PM
xtype:checktreepanel, is wrong
it should be
xtype:'checktreepanel',

unless checktreepanel is a reference to 'checktreepanel'

Jangla
2 Mar 2010, 6:01 AM
Sorry for taking a while to get back - emergency project got brought forward.

Anyway, made the change you suggested to the JSON - no change in the behaviour of the tree.

Jangla
3 Mar 2010, 5:52 AM
Update - installing 3.1 Ext solved that issue but created a new one!

Now, you can expand everything but if you close the top-most node while the other nodes are all open, you get a visual error - the interim nodes disappear (as you expect) but then the bottom-most leaf node re-opens!!! No error is reported.

Here's the link: http://dev.booking.five-star-systems.co.uk:89/pm-search/wizard.aspx?pid=1