public void save() {
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
try {
userPortal.saveNode(getRootNode().getNode(), getRootNode());
DescriptionService descriptionService = getApplicationComponent(DescriptionService.class);
Map<String, Map<Locale, State>> i18nizedLabels = this.userNodeLabels;
for (String treeNodeId : i18nizedLabels.keySet()) {
TreeNode node = findNode(treeNodeId);
if (node != null) {
Map<Locale, State> labels = i18nizedLabels.get(treeNodeId);
if (labels != null && labels.size() > 0) {
descriptionService.setDescriptions(node.getNode().getId(), labels);
}
}
}
} catch (NavigationServiceException ex) {
context.getUIApplication().addMessage(
new ApplicationMessage("UINavigationNodeSelector.msg." + ex.getError().name(), null, ApplicationMessage.ERROR));
}
}