FilesystemContainer + Adding items to filesystem - No Refresh

Hi there,

I’ve made an application which shows me my filesystem in a tree.
By using the DragAndDropWrapper I can add new files from my desktop to my filesystem.

The problem is that the container does not recognise the added file. I suppose the container works by caching.
What I need to do now is recreate the FilesystemContainer and connect that one to my tree as the new ContainerDataSource.

My question is:
Is there a way to refresh the FileSystemContainer such that it ‘sees’ that there are new items?
Or is there a way to add the new file myself to the container as it does not support the addItem(Object id); method.

FileSystemContainer actually does not cache anything but reads directly from the file system. So you only need to do something that causes the Tree to be redrawn, at which point it will ask the container for the items and get also the newly added item. Calling tree.requestRepaint() would be a simple way.

Ewout,

Did the table.requestRepaint() end up resolving your issue? I am encountering a similar problem using a table with a FileSystemContainer and the requestRepaint() does not seem to work.

Thanks!

josh