Package org.auraframework.impl.root.component

Examples of org.auraframework.impl.root.component.ComponentDefRefArrayImpl


    @SuppressWarnings("unchecked")
    @Override
    public Object initialize(Object config, BaseComponent<?, ?> valueProvider) throws QuickFixException {
        if (config != null && config instanceof List) {
            return new ComponentDefRefArrayImpl((List<ComponentDefRef>)config, valueProvider);
        }
        return config;
    }
View Full Code Here


        Component cmp = (Component) Aura.getInstanceService().getInstance(desc);
        assertNotNull("Failed to create component with Aura.ComponentDefRef[] type attribute.", cmp);
        Object value = cmp.getAttributes().getValue("attr");
        assertNotNull(value);
        assertTrue(value instanceof ComponentDefRefArrayImpl);
        ComponentDefRefArrayImpl cdra = (ComponentDefRefArrayImpl) value;
        List<ComponentDefRef> cmpDefRefs = cdra.getList();
        assertEquals("Unexpected items in componentDefRef array attribute", 2, cmpDefRefs.size());
        // assertTrue(cmpDefRefs.get(0) instanceof ComponentDefRef);
        // assertTrue(cmpDefRefs.get(1) instanceof ComponentDefRef);
        // Also verifies the order of components
        assertEquals("markup://test:text", cmpDefRefs.get(0).getDescriptor().getQualifiedName());
View Full Code Here

        Component cmp = (Component) Aura.getInstanceService().getInstance(desc);
        assertNotNull(cmp);
        Object value = cmp.getAttributes().getValue("attr");
        assertNotNull(value);
        assertTrue(value instanceof ComponentDefRefArrayImpl);
        ComponentDefRefArrayImpl cdra = (ComponentDefRefArrayImpl) value;
        List<ComponentDefRef> cmpDefRefs = cdra.getList();
        ComponentDefRef ref = cmpDefRefs.get(0);
        assertEquals("Failed to use attribute value of outer component in ComponentDefRef array items.", "auraemulp",
                ref.newInstance(cmp).getAttributes().getValue("value"));
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.component.ComponentDefRefArrayImpl

Copyright © 2018 www.massapicom. 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.