use of org.apache.wicket.ajax.AjaxChannel in project midpoint by Evolveum.
the class NavigatorPanel method initLast.
private void initLast() {
WebMarkupContainer last = new WebMarkupContainer(ID_LAST);
last.add(new AttributeModifier("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return isLastEnabled() ? "" : "disabled";
}
}));
add(last);
AjaxLink lastLink = new AjaxLink(ID_LAST_LINK) {
@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
attributes.setChannel(new AjaxChannel("blocking", AjaxChannel.Type.ACTIVE));
}
@Override
public void onClick(AjaxRequestTarget target) {
lastPerformed(target);
}
};
lastLink.add(new VisibleEnableBehaviour() {
@Override
public boolean isEnabled() {
return BooleanUtils.isTrue(showPageListingModel.getObject()) && isLastEnabled();
}
});
last.add(lastLink);
}
Aggregations