I have a application which contains a Tree control and a Button control.
The Tree is used for representing a XML file content, and the Button is used for buliding XML
files. the brief work flow is like below:
I click the Button to invoke a Java function to build XML files to a certain directory on my disk using RemoteObject, while this operation usually takes some time to complete. and I don't know how much time it will cost, when the job finishes.
Meanwhile, the application is trying to read those XML files just built as DataProvider for the Tree.
So the problem is when I try to read those XML files after I click the Button, those XML files may not exist yet in the directory.
I am thinking of using a progressBar to show the progress of building XML files, then to read those XML files after build work complete.But I am not sure if it works.
thank you for any helps.
I don't know if I understand everything you say but I'll try:
1. User click a button
2. A method of your service is called, this method must have a result event listener attached
3. The result function is executed, your XML has arrived. You can set the dataProvider
Sorry about my long story, your suggestion is quite helpful, I figured it out now.
while I have another question about determine if some files are exist in a directory?
I will post it as a new topic.