Screen caption is not updated in AfterShow when mainTabSheetMode is managed
Flaurite opened this issue · 0 comments
Flaurite commented
Environment
- Platform version: 7.2
- Client type: Web
Description of the bug or enhancement
RU forum discussion: topic;
Steps to reproduce
- Add to the web properties:
cuba.web.mainTabSheetMode = MANAGED
- In any screen subscribe to
AfterShowEvent
:
@Subscribe
public void onAfterShow(AfterShowEvent event) {
getWindow().setCaption("New Caption");
}
AR
Caption is no updated
Workaround:
@Subscribe
public void onAfterShow(AfterShowEvent event) {
updateCaption();
}
protected void updateCaption() {
com.vaadin.ui.Component parent = getWindow().unwrap(AbstractOrderedLayout.class);
while (parent != null) {
if (parent instanceof CubaManagedTabSheet.Tab) {
((CubaManagedTabSheet.Tab) parent).setCaption("New caption");
break;
}
parent = parent.getParent();
}
}