Examples of coerceValue()


Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

       
        expect(form.getElementId(bean)).andReturn("For_1");
       
        expect(spec.getParameter("source")).andReturn(pspec).anyTimes();
       
        expect(conv.coerceValue(src, Iterator.class)).andReturn(src.iterator());
       
        expect(resp.isDynamic()).andReturn(false).anyTimes();
       
        expect(cycle.getResponseBuilder()).andReturn(resp).anyTimes();
       
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        ValueConverter vc = newMock(ValueConverter.class);
        Location l = fabricateLocation(99);
       
        Date date = new Date();

        expect(vc.coerceValue("my-literal", Date.class)).andReturn(date);

        replay();
       
        LiteralBinding b = new LiteralBinding("parameter foo", vc, l, "my-literal");
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        ValueConverter vc = newMock(ValueConverter.class);
        Location location = fabricateLocation(99);
       
        Exception innerException = new RuntimeException("Failure");

        expect(vc.coerceValue("my-literal", Date.class)).andThrow(innerException);
       
        replay();
       
        LiteralBinding b = new LiteralBinding("parameter foo", vc, location, "my-literal");
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        expect(component.getComponent("foo")).andReturn(nested);
        expect(nested.getClientId()).andReturn("fooClientId");

        List clientIds = Arrays.asList("fooClientId");
       
        expect(vc.coerceValue(clientIds, List.class)).andReturn(clientIds);

        Location l = newLocation();

        replay();
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        expect(component.getComponent("barney")).andReturn(compB);
        expect(compB.getClientId()).andReturn("comp_0");

        List clientIds = Arrays.asList("comp_1", "comp_0");

        expect(vc.coerceValue(clientIds, List.class)).andReturn(clientIds);

        Location l = newLocation();

        replay();
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        formControl.setReturnValue("myform");

        field.getValidators();
        fieldControl.setReturnValue(null);
       
        converter.coerceValue(null, Iterator.class);
        converterControl.setReturnValue(Collections.EMPTY_LIST.iterator());
       
        replayControls();

        support.renderContributions(field, writer, cycle);
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        formControl.setReturnValue("myform");

        field.getValidators();
        fieldControl.setReturnValue(validator);
       
        converter.coerceValue(validator, Iterator.class);
        converterControl.setReturnValue(Collections.singleton(validator).iterator());
       
        FormComponentContributorContext context = new FormComponentContributorContextImpl(field);
       
        validator.renderContribution(writer, cycle, context, field);
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        Object object = new Object();

        field.getValidators();
        fieldControl.setReturnValue(validator);
       
        converter.coerceValue(validator, Iterator.class);
        converterControl.setReturnValue(Collections.singleton(validator).iterator());

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);
       
        try
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        Object object = new Object();

        field.getValidators();
        fieldControl.setReturnValue(validator);
       
        converter.coerceValue(validator, Iterator.class);
        converterControl.setReturnValue(Collections.singleton(validator).iterator());

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);
       
        ValidatorException expected = new ValidatorException("test");
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter.coerceValue()

        Object object = new Object();

        field.getValidators();
        fieldControl.setReturnValue(null);
       
        converter.coerceValue(null, Iterator.class);
        converterControl.setReturnValue(Collections.EMPTY_LIST.iterator());
       
        try
        {
            replayControls();
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.