How to open a window in tabsheet?

image

like this, I want open a sceen in BOM1 and BOM2
it’s like incloud in html

Hello, @1105491633

You can use one of the following methods:

WindowManager.openFrame(Frame parentFrame, Component parent, WindowInfo windowInfo);

WindowManager.openFrame(Frame parentFrame, Component parent, WindowInfo windowInfo, Map<String, Object> params);

WindowManager.openFrame(Frame parentFrame, Component parent, @Nullable String id,
                           WindowInfo windowInfo, Map<String, Object> params);

WindowManager can be obtained via getWindowManager() invocation.

As a result you should use some variation of the following snippet:

getWindowManager().openFrame(getFrame(), tab, windowConfig.getWindowInfo(windowAlias));

Regards,
Daniil

what is the windowConfig ?how can i get it?
and do you have sample?

WindowConfig is a bean that holds information about all registered screens in *-screens.xml files.

The general way to obtain an instance of WindowConfig is to inject it into your screen controller:

@Inject
protected WindowConfig windowConfig;

Unfortunately, there is no any sample for this small case. Only thing you need is the following code:

getWindowManager().openFrame(getFrame(), tab, windowConfig.getWindowInfo(windowAlias));

where:

  • tab - is a parent component for frame
  • windowAlias - string alias that is used while registering some screen.

Regards,
Daniil.

addLazyTab(String, Element, ComponentLoader)
String is tab name,
what is the Element and ComponentLoader?
I need add a lazyTab

This method is internal and not intended for user use.

There is no ability to add lazy tab programmatically and the only way to add lazy tab is to declare some tab lazy in a screen XML descriptor.

if I add lazy tab in a screen XML descriptor.
then use tabSheet.add(tabSheet.getComponent(“lazyTab”)); to creat a tab , is lazy of the tab?

No, it will not work.