use of org.openforis.collect.model.ui.UITabsGroup in project collect by openforis.
the class TabsGroupComposer method generateNewTabName.
private String generateNewTabName(UITabsGroup parentGroup) {
String prefix = "tab_";
Stack<Integer> parts = new Stack<Integer>();
UITabsGroup currentGroup = parentGroup;
do {
int position = currentGroup.getTabs().size() + 1;
parts.push(position);
currentGroup = currentGroup.getParent();
} while (currentGroup != null);
String suffix = StringUtils.join(parts.toArray(), "_");
String tabName = prefix + suffix;
return tabName;
}
use of org.openforis.collect.model.ui.UITabsGroup in project collect by openforis.
the class TabsGroupComposer method removeTab.
@Command
@NotifyChange({ "tabs" })
public void removeTab(@BindingParam("tab") UITab tab) {
UITabsGroup parent = tab.getParent();
parent.removeTab(tab);
}
Aggregations