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);

            element.addMixin(InternalUtils.lastTerm(className), mixinInstantiator);
        }
    }
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();

        Object value = new Object();

        train_getModel(ins, model);
View Full Code Here

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

        train_getModel(ins, model);

        replay();
View Full Code Here

    @Test
    public void post_render_cleanup_removes_all_variables()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();

        train_getModel(ins, model);

        replay();
View Full Code Here

    @Test
    public void add_page_lifecycle_listener()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();
        ComponentPageElement element = mockComponentPageElement();
        Page page = mockPage();
        PageLifecycleListener listener = newMock(PageLifecycleListener.class);
View Full Code Here

    @Test
    public void get_property_name()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();
        ComponentPageElement element = mockComponentPageElement();
        Page page = mockPage();
        Binding binding = mockBinding();
View Full Code Here

    @Test
    public void get_property_name_internal_prop_binding()
    {
        Component component = mockComponent();
        Instantiator ins = mockInstantiator(component);
        ComponentModel model = mockComponentModel();
        ComponentPageElement element = mockComponentPageElement();
        Page page = mockPage();
        InternalPropBinding binding = newMock(InternalPropBinding.class);
View Full Code Here

  @Test public void component_render_tracing() {
    Request request = newMock(Request.class);
    SymbolSource symbolSource = newMock(SymbolSource.class);
   
    Page page = getMocksControl().createMock(Page.class);
    Instantiator instantiator = newMock(Instantiator.class);
    Location location = newMock(Location.class);
    ComponentPageElementResources elementResources = newMock(ComponentPageElementResources.class);
    ComponentModel model = newMock(ComponentModel.class);
   
    getMocksControl().resetToNice();

    expect(instantiator.getModel()).andReturn(model).anyTimes();
   
    // off by default
    expect(symbolSource.valueForSymbol(PRODUCTION_MODE)).andReturn("false");
    expect(symbolSource.valueForSymbol(COMPONENT_RENDER_TRACING_ENABLED)).andReturn("false");
    expect(request.getParameter("t:component-trace")).andReturn("false");
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

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.