Tuesday, July 19, 2011

RequestFactory issue: proxy must include getter if it is to include setter

I haven't seen this documented anywhere, and I've scrutinized much of
the documentation, so I don't think I missed it.

From what I can tell, if you have a proxy that contains a reference to
another proxy, then you must have a getter in order for the setter to
work properly.

If the getter is missing, then the code for the setter will compile
just fine, but at run-time an IllegalArgumentException is thrown when
the setter is called, even with an appropriate parameter value. This
exception is thrown in AutoBeanCodexImpl.doCoderFor.

Drilling down into the source code shows that the lack of a getter is
the problem.

If this is intended behavior, then it seems to me that it should be
documented somewhere. The closest I see is this statement in the
"Getting started with Request Factory" document:

"It is not necessary to represent every property and method from the
server-side entity in the EntityProxy, only getters and setters for
properties that should be exposed to the client"

This doesn't explicitly say that both getters and setters are required
for a property.

Ryan

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate