Problem refreshing the Tree Component icons

Hello,

I'm using the Tree, adding the nodes dinamically, following the example: http://www.netbeans.org/kb/55/vwp-databasetree.html

This Tree shows the access permissions from the users, and show a red icon on the itens without permissions and a green icon on the itens with permissions.

In the nodes, I add an action that change this permissions when the user click.

If the permission is Ok on the clicked item, the action remove this permission and vice-versa.

The action is working fine, but the problem is the refresh of the tree after click. The icons stay like before the click. It is refreshed only if I navigate to another page and return after. Then the icons are showed correct.

In the method that add the nodes, I select the node icons like this:

if (havePermissionModulo(grupo, modulo)){

moduloNode.setImageURL(imgPermissaoOk);

}else{

moduloNode.setImageURL(imgPermissaoNegada);

}

Where imgPermissaoOk and imgPermissaoNegada have the path to the images.

Sorry by my english :)

[1079 byte] By [gustavodelgadoa] at [2007-11-27 2:40:07]
# 1
It is hard to tell When the user clicks on an icon, is the page submitted to the server and the page redisplaying itself? Is the tree's clientSide property cleared (that is, false).Is the browser caching the images? What if you hit a Shift-Reload?
jetsonsa at 2007-7-12 3:02:45 > top of Java-index,Development Tools,Java Tools...