http://gwt-code-reviews.appspot.com/1601806/diff/1015/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right):
http://gwt-code-reviews.appspot.com/1601806/diff/1015/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode624 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:624: * resolving property values, won't automatically edit proxies that weren't On 2012/04/27 14:52:12, rdayal wrote:
Ugh. Ok, then we probably need to fix something with respect to
getting a
property from a proxy - I wonder why getting a value from a proxy
implies an
edit?
Otherwise, you have to pass the RequestContext along with the proxies everywhere. With this auto-edit, you can simply edit the "top-level" proxy and then use it like any other bean. e.g. proxy = ctx.edit(proxy); proxy.getFoo().setBar("foo bar"); // auto-edit vs. proxy = ctx.edit(proxy); ctx.edit(proxy.getFoo().setBar("foo bar"); FYI: to fix the TODO about reducing the payload while preserving the "no-op request, validate proxies only", I was thinking about tracking those proxies that are auto-edited vs. those that have been explicitly edited, so that only the latter are unconditionally sent to the server; the former being sent only if they contain changes. The issue here is that for now the RequestFactoryEditorDriver explicitly edits all proxies, instead of editing the top-level proxy and taking advantage of the auto-edit feature (see issue 5981 which is related; I do believe it's better that way though: editing proxies in CellTables would break the edit/flush workflow; and that could be mitigated by introducing "read-only editors" (that wouldn't edit the subproxy)). ...I wouldn't mind personally removing that auto-edit feature, even if that's a "big breaking" change: it seems like overall it causes more harm than good. http://gwt-code-reviews.appspot.com/1601806/diff/9001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java File user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java (right): http://gwt-code-reviews.appspot.com/1601806/diff/9001/user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#newcode1281 user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java:1281: assert bean.getTag(REQUEST_CONTEXT_STATE) == expectedState; On 2012/04/27 14:52:12, rdayal wrote:
Nit: put parens around the assert expression.
Done. http://gwt-code-reviews.appspot.com/1601806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors