Examples of coerceValue()


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

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

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

        validator.getAcceptsNull();
        validatorControl.setReturnValue(true);
View Full Code Here

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

       
        expect(cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE)).andReturn(null);
       
        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()

       
        String[] parms = (String[])src.toArray((new String[src.size()]));
       
        expect(cycle.getParameters("foo")).andReturn(parms);
       
        expect(conv.coerceValue(src, Iterator.class)).andReturn(src.iterator());
       
        expect(resp.isDynamic()).andReturn(false).anyTimes();
       
        expect(cycle.renderStackPop()).andReturn(bean);
       
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()

        Map map = new HashMap();
       
        ValueConverter converter = newMock(ValueConverter.class);
        Location l = newLocation();

        expect(converter.coerceValue(newValue, String.class)).andReturn(valueConverted);
       
        PortletRequest request = newRequest(map);
       
        replay();
View Full Code Here

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

        trainGetAttribute(cycle, TapestryUtils.FORM_ATTRIBUTE, form);
        expect(form.wasPrerendered(writer, comp)).andReturn(false);

        expect(form.getElementId(comp)).andReturn("suggest");
        expect(cycle.getParameter("suggest")).andReturn("b");
        expect(converter.coerceValue(source, Iterator.class)).andReturn(source.iterator());

        replay();

        comp.renderComponent(writer, cycle);
View Full Code Here

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

       
        expect(cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE)).andReturn(null);
       
        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()

       
        String[] parms = (String[])src.toArray((new String[src.size()]));
       
        expect(cycle.getParameters("foo")).andReturn(parms);
       
        expect(conv.coerceValue(src, Iterator.class)).andReturn(src.iterator());
       
        expect(resp.isDynamic()).andReturn(false).anyTimes();
       
        expect(cycle.renderStackPop()).andReturn(bean);
       
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.