Hi!

I try to do something like this

                final Label counterLabel = new Label("counter", new 
PropertyModel(this,
"counter"));
                counterLabel.setOutputMarkupId(true);
                add(counterLabel);

                Form form = new Form("form");
                add(form);

                form.add(new AjaxButton("confirmButton") {
                        @Override
                        protected void onSubmit(AjaxRequestTarget target, Form 
form) {
                                for (int i=0; i <100; i++ ) {
                                        synchronized (this) {
                                                try {
                                                        wait(1000);
                                                } catch (InterruptedException 
e) {
                                                        e.printStackTrace();
                                                }
                                                counter += i;
                                                
target.addComponent(counterLabel);
                                        }
                                }
                        }
                });


The component doesn't refresh. Only for the last time. How to make it work?


Thanks,
Artur

-- 
View this message in context: 
http://www.nabble.com/How-to-refresh-component-many-times-in-one-ajax-request-tp14374053p14374053.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to