Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen caption is not updated in AfterShow when mainTabSheetMode is managed #3270

Open
Flaurite opened this issue May 24, 2022 · 0 comments
Open
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@Flaurite
Copy link
Contributor

Flaurite commented May 24, 2022

Environment

  • Platform version: 7.2
  • Client type: Web

Description of the bug or enhancement

RU forum discussion: topic;

Steps to reproduce

  1. Add to the web properties: cuba.web.mainTabSheetMode = MANAGED
  2. 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();
    }
}
@Flaurite Flaurite added the type: bug Something isn't working label May 24, 2022
@Flaurite Flaurite added this to the Release 7.2 milestone May 24, 2022
@gorbunkov gorbunkov assigned glebfox and unassigned t1-cuba Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants