Examples of ComponentResources


Examples of org.apache.tapestry5.ComponentResources

        replay();

        ComponentPageElement cpe = new ComponentPageElementImpl(page, ins, null);

        ComponentResources resources = cpe.getComponentResources();
        assertFalse(resources.isBound("fred"));

        cpe.bindParameter("barney", binding);

        assertFalse(resources.isBound("fred"));
        assertTrue(resources.isBound("barney"));

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

public class BeanEditorTest extends TapestryTestCase
{
    @Test
    public void object_created_as_needed()
    {
        ComponentResources resources = mockComponentResources();
        BeanModelSource source = mockBeanModelSource();
        BeanModel model = mockBeanModel();
        RegistrationData data = new RegistrationData();
        Messages messages = mockMessages();
        PropertyOverrides overrides = mockPropertyOverrides();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources


    @Test
    public void object_can_not_be_instantiated()
    {
        ComponentResources resources = mockComponentResources();
        BeanModelSource source = mockBeanModelSource();
        BeanModel model = mockBeanModel();
        Location l = mockLocation();
        Throwable exception = new RuntimeException("Fall down go boom.");
        PropertyOverrides overrides = mockPropertyOverrides();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        return new ReadOnlyComponentFieldConduit(className, fieldName)
        {
            public Object get(Object instance, InstanceContext context)
            {
                ComponentResources resources = context.get(ComponentResources.class);

                return resources.getBlock(blockId);
            }
        };
    }
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        context.add(new PageAssemblyAction()
        {
            public void execute(PageAssembly pageAssembly)
            {
                ComponentResources resources = pageAssembly.activeElement.peek().getComponentResources();

                RenderCommand command = elementFactory.newExpansionElement(resources, token);

                pageAssembly.addRenderCommand(command);
            }
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        ComputedValue<Asset> computedAsset = new ComputedValue<Asset>()
        {
            public Asset get(InstanceContext context)
            {
                ComponentResources resources = context.get(ComponentResources.class);

                Locale locale = resources.getLocale();

                return assetSource.getAsset(baseResource, expanded, locale);
            }
        };
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void expression_has_no_prefix()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();

        String defaultPrefix = "def";
        String description = "descrip";
        String expression = "full expression";
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void expression_prefix_not_in_configuration()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();

        String defaultPrefix = "def";
        String description = "descrip";
        String expression = "javascript:not-a-known-prefix";
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void known_prefix()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();

        String defaultPrefix = "literal";
        String description = "descrip";
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void factory_throws_exception()
    {
        BindingFactory factory = mockBindingFactory();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();
        Throwable t = new RuntimeException("Simulated failure.");

        String defaultPrefix = "def";
        String description = "descrip";
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.