I would like to have my file upload requests on my site, which take much longer than a normal request, go through a different mechanism. I'd like the user to still be able to click around the site and work while the file is uploading and then when it finishes, I can pop up an "All Done" type dialog. AjaxChannel seems to me to be the mechanism to do this, but either I am doing it wrong or it doesn't work as I'd expect.
My links I'm testing the concept with looks like (I'm using wicket 6.10.0): add(new AjaxLink<Void>("slow") { @Override public void onClick(AjaxRequestTarget target) { System.out.println("Slow Link Clicked...."); try { Thread.sleep(Integer.valueOf("10000")); } catch (InterruptedException ie) {} target.appendJavaScript("alert('Done with slow running request');"); System.out.println("Done Processing Slow Link."); } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.setChannel(new AjaxChannel("upl", AjaxChannel.Type.QUEUE)); } }); add(new AjaxLink<Void>("fast") { @Override public void onClick(AjaxRequestTarget target) { System.out.println("Fast Link Clicked...."); target.appendJavaScript("alert('Done with fast running request');"); System.out.println("Done Processing Fast Link."); } }); I would expect that if I click Slow, then click Fast that the fast would return to the user before the slow, but that's not happening. I can attach a quickstart and create an issue in JIRA if that is the route to go if I am doing it right. If I'm doing it wrong, can someone let me know how I can accomplish what I'm looking to do? Thanks, Steve