PDA

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



frederic.bastide
27 Aug 2010, 5:11 AM
Hello,
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

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

frederic.bastide
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

sven
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?

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

frederic.bastide
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.

sven
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 ;)

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

frederic.bastide
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

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

frederic.bastide
2 Sep 2010, 1:20 AM
Hello,

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?
Thanks.

Frédéric BASTIDE

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

sven
2 Sep 2010, 1:31 AM
It looks like this for me:
http://www.svenbrunken.de/images/screenshots/SS-2010.09.02-11.31.04.png

The empty but open nodes return an empty arraylist.

frederic.bastide
2 Sep 2010, 1:50 AM
And for me:
before expand:
22210

when expand 1234 folder:
22211

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

Frédéric

sven
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.

frederic.bastide
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?

Frédéric

sven
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.

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