/** * @return true if screen can be opened multiple times from a navigation menu */ protected boolean isMultipleOpen() { WindowInfo windowInfo = UiControllerUtils.getScreenContext(this).getWindowInfo(); if (windowInfo.getDescriptor() != null) { String multipleOpenAttr = windowInfo.getDescriptor().attributeValue("multipleOpen"); if (multipleOpenAttr != null) { return Boolean.parseBoolean(multipleOpenAttr); } } MultipleOpen annotation = this.getClass().getAnnotation(MultipleOpen.class); if (annotation != null) { // default is false return annotation.value(); } return false; }
@Deprecated protected Map<String, Object> createParametersMap(WindowInfo windowInfo, @Nullable Map<String, Object> params) { Map<String, Object> map; if (params != null) { map = new HashMap<>(params.size()); } else { map = new HashMap<>(); } Element element = windowInfo.getDescriptor(); if (element != null) { Element paramsElement = element.element("params") != null ? element.element("params") : element; if (paramsElement != null) { List<Element> paramElements = paramsElement.elements("param"); for (Element paramElement : paramElements) { String name = paramElement.attributeValue("name"); String value = paramElement.attributeValue("value"); if ("true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value)) { Boolean booleanValue = Boolean.valueOf(value); map.put(name, booleanValue); } else { map.put(name, value); } } } } if (params != null) { map.putAll(params); } return map; }
WindowInfo windowInfo = windowConfig.getWindowInfo(screen); if (windowInfo.getDescriptor() != null) { String caption = menuConfig.getItemCaption(screen);
public ResolvedWindowInfo(WindowInfo windowInfo, Type type, Class<? extends FrameOwner> controllerClass, String template) { super(windowInfo.getId(), null, windowInfo.getDescriptor(), windowInfo.getControllerClassName(), windowInfo.getRouteDefinition()); this.template = template; this.controllerClass = controllerClass; this.type = type; }
String template; if (windowInfo.getDescriptor() != null) { String className = windowInfo.getDescriptor().attributeValue("class"); template = windowInfo.getDescriptor().attributeValue("template");