Package org.apache.tapestry.ioc.services

Examples of org.apache.tapestry.ioc.services.ClassPropertyAdapter


    }

    @Test
    public void property_order_basic()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
View Full Code Here


    }

    @Test
    public void property_order_on_subclass()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBeanSubclass.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void properties_with_order_annotation_filtered()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(PropertyOrderBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryInternalUtils.orderProperties(null, adapter, _classFactory, names);
View Full Code Here

        notNull(beanClass, "beanClass");
        notNull(resources, "resources");

        Messages messages = resources.getMessages();

        ClassPropertyAdapter adapter = _propertyAccess.getAdapter(beanClass);

        BeanModel model = new BeanModelImpl(beanClass, _propertyConduitSource, _typeCoercer,
                messages);

        List<String> propertyNames = newList();

        for (String propertyName : adapter.getPropertyNames())
        {
            PropertyAdapter pa = adapter.getPropertyAdapter(propertyName);

            if (!pa.isRead())
                continue;

            if (pa.getAnnotation(NonVisual.class) != null)
View Full Code Here

    }

    @Test
    public void property_order_basic()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void property_order_on_subclass()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(DataBeanSubclass.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void properties_with_order_annotation_filtered()
    {
        ClassPropertyAdapter adapter = _access.getAdapter(PropertyOrderBean.class);

        List<String> names = adapter.getPropertyNames();

        names.remove("class");

        List<String> sorted = TapestryUtils.orderProperties(adapter, _classFactory, names);
View Full Code Here

    }

    @Test
    public void clear_wipes_internal_cache()
    {
        ClassPropertyAdapter cpa1 = _access.getAdapter(Bean.class);

        assertSame(cpa1.getBeanType(), Bean.class);

        ClassPropertyAdapter cpa2 = _access.getAdapter(Bean.class);

        assertSame(cpa2, cpa1);

        _access.clearCache();

        ClassPropertyAdapter cpa3 = _access.getAdapter(Bean.class);

        assertNotSame(cpa3, cpa1);
    }
View Full Code Here

    }

    @Test
    public void class_property_adapter_toString()
    {
        ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);

        assertEquals(cpa.toString(),
                     "<ClassPropertyAdaptor " + CLASS_NAME + "$Bean : class, readOnly, value, writeOnly>");
    }
View Full Code Here

    }

    @Test
    public void property_adapter_read_only_property()
    {
        ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
        PropertyAdapter pa = cpa.getPropertyAdapter("readOnly");

        assertTrue(pa.isRead());
        assertFalse(pa.isUpdate());

        assertNull(pa.getWriteMethod());
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.services.ClassPropertyAdapter

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.