Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.Component


    @Test
    public void get_active_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();
        RequestGlobals globals = mockRequestGlobals();
        String pageName = "Active";

        expect(globals.getActivePageName()).andReturn(pageName);
View Full Code Here


        this.renderer = renderer;
    }

    public ContentType findContentType(Object component)
    {
        Component c = (Component) component;

        String pageName = c.getComponentResources().getPageName();

        Page page = pageCache.get(pageName);

        return pageContentAnalyzer.findContentType(page);
    }
View Full Code Here

        ComponentModel model = modelSource.getModel(pageClassName);

        if (model.handlesEvent(eventType))
        {
            Component page = componentSource.getPage(pageName);

            page.getComponentResources().triggerEvent(eventType, new Object[]
            { link, parameters }, null);
        }
    }
View Full Code Here

        ct.finish();

        Instantiator instantiator = ct.createInstantiator();

        Component instance = instantiator.newInstance(resources);

        verify();

        expect(resources.getComponent()).andReturn(instance).anyTimes();
View Full Code Here

    public void special_prop_binding_values(String expression, Object expected)
    {
        Location l = mockLocation();
        String description = "my description";
        ComponentResources resources = mockComponentResources();
        Component component = mockComponent();

        train_getComponent(resources, component);
        train_getCompleteId(resources, "Does.not.matter");

        replay();
View Full Code Here

    public void not_a_field()
    {
        FieldValidatorSource source = mockFieldValidatorSource();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Component instance = mockComponent();
        Location l = mockLocation();

        train_getComponent(component, instance);
        train_getCompleteId(component, "foo.Bar:baz");
View Full Code Here

        replay();

        Instantiator inst = source.getInstantiator(classname);

        Component target = inst.newInstance(resources);

        verify();

        return target;
    }
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();
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

TOP

Related Classes of org.apache.tapestry5.runtime.Component

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.