Search in sources :

Example 1 with FlowLayoutPattern

use of com.qcadoo.view.internal.components.layout.FlowLayoutPattern in project qcadoo by qcadoo.

the class AwesomeDynamicListPattern method parse.

@Override
public void parse(final Node componentNode, final ViewDefinitionParser parser) throws ViewDefinitionParserNodeException {
    super.parse(componentNode, parser);
    NodeList childNodes = componentNode.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node child = childNodes.item(i);
        if ("components".equals(child.getNodeName())) {
            innerFormPattern.parse(child, parser);
        } else if ("header".equals(child.getNodeName())) {
            ComponentDefinition formComponentDefinition = new ComponentDefinition();
            formComponentDefinition.setName("header");
            formComponentDefinition.setFieldPath(null);
            formComponentDefinition.setSourceFieldPath(null);
            formComponentDefinition.setTranslationService(getTranslationService());
            formComponentDefinition.setViewDefinition(getViewDefinition());
            formComponentDefinition.setParent(this);
            formComponentDefinition.setContextualHelpService(getContextualHelpService());
            headerFormPattern = new FlowLayoutPattern(formComponentDefinition);
            headerFormPattern.parse(child, parser);
            children.put(headerFormPattern.getName(), headerFormPattern);
        }
    }
}
Also used : FlowLayoutPattern(com.qcadoo.view.internal.components.layout.FlowLayoutPattern) NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node) ComponentDefinition(com.qcadoo.view.internal.ComponentDefinition)

Aggregations

ComponentDefinition (com.qcadoo.view.internal.ComponentDefinition)1 FlowLayoutPattern (com.qcadoo.view.internal.components.layout.FlowLayoutPattern)1 Node (org.w3c.dom.Node)1 NodeList (org.w3c.dom.NodeList)1