Vaadin java – javascript datatype

Values in the Shared State and in RPC calls are converted between Java and JavaScript using the following conventions:

  • Primitive Java numbers (byte, char, int, long, float, double) and their boxed types (Byte, Character, Integer, Long, Float, Double) are represented by JavaScript numbers.
  • The primitive Java boolean and the boxed Boolean are represented by JavaScript booleans.
  • Java Strings are represented by JavaScript strings.
  • List, Set and all arrays in Java are represented by JavaScript arrays.
  • Map<string, ?=””> in Java is represented by JavaScript object with fields corresponding to the map keys.
  • Any other Java Map is represented by a JavaScript array containing two arrays, the first contains the keys and the second contains the values in the same order.
  • A Java Bean is represented by a JavaScript object with fields corresponding to the bean’s properties.
  • A Java Connector is represented by a JavaScript string containing the connector’s id.
  • A pluggable serialization mechanism is provided for types not described here. Please refer to the documentation for specific types for serialization information.

 

And here: https://vaadin.com/wiki/-/wiki/Main/Using+complex+Java+types+from+JavaScript

Seems like it accepts JSONArray, JSONObject as well.

About slump

Dr Slump ... :D.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: