@EventListener(AppContextInitializedEvent.class) @Order(Events.HIGHEST_PLATFORM_PRECEDENCE + 300) protected void init() { ClientConfig clientConfig = configuration.getConfig(ClientConfig.class); String property = clientConfig.getScreenIdsToSaveHistory(); if (StringUtils.isNotBlank(property)) { screenIds.addAll(Arrays.asList(StringUtils.split(property, ','))); } for (MetaClass metaClass : metadata.getTools().getAllPersistentMetaClasses()) { Map<String, Object> attributes = metadata.getTools().getMetaAnnotationAttributes(metaClass.getAnnotations(), TrackEditScreenHistory.class); if (Boolean.TRUE.equals(attributes.get("value"))) { screenIds.add(windowConfig.getEditorScreenId(metaClass)); } } }
/** * @return editor screen identifier */ public String getWindowId() { if (windowId != null) { return windowId; } else { MetaClass metaClass = target.getDatasource().getMetaClass(); WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); return windowConfig.getEditorScreenId(metaClass); } }
/** * @return editor screen identifier */ public String getWindowId() { if (windowId != null) { return windowId; } else { MetaClass metaClass = target.getDatasource().getMetaClass(); WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); return windowConfig.getEditorScreenId(metaClass); } }
public WindowInfo getEditorScreen(Entity entity) { MetaClass metaClass = entity.getMetaClass(); MetaClass originalMetaClass = metadata.getExtendedEntities().getOriginalOrThisMetaClass(metaClass); WindowInfo windowInfo = primaryEditors.get(originalMetaClass.getJavaClass()); if (windowInfo != null) { return windowInfo; } String editorScreenId = getEditorScreenId(metaClass); return getWindowInfo(editorScreenId); }
protected void openEntityWindow(SearchResultEntry entry, String entityName, WindowManager.OpenType openType) { WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); MetaClass metaClass = metadata.getSession().getClass(entityName); Entity entity = reloadEntity(metaClass, entry.getId()); openEditor(windowConfig.getEditorScreenId(metaClass), entity, openType); }
windowAlias = windowConfig.getEditorScreenId(entity.getMetaClass());
editorScreenId = windowConfig.getEditorScreenId(metaClass);
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); if (windowAlias == null) { windowAlias = windowConfig.getEditorScreenId(entity.getMetaClass());
windowAlias = windowConfig.getEditorScreenId(entity.getMetaClass());