Search in sources :

Example 1 with SectionNode

use of com.codename1.rad.nodes.SectionNode in project CodeRAD by shannah.

the class FormNode method setAttributes.

public void setAttributes(Attribute... atts) {
    if (sections == null) {
        sections = new Sections();
    }
    // super.setAttributes(atts);
    for (Attribute att : atts) {
        if (att.getClass() == SectionNode.class) {
            sections.add((SectionNode) att);
            ((SectionNode) att).setParent(this);
        } else if (att.getClass() == FieldNode.class) {
            if (globalSection == null) {
                globalSection = new SectionNode();
                globalSection.setParent(this);
            }
            globalSection.setAttributes(att);
        } else if (att instanceof ListNode) {
            rootList = (ListNode) att;
            super.setAttributes(att);
        } else if (att instanceof ViewNode) {
            rootView = (ViewNode) att;
            super.setAttributes(att);
        } else {
            super.setAttributes(att);
        }
    }
}
Also used : Attribute(com.codename1.rad.models.Attribute)

Example 2 with SectionNode

use of com.codename1.rad.nodes.SectionNode in project CodeRAD by shannah.

the class EntityEditor method buildSections.

private void buildSections() {
    for (SectionNode section : (FormNode) rootNode) {
        SectionEditor sectionEditor = new SectionEditor(entity, section);
        sectionEditor.build();
        add(sectionEditor);
    }
}
Also used : FormNode(com.codename1.rad.nodes.FormNode) SectionNode(com.codename1.rad.nodes.SectionNode)

Aggregations

Attribute (com.codename1.rad.models.Attribute)1 FormNode (com.codename1.rad.nodes.FormNode)1 SectionNode (com.codename1.rad.nodes.SectionNode)1