mikehalfsheen
asked on
Displaying a progress page in struts
Hi,
I want to submit a form from formPage.jsp , this is validated and partially processed in FormPageAction.
I then want to display another Page (doingsomething.jsp) before forwarding the request to a 'LongishProcessAction' class. I think I could probably accomplish this by
either sending a 'Please-wait-while-I-do-so me-process ing-page' using the Response in FormPageAction and then redirecting the request to LongishProcessAction OR
duplicating the form from formPage in a 'Please-wait-while-I-do-so me-process ing-page' , but using hidden fields and , and submitting the form via a onload='document.forms[0]. submit' in the body tag. However both these solutions seem pretty cludgey, I wondered if there was a struts mechanism for this
To summarise, what I'd like to do is :
1) submit form
2) validate form in action class
3) display a page telling the user that the process may take some time (if I could update the page with some type of progress bar all the better)-I don't really wan to keep refreshing the page though, that looks a bit tacky ;)
4) process the details entered/validated in steps 1 and 2
5) display the results
I want to submit a form from formPage.jsp , this is validated and partially processed in FormPageAction.
I then want to display another Page (doingsomething.jsp) before forwarding the request to a 'LongishProcessAction' class. I think I could probably accomplish this by
either sending a 'Please-wait-while-I-do-so
duplicating the form from formPage in a 'Please-wait-while-I-do-so
To summarise, what I'd like to do is :
1) submit form
2) validate form in action class
3) display a page telling the user that the process may take some time (if I could update the page with some type of progress bar all the better)-I don't really wan to keep refreshing the page though, that looks a bit tacky ;)
4) process the details entered/validated in steps 1 and 2
5) display the results
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or of course, some sort of AJAX framework with javascript to update the progress bars...
But as bloodredsun says, this can be a right pain in the bum :-(
Have you considered:
1) Submit form to a page which starts processing the results and shows an animated gof of a "never ending" progressbar
2) when this page has loaded, use javascript to forward on to the results viewing action
3) the results viewing action can wait till the results are ready, so the page in the browser should reamin on the animated gif page...
Not sure...that might work...
The only problem I can see is that the animated gif MIGHT stop animating on IE when the page gets forwarded :-/
Tim
But as bloodredsun says, this can be a right pain in the bum :-(
Have you considered:
1) Submit form to a page which starts processing the results and shows an animated gof of a "never ending" progressbar
2) when this page has loaded, use javascript to forward on to the results viewing action
3) the results viewing action can wait till the results are ready, so the page in the browser should reamin on the animated gif page...
Not sure...that might work...
The only problem I can see is that the animated gif MIGHT stop animating on IE when the page gets forwarded :-/
Tim
https://bpcatalog.dev.java.net/nonav/ajax/progress-bar/design.html
Shows the AJAX idea... Hehehe... Even the flow diagram makes my brain sweat ;-)
Tim
Shows the AJAX idea... Hehehe... Even the flow diagram makes my brain sweat ;-)
Tim
https://bpcatalog.dev.java.net/source/browse/bpcatalog/ws/ajax/progress-bar/
Might have a "ready to roll" solution though that you can incorporate into your project...
Maybe...
But it will be no easy task :-(
Tim
Might have a "ready to roll" solution though that you can incorporate into your project...
Maybe...
But it will be no easy task :-(
Tim
Here's a more basic vanilla Javacript one: http://www.servletsuite.com/servlets/wait.htm
Sheesh Tim, that link's a corker. I looked for about 10 seconds anf then everything went blurry.....X-(
Sheesh Tim, that link's a corker. I looked for about 10 seconds anf then everything went blurry.....X-(
>> Sheesh Tim, that link's a corker. I looked for about 10 seconds anf then everything went blurry.....
Hehehe, yeah :-/
Although AJAX is the future for interactive web applications I feel...
Though it probably tramples all over accessability concerns :-/
And like AOP, is going to explode to being used where it isn't needed, then get a bad name, then start getting used sensibly ;-)
(imho) ;-)
hehehe
Tim
Hehehe, yeah :-/
Although AJAX is the future for interactive web applications I feel...
Though it probably tramples all over accessability concerns :-/
And like AOP, is going to explode to being used where it isn't needed, then get a bad name, then start getting used sensibly ;-)
(imho) ;-)
hehehe
Tim
>> Although AJAX is the future for interactive web applications I feel...
I meant:
"Although AJAX is the future for HIGHLY interactive web applications I feel..."
;-)
NostraTimus
I meant:
"Although AJAX is the future for HIGHLY interactive web applications I feel..."
;-)
NostraTimus
ASKER
Bl00dy h3ck. That was a load to come to:) Cheers. You'vve given me enough links to think about between you.
Cheers Mike
hehehe, yeah sorry about that ;-)
There aren't any "nice, clean" progress solutions for websites though :-( They are all a hack :-(
Good luck with it though!! :-D
And thanks for the Split! :-D
Tim
There aren't any "nice, clean" progress solutions for websites though :-( They are all a hack :-(
Good luck with it though!! :-D
And thanks for the Split! :-D
Tim
http://mail-archives.apache.org/mod_mbox/struts-user/200504.mbox/%3CEEDD33F766B6C34C88DA5BB0EAE586FE3796B5@dak.india.alopa.com%3E
There is no specific way to do what you are asking in struts, just the normal workarounds that you have in standard JSP