Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.BindingSource


    public void unclosed_attribute_expression()
    {
        ComponentInstantiatorSource source = mockComponentInstantiatorSource();
        ComponentClassResolver resolver = mockComponentClassResolver();
        TypeCoercer typeCoercer = mockTypeCoercer();
        BindingSource bindingSource = mockBindingSource();
        ComponentMessagesSource messagesSource = newMock(ComponentMessagesSource.class);
        ComponentResources resources = mockComponentResources();
        Location location = mockLocation();

        AttributeToken token = new AttributeToken(null, "fred", "${flintstone", location);
View Full Code Here


        ComponentResources resources = newComponentResources();
        Component container = newComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        BindingSource bindingSource = newBindingSource();

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

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

        ComponentResources resources = newComponentResources();
        Component container = newComponent();
        PropertyAccess access = newPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = newClassPropertyAdapter();
        PropertyAdapter propertyAdapter = newPropertyAdapter();
        BindingSource bindingSource = newBindingSource();
        Binding binding = newBinding();
        ComponentResources containerResources = newComponentResources();

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

    @Test
    public void not_all_embedded_components_in_template()
    {
        ComponentTemplateSource templateSource = newComponentTemplateSource();
        PageElementFactory elementFactory = newPageElementFactory();
        BindingSource bindingSource = newBindingSource();
        ComponentPageElement rootElement = newComponentPageElement();
        InternalComponentResources resources = newInternalComponentResources();
        ComponentModel model = newComponentModel();
        ComponentTemplate template = newComponentTemplate();
        Log log = newLog();
View Full Code Here

    @Test
    public void type_conflict_between_template_and_class()
    {
        ComponentTemplateSource templateSource = newComponentTemplateSource();
        PageElementFactory elementFactory = newPageElementFactory();
        BindingSource bindingSource = newBindingSource();
        ComponentPageElement rootElement = newComponentPageElement();
        InternalComponentResources resources = newInternalComponentResources();
        ComponentModel model = newComponentModel();
        ComponentModel childModel = newComponentModel();
        ComponentTemplate template = newComponentTemplate();
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

    }

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

        MutableComponentModel model = newMutableComponentModel();

        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

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.