@Override public WindowContext getContext() { return frame.getContext(); }
protected Map<String, Object> getWindowParams(Window window) { return window.getContext().getParams(); } }
protected boolean omitParams(Screen screen) { Screens.LaunchMode launchMode = screen.getWindow().getContext().getLaunchMode(); if (OpenMode.THIS_TAB != launchMode) { return false; } return ui.getScreens().getOpenedScreens().getCurrentBreadcrumbs().size() > MAX_NESTING; }
protected void afterShowWindow(Screen screen) { WindowContext windowContext = screen.getWindow().getContext(); if (!WindowParams.DISABLE_APPLY_SETTINGS.getBool(windowContext)) { applySettings(screen, getSettingsImpl(screen.getId())); } if (screen instanceof LegacyFrame) { if (!WindowParams.DISABLE_RESUME_SUSPENDED.getBool(windowContext)) { DsContext dsContext = ((LegacyFrame) screen).getDsContext(); if (dsContext != null) { ((DsContextImplementation) dsContext).resumeSuspended(); } } } if (screen instanceof AbstractWindow) { AbstractWindow abstractWindow = (AbstractWindow) screen; if (abstractWindow.isAttributeAccessControlEnabled()) { attributeAccessSupport.applyAttributeAccess(abstractWindow, false); } } else { DisableAttributeAccessControl annotation = screen.getClass().getAnnotation(DisableAttributeAccessControl.class); if (annotation == null || !annotation.value()) { attributeAccessSupport.applyAttributeAccess(screen, false); } } }
@Override public OperationResult showFromNavigation(Screen screen) { LaunchMode launchMode = screen.getWindow().getContext().getLaunchMode();
public void saveScreenHistory(Screen frameOwner) { WindowContext windowContext = frameOwner.getWindow().getContext(); if (security.isEntityOpPermitted(ScreenHistoryEntity.class, EntityOp.CREATE) && (frameOwner instanceof EditorScreen) && windowContext.getLaunchMode() != OpenMode.DIALOG && (screenIds.contains(frameOwner.getId()))) { String caption = frameOwner.getWindow().getCaption(); UUID entityId = null; Entity entity = ((EditorScreen) frameOwner).getEditedEntity(); if (entity != null) { if (PersistenceHelper.isNew(entity)) { return; } if (StringUtils.isBlank(caption)) { caption = messages.getTools().getEntityCaption(entity.getMetaClass()) + " " + metadata.getTools().getInstanceName(entity); } entityId = (UUID) entity.getId(); } ScreenHistoryEntity screenHistoryEntity = metadata.create(ScreenHistoryEntity.class); screenHistoryEntity.setCaption(StringUtils.abbreviate(caption, 255)); screenHistoryEntity.setUrl(makeLink(frameOwner)); screenHistoryEntity.setEntityId(entityId); addAdditionalFields(screenHistoryEntity, entity); CommitContext cc = new CommitContext(Collections.singleton(screenHistoryEntity)); dataManager.commit(cc); } }
protected <T extends Screen> void loadWindowFromXml(Element element, WindowInfo windowInfo, Window window, T controller, ComponentLoaderContext componentLoaderContext) { LayoutLoader layoutLoader = beanLocator.getPrototype(LayoutLoader.NAME, componentLoaderContext); layoutLoader.setLocale(getLocale()); layoutLoader.setMessagesPack(getMessagePack(windowInfo.getTemplate())); ComponentLoader<Window> windowLoader = layoutLoader.createWindowContent(window, element, windowInfo.getId()); if (controller instanceof LegacyFrame) { screenViewsLoader.deployViews(element); initDsContext(window, element, componentLoaderContext); DsContext dsContext = ((LegacyFrame) controller).getDsContext(); if (dsContext != null) { dsContext.setFrameContext(window.getContext()); } } windowLoader.loadComponent(); }
LaunchMode launchMode = screen.getWindow().getContext().getLaunchMode();
for (AbstractCondition condition : conditions.toConditionsList()) { if (condition.getParam() != null) { for (Map.Entry<String, Object> entry : window.getContext().getParams().entrySet()) { if (entry.getKey().equals(condition.getParam().getName())) condition.getParam().parseValue((String) entry.getValue());
if (!WindowParams.DISABLE_AUTO_REFRESH.getBool(window.getContext())) { if (getResultingManualApplyRequired()) { if (BooleanUtils.isTrue(defaultFilter.getApplyDefault())) {