Search in sources :

Example 1 with ScreenDataXmlLoader

use of com.haulmont.cuba.gui.model.impl.ScreenDataXmlLoader in project cuba by cuba-platform.

the class FragmentLoader method loadScreenData.

protected void loadScreenData(Element dataEl) {
    ScreenData hostScreenData = null;
    ComponentContext parent = getComponentContext().getParent();
    while (hostScreenData == null && parent != null) {
        hostScreenData = parent.getScreenData();
        parent = parent.getParent();
    }
    ScreenDataXmlLoader screenDataXmlLoader = beanLocator.get(ScreenDataXmlLoader.class);
    ScreenData screenData = UiControllerUtils.getScreenData(resultComponent.getFrameOwner());
    screenDataXmlLoader.load(screenData, dataEl, hostScreenData);
    ((ComponentLoaderContext) context).setScreenData(screenData);
}
Also used : ScreenDataXmlLoader(com.haulmont.cuba.gui.model.impl.ScreenDataXmlLoader) ScreenData(com.haulmont.cuba.gui.model.ScreenData)

Example 2 with ScreenDataXmlLoader

use of com.haulmont.cuba.gui.model.impl.ScreenDataXmlLoader in project cuba by cuba-platform.

the class WindowLoader method loadScreenData.

protected void loadScreenData(Window window, Element element) {
    Element dataEl = element.element("data");
    if (dataEl != null) {
        ScreenDataXmlLoader screenDataXmlLoader = beanLocator.get(ScreenDataXmlLoader.class);
        ScreenData screenData = UiControllerUtils.getScreenData(window.getFrameOwner());
        screenDataXmlLoader.load(screenData, dataEl, null);
        ((ComponentLoaderContext) context).setScreenData(screenData);
    }
}
Also used : Element(org.dom4j.Element) ScreenDataXmlLoader(com.haulmont.cuba.gui.model.impl.ScreenDataXmlLoader) ScreenData(com.haulmont.cuba.gui.model.ScreenData)

Aggregations

ScreenData (com.haulmont.cuba.gui.model.ScreenData)2 ScreenDataXmlLoader (com.haulmont.cuba.gui.model.impl.ScreenDataXmlLoader)2 Element (org.dom4j.Element)1