Package org.apache.tapestry5.internal.services

Examples of org.apache.tapestry5.internal.services.Instantiator


    private void addRootComponentMixins(ComponentPageElement element)
    {
        for (String className : instantiator.getModel().getMixinClassNames())
        {
            Instantiator mixinInstantiator = instantiatorSource.getInstantiator(className);

            ComponentModel model = instantiator.getModel();
            element.addMixin(InternalUtils.lastTerm(className), mixinInstantiator, model.getOrderForMixin(className));
        }
    }
View Full Code Here


        }
    }

    private void addMixin(String className, String... order)
    {
        Instantiator mixinInstantiator = instantiatorSource.getInstantiator(className);

        String mixinId = InternalUtils.lastTerm(className);

        if (mixinIdToInstantiator.containsKey(mixinId))
            throw new TapestryException(PageloadMessages.uniqueMixinRequired(mixinId), location, null);
View Full Code Here

    public void addMixinsToElement(ComponentPageElement newElement)
    {
        for (Map.Entry<String, Instantiator> entry : mixinIdToInstantiator.entrySet())
        {
            String mixinId = entry.getKey();
            Instantiator instantiator = entry.getValue();

            newElement.addMixin(mixinId, instantiator, mixinsIdToOrderConstraints.get(mixinId));
        }
    }
View Full Code Here

        verify();

        transformation.finish();

        Instantiator instantiator = transformation.createInstantiator();

        Object component = instantiator.newInstance(resources);

        // Test the companion flag field

        expect(manager.exists(asoClass)).andReturn(true);
View Full Code Here

        verify();

        transformation.finish();

        Instantiator instantiator = transformation.createInstantiator();

        Object component = instantiator.newInstance(resources);

        // Test read property

        train_getIfExists(manager, asoClass, null);
View Full Code Here

    @Test
    public void render_informal_parameters_no_bindings()
    {
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        MarkupWriter writer = mockMarkupWriter();
        TypeCoercer coercer = mockTypeCoercer();
        ComponentModel model = mockComponentModel();

        train_getModel(ins, model);
View Full Code Here

    @Test
    public void render_informal_parameters_skips_formal_parameters()
    {
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        MarkupWriter writer = mockMarkupWriter();
        ComponentModel model = mockComponentModel();
        ParameterModel pmodel = mockParameterModel();
        Binding binding = mockBinding();
View Full Code Here

    @Test
    public void render_an_informal_parameter()
    {
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        MarkupWriter writer = mockMarkupWriter();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        Object rawValue = new Long(97);
View Full Code Here

    @Test
    public void get_render_variable_exists()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();
        ComponentPageElement element = mockComponentPageElement();

        Object value = new Object();
View Full Code Here

    @Test
    public void get_render_variable_missing()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();
        ComponentPageElement element = mockComponentPageElement();

        train_getModel(ins, model);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.services.Instantiator

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.