Hello,
One of the DynPro UI's is a progress bar.
I have a certain view which loads a ResultSet from a certain DB. This ResultSet is being loaded to the view in a while(rs.next()) loop and since it contains huge amount of records it takes it few minutes to load.
Can someone please show me an example of how can integrate such a progress bar in the view which will display the amount of time left for loading?
Request clarification before answering.
Roy,
Sadly, ProgressBar in WD is suitable for displaying some 'static' percent value rather then for real-time visualization of process' progress. The problem is in fact that separate HTTP request/response round-trip required to update values of UI element (incl. ProgressBar) and there is no way in HTTP to push-back content to browser.
Also you can do this but it is strictly unrecommended in J2EE application (due to use of multithreading):
1. In first request/response cycle (some WD action) you set up Timer UI control and fork new thread that perform loading of data.
2. In subsequent requests (as a result of Timer.onTimer action execution) you poll thread for progress via some variable shared between 2 threads and update progress bar accordingly
3. If on next timer invocation the work is done, you are navigating to result or populate context to show result or whatever. DO NOT MODIFY WD CONTEXT OR INVOKE CONTROLLERS METHODS FROM SEPARATE THREAD!
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.