I am trying to implement progress ( process ) bar example which i need it to my interface , I have just copied the example in the richfaces site.
what i want is that once the user clicks on the button it should call a method which will take some time to finish the processing , while the processing is going , I just want to display a message indicating that there is some process going on .
in the code below once i click on the button it will call the method "processSomething" from mehtod"startProcess" and after finishing processing in this method , it show the processing bar which is not what i want.
it should show the processing bar while the processing is going on in the method "processSomething".
That's not going to work. An HTTP request doesn't return anything at all until all the code in the request handler has completely finished processing. So you'd get a long delay and then 100%.
To get a progress display, you're going to need to run the long-running display in a separate thread, start the thread in you backing bean, then return to the caller, leaving the thread to run.
You also need to make sure that the thread you start isn't tied to a transient object like a servlet request or you'll run out of HTTP request processors. Traditionally, I've simply set up what I call a "null servlet" whose init() method launched a thread engine which could be petitioned to run the threads on its own resource structure.
Customer surveys are for companies who didn't pay proper attention to begin with.