protected void loadKeyValueCollectionContainer(ScreenData screenData, Element element, @Nullable ScreenData hostScreenData) { String containerId = getRequiredAttr(element, "id"); KeyValueCollectionContainer container; if (checkProvided(element, hostScreenData)) { //noinspection ConstantConditions container = hostScreenData.getContainer(containerId); } else { container = factory.createKeyValueCollectionContainer(); loadProperties(element, container); String idName = element.attributeValue("idName"); if (!Strings.isNullOrEmpty(idName)) container.setIdName(idName); } screenData.registerContainer(containerId, container); Element loaderEl = element.element("loader"); if (loaderEl != null) { loadKeyValueCollectionLoader(screenData, loaderEl, container, hostScreenData); } }
protected void loadKeyValueInstanceContainer(ScreenData screenData, Element element, ScreenData hostScreenData) { String containerId = getRequiredAttr(element, "id"); KeyValueContainer container; if (checkProvided(element, hostScreenData)) { container = hostScreenData.getContainer(containerId); } else { container = factory.createKeyValueContainer(); loadProperties(element, container); String idName = element.attributeValue("idName"); if (!Strings.isNullOrEmpty(idName)) container.setIdName(idName); } screenData.registerContainer(containerId, container); Element loaderEl = element.element("loader"); if (loaderEl != null) { loadKeyValueInstanceLoader(screenData, loaderEl, container, hostScreenData); } }
protected void loadInstanceContainer(ScreenData screenData, Element element, @Nullable ScreenData hostScreenData) { String containerId = getRequiredAttr(element, "id"); InstanceContainer<Entity> container; if (checkProvided(element, hostScreenData)) { //noinspection ConstantConditions container = hostScreenData.getContainer(containerId); } else { container = factory.createInstanceContainer(getEntityClass(element)); loadView(element, getEntityClass(element), container); } screenData.registerContainer(containerId, container); Element loaderEl = element.element("loader"); if (loaderEl != null) { loadInstanceLoader(screenData, loaderEl, container, hostScreenData); } for (Element collectionEl : element.elements()) { loadNestedContainer(screenData, collectionEl, container, hostScreenData); } }
protected void loadCollectionContainer(ScreenData screenData, Element element, @Nullable ScreenData hostScreenData) { String containerId = getRequiredAttr(element, "id"); CollectionContainer<Entity> container; if (checkProvided(element, hostScreenData)) { //noinspection ConstantConditions container = hostScreenData.getContainer(containerId); } else { container = factory.createCollectionContainer(getEntityClass(element)); loadView(element, getEntityClass(element), container); } screenData.registerContainer(containerId, container); Element loaderEl = element.element("loader"); if (loaderEl != null) { loadCollectionLoader(screenData, loaderEl, container, hostScreenData); } for (Element collectionEl : element.elements()) { loadNestedContainer(screenData, collectionEl, container, hostScreenData); } }
screenData.registerContainer(containerId, nestedContainer);