Examples of LayoutItemDef


Examples of org.auraframework.def.LayoutItemDef

    @Override
    protected void handleChildTag() throws XMLStreamException, QuickFixException {
        String tag = getTagName();
        if (LayoutItemDefHandler.TAG.equalsIgnoreCase(tag)) {
            LayoutItemDef layoutItem = new LayoutItemDefHandler<P>(getParentHandler(), builder.getName(), xmlReader,
                    source).getElement();
            builder.addLayoutItemDef(layoutItem);
        } else {
            error("Found unexpected tag %s", tag);
        }
View Full Code Here

Examples of org.auraframework.def.LayoutItemDef

        assertNotNull(feedLayout);
        assertEquals("Failed to retrieve description of individual layout", "layout description",
                feedLayout.getDescription());
        assertEquals(1, feedLayout.getLayoutItemDefs().size());

        LayoutItemDef item = feedLayout.getLayoutItemDef("content");
        assertNotNull(item);

        assertEquals("Failed to retrieve description of layout item", "layout item description", item.getDescription());
        List<ComponentDefRef> body = item.getBody();
        assertEquals(1, body.size());
        ComponentDefRef ref = body.get(0);
        assertEquals("markup://aura:html", ref.getDescriptor().getQualifiedName());
        assertEquals("inner", ref.getLocalId());
        Collection<?> htmlAttribs = ((HashMap<?, ?>) ref.getAttributeDefRef("HTMLAttributes").getValue()).values();
        assertEquals(1, htmlAttribs.size());
        assertEquals("self", htmlAttribs.toArray()[0]);
        assertNull(item.getCache());

        // Menu Layout
        LayoutDef menuLayout = layoutsDef.getLayoutDef("menu");
        assertNotNull(menuLayout);
        assertEquals("Menu layout was not specified any description.", null, menuLayout.getDescription());
        assertEquals(1, menuLayout.getLayoutItemDefs().size());

        item = menuLayout.getLayoutItemDef("content");
        assertNotNull(item);
        assertEquals("Content layout was not specified any description.", null, item.getDescription());
        body = item.getBody();
        assertEquals(1, body.size());
        ref = body.get(0);
        assertEquals("markup://ui:button", ref.getDescriptor().getQualifiedName());
        assertEquals("inner", ref.getLocalId());
        assertEquals("futile", ref.getAttributeDefRef("label").getValue());
        assertEquals("session", item.getCache());

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.