private Label indexLabel;
public TabsPanel(String id) {
super(id);
Tabs tabs = new Tabs("tabs");
tabs.setAjaxBeforeActivateEvent(new Tabs.ITabsAjaxEvent() {
private static final long serialVersionUID = 1L;
@Override
public void onEvent(AjaxRequestTarget target, Tabs tabs, int index) {
TabsPanel.this.index = index;
target.add(indexLabel);
}
});
tabs.setCollapsible(true);
tabs.setActive(false);
tabs.setHide(new TabsAnimateOption(new EffectOptionObject()
.setEffect("drop")
.setDuration(200)
));
tabs.setShow(new TabsAnimateOption(new EffectOptionObject()
.setEffect("slide")
.setDuration(200)
));
add(tabs);