Examples of UidlValue


Examples of com.vaadin.shared.communication.UidlValue

    public void testNullLegacyValue() throws JsonException {
        JsonArray inputArray = Json.createArray();
        inputArray.set(0, "n");
        inputArray.set(1, Json.createNull());
        UidlValue decodedObject = (UidlValue) JsonCodec.decodeInternalType(
                UidlValue.class, true, inputArray, null);
        assertNull(decodedObject.getValue());
    }
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

    public void testNullTypeOtherValue() {
        try {
            JsonArray inputArray = Json.createArray();
            inputArray.set(0, "n");
            inputArray.set(1, "a");
            UidlValue decodedObject = (UidlValue) JsonCodec.decodeInternalType(
                    UidlValue.class, true, inputArray, null);

            throw new AssertionFailedError("No JsonException thrown");
        } catch (JsonException e) {
            // Should throw exception
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

    }

    private static JSONValue encodeChildValue(Object value,
            Type collectionType, int typeIndex, ApplicationConnection connection) {
        if (collectionType == null) {
            return encode(new UidlValue(value), null, connection);
        } else {
            assert collectionType.getParameterTypes() != null
                    && collectionType.getParameterTypes().length > typeIndex
                    && collectionType.getParameterTypes()[typeIndex] != null : "Proper generics required for encoding child value, assertion failed for "
                    + collectionType;
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            ConnectorTracker connectorTracker) {
        String type = encodedJsonValue.getString(0);

        Object decodedValue = decodeInternalType(getType(type), true,
                encodedJsonValue.get(1), connectorTracker);
        return new UidlValue(decodedValue);
    }
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            return decodeInternalOrCustomType(childType, value,
                    connectorTracker);
        } else {
            // Only UidlValue when not enforcing a given type to avoid security
            // issues
            UidlValue decodeInternalType = (UidlValue) decodeInternalType(
                    UidlValue.class, true, value, connectorTracker);
            return decodeInternalType.getValue();
        }
    }
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            throw new JsonException(
                    "Invalid parameters in legacy change variables call. Expected 2, was "
                            + parametersJson.length());
        }
        String variableName = parametersJson.getString(0);
        UidlValue uidlValue = (UidlValue) JsonCodec.decodeInternalType(
                UidlValue.class, true, parametersJson.get(1), connectorTracker);

        Object value = uidlValue.getValue();

        if (previousInvocation != null
                && previousInvocation.getConnectorId().equals(connectorId)) {
            previousInvocation.setVariableChange(variableName, value);
            return null;
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            throw new JSONException(
                    "Invalid parameters in legacy change variables call. Expected 2, was "
                            + parametersJson.length());
        }
        String variableName = parametersJson.getString(0);
        UidlValue uidlValue = (UidlValue) JsonCodec.decodeInternalType(
                UidlValue.class, true, parametersJson.get(1), connectorTracker);

        Object value = uidlValue.getValue();

        if (previousInvocation != null
                && previousInvocation.getConnectorId().equals(connectorId)) {
            previousInvocation.setVariableChange(variableName, value);
            return null;
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            ConnectorTracker connectorTracker) throws JSONException {
        String type = encodedJsonValue.getString(0);

        Object decodedValue = decodeInternalType(getType(type), true,
                encodedJsonValue.get(1), connectorTracker);
        return new UidlValue(decodedValue);
    }
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            return decodeInternalOrCustomType(childType, value,
                    connectorTracker);
        } else {
            // Only UidlValue when not enforcing a given type to avoid security
            // issues
            UidlValue decodeInternalType = (UidlValue) decodeInternalType(
                    UidlValue.class, true, value, connectorTracker);
            return decodeInternalType.getValue();
        }
    }
View Full Code Here

Examples of com.vaadin.shared.communication.UidlValue

            throw new JSONException(
                    "Invalid parameters in legacy change variables call. Expected 2, was "
                            + parametersJson.length());
        }
        String variableName = parametersJson.getString(0);
        UidlValue uidlValue = (UidlValue) JsonCodec.decodeInternalType(
                UidlValue.class, true, parametersJson.get(1), connectorTracker);

        Object value = uidlValue.getValue();

        if (previousInvocation != null
                && previousInvocation.getConnectorId().equals(connectorId)) {
            previousInvocation.setVariableChange(variableName, value);
            return null;
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.