Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.BindingSource


    @Test
    public void not_all_embedded_components_in_template()
    {
        ComponentTemplateSource templateSource = mockComponentTemplateSource();
        PageElementFactory elementFactory = mockPageElementFactory();
        BindingSource bindingSource = mockBindingSource();
        ComponentPageElement rootElement = mockComponentPageElement();
        InternalComponentResources resources = mockInternalComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentTemplate template = mockComponentTemplate();
        Log log = mockLog();
View Full Code Here


    @Test
    public void type_conflict_between_template_and_class()
    {
        ComponentTemplateSource templateSource = mockComponentTemplateSource();
        PageElementFactory elementFactory = mockPageElementFactory();
        BindingSource bindingSource = mockBindingSource();
        ComponentPageElement rootElement = mockComponentPageElement();
        InternalComponentResources resources = mockInternalComponentResources();
        ComponentModel model = mockComponentModel();
        ComponentModel childModel = mockComponentModel();
        ComponentTemplate template = mockComponentTemplate();
View Full Code Here

    }

    @Test
    public void parameter_with_default() throws Exception
    {
        final BindingSource source = mockBindingSource();
        final InternalComponentResources resources = mockInternalComponentResources();
        final Binding binding = mockBinding();
        String boundValue = "howdy!";

        MutableComponentModel model = mockMutableComponentModel();

        model.addParameter("value", false, TapestryConstants.PROP_BINDING_PREFIX);

        Runnable phaseTwoTraining = new Runnable()
        {
            public void run()
            {
                train_isBound(resources, "value", false);

                expect(
                        source.newBinding(
                                "default value",
                                resources,
                                TapestryConstants.PROP_BINDING_PREFIX,
                                "literal:greeting")).andReturn(binding);
View Full Code Here

    }

    @Test
    public void default_binding_method() throws Exception
    {
        BindingSource source = mockBindingSource();
        final InternalComponentResources resources = mockInternalComponentResources();
        _binding = mockBinding();
        String boundValue = "yowza!";

        MutableComponentModel model = mockMutableComponentModel();
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                expression,
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                expression,
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put("prop", factory);

        BindingSource source = new BindingSourceImpl(map);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                "prop:myproperty",
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

        try
        {
            source.newBinding(description, container, component, defaultPrefix, expression, l);
            unreachable();
        }
        catch (TapestryException ex)
        {
            assertTrue(ex.getMessage().contains(
View Full Code Here

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();

        train_getId(resources, id);
        train_getContainer(resources, container);

        train_getAdapter(access, container, classPropertyAdapter);
View Full Code Here

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        PropertyAdapter propertyAdapter = newPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();
        Binding binding = mockBinding();
        ComponentResources containerResources = mockComponentResources();

        train_getId(resources, id);
        train_getContainer(resources, container);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.BindingSource

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.