Thank you all for your feed back; you are correct of course, the
limitations I've mentioned are results of the Serializable interface
requirements.

@obsega; Yes private members and only getters (accessors) is currently
what I have.

@Thomas; I was not aware of CustomFieldSerializer (which appears to be
default GWT behavior despite being documented by WOGWT). This looks
like it might be exactly what I'm after, I will give it a go; thank
you!

On Feb 6, 12:04 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Feb 5, 9:53 am, Syntax <j.dixon...@gmail.com> wrote:
>
>
>
> > I would REALLY like to be able to define my members as final; however
> > as noted on the GWT serialization page:
> > - Fields that are declared final are also not exchanged during RPCs,
> > so they should generally be marked transient as well.
>
> > I was wondering why final fields are not transferred? I can only
> > imagine that when the instance is created server side it uses the no-
> > args constructor and reflection to set the values?
>
> > I find it quite annoying that I am required to enter a no args
> > constructor, surely the RPC generator can just manually add and empty
> > no args constructor if none already exists?
>
> > One suggestion from a colleague was to add support for the
> > @ConstructorProperties annotation to GWT serialization classes, so
> > that the GWT serialization back end calls the constructor with
> > arguments and matches field names with the annotation values. Has
> > anyone considered this?
>
> Just an idea but... couldn't you use a CustomFieldSerializer?

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

Reply via email to