paulvr
Joined: 12/05/2008 00:00:00
Messages: 121
Offline
|
You need to do your processing in a subthread and update the renderer from there. And using SessionRenderer is a bit easier:
In your bean constructor call:
SessionRenderer.addCurrentSession(groupName);
In your button action handler:
public String buttonAction()
{ Thread worker = new Thread(
new Runnable()
{ public void run()
{ for (int i = 0; i < 10000; i++)
{ // do something usefull;
setPercent(i / 100);
SessionRenderer.render(groupName);
}
}
});
worker.start();
return null;
}
|