GWT Visualisation API DataTable Serialization

后端 未结 3 1110
终归单人心
终归单人心 2021-01-13 12:08

I am trying to follow this tutorial on how to connect to a database in GWT, but instead of creating a login program, I am trying to retrieve a GWT Visulation DataTable from

3条回答
  •  萌比男神i
    2021-01-13 12:43

    Ok so I figured it out myself (sorta) so I thought I would post the answer here in case someone else happens to have the same problem later.

    The answer in short that is impossible. DataTable is a JSO object, and in GWT current release (1.6something) it can not serialize those types of objects. What I had to do was break down my data into a series of ArrayLists and hold those in a temperay Object. That object can then be serialized and sent to the client side. The problem with this is that you must then construct the DataTable object on the client side.

    If anyone else happens to come up with a better idea I would still be interested on finding out.

    Thanks.

    -Eric

提交回复
热议问题