Examples of ComponentResources


Examples of org.apache.tapestry5.ComponentResources

    public void missing_field_validator_constraint() throws Exception
    {
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();

        Map<String, Validator> map = singletonMap("minlength", validator);
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void trigger_deferred()
    {
        Request request = mockRequest();
        ComponentResources resources = mockComponentResources();
        FormSupportImpl support = new FormSupportImpl(null, null);

        String elementName = "myname";

        // Also: test for the alternate, JavaScript oriented way, of determining the
        // element/component that triggered the submission.
        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, "[ 'xyz', 'pdq' ]");

        replay();

        Submit submit = new Submit(request);

        TestBase.set(submit, "resources", resources, "formSupport", support);

        submit.processSubmission("xyz", elementName);

        verify();

        expect(resources.triggerEvent(EventConstants.SELECTED, null, null)).andReturn(false);

        replay();

        support.executeDeferred();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
        Messages globalMessages = mockMessages();

        Map<String, Validator> map = singletonMap("required", validator);
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter requiredFormatter = mockMessageFormatter();
        MessageFormatter minLengthFormatter = mockMessageFormatter();
        Object inputValue = "input value";
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer fifteen = 15;
        FormSupport fs = mockFormSupport();
        Messages globalMessages = mockMessages();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void trigger_immediate()
    {
        FormSupport support = mockFormSupport();
        ComponentResources resources = mockComponentResources();
        Heartbeat heartbeat = new HeartbeatImpl();
        Request request = mockRequest();

        String elementName = "myname";

        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
        train_getParameter(request, elementName, "login");

        replay();

        heartbeat.begin();

        Submit submit = new Submit(request);

        TestBase.set(submit, "resources", resources, "formSupport", support, "heartbeat", heartbeat, "defer", false);

        submit.processSubmission("xyz", elementName);

        verify();

        expect(resources.triggerEvent(EventConstants.SELECTED, null, null)).andReturn(false);

        replay();

        heartbeat.end();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer five = 5;
        FormSupport fs = mockFormSupport();
        ValidatorMacro macro = mockValidatorMacro();
        Messages globalMessages = mockMessages();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer five = 5;
        FormSupport fs = mockFormSupport();
        ValidatorMacro macro = mockValidatorMacro();
        Messages globalMessages = mockMessages();
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void test_imagesubmit_event_fired()
    {
        Request request = mockRequest();
        final ComponentResources resources = mockComponentResources();
        FormSupport formSupport = mockFormSupport();
        Asset image = mockAsset();

        String elementName = "myname";
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    @Test
    public void test_submit_event_fired()
    {
        Request request = mockRequest();
        final ComponentResources resources = mockComponentResources();
        FormSupport formSupport = mockFormSupport();

        String elementName = "myname";

        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
View Full Code Here

Examples of org.apache.tapestry5.ComponentResources

    }

    @Override
    protected Link createLink(Object[] eventContext)
    {
        ComponentResources containerResources = resources.getContainerResources();

        return containerResources.createEventLink(event, eventContext);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.