mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-10194 PivotTable unloads its content on Tab Change if ContentSwitchMode HIDE is set
This commit is contained in:
parent
22dcd74809
commit
93f0007850
@ -229,6 +229,9 @@ public interface Window extends Frame, Component.HasCaption, Component.HasIcon {
|
||||
|
||||
/**
|
||||
* Sets how the managed main TabSheet switches a tab with this window: hides or unloads its content.
|
||||
* <p>
|
||||
* Note that: a method invocation will take effect only if {@code cuba.web.mainTabSheetMode} property
|
||||
* is set to 'MANAGED'.
|
||||
*
|
||||
* @param mode one of the {@link ContentSwitchMode} enum values
|
||||
*/
|
||||
|
@ -49,6 +49,7 @@ import com.haulmont.cuba.web.gui.components.WebFrameActionsHolder;
|
||||
import com.haulmont.cuba.web.gui.components.WebWrapperUtils;
|
||||
import com.haulmont.cuba.web.toolkit.ui.CubaSingleModeContainer;
|
||||
import com.haulmont.cuba.web.toolkit.ui.CubaVerticalActionsLayout;
|
||||
import com.haulmont.cuba.web.toolkit.ui.MainTabSheetMode;
|
||||
import com.vaadin.server.ClientConnector;
|
||||
import com.vaadin.server.Page;
|
||||
import com.vaadin.server.Sizeable.Unit;
|
||||
@ -1418,6 +1419,13 @@ public class WebWindow implements Window, Component.Wrapper,
|
||||
Preconditions.checkNotNullArgument(mode, "Content switch mode can't be null. " +
|
||||
"Use ContentSwitchMode.DEFAULT option instead");
|
||||
|
||||
MainTabSheetMode tabSheetMode = AppBeans.get(Configuration.class)
|
||||
.getConfig(WebConfig.class)
|
||||
.getMainTabSheetMode();
|
||||
if (tabSheetMode != MainTabSheetMode.MANAGED) {
|
||||
log.debug("Content switch mode can be set only for the managed main TabSheet. Current invocation will be ignored.");
|
||||
}
|
||||
|
||||
this.contentSwitchMode = mode;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user