private int counter = 0;
@SuppressWarnings("serial")
public ProgressbarPage() {
final ProgressbarWebMarkupContainer progressbar = new ProgressbarWebMarkupContainer(
"progressbar");
progressbar.add(JQBehaviors.draggable());
add(progressbar);
add(new AbstractAjaxTimerBehavior(Duration.seconds(1)) {
@Override
protected void onTimer(AjaxRequestTarget target) {
progressbar.value(target, counter);
counter++;
if (counter > 100)
counter = 0;
}
});