Hi everyone, i’m try to set tab caption like (UI.getCurrent().getPage().setTitle(NAME)), from each active UI class at curent moment.
Example:
UISettings{
getMenuItem(){
UI.getCurrent().getPage().setTitle("Settings");
}
}
UIConfigurations{
getMenuItem(){
UI.getCurrent().getPage().setTitle("Users");
}
}
But always tab set the last item value(((
My execute code:
private HorizontalLayout getHorizontalMenu(){
HorizontalLayout root = new HorizontalLayout();
root.setSpacing(true);
root.setClassName(THEME.padding);
//Menu with items
root.add(UIApplication.getMenuItem(), UIDictionaries.getMenuItem(), UIConfigurations.getMenuItem(), UISettings.getMenuItem());
root.setVerticalComponentAlignment(Alignment.CENTER);
return root;
}
This code show UI.getCurrent().getPage().setTitle(NAME) only for last element. In my case it’s —>UISettings.getMenuItem().