protected void resumeDsContextAfterShow(LegacyFrame controller) { if (!WindowParams.DISABLE_RESUME_SUSPENDED.getBool(controller.getContext())) { DsContext dsContext = controller.getDsContext(); if (dsContext != null) { ((DsContextImplementation) dsContext).resumeSuspended(); } } }
@Override public void fireAfterCommit(CommitContext context, Set<Entity> committedEntities) { for (DsContext childDsContext : children) { ((DsContextImplementation) childDsContext).fireAfterCommit(context, committedEntities); } if (afterCommitListeners != null) { for (AfterCommitListener listener : afterCommitListeners) { listener.afterCommit(context, committedEntities); } } }
@Override public void fireBeforeCommit(CommitContext context) { if (beforeCommitListeners != null) { for (BeforeCommitListener listener : new ArrayList<>(beforeCommitListeners)) { listener.beforeCommit(context); } } for (DsContext childDsContext : children) { ((DsContextImplementation) childDsContext).fireBeforeCommit(context); } }
context = new DsContextImpl(dataservice); if (parent != null) context.setParent(parent); if (aliasesMap != null) { aliasesMap.forEach(context::addAlias); context.setParent(parent); context.executeLazyTasks();
((DsContextImplementation) dsContext).unregister(entitiesDs);
private void registerDatasource(Datasource datasource) { if (dsContext != null && id != null) { ((DsContextImplementation) dsContext).register(datasource); } } }
protected String getDatasourceId(Element element) { String id = element.attributeValue("id"); for (Datasource datasource : context.getAll()) { if (Objects.equals(datasource.getId(), id)) throw new DevelopmentException("Duplicated datasource id: " + id); } return id; } }
dsContext.registerDependency(this, ds, property); } else { ((DsContextImplementation) dsContext).addLazyTask(context -> { final String[] strings1 = path.split("\\."); String source1 = strings1[0];
((DsContextImplementation) getDsContext()).unregister(entitiesDs);
/** * Called after "postInit" in "Apply" action processing. */ protected void afterWindowApplyPostInit() { if (!WindowParams.DISABLE_RESUME_SUSPENDED.getBool(getContext())) { ((DsContextImplementation) getDsContext()).resumeSuspended(); } }
DsContext dsContext = ((LegacyFrame) window.getFrameOwner()).getDsContext(); if (dsContext != null) { ((DsContextImplementation) dsContext).resumeSuspended();
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); } } }
DsContext dsContext = ((LegacyFrame) window.getFrameOwner()).getDsContext(); if (dsContext != null) { ((DsContextImplementation) dsContext).resumeSuspended();
@Override protected void afterLookupWindowOpened(Window lookupWindow) { boolean found = ComponentsHelper.walkComponents(lookupWindow, screenComponent -> { if (!(screenComponent instanceof Filter)) { return false; } else { MetaClass actualMetaClass = ((FilterImplementation) screenComponent).getEntityMetaClass(); MetaClass propertyMetaClass = extendedEntities.getEffectiveMetaClass(pickerField.getMetaClass()); if (Objects.equals(actualMetaClass, propertyMetaClass)) { applyFilter(((Filter) screenComponent)); return true; } return false; } }); if (!found) { Notifications notifications = getScreenContext(pickerField).getNotifications(); notifications.create(NotificationType.WARNING) .withCaption(messages.getMainMessage("dynamicAttributes.entity.filter.filterNotFound")) .show(); } AbstractWindow controller = (AbstractWindow) (lookupWindow).getFrameOwner(); ((DsContextImplementation) controller.getDsContext()).resumeSuspended(); }
((DsContextImplementation) legacyFrame.getDsContext()).resumeSuspended();
DsContext dsContext = ((LegacyFrame) window.getFrameOwner()).getDsContext(); if (dsContext != null) { ((DsContextImplementation) dsContext).resumeSuspended();