Fix issue 5462 where DynaTableRf explodes when favoriting a new person. This fix hides the favorite checkbox by default, and shows it if the person has been persisted. This is a pretty dirty hack, so please review it to make sure it's not too dirty. The correct way to fix this issue would be to re-work DynaTableRf so that the favorite boolean is a property on the person, but this is a workaround until that can be done. Review at http://gwt-code-reviews.appspot.com/1043802 git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9133 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java index 81dae75..51ce66f 100644 --- a/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java +++ b/samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
@@ -97,6 +97,7 @@ } } }, KeyUpEvent.getType()); + this.favorite.setVisible(false); } /** @@ -156,8 +157,9 @@ private void edit(RequestContext requestContext) { editorDriver = GWT.create(Driver.class); editorDriver.initialize(requestFactory, personEditor); - + if (requestContext == null) { + this.favorite.setVisible(true); fetchAndEdit(); return; }