Reviewers: rjrjr, rchandia,
Description:
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.
Please review this at http://gwt-code-reviews.appspot.com/1043802/show
Affected files:
M
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
Index:
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
===================================================================
---
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
(revision 9129)
+++
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
(working copy)
@@ -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;
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors