Examples of toValue()


Examples of org.apache.tapestry5.ValueEncoder.toValue()

                    throw new RuntimeException(String.format(
                            "The value for query parameter '%s' was blank, but a non-blank value is needed.",
                            parameterName));
                }

                Object value = valueEncoder.toValue(parameterValue);

                if (parameterType.isPrimitive() && value == null)
                    throw new RuntimeException(
                            String.format(
                                    "Query parameter '%s' evaluates to null, but the event method parameter is type %s, a primitive.",
View Full Code Here

Examples of org.apache.tapestry5.ValueEncoder.toValue()

                    Class parameterType = classCache.forName(parameterTypeName);

                    ValueEncoder valueEncoder = valueEncoderSource.getValueEncoder(parameterType);

                    Object value = valueEncoder.toValue(parameterValue);

                    if (parameterType.isPrimitive() && value == null)
                        throw new RuntimeException(
                                String.format(
                                        "Query parameter '%s' evaluates to null, but the event method parameter is type %s, a primitive.",
View Full Code Here

Examples of org.apache.tapestry5.ValueEncoder.toValue()

                    Class parameterType = classCache.forName(parameterTypeName);

                    ValueEncoder valueEncoder = valueEncoderSource.getValueEncoder(parameterType);

                    Object value = valueEncoder.toValue(parameterValue);

                    if (parameterType.isPrimitive() && value == null)
                        throw new RuntimeException(
                                String.format(
                                        "Query parameter '%s' evaluates to null, but the event method parameter is type %s, a primitive.",
View Full Code Here

Examples of org.apache.tapestry5.ValueEncoder.toValue()

        replay();

        ValueEncoder ve = coercion.coerce(pke);

        assertEquals(ve.toClient(value), "99");
        assertEquals(ve.toValue("99"), value);

        verify();
    }

    @Test
View Full Code Here

Examples of org.apache.tapestry5.ValueEncoder.toValue()

            }

            private Object coerce(final String parameterName, Class parameterType,
                    String parameterValue, ValueEncoder valueEncoder)
            {
                Object value = valueEncoder.toValue(parameterValue);

                if (parameterType.isPrimitive() && value == null)
                    throw new RuntimeException(
                            String.format(
                                    "Query parameter '%s' evaluates to null, but the event method parameter is type %s, a primitive.",
View Full Code Here

Examples of org.apache.tapestry5.services.ContextValueEncoder.toValue()

        replay();

        ContextValueEncoder cve = new ContextValueEncoderImpl(source);

        assertSame(cve.toValue(Long.class, clientValue), value);

        verify();
    }

}
View Full Code Here

Examples of org.enhydra.shark.xpdl.XMLAttribute.toValue()

            if (changedDeadline == this) {
                XMLAttribute durationUnit = (XMLAttribute) changedDeadline.get("DurationUnit");

                String changedDeadlineLimit = changedDeadline.getDeadlineLimit();
                if (changedDeadlineLimit != null && changedDeadlineLimit.trim().length() > 0) {
                    char durationUnitChar = durationUnit.toValue().charAt(0);
                    String variableCondition = "";
                    switch (durationUnitChar) {
                        case 'D':
                            variableCondition += (24 * 60 * 60 * 1000);
                            break;
View Full Code Here

Examples of org.enhydra.shark.xpdl.XMLAttribute.toValue()

            } else if (el instanceof XMLComplexElement) {
                List attributes = ((XMLComplexElement) el).getXMLAttributes();
                String str = "\n\tElement type=" + el.toName();
                for (int i = 0; i < attributes.size(); i++) {
                    XMLAttribute attr = (XMLAttribute) attributes.get(i);
                    str += "\n\t    " + i + ". attribute [" + attr.toName() + "," + attr.toValue() + "]";
                }
                List elems = ((XMLComplexElement) el).getXMLElements();
                for (int i = 0; i < elems.size(); i++) {
                    XMLElement attr = (XMLElement) elems.get(i);
                    if (attr instanceof XMLSimpleElement) {
View Full Code Here

Examples of org.enhydra.shark.xpdl.XMLAttribute.toValue()

                }
                List elems = ((XMLComplexElement) el).getXMLElements();
                for (int i = 0; i < elems.size(); i++) {
                    XMLElement attr = (XMLElement) elems.get(i);
                    if (attr instanceof XMLSimpleElement) {
                        str += "\n\t    " + i + ". simple el [" + attr.toName() + "," + attr.toValue() + "]";
                    } else {
                        toString(attr);
                    }
                }
                System.err.println(str);
View Full Code Here

Examples of org.enhydra.shark.xpdl.XMLAttribute.toValue()

                String str = "\n\tElement type=" + el.toName();
                List elems = ((XMLCollection) el).toElements();
                for (int i = 0; i < elems.size(); i++) {
                    XMLElement attr = (XMLElement) elems.get(i);
                    if (attr instanceof XMLAttribute) {
                        str += "\n\t    " + i + ". attribute [" + attr.toName() + "," + attr.toValue() + "]";
                    }
                    if (attr instanceof XMLSimpleElement) {
                        str += "\n\t    " + i + ". simple el [" + attr.toName() + "," + attr.toValue() + "]";
                    } else {
                        toString(attr);
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.