All this serializaiton issues comes from @Serializable (java spec), not from GWT. Be sure you understand what it means.
On 5 February 2010 16:51, obesga <obe...@gmail.com> wrote: > ... I see it a little overcomplicated, is no easier to declare private > fields and only getters ? > > As GWT does serialization and desarialization when a RPC call is done > - that is, it converts the object to text ( to travel across HTTP ) > and creates a new object filling it with the serializated content - > final fields are killers for this behaviour. > > If you provide no contructor, the empty constructor is created; but a > class with a constructor cannot create-on-the-fly an empty one > ( because the class specificaction is the constructors you provided ) > > Hope that helps > > 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? > > -- > 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<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- Regards, Alexander -- 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.