Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.Component


    }

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

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

        train_getModel(ins, model);
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);
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

        this.validatorMacro = validatorMacro;
    }

    public FieldValidator createValidator(Field field, String validatorType, String constraintValue)
    {
        Component component = (Component) field;
        assert InternalUtils.isNonBlank(validatorType);
        ComponentResources componentResources = component.getComponentResources();
        String overrideId = componentResources.getId();

        // 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

                    boolean matches = !event.isAborted() && event.matches(eventType, "", minContextValues);

                    if (matches)
                    {
                        final Component instance = (Component) invocation.getInstance();

                        tracker.invoke(operationDescription, new Invokable<Object>()
                        {
                            public Object invoke()
                            {
View Full Code Here

                return new ReadOnlyComponentFieldConduit(resources, fieldName)
                {
                    public Object get(Object instance, InstanceContext context)
                    {
                        Component container = resources.getContainer();

                        if (!fieldType.isInstance(container))
                        {
                            String message = String.format(
                                    "Component %s (type %s) is not assignable to field %s.%s (of type %s).", container
                                    .getComponentResources().getCompleteId(), container.getClass().getName(), resources.getComponentModel()
                                    .getComponentClassName(), fieldName, fieldTypeName);

                            throw new RuntimeException(message);
                        }
View Full Code Here

            {
                tracker.run(operationDescription, new Runnable()
                {
                    public void run()
                    {
                        Component instance = (Component) invocation.getInstance();

                        handler.handleEvent(instance, event);
                    }
                });
            }
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.