Package org.apache.tapestry.runtime

Examples of org.apache.tapestry.runtime.Component


        String parameterName = "myparam";

        String id = "mycomponentid";

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

        train_getId(resources, id);
View Full Code Here


        String parameterName = "myparam";

        String id = "mycomponentid";

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

                while (true)
                {
                    String componentId = ois.readUTF();
                    ComponentAction action = (ComponentAction) ois.readObject();

                    Component component = _source.getComponent(componentId);

                    action.execute(component);
                }
            }
            catch (EOFException ex)
View Full Code Here

    {
        notNull(pageClass, "pageClass");

        Page page = _pageCache.getByClassName(pageClass.getName());

        Component root = page.getRootComponent();

        return pageClass.cast(root);
    }
View Full Code Here

        _validators = validators;
    }

    public FieldValidator createValidator(Field field, String validatorType, String constraintValue)
    {
        Component component = cast(field, Component.class, "field");
        notBlank(validatorType, "validatorType");

        ComponentResources componentResources = component.getComponentResources();
        String overrideId = componentResources.getId();
        Locale locale = componentResources.getLocale();

        // So, if you use a TextField on your EditUser page, we want to search the messages
        // of the EditUser page (the container), not the TextField (which will always be the same).
View Full Code Here

    @Test
    public void block_not_found()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        TypeCoercer coercer = mockTypeCoercer();

        Instantiator ins = newInstantiator(component, model);
View Full Code Here

    @Test
    public void block_found()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        TypeCoercer coercer = mockTypeCoercer();
        Block block = mockBlock();

        Instantiator ins = newInstantiator(component, model);
View Full Code Here

    @Test
    public void parameter_is_bound()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        TypeCoercer coercer = mockTypeCoercer();

        Instantiator ins = newInstantiator(component, model);
View Full Code Here

    @Test
    public void duplicate_block_id()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        TypeCoercer coercer = mockTypeCoercer();
        Block block1 = mockBlock();
        Block block2 = mockBlock();
View Full Code Here

    @Test
    public void verify_required_parameters_all_are_bound()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        TypeCoercer coercer = mockTypeCoercer();
        ParameterModel pmodel = mockParameterModel();

        Instantiator ins = newInstantiator(component, model);

        train_getParameterNames(model, "barney");
        train_getParameterModel(model, "barney", pmodel);

        component.containingPageDidLoad();

        replay();

        ComponentPageElementImpl cpe = new ComponentPageElementImpl(page, ins, null);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.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.