View Full Version : [FNR] Bug in asyncronous tree in gxt2.2 RC1

27 Aug 2010, 5:11 AM
i have written a filemanager it works fine in GXT2.1.1.
When i try it with GXT2.2 RC1 when i open an empty folder the icon never change
it stays always with the wait icon.
My code is based on the example of async tree from the explorerdemo but there is no empty folder in this demo.

Frédéric BASTIDE

27 Aug 2010, 5:21 AM
Can you please post a fully working testcase of your problem that implements EntryPoint?

27 Aug 2010, 5:43 AM
Tahnks for your answer but it's a bit difficult because it's a part of my application.
I think you can easily reproduce this problem in the showcase example of async tree by create an empty folder in your gxt structure
because, like i said, my code is very similar.

Frédéric BASTIDE

27 Aug 2010, 5:44 AM
The example works as intended. Can you please tell me how to modify it exactly so i can brake it?

27 Aug 2010, 5:54 AM
I was able to figure out what oyu mean.

27 Aug 2010, 6:00 AM
I think you don't have to modify the example code to reproduce this problem.
If i understand correctly in async tree example the tree represents the file structure of your example sources.
You have in this structure to create an empty folder.
After launch the example and try to open this empty folder.

27 Aug 2010, 6:03 AM
Yes, the server needs to return an empty list. I understood your post that there needs to be an empty node on the TreePanel, not an emply list returned from the server.

That is why a testcase is always the best solution to show a problem ;)

27 Aug 2010, 6:06 AM
Fixed in SVN as of revision 2201

27 Aug 2010, 6:48 AM
Thanks again!!! and sorry for no testcase!!!

My compagny is migrating his swing application under GXT. We will order a commercial license when our new product will be marketed.
During this (long) developement time we don't want to pay for a subscription license... but it's interesting to stay in touch with the latest release so i want to use GXT2.2 RC1 and help you to correct bugs.
What can i do in this condtions?
Can you send me only this fix?
Is there an other solution?

Frédéric BASTIDE

27 Aug 2010, 6:49 AM
You will need to wait for the next release, which probably happens on monday.

2 Sep 2010, 1:20 AM

i have downloaded the 2.2.0 release it works better but i still have a little problem.The icon doesn't stay with wait icon but doesn't update to open icon ie after open an empty folder no icon is displayed.
Do i have missed something?

Frédéric BASTIDE

2 Sep 2010, 1:23 AM
Can you please post a testcase that implements EntryPoint for this?

2 Sep 2010, 1:31 AM
It looks like this for me:

The empty but open nodes return an empty arraylist.

2 Sep 2010, 1:50 AM
And for me:
before expand:

when expand 1234 folder:

i take a look in my code and give you news later.


2 Sep 2010, 1:51 AM
You need to override the hasChildren method of the TreePanel. Else there is no way we can know, that it is not a leaf.

2 Sep 2010, 2:49 AM
Thanks a lot.
It's what i have done and it works fine but:

why the method hasChildren of TreePanel ask haschildren of loader only if node is not loaded?
I think it would be better TreePanel always ask to the loader:

protected boolean hasChildren(M model) {
TreeNode node = findNode(model);
if (loader != null) { //&& !node.loaded) {
return loader.hasChildren(node.m);
if (!node.leaf || store.hasChildren(node.m)) {
return true;
return false;

in my case it works but perhaps i don't see all ;=))

What do you think about to do this in TreePanel class of GXT?


2 Sep 2010, 2:56 AM
This cannot be done as this is a major change in behaviour. Simple override the hasChildren method of the TreePanel.

2 Sep 2010, 3:04 AM
Ok no problem but i'm still thinking it would be more logical...