APISonar


com.haulmont.cuba.gui.logging.UIPerformanceLogger.LifeCycle.XML

> com > haulmont > cuba > gui > logging > UIPerformanceLogger > LifeCycle > XML
com APIs haulmont APIs cuba APIs gui APIs logging APIs UIPerformanceLogger APIs LifeCycle APIs XML APIs

Example 1
public Component loadComponent(InputStream stream, Component parent, Map<String, Object> params) {
        StopWatch xmlLoadWatch = new Log4JStopWatch(context.getCurrentIFrameId() + "#" +
                UIPerformanceLogger.LifeCycle.XML,
                Logger.getLogger(UIPerformanceLogger.class));

        Document doc = parseDescriptor(stream, params == null ? Collections.<String, Object>emptyMap() : params);
        Element element = doc.getRootElement();
        xmlLoadWatch.stop();

        return loadComponent(element, parent);
    }
Example 2
public Element load(String resourcePath, String id, Map<String, Object> params) {
        StopWatch xmlLoadWatch = new Slf4JStopWatch(id + "#" +
                UIPerformanceLogger.LifeCycle.XML,
                LoggerFactory.getLogger(UIPerformanceLogger.class));

        String template = loadTemplate(resourcePath);
        Document document = getDocument(template, params);

        xmlLoadWatch.stop();
        return document.getRootElement();
    }