Friday, July 19, 2013

Re: AutoBeanCodexEncode does not encode numbers when zero is the value

I would say its an AutoBean Framework optimization and it is working as intended. The framework assumes that you use AutoBeanCodex.decode() to parse the payload, which will probably set all AutoBean properties to default values and then update the ones found in the payload. There is no need to have default values in the payload if you can recreate them. As AutoBeans are based on interfaces, the framework knows the type of each property and thus knows the default value.

So you should either use AutoBeanCodex.decode() or setup the default value in PocJsObject.getIntValue() yourself.

-- J.



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment