So, i managed to solve my own problem again, but I'm no 100% on how i
did it.

What i did was remove all my functions in the class and then re-added
them with the "create getter and setter for <private String>"

Then i made sure that the variable was set using the actual setter
function. ie: this.setTitle(Title).
I also had other function in the class.
Like myfucntion(String title, int counter) or something like that.
Origionaly i have stuff like
this.Title = title.

I had to change these to this.setTitle(title). Even though all the
setTitle function does exaclty: this.title = title.
For some reason this fixes it.

as far as i can tell, the rules for successful xml serialisation as as
such:
1. The each variable you want serialised must have a set command
called that has the same name with a "set" prefix
2. this function must be called at least once or that particular
variable will not be searilised (once it is called though, you can
then go back to using direct methods like this.Title = title. )
3. each variable MUST also have a public function wiht the same name
and a "get" prefix.

It took me ages to work this out, and i would love it if someone out
there could explain why.
My only guess is that it does have 1 convenient feature, and that is,
you can actually use this to determine which variables will be seen in
the resulting serialised XML, but you can still work happily with all
the other variables in an object (like counters and states) and not
have them appear in the output.

Nice one. Just wish i found a tutuorial out there that explained this
to me from the start.

Am still interested to hear what others do.

/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