Thanks Martijn, I haven't attempted this yet - I've been working on other things (since functionally this part of my app works fine). When I revisit this I'm sure I'll have some questions for you :)
Thanks again Martijn Dashorst wrote: > > Create a processing thread, and dispatch it. Have the thread update > some progress object that you can get access to, and query that > progress with a label (or something more fancy like a progress bar). > > Something like: > > Link() { > onclick() { create thread, start it } > } > > add(new Label("progress", new Model() { getObject() { ... get thread, > return progress })); > label.add(new AjaxSelfUpdatingBehavior(Duration.ONE_SECOND)); > > Note that you don't want to serialize the thread itself, or the > progress object. You'll have to dynamically retrieve it > (de/serialization will detach the objects). > > Martijn > > On 7/20/07, jonaqua <[EMAIL PROTECTED]> wrote: >> >> The wicket ajax link examples are great. The functionality I need is >> very >> similar to the third link example here: >> >> http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.LinksPage >> >> ( ajax link with a busy indicator. the server will deliberately pause for >> five seconds) >> >> The only difference between my code and that example is that I >> substituted >> my actual long running task for the example's Thread.sleep(5000). >> >> Everything is working great but I have two questions: >> >> 1) I don't really want it to be a link. I really just want my long >> running >> task to be executed after the page is loaded and I want it to update some >> label when it finishes. Any hints on how I can do this? >> >> 2) Right now my long running task is executed in the link's >> onClick(AjaxRequestTarget target) method just like the example. Should >> this >> be executed on a separate thread? >> >> Thank you >> >> >> -- >> View this message in context: >> http://www.nabble.com/execute-long-running-ajax-task-after-page-is-loaded-tf4118823.html#a11713572 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > -- > Wicket joins the Apache Software Foundation as Apache Wicket > Apache Wicket 1.3.0-beta2 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/execute-long-running-ajax-task-after-page-is-loaded-tf4118823.html#a11810638 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions. _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user