use of com.github.appreciated.app.layout.builder.interfaces.HasCaptionInterceptor in project vaadin-app-layout by appreciated.
the class AppLayoutConfiguration method prepareNavigationElement.
private void prepareNavigationElement(AbstractNavigationElement element) {
if (element instanceof HasCaptionInterceptor) {
((HasCaptionInterceptor) element).setCaptionInterceptor(captionInterceptor);
}
if (element instanceof NavigatorNavigationElement) {
NavigatorNavigationElement nElement = (NavigatorNavigationElement) element;
nElement.setCDI(isCDI);
nElement.setNavigationElementInfoProvider(navigationElementInfoProvider);
if ((isCDI == false && nElement.getViewClassName() == defaultNavigationElement.getViewClassName()) || (isCDI == true && nElement.getViewName().equals(""))) {
AppLayoutSessionHelper.updateActiveElementSessionData(nElement);
}
nElement.setViewNameInterceptor(viewNameInterceptor);
if (isNavigatorEnabled) {
nElement.addViewToNavigator(navigator);
} else {
nElement.addViewToComponentNavigator(componentNavigator);
}
navigatorElements.add(nElement);
} else if (element instanceof SubmenuNavigationElement) {
SubmenuNavigationElement sElement = (SubmenuNavigationElement) element;
sElement.getSubmenuElements().forEach(element1 -> prepareNavigationElement(element1));
}
}
Aggregations