Skip to content

Commit

Permalink
MID-2587 system configuration page, tab fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Oct 15, 2015
1 parent c3195d9 commit d082258
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Expand Up @@ -291,6 +291,7 @@ protected WebMarkupContainer newLink(final String linkId, final int index) {
@Override
public void onClick() {
setSelectedTab(index);
onTabChange(index);
}
};
}
Expand Down Expand Up @@ -425,4 +426,11 @@ public boolean isVisible(int index) {
}
}
}

/**
* Method called after tab was changed - user clicked on link in tab header.
*
* @param index Index of new tab.
*/
protected void onTabChange(int index) {}
}
Expand Up @@ -195,7 +195,14 @@ public WebMarkupContainer getPanel(String panelId) {
}
});

TabbedPanel tabPanel = new TabbedPanel(ID_TAB_PANEL, tabs);
TabbedPanel tabPanel = new TabbedPanel(ID_TAB_PANEL, tabs) {

@Override
protected void onTabChange(int index) {
PageParameters params = getPageParameters();
params.set(SELECTED_TAB_INDEX, index);
}
};
tabPanel.setOutputMarkupId(true);
mainForm.add(tabPanel);

Expand Down

0 comments on commit d082258

Please sign in to comment.