Hi, I'm kinda new to GWT.

Anyway, I managed to perform an RPC call to the server for an array of
objects, each. The object class (with a few strings and a few ints) is
defined on the client side, but the server seems happy to reference to
it.

But now i want to have the server write (and later read) the data to
file.
I have been experimenting with Serialising Java Objects as XML from
the server side. However the server seems to only write each object in
the array, but not the data that is actually IN the object (ie: added
by the user)

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_18" class="java.beans.XMLDecoder">
 <array class="com.mysite.client.myObject" length="3">
  <void index="0">
   <object class="com.mysite.client.myObject"/>
  </void>
  <void index="1">
   <object class="com.mysite.client.myObject"/>
  </void>
  <void index="2">
   <object class="com.mysite.client.myObject"/>
  </void>
 </array>
</java>

Even when I just reference one object: like myObject test = new
myObject("abc", 100, 10, "blahblah"); the xml output is just the class
definition.

I have looked at many example online and they say that i should see
the data in the object as well.
Perhaps because the class is client side and "special" in a gwt sort
of way, this is not possible?
Probably I am doing something silly.

Probably, even, gwt has better and more standardised ways saving and
retrieving data on the server side. What simple methods do others do?
I really like the sound of using serialisable xml because it seems to
mean that I don't have to update the save/load routine when I update
and develop the class. But maybe its better to just put it all in a
DB.

/David.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to