Hi,

I have a simple form. When I submit it I launch a thread that runs on the
background. When the thread is finished, I would like to update a
DropdownChoice with the result generated by the thread. I manage to update
the choice, but the changes are only visible when I refresh the page. To
avoid that, I have used a AjaxEventBehavior to update the choice whenever
the user clicks on it:

serviceNameChoice = new DropDownChoice<String>("serviceNameChoice", new
Model<String>(),
                                                                                
                                                     
serviceNames);
serviceNameChoice.add(new AjaxEventBehavior("onclick") {
     protected void onEvent(AjaxRequestTarget target) {
        target.add(serviceNameChoice);
     }
});

The result is an unusable drop-down choice, since the choice keep refreshing
when I try to select a value.

How can I do what I want, that is, update/refresh a DropdownChoice when a
background thread finishes its work?
Thanks!

Humberto

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Update-component-after-background-thread-is-finished-tp4300126p4300126.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to