Hey
Sometime ago we discussed that I needed a cancel button. The need was there
because of a certain page had long loading times, not because of wicket though.
We talked about a worker thread so I could start the report generation and then
the wicket page could come and ask the worker thread once in a while if it were
done, if the user in the mean time had pressed cancel we could just cancel the
worker thread. While pretty easy to describe in theory it does require some
effort to create and theres a lot of stuff to take in consideration(could we
really stop the report generation and if we forced a stop what would our
backend server say? ++ more).
As by default im pretty lazy. So I'll call this the lazy mans fix for a cancel
button.
So since wicket has a singular model for page requests processing per session
this requires that we go out side of wicket, to a pretty simple jsp page that
invalidates the session and then returns the user to what ever page the user
came from (or as close as it can be if it's a wizard, with some effort you
could get the user back to the correct page).
So to recap:
1. Wicket Page that has cancel button forwards to an JSP page
2. JSP page invalidates session and forwards back to wicket page
3. Wicket interprets the user as being a new user(since the other users
session are invalidated) and processes request as normal.
Do note that the original page(the page that the user pressed cancel on) will
still have to be processed, since the page thread aren't cancelled.
Regards Nino
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user