I fear not. As far as I understand, getAjaxCallDecorator() decorates the javascript with a custom script, which is executed immediately upon hitting the button. What I want to achieve is displaying some status messaged during the progress of my long-term operation ...
-Tom On 08.04.2010 at 20:58 Fernando Wermus wrote: > Does this resolve your problem? > > @Override > > protected IAjaxCallDecorator getAjaxCallDecorator() { > > return new AjaxCallDecorator() { > > private static final long serialVersionUID = 1L; > > @Override > > public CharSequence decorateScript(CharSequence script) { > > return YOUR JAVASCRIPT + script; > > } > > }; > > } > > On Thu, Apr 8, 2010 at 3:43 PM, Thomas Götz <t...@richmountain.de> wrote: > >> Problem: >> I have an AjaxButton that triggers a long-running operation when clicked. I >> want to give feedback (in form of a javascript message) upon partial >> completion of the operation, therefore I am using a jQuery notifications >> plugin (http://www.programmingmind.com/contributions). >> >> So, what I do is the following: >> >> final Form form = new Form("form"); >> add(form); >> >> form.add(new AjaxButton("button) { >> @Override >> protected void onSubmit(AjaxRequestTarget target, Form<?> form) { >> for(Object o : someList) { >> // do somthing >> target.appendJavascript(getJavascript()); >> } >> target.addComponent(form); >> } >> }); >> >> >> ... but obviously, the Javascript messages are only display at the end of >> the complete operation (after foreach loop has finished). So my question: >> what should I do to get the messages displayed after each iteration? >> >> -Tom >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Fernando Wermus. > > www.linkedin.com/in/fernandowermus --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org