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

TabsetPanel on TabsetPanel does not restore selection #506

Open
fls-indinf opened this issue Jul 5, 2024 · 2 comments
Open

TabsetPanel on TabsetPanel does not restore selection #506

fls-indinf opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fls-indinf
Copy link

When adding a TabsetPanel as content of a tab on another TabsetPanel, the seletion of the lower one will not be restored after switching back and forth.

grafik

I created a SimpleWorkScreen like this:

public class SimpleWorkScreen extends RemoteWorkScreen {

  UITabsetPanel tabPanel;

  public SimpleWorkScreen(IWorkScreenApplication pApplication, AbstractConnection pConnection) throws Throwable {
    super(pApplication, pConnection, null);
    initializeUI();
  }

  /**
   * Initializes the UI.
   * 
   * @throws Throwable if the initialization throws an error
   */
  private void initializeUI() throws Throwable {
    setLayout(new UIBorderLayout());

    UITabsetPanel tabPanel = new UITabsetPanel();

    UITabsetPanel tabPanel1 = new UITabsetPanel();

    tabPanel1.add(new UIPanel(), "A");
    tabPanel1.add(new UIPanel(), "B");
    tabPanel.add(tabPanel1, "1");

    UITabsetPanel tabPanel2 = new UITabsetPanel();

    tabPanel2.add(new UIPanel(), "C");
    tabPanel2.add(new UIPanel(), "D");
    tabPanel.add(tabPanel2, "2");

    add(tabPanel, IBorderLayout.CENTER);
  }

I switched to tab 2 and D. Then back to 1.
After switching back to tab 2, tab C was selected and I couldn't select tab D.

@fls-indinf
Copy link
Author

The issue seems to occur, when you add a UITabsetPanel as tab on another UITabsetPanel. When adding a UITabsetPanel on a UIPanel before and then adding the UIPanel as tab on the UITabsetPanel, the selection seems to work as expected.

    UITabsetPanel tabPanel = new UITabsetPanel();

    UITabsetPanel tabPanel1 = new UITabsetPanel();

    tabPanel1.add(new UIPanel(), "A");
    tabPanel1.add(new UIPanel(), "B");
    UIPanel workaroundPanel = new UIPanel(new UIBorderLayout());
    workaroundPanel.add(tabPanel1, UIBorderLayout.CENTER);
    tabPanel.add(workaroundPanel, "1");

    UITabsetPanel tabPanel2 = new UITabsetPanel();

    tabPanel2.add(new UIPanel(), "C");
    tabPanel2.add(new UIPanel(), "D");
    workaroundPanel = new UIPanel(new UIBorderLayout());
    workaroundPanel.add(tabPanel2, UIBorderLayout.CENTER);
    tabPanel.add(workaroundPanel, "2");

    setLayout(new UIBorderLayout());
    add(tabPanel, IBorderLayout.CENTER);

@rjahn
Copy link
Member

rjahn commented Aug 13, 2024

We'll check the problem but currently we're working on migration to latest primereact.

@rjahn rjahn added the bug Something isn't working label Aug 13, 2024
@rjahn rjahn added this to the 2.5 milestone Aug 13, 2024
@rjahn rjahn modified the milestones: 2.5, 2.6 Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants