Re: [gwt-contrib] Sub entities not being filled in
Thanks Sam, yeah, this is a big bad bug. On Sun, Oct 3, 2010 at 9:33 PM, Sam Gross colesb...@gmail.com wrote: I also ran into a bug today where sub entities were not always deserialized. The problem is in that entries in related objects may refer to entities that haven't been deserialized yet if the referenced entities occur later in related objects. Splitting AbstractRequestContext.processReturnRecord so that it first creates all the proxies before mutating any of them seemed to fix the problem. -Sam On Sun, Oct 3, 2010 at 9:47 PM, Patrick Julien pjul...@gmail.com wrote: I'm still having difficulties even with this syntax, again the collections seem to be the problem so having offices give me back all my offices. but putting offices.address, or offices.office.address or office.address still gives me null On Sun, Oct 3, 2010 at 9:07 PM, Ray Cromwell cromwell...@gmail.com wrote: the syntax of with() is with(property.subProperty.subSubProperty, property2.subProperty2.subPropertyProperty2). Bob can answer the question as to how to make deeply composited editors do the right thing. On Sun, Oct 3, 2010 at 6:02 PM, Patrick Julien pjul...@gmail.com wrote: No, it's not just me, anything one level deep doesn't get picked up. So my offices also have on address and it's not in the getPath() array either. Even if it was, what's the syntax for sub path elements? On Sun, Oct 3, 2010 at 8:38 PM, Patrick Julien pjul...@gmail.com wrote: Getting there. So now getPaths() gets me the data for my offices and patients but not the phones inside the offices. Since offices is using my own composite editor, I'm going to assume that's where the problem is On Sun, Oct 3, 2010 at 8:22 PM, BobV b...@google.com wrote: On Sun, Oct 3, 2010 at 7:24 PM, Patrick Julien pjul...@gmail.com wrote: Yeah, because even with using with(). The problem is the entire object graph isn't there So I have a practice that has offices and each office has phones. So if I ask for offices. It fills in the offices but the phones inside it are not. This could get laborious if I need to do this manually for each editing activity Use RequestFactoryEditorDriver.getPaths(); interface MyOfficeDriver extends RequesFactoryEditorDriverOfficeProxy, OfficeEditor {} MyOfficeDriver driver = GWT.create(MyOfficeDriver.class); driver.initialize(requestFactory, editor); requestFactory.officeService().fetchOffice(1234).with(driver.getPaths()).to(receiver).fire(); -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
For the editor part, I can see in the generated code for my editor that public static void traverseEditor(com.*.client.ui.EditorContainer editor, String prefix, java.util.ListString paths) { } is completely empty but in this case, EditorContainer contains OfficeEditor because it's a composite. OfficeEditor has one AddressEditor and a HasDataEditorPhone so getPath() is currently buggy unless there's a way I can fill in my own traverseEditor somehow On Sun, Oct 3, 2010 at 9:47 PM, Patrick Julien pjul...@gmail.com wrote: I'm still having difficulties even with this syntax, again the collections seem to be the problem so having offices give me back all my offices. but putting offices.address, or offices.office.address or office.address still gives me null On Sun, Oct 3, 2010 at 9:07 PM, Ray Cromwell cromwell...@gmail.com wrote: the syntax of with() is with(property.subProperty.subSubProperty, property2.subProperty2.subPropertyProperty2). Bob can answer the question as to how to make deeply composited editors do the right thing. On Sun, Oct 3, 2010 at 6:02 PM, Patrick Julien pjul...@gmail.com wrote: No, it's not just me, anything one level deep doesn't get picked up. So my offices also have on address and it's not in the getPath() array either. Even if it was, what's the syntax for sub path elements? On Sun, Oct 3, 2010 at 8:38 PM, Patrick Julien pjul...@gmail.com wrote: Getting there. So now getPaths() gets me the data for my offices and patients but not the phones inside the offices. Since offices is using my own composite editor, I'm going to assume that's where the problem is On Sun, Oct 3, 2010 at 8:22 PM, BobV b...@google.com wrote: On Sun, Oct 3, 2010 at 7:24 PM, Patrick Julien pjul...@gmail.com wrote: Yeah, because even with using with(). The problem is the entire object graph isn't there So I have a practice that has offices and each office has phones. So if I ask for offices. It fills in the offices but the phones inside it are not. This could get laborious if I need to do this manually for each editing activity Use RequestFactoryEditorDriver.getPaths(); interface MyOfficeDriver extends RequesFactoryEditorDriverOfficeProxy, OfficeEditor {} MyOfficeDriver driver = GWT.create(MyOfficeDriver.class); driver.initialize(requestFactory, editor); requestFactory.officeService().fetchOffice(1234).with(driver.getPaths()).to(receiver).fire(); -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Changes in com.google.gwt.app land to catch up to the RequestFactory (issue946802)
http://gwt-code-reviews.appspot.com/946802/diff/8001/9005 File user/src/com/google/gwt/app/place/CreateAndEditProxy.java (right): http://gwt-code-reviews.appspot.com/946802/diff/8001/9005#newcode54 user/src/com/google/gwt/app/place/CreateAndEditProxy.java:54: display.setWidget(null); Er, really fall through to super.exit when cancelling a creation? (it will goTo the details of the cancelled proxy!?) http://gwt-code-reviews.appspot.com/946802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixing a ConcurrentModificationException in JsonRequestProcessor that occurs when you use a sett... (issue945801)
committed as r8920 http://gwt-code-reviews.appspot.com/945801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
Bob, any suggestions for a work around for the moment? On Mon, Oct 4, 2010 at 9:41 AM, Patrick Julien pjul...@gmail.com wrote: For the editor part, I can see in the generated code for my editor that public static void traverseEditor(com.*.client.ui.EditorContainer editor, String prefix, java.util.ListString paths) { } is completely empty but in this case, EditorContainer contains OfficeEditor because it's a composite. OfficeEditor has one AddressEditor and a HasDataEditorPhone so getPath() is currently buggy unless there's a way I can fill in my own traverseEditor somehow On Sun, Oct 3, 2010 at 9:47 PM, Patrick Julien pjul...@gmail.com wrote: I'm still having difficulties even with this syntax, again the collections seem to be the problem so having offices give me back all my offices. but putting offices.address, or offices.office.address or office.address still gives me null On Sun, Oct 3, 2010 at 9:07 PM, Ray Cromwell cromwell...@gmail.com wrote: the syntax of with() is with(property.subProperty.subSubProperty, property2.subProperty2.subPropertyProperty2). Bob can answer the question as to how to make deeply composited editors do the right thing. On Sun, Oct 3, 2010 at 6:02 PM, Patrick Julien pjul...@gmail.com wrote: No, it's not just me, anything one level deep doesn't get picked up. So my offices also have on address and it's not in the getPath() array either. Even if it was, what's the syntax for sub path elements? On Sun, Oct 3, 2010 at 8:38 PM, Patrick Julien pjul...@gmail.com wrote: Getting there. So now getPaths() gets me the data for my offices and patients but not the phones inside the offices. Since offices is using my own composite editor, I'm going to assume that's where the problem is On Sun, Oct 3, 2010 at 8:22 PM, BobV b...@google.com wrote: On Sun, Oct 3, 2010 at 7:24 PM, Patrick Julien pjul...@gmail.com wrote: Yeah, because even with using with(). The problem is the entire object graph isn't there So I have a practice that has offices and each office has phones. So if I ask for offices. It fills in the offices but the phones inside it are not. This could get laborious if I need to do this manually for each editing activity Use RequestFactoryEditorDriver.getPaths(); interface MyOfficeDriver extends RequesFactoryEditorDriverOfficeProxy, OfficeEditor {} MyOfficeDriver driver = GWT.create(MyOfficeDriver.class); driver.initialize(requestFactory, editor); requestFactory.officeService().fetchOffice(1234).with(driver.getPaths()).to(receiver).fire(); -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Making Showcase generate a hidden site map to Showcase to make it crawlable. Also ensuring that ... (issue952801)
LGTM http://gwt-code-reviews.appspot.com/952801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix 'ant dist-dev' and 'ant-doc' builds: (issue953801)
Reviewers: fabbott, Description: Fix 'ant dist-dev' and 'ant-doc' builds: 1) Add memory to java heap for 'gwt.javac' 2) Break up a line in JsonResults that caused javac to exit 3) Remove an annotation in SafeHtmlHostedModeUtils that caused javadoc to crash 4) Update the list of packages for which we generate javadoc 5) Clean up cellview/client/package.html file 6) Add safehtml/{client,shared}/package.html files Please review this at http://gwt-code-reviews.appspot.com/953801/show Affected files: M common.ant.xml M doc/build.xml M doc/packages.properties M user/src/com/google/gwt/requestfactory/client/impl/messages/JsonResults.java A user/src/com/google/gwt/safehtml/client/package.html M user/src/com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java A user/src/com/google/gwt/safehtml/shared/package.html M user/src/com/google/gwt/user/cellview/client/package.html -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix 'ant dist-dev' and 'ant-doc' builds: (issue953801)
http://gwt-code-reviews.appspot.com/953801/diff/1/5 File user/src/com/google/gwt/requestfactory/client/impl/messages/JsonResults.java (right): http://gwt-code-reviews.appspot.com/953801/diff/1/5#newcode28 user/src/com/google/gwt/requestfactory/client/impl/messages/JsonResults.java:28: // javac complains when this is all on one line which javac, including revision? Comment should probably say... http://gwt-code-reviews.appspot.com/953801/diff/1/7 File user/src/com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java (right): http://gwt-code-reviews.appspot.com/953801/diff/1/7#newcode112 user/src/com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java:112: // The following annotation causes javadoc to crash: Do we have any idea why?? It seems like we should have version information, too. http://gwt-code-reviews.appspot.com/953801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8929 committed - Making Showcase generate a hidden site map to make it crawlable. Also ...
Revision: 8929 Author: gwt.mirror...@gmail.com Date: Mon Oct 4 13:22:55 2010 Log: Making Showcase generate a hidden site map to make it crawlable. Also ensuring that the select box used to select source code always contains at least one option to work around an HtmlUnit innerHtml bug that affects crawlability. Review at http://gwt-code-reviews.appspot.com/952801 Review by: kpro...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8929 Modified: /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/MainMenuTreeViewModel.java /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseShell.java === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/MainMenuTreeViewModel.java Mon Sep 13 12:31:36 2010 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/MainMenuTreeViewModel.java Mon Oct 4 13:22:55 2010 @@ -70,8 +70,10 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; /** * The {...@link TreeViewModel} used by the main menu. @@ -247,6 +249,21 @@ public boolean isLeaf(Object value) { return value != null !(value instanceof Category); } + + /** + * Get the set of all {...@link ContentWidget}s used in the model. + * + * @return the {...@link ContentWidget}s + */ + SetContentWidget getAllContentWidgets() { +SetContentWidget widgets = new HashSetContentWidget(); +for (Category category : categories.getList()) { + for (ContentWidget example : category.examples.getList()) { +widgets.add(example); + } +} +return widgets; + } /** * Initialize the top level categories in the tree. === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java Mon Sep 13 12:31:36 2010 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java Mon Oct 4 09:55:53 2010 @@ -26,17 +26,22 @@ import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.i18n.client.LocaleInfo; +import com.google.gwt.safehtml.shared.SafeHtmlBuilder; +import com.google.gwt.safehtml.shared.SafeHtmlUtils; import com.google.gwt.sample.showcase.client.MainMenuTreeViewModel.Category; import com.google.gwt.user.cellview.client.CellTree; import com.google.gwt.user.cellview.client.TreeNode; import com.google.gwt.user.client.History; import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.RootLayoutPanel; +import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.view.client.SelectionChangeEvent; import com.google.gwt.view.client.SingleSelectionModel; import java.util.ArrayList; import java.util.List; +import java.util.Set; /** * Entry point classes define codeonModuleLoad()/code. @@ -99,6 +104,7 @@ final SingleSelectionModelContentWidget selectionModel = new SingleSelectionModelContentWidget(); final MainMenuTreeViewModel treeModel = new MainMenuTreeViewModel( constants, selectionModel); +SetContentWidget contentWidgets = treeModel.getAllContentWidgets(); shell = new ShowcaseShell(treeModel); RootLayoutPanel.get().add(shell); @@ -176,8 +182,30 @@ ContentWidget content = (ContentWidget) category.getChildValue(0); selectionModel.setSelected(content, true); } + +// Generate a site map. +createSiteMap(contentWidgets); } + /** + * Create a hidden site map for crawlability. + * + * @param contentWidgets the {...@link ContentWidget}s used in Showcase + */ + private void createSiteMap(SetContentWidget contentWidgets) { +SafeHtmlBuilder sb = new SafeHtmlBuilder(); +for (ContentWidget cw : contentWidgets) { + String token = getContentWidgetToken(cw); + sb.append(SafeHtmlUtils.fromTrustedString(a href=\# + token + \ + + token + /a)); +} + +// Add the site map to the page. +HTML siteMap = new HTML(sb.toSafeHtml()); +siteMap.setVisible(false); +RootPanel.get().add(siteMap, 0, 0); + } + /** * Set the content to the {...@link ContentWidget}. * === --- /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseShell.java Wed Sep 22 12:58:01 2010 +++ /trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseShell.java Mon Oct 4 09:55:53 2010 @@ -255,7 +255,15 @@ tabStyle.setVisible(content.hasStyle()); tabSource.setVisible(true); -// Show the list of raw source files if there are any. +/* + * Show the list of raw source files if there are any. We need to add at + *
[gwt-contrib] Fix Eclipse / Checkstyle / Javadoc warnings (issue954801)
Reviewers: jat, Description: Fix Eclipse / Checkstyle / Javadoc warnings Please review this at http://gwt-code-reviews.appspot.com/954801/show Affected files: M dev/core/src/com/google/gwt/core/ext/linker/SymbolData.java M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java M dev/core/src/com/google/gwt/dev/Precompile.java M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java M dev/core/src/com/google/gwt/dev/jjs/impl/OptimizerStats.java M dev/core/src/com/google/gwt/dev/json/JsonObject.java M dev/core/src/com/google/gwt/dev/json/JsonValue.java M dev/core/src/com/google/gwt/dev/resource/impl/ZipFileResource.java M dev/core/src/com/google/gwt/dev/shell/ModuleSpace.java M dev/core/src/com/google/gwt/dev/util/editdistance/CharIndex.java M dev/core/src/com/google/gwt/dev/util/editdistance/GeneralEditDistances.java M dev/core/src/com/google/gwt/dev/util/editdistance/ModifiedBerghelRoachEditDistance.java M dev/core/src/com/google/gwt/dev/util/editdistance/MyersBitParallelEditDistance.java M dev/core/src/com/google/gwt/dev/util/editdistance/PatternBitmap.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/MentorSelector.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/server/domain/Employee.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/server/domain/Expense.java M samples/expenses/src/main/java/com/google/gwt/sample/expenses/server/domain/Report.java M user/src/com/google/gwt/app/place/AbstractProxyListView.java M user/src/com/google/gwt/app/place/Activity.java M user/src/com/google/gwt/app/place/CreateAndEditProxy.java M user/src/com/google/gwt/app/place/EntityProxyKeyProvider.java M user/src/com/google/gwt/app/place/FindAndEditProxy.java M user/src/com/google/gwt/app/place/PlaceChangeEvent.java M user/src/com/google/gwt/app/place/PlaceChangeRequestEvent.java M user/src/com/google/gwt/app/place/Prefix.java M user/src/com/google/gwt/app/place/ProxyPlaceToListPlace.java M user/src/com/google/gwt/app/place/WithTokenizers.java M user/src/com/google/gwt/cell/client/ImageLoadingCell.java M user/src/com/google/gwt/editor/client/AutoBean.java M user/src/com/google/gwt/editor/client/AutoBeanVisitor.java M user/src/com/google/gwt/editor/client/EditorError.java M user/src/com/google/gwt/editor/client/impl/AbstractAutoBean.java M user/src/com/google/gwt/editor/client/testing/MockEditorChain.java M user/src/com/google/gwt/editor/rebind/model/EditorData.java M user/src/com/google/gwt/event/logical/shared/AttachEvent.java M user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java M user/src/com/google/gwt/event/shared/EventBus.java M user/src/com/google/gwt/event/shared/HandlerManager.java M user/src/com/google/gwt/i18n/client/CurrencyList.java M user/src/com/google/gwt/i18n/client/DateTimeFormatRenderer.java M user/src/com/google/gwt/i18n/client/Messages.java M user/src/com/google/gwt/i18n/client/impl/CurrencyDataImpl.java M user/src/com/google/gwt/logging/client/HtmlLogFormatter.java M user/src/com/google/gwt/logging/impl/FormatterImpl.java M user/src/com/google/gwt/logging/server/JsonLogRecordServerUtil.java M user/src/com/google/gwt/logging/server/RemoteLoggingServiceUtil.java M user/src/com/google/gwt/requestfactory/client/DefaultRequestTransport.java M user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java M user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactory.java M user/src/com/google/gwt/requestfactory/client/impl/FindRequest.java M user/src/com/google/gwt/requestfactory/client/impl/SimpleEntityProxyId.java M user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java M user/src/com/google/gwt/requestfactory/server/Logging.java M user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java M user/src/com/google/gwt/requestfactory/shared/EntityProxy.java M user/src/com/google/gwt/requestfactory/shared/RequestContext.java M user/src/com/google/gwt/requestfactory/shared/RequestFactory.java M user/src/com/google/gwt/safehtml/client/SafeHtmlTemplates.java M user/src/com/google/gwt/safehtml/shared/SimpleHtmlSanitizer.java M user/src/com/google/gwt/text/shared/SimpleSafeHtmlRenderer.java M user/src/com/google/gwt/uibinder/client/UiChild.java M user/src/com/google/gwt/uibinder/client/UiHandler.java M
[gwt-contrib] [google-web-toolkit] r8930 committed - Fix exit on cancel from create activity. Wasn't going to a...
Revision: 8930 Author: rj...@google.com Date: Mon Oct 4 10:12:28 2010 Log: Fix exit on cancel from create activity. Wasn't going to a new place, so you couldn't try to create again. Also restore old behavior of not trying to save w/no changes, didn't mean to delete it. Review at http://gwt-code-reviews.appspot.com/950801 Review by: cromwell...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=8930 Modified: /trunk/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java /trunk/user/src/com/google/gwt/app/place/CreateAndEditProxy.java === --- /trunk/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java Sun Oct 3 19:15:33 2010 +++ /trunk/user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java Mon Oct 4 10:12:28 2010 @@ -63,8 +63,7 @@ } public String mayStop() { -if (isWaiting() -|| (editorDriver != null editorDriver.flush().isChanged())) { +if (isWaiting() || changed()) { return Are you sure you want to abandon your changes?; } @@ -80,6 +79,10 @@ } public void saveClicked() { +if (!changed()) { + return; +} + setWaiting(true); editorDriver.flush().fire(new ReceiverVoid() { /* @@ -157,6 +160,10 @@ protected EntityProxyIdP getProxyId() { return (EntityProxyIdP) getProxy().stableId(); } + + private boolean changed() { +return editorDriver != null editorDriver.flush().isChanged(); + } /** * @return true if we're waiting for an rpc response. === --- /trunk/user/src/com/google/gwt/app/place/CreateAndEditProxy.java Sun Oct 3 19:15:33 2010 +++ /trunk/user/src/com/google/gwt/app/place/CreateAndEditProxy.java Mon Oct 4 10:12:28 2010 @@ -27,18 +27,20 @@ */ public abstract class CreateAndEditProxyP extends EntityProxy extends AbstractProxyEditActivityP { - private AcceptsOneWidget display; private final P proxy; + private final PlaceController placeController; + private ClassP proxyClass; public CreateAndEditProxy(ClassP proxyClass, RequestContext request, ProxyEditViewP, ? view, PlaceController placeController) { super(view, placeController); this.proxy = request.create(proxyClass); +this.placeController = placeController; +this.proxyClass = proxyClass; } @Override public void start(AcceptsOneWidget display, EventBus eventBus) { -this.display = display; super.start(display, eventBus); } @@ -51,10 +53,10 @@ @Override protected void exit(boolean saved) { if (!saved) { - display.setWidget(null); -} - -super.exit(saved); + placeController.goTo(new ProxyListPlace(proxyClass)); +} else { + super.exit(saved); +} } @Override -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: First take at GWT validation that actually validates on the client side. (issue863801)
LGTM, just comment / documentation nits. http://gwt-code-reviews.appspot.com/863801/diff/32001/33004 File samples/common.ant.xml (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33004#newcode100 samples/common.ant.xml:100: /classpath Low priority: Can you extract this classpath as an ant environment variable so it's not buried down in the target definition? http://gwt-code-reviews.appspot.com/863801/diff/32001/33005 File samples/validation/build.xml (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33005#newcode2 samples/validation/build.xml:2: !-- Must be compiled using jdk 1.6, because hibernate needs jaxb -- What's the failure mode for this? The GWT distribution is supposed to be usable with a 1.5 install to support enterprise folks who can't upgrade. If it's just the server components of the sample app that won't fire up, it's not a big deal. If it means that you can't run the GWT compiler to compile the app on 1.5, that's a problem. http://gwt-code-reviews.appspot.com/863801/diff/32001/33006 File samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33006#newcode20 samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml:20: inherits name='org.hibernate.validator.HibernateValidator'/ Since HibernateValidator also includes the Validation package, I think you should drop the redundant import to reduce the huh? factor in the sample app. http://gwt-code-reviews.appspot.com/863801/diff/32001/33015 File user/build.xml (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33015#newcode67 user/build.xml:67: pathelement location=${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final-sources.jar / Indentation looks off, could just be rietveld. http://gwt-code-reviews.appspot.com/863801/diff/32001/33025 File user/src/org/hibernate/validator/HibernateValidator.gwt.xml (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33025#newcode1 user/src/org/hibernate/validator/HibernateValidator.gwt.xml:1: ?xml version=1.0 encoding=UTF-8? Add a comment in this file explaining when/how to import this module and a readme file in same directory explaining why these files exist and any maintenance directions. http://gwt-code-reviews.appspot.com/863801/diff/32001/33044 File user/test/com/google/gwt/validation/example/client/AuthorTest.java (right): http://gwt-code-reviews.appspot.com/863801/diff/32001/33044#newcode53 user/test/com/google/gwt/validation/example/client/AuthorTest.java:53: // public void testNotDefaultValidtor_EmptyNotDefualt() throws Exception { Instead of commenting out the code rename the method to disabled_testXyzzy just to make sure the code doesn't rot from a compilation standpoint. http://gwt-code-reviews.appspot.com/863801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Add Support for server side script selection in linker (issue941802)
Wow, this is great! I'm guessing this means we can cut the startup round trips to one? Is this going into GWT 2.1? Exciting stuff. -- Arthur Kalmenson On Fri, Oct 1, 2010 at 6:09 PM, unn...@google.com wrote: Reviewers: jgw, Description: Add Support for server side script selection in linker Please review this at http://gwt-code-reviews.appspot.com/941802/show Affected files: A dev/core/src/com/google/gwt/core/ext/linker/impl/PermutationsUtil.java A dev/core/src/com/google/gwt/core/ext/linker/impl/PropertiesMappingArtifact.java A dev/core/src/com/google/gwt/core/ext/linker/impl/ResourceInjectionUtil.java M dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java M dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js M dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js A dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptCommon.js A dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptDirect.js A dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js M dev/core/src/com/google/gwt/core/ext/linker/impl/permutations.js M dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js M dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoaded.js M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js M dev/core/src/com/google/gwt/core/linker/SingleScriptLinker.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r8931 committed - Created a branch for the GWT 2.1 release.
Revision: 8931 Author: p...@google.com Date: Mon Oct 4 13:53:40 2010 Log: Created a branch for the GWT 2.1 release. http://code.google.com/p/google-web-toolkit/source/detail?r=8931 Added: /releases/2.1 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
As an update to this issue, I can confirm that I have an editor working in another scenario where the depth level doesn't go beyond, well, 1 I guess. So I an editor, and it has a list in it but the list doesn't contain other EntityProxy's The two issues still remain: driver.getPath() isn't able to completely scan an editor tree when it contains CompositeEditor's that, they themselves, have more editors in their hierarchy It's not possible to request sub-properties when using collections manually. It just doesn't work. The example I gave were trying to get the name of an office inside a collection, putting offices office offices.name office.name offices.office.name just doesn't work. On Mon, Oct 4, 2010 at 9:41 AM, Patrick Julien pjul...@gmail.com wrote: For the editor part, I can see in the generated code for my editor that public static void traverseEditor(com.*.client.ui.EditorContainer editor, String prefix, java.util.ListString paths) { } is completely empty but in this case, EditorContainer contains OfficeEditor because it's a composite. OfficeEditor has one AddressEditor and a HasDataEditorPhone so getPath() is currently buggy unless there's a way I can fill in my own traverseEditor somehow On Sun, Oct 3, 2010 at 9:47 PM, Patrick Julien pjul...@gmail.com wrote: I'm still having difficulties even with this syntax, again the collections seem to be the problem so having offices give me back all my offices. but putting offices.address, or offices.office.address or office.address still gives me null On Sun, Oct 3, 2010 at 9:07 PM, Ray Cromwell cromwell...@gmail.com wrote: the syntax of with() is with(property.subProperty.subSubProperty, property2.subProperty2.subPropertyProperty2). Bob can answer the question as to how to make deeply composited editors do the right thing. On Sun, Oct 3, 2010 at 6:02 PM, Patrick Julien pjul...@gmail.com wrote: No, it's not just me, anything one level deep doesn't get picked up. So my offices also have on address and it's not in the getPath() array either. Even if it was, what's the syntax for sub path elements? On Sun, Oct 3, 2010 at 8:38 PM, Patrick Julien pjul...@gmail.com wrote: Getting there. So now getPaths() gets me the data for my offices and patients but not the phones inside the offices. Since offices is using my own composite editor, I'm going to assume that's where the problem is On Sun, Oct 3, 2010 at 8:22 PM, BobV b...@google.com wrote: On Sun, Oct 3, 2010 at 7:24 PM, Patrick Julien pjul...@gmail.com wrote: Yeah, because even with using with(). The problem is the entire object graph isn't there So I have a practice that has offices and each office has phones. So if I ask for offices. It fills in the offices but the phones inside it are not. This could get laborious if I need to do this manually for each editing activity Use RequestFactoryEditorDriver.getPaths(); interface MyOfficeDriver extends RequesFactoryEditorDriverOfficeProxy, OfficeEditor {} MyOfficeDriver driver = GWT.create(MyOfficeDriver.class); driver.initialize(requestFactory, editor); requestFactory.officeService().fetchOffice(1234).with(driver.getPaths()).to(receiver).fire(); -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fix verifyPositionStatic() to that RooPanel.get() is explicitly allowed, e.g. (issue931801)
http://gwt-code-reviews.appspot.com/931801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
Your feedback has been very helpful in finding out where the weak points in our APIs and implementations are. driver.getPath() isn't able to completely scan an editor tree when it contains CompositeEditor's that, they themselves, have more editors in their hierarchy I'm thinking about how to solve this one, since an uninitialized CompositeEditor won't have any sub-editors to query. It's not possible to request sub-properties when using collections manually. It just doesn't work. The example I gave were trying to get the name of an office inside a collection, putting RayC is looking at this. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
The following test case passes: public void testCollectionSubProperties() { delayTestFinish(DELAY_TEST_FINISH); simpleFooRequest().getSimpleFooWithSubPropertyCollection().with( selfOneToManyField.fooField).fire(new ReceiverSimpleFooProxy() { @Override public void onSuccess(SimpleFooProxy response) { assertEquals(I'm Here, response.getSelfOneToManyField().get(0).getFooField().getUserName()); } }); } on the server: public static SimpleFoo getSimpleFooWithSubPropertyCollection() { SimpleFoo foo = new SimpleFoo(); SimpleFoo subFoo = new SimpleFoo(); SimpleFoo subSubFoo = new SimpleFoo(); subFoo.setFooField(subSubFoo); subSubFoo.setUserName(I'm here); subSubFoo.persist(); subFoo.persist(); foo.persist(); foo.setSelfOneToManyField(Arrays.asList(subFoo)); return foo; } If you have a class that looks like this: public class Company { ListOffice offices; } public class Office { Employee siteManager; } Then the correct way to query for siteManager is: with(offices.siteManager) With is a nothing more than a filter on names, it doesn't care if something is a collection, or an entity, just whether or not the name matches. -Ray On Mon, Oct 4, 2010 at 2:32 PM, BobV b...@google.com wrote: Your feedback has been very helpful in finding out where the weak points in our APIs and implementations are. driver.getPath() isn't able to completely scan an editor tree when it contains CompositeEditor's that, they themselves, have more editors in their hierarchy I'm thinking about how to solve this one, since an uninitialized CompositeEditor won't have any sub-editors to query. It's not possible to request sub-properties when using collections manually. It just doesn't work. The example I gave were trying to get the name of an office inside a collection, putting RayC is looking at this. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
On Mon, Oct 4, 2010 at 5:32 PM, BobV b...@google.com wrote: Your feedback has been very helpful in finding out where the weak points in our APIs and implementations are. driver.getPath() isn't able to completely scan an editor tree when it contains CompositeEditor's that, they themselves, have more editors in their hierarchy I'm thinking about how to solve this one, since an uninitialized CompositeEditor won't have any sub-editors to query. You're using code generation for the other parts. What I mean by that is that you generate the method public static void traverseEditor(com.*.client.ui.EditorContainer editor, String prefix, java.util.ListString paths) { } and that has content that was made at compile time, not run time. Here, the editor you're looking for is right there in CompositeEditor CompositeEditorT, C, E extends EditorC So whatever E is the children. Is that not suitable here also? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] attachevent.handler
Hi, We just updated to trunk to use the new AttachEvent (good timing, thanks!), and a beginner GWT dev here expressed confusion at the Handler interface. I explained its actually AttachEvent.Handler, an inner interface. Which he then understood, but pointed at is not consistent with the rest of the API, ClickHandler, etc. I am prone to agree with him. Just FWIW. - Stephen -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes to use Java 1.5 compatible JARs (issue939802)
LGTM On Mon, Oct 4, 2010 at 3:11 PM, rchan...@google.com wrote: Reviewers: amitmanjhi, Description: Fixes to use Java 1.5 compatible JARs Fixed DynaTableRf eclipse .classpath to use json-1.5.jar Fixed build scripts and eclipse classpaths to use java 1.5 compatible StreamHtmlParser JAR Review by: amitman...@google.com Please review this at http://gwt-code-reviews.appspot.com/939802/show Affected files: M dev/build.xml M eclipse/samples/DynaTableRf/.classpath M eclipse/user/.classpath Index: dev/build.xml === --- dev/build.xml (revision 8929) +++ dev/build.xml (working copy) @@ -100,7 +100,7 @@ include name=htmlunit/htmlunit-r5940/htmlunit-r5940.jar / include name=htmlunit/htmlunit-r5940/htmlunit-core-js-r5940.jar / include name=nekohtml/nekohtml-1.9.13.jar / - include name=streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar / + include name=streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar / include name=xalan/xalan-2.7.1.jar / include name=xerces/xerces-2_9_1/serializer.jar / include name=xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar / @@ -124,7 +124,7 @@ zipfileset src=${gwt.tools.lib}/jetty/jetty-6.1.11.jar / zipfileset src=${gwt.tools.lib}/icu4j/icu4j-4_4_1.jar / zipfileset src=${gwt.tools.lib}/protobuf/protobuf-2.2.0/protobuf-java-rebased-2.2.0.jar / - zipfileset src=${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar / + zipfileset src=${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar / zipfileset src=${gwt.tools.lib}/tomcat/ant-launcher-1.6.5.jar / zipfileset src=${gwt.tools.lib}/tomcat/catalina-1.0.jar / zipfileset src=${gwt.tools.lib}/tomcat/catalina-optional-1.0.jar / Index: eclipse/samples/DynaTableRf/.classpath === --- eclipse/samples/DynaTableRf/.classpath (revision 8929) +++ eclipse/samples/DynaTableRf/.classpath (working copy) @@ -6,6 +6,6 @@ classpathentry combineaccessrules=false kind=src path=/gwt-user/ classpathentry kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA.jar sourcepath=/GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ classpathentry kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ - classpathentry kind=var path=GWT_TOOLS/redist/json/r2_20080312/json.jar/ + classpathentry kind=var path=GWT_TOOLS/redist/json/r2_20080312/json-1.5.jar/ classpathentry kind=output path=war/WEB-INF/classes/ /classpath Index: eclipse/user/.classpath === --- eclipse/user/.classpath (revision 8929) +++ eclipse/user/.classpath (working copy) @@ -40,6 +40,6 @@ classpathentry exported=true kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ classpathentry kind=var path=GWT_TOOLS/lib/jetty/jetty-6.1.11.jar sourcepath=/GWT_TOOLS/lib/jetty/jetty-6.1.11-src.zip/ classpathentry kind=var path=GWT_TOOLS/lib/guava/guava-r06/guava-r06-rebased.jar/ - classpathentry kind=var path=GWT_TOOLS/lib/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar/ + classpathentry kind=var path=GWT_TOOLS/lib/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar/ classpathentry kind=output path=bin/ /classpath -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixes to use Java 1.5 compatible JARs (issue939802)
Reviewers: amitmanjhi, Description: Fixes to use Java 1.5 compatible JARs Fixed DynaTableRf eclipse .classpath to use json-1.5.jar Fixed build scripts and eclipse classpaths to use java 1.5 compatible StreamHtmlParser JAR Review by: amitman...@google.com Please review this at http://gwt-code-reviews.appspot.com/939802/show Affected files: M dev/build.xml M eclipse/samples/DynaTableRf/.classpath M eclipse/user/.classpath Index: dev/build.xml === --- dev/build.xml (revision 8929) +++ dev/build.xml (working copy) @@ -100,7 +100,7 @@ include name=htmlunit/htmlunit-r5940/htmlunit-r5940.jar / include name=htmlunit/htmlunit-r5940/htmlunit-core-js-r5940.jar / include name=nekohtml/nekohtml-1.9.13.jar / - include name=streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar / + include name=streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar / include name=xalan/xalan-2.7.1.jar / include name=xerces/xerces-2_9_1/serializer.jar / include name=xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar / @@ -124,7 +124,7 @@ zipfileset src=${gwt.tools.lib}/jetty/jetty-6.1.11.jar / zipfileset src=${gwt.tools.lib}/icu4j/icu4j-4_4_1.jar / zipfileset src=${gwt.tools.lib}/protobuf/protobuf-2.2.0/protobuf-java-rebased-2.2.0.jar / - zipfileset src=${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar / + zipfileset src=${gwt.tools.lib}/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar / zipfileset src=${gwt.tools.lib}/tomcat/ant-launcher-1.6.5.jar / zipfileset src=${gwt.tools.lib}/tomcat/catalina-1.0.jar / zipfileset src=${gwt.tools.lib}/tomcat/catalina-optional-1.0.jar / Index: eclipse/samples/DynaTableRf/.classpath === --- eclipse/samples/DynaTableRf/.classpath (revision 8929) +++ eclipse/samples/DynaTableRf/.classpath (working copy) @@ -6,6 +6,6 @@ classpathentry combineaccessrules=false kind=src path=/gwt-user/ classpathentry kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA.jar sourcepath=/GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ classpathentry kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ - classpathentry kind=var path=GWT_TOOLS/redist/json/r2_20080312/json.jar/ + classpathentry kind=var path=GWT_TOOLS/redist/json/r2_20080312/json-1.5.jar/ classpathentry kind=output path=war/WEB-INF/classes/ /classpath Index: eclipse/user/.classpath === --- eclipse/user/.classpath (revision 8929) +++ eclipse/user/.classpath (working copy) @@ -40,6 +40,6 @@ classpathentry exported=true kind=var path=GWT_TOOLS/lib/javax/validation/validation-api-1.0.0.GA-sources.jar/ classpathentry kind=var path=GWT_TOOLS/lib/jetty/jetty-6.1.11.jar sourcepath=/GWT_TOOLS/lib/jetty/jetty-6.1.11-src.zip/ classpathentry kind=var path=GWT_TOOLS/lib/guava/guava-r06/guava-r06-rebased.jar/ - classpathentry kind=var path=GWT_TOOLS/lib/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-rebased.jar/ + classpathentry kind=var path=GWT_TOOLS/lib/streamhtmlparser/streamhtmlparser-jsilver-r10/streamhtmlparser-jsilver-r10-1.5-rebased.jar/ classpathentry kind=output path=bin/ /classpath -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Making Showcase generate a hidden site map to Showcase to make it crawlable. Also ensuring that ... (issue952801)
committed as r8929 http://gwt-code-reviews.appspot.com/952801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Changes the default row count of HasDataPresenter from Integer.MIN_VALUE to a more reasonable 0.... (issue950802)
Reviewers: rice, Description: Changes the default row count of HasDataPresenter from Integer.MIN_VALUE to a more reasonable 0. We use the boolean isRowCountExact to determine if we actually have 0 rows, or just think we do. Please review this at http://gwt-code-reviews.appspot.com/950802/show Affected files: M user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java M user/test/com/google/gwt/user/cellview/client/HasDataPresenterTest.java Index: user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java === --- user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java (revision 8928) +++ user/src/com/google/gwt/user/cellview/client/HasDataPresenter.java (working copy) @@ -269,7 +269,7 @@ */ private boolean pageStartChangedSinceRender; - private int rowCount = Integer.MIN_VALUE; + private int rowCount = 0; private boolean rowCountIsExact; @@ -950,7 +950,7 @@ private void updateLoadingState() { int cacheSize = rowData.size(); int curPageSize = isRowCountExact() ? getCurrentPageSize() : pageSize; -if (rowCount == 0) { +if (rowCount == 0 rowCountIsExact) { view.setLoadingState(LoadingState.EMPTY); } else if (cacheSize = curPageSize) { view.setLoadingState(LoadingState.LOADED); Index: user/test/com/google/gwt/user/cellview/client/HasDataPresenterTest.java === --- user/test/com/google/gwt/user/cellview/client/HasDataPresenterTest.java (revision 8928) +++ user/test/com/google/gwt/user/cellview/client/HasDataPresenterTest.java (working copy) @@ -351,6 +351,18 @@ view.assertSelectedRows(); } + public void testDefaults() { +HasDataString listView = new MockHasDataString(); +MockViewString view = new MockViewString(); +HasDataPresenterString presenter = new HasDataPresenterString(listView, +view, 10, null); + +assertEquals(0, presenter.getRowCount()); +assertFalse(presenter.isRowCountExact()); +assertEquals(0, presenter.getCurrentPageSize()); +assertEquals(new Range(0, 10), presenter.getVisibleRange()); + } + public void testGetCurrentPageSize() { HasDataString listView = new MockHasDataString(); MockViewString view = new MockViewString(); @@ -884,10 +896,17 @@ assertTrue(presenter.isRowCountExact()); view.assertLoadingState(LoadingState.LOADING); -// Set size to 0. +// Set size to 0, but not exact. The state is loading until we know there is +// no data. presenter.setRowCount(0, false); assertEquals(0, presenter.getRowCount()); assertFalse(presenter.isRowCountExact()); +view.assertLoadingState(LoadingState.LOADING); + +// Set size to 0 and exact. Now we know the list is empty. +presenter.setRowCount(0, true); +assertEquals(0, presenter.getRowCount()); +assertTrue(presenter.isRowCountExact()); view.assertLoadingState(LoadingState.EMPTY); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adding examples for cell widgets and data providers. (issue955801)
Reviewers: rice, Description: Adding examples for cell widgets and data providers. Please review this at http://gwt-code-reviews.appspot.com/955801/show Affected files: A user/javadoc/com/google/gwt/examples/cell/CellExample.java A user/javadoc/com/google/gwt/examples/cell/EditableCellExample.java A user/javadoc/com/google/gwt/examples/cellview/CellBrowserExample.java A user/javadoc/com/google/gwt/examples/cellview/CellListExample.java A user/javadoc/com/google/gwt/examples/cellview/CellListValueUpdaterExample.java A user/javadoc/com/google/gwt/examples/cellview/CellTableExample.java A user/javadoc/com/google/gwt/examples/cellview/CellTableFieldUpdaterExample.java A user/javadoc/com/google/gwt/examples/cellview/CellTreeExample.java A user/javadoc/com/google/gwt/examples/cellview/SimplePagerExample.java A user/javadoc/com/google/gwt/examples/view/AsyncDataProviderExample.java A user/javadoc/com/google/gwt/examples/view/ListDataProviderExample.java M user/src/com/google/gwt/cell/client/AbstractCell.java M user/src/com/google/gwt/cell/client/AbstractEditableCell.java M user/src/com/google/gwt/cell/client/Cell.java M user/src/com/google/gwt/user/cellview/client/CellBrowser.java M user/src/com/google/gwt/user/cellview/client/CellList.java M user/src/com/google/gwt/user/cellview/client/CellTable.java M user/src/com/google/gwt/user/cellview/client/CellTree.java M user/src/com/google/gwt/user/cellview/client/SimplePager.java M user/src/com/google/gwt/view/client/AsyncDataProvider.java M user/src/com/google/gwt/view/client/ListDataProvider.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fixed the serialization bug that the version numbers were not being sent back (issue930802)
Reviewers: robertvawter, Description: Fixed the serialization bug that the version numbers were not being sent back on an update (which impacts the event firing). Fixed the test and test harness (SimpleBar, SimpleFoo, SimpleFooString). The tests were only passing purely due to luck -- the serialization bug masked the test harness bug. Patch by: amitmanjhi Review by: robertvawter Please review this at http://gwt-code-reviews.appspot.com/930802/show Affected files: M user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryStringTest.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java M user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java M user/test/com/google/gwt/requestfactory/server/SimpleBar.java M user/test/com/google/gwt/requestfactory/server/SimpleFoo.java M user/test/com/google/gwt/requestfactory/server/SimpleFooString.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Sub entities not being filled in
OK, this also works for me, where it breaks down is more collections So I go back to practice, offices and phones class Practice { private ListOffice offices; } class Office { private ListPhone phones; } practive is unique and has a list of offices What I get back has all the practice seeded. All the offices are seeded and it has all its values but phones is null. If I add offices.phones, it works, I get a non null list of phone handles but the values on the handles are not set. Now I manually add, in addition to offices.phones, offices.phones.number the value of number is still null I believe this respect the syntax you outlined here. I can confirm on the server in json request processor on the server that the phone entities are there and have values when processed but the subProperties map in RequestProperty is null so it returns false when it tests if it should include these values or not On Mon, Oct 4, 2010 at 5:46 PM, Ray Cromwell cromwell...@gmail.com wrote: The following test case passes: public void testCollectionSubProperties() { delayTestFinish(DELAY_TEST_FINISH); simpleFooRequest().getSimpleFooWithSubPropertyCollection().with( selfOneToManyField.fooField).fire(new ReceiverSimpleFooProxy() { �...@override public void onSuccess(SimpleFooProxy response) { assertEquals(I'm Here, response.getSelfOneToManyField().get(0).getFooField().getUserName()); } }); } on the server: public static SimpleFoo getSimpleFooWithSubPropertyCollection() { SimpleFoo foo = new SimpleFoo(); SimpleFoo subFoo = new SimpleFoo(); SimpleFoo subSubFoo = new SimpleFoo(); subFoo.setFooField(subSubFoo); subSubFoo.setUserName(I'm here); subSubFoo.persist(); subFoo.persist(); foo.persist(); foo.setSelfOneToManyField(Arrays.asList(subFoo)); return foo; } If you have a class that looks like this: public class Company { ListOffice offices; } public class Office { Employee siteManager; } Then the correct way to query for siteManager is: with(offices.siteManager) With is a nothing more than a filter on names, it doesn't care if something is a collection, or an entity, just whether or not the name matches. -Ray On Mon, Oct 4, 2010 at 2:32 PM, BobV b...@google.com wrote: Your feedback has been very helpful in finding out where the weak points in our APIs and implementations are. driver.getPath() isn't able to completely scan an editor tree when it contains CompositeEditor's that, they themselves, have more editors in their hierarchy I'm thinking about how to solve this one, since an uninitialized CompositeEditor won't have any sub-editors to query. It's not possible to request sub-properties when using collections manually. It just doesn't work. The example I gave were trying to get the name of an office inside a collection, putting RayC is looking at this. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixed the serialization bug that the version numbers were not being sent back (issue930802)
http://gwt-code-reviews.appspot.com/930802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Changes the default row count of HasDataPresenter from Integer.MIN_VALUE to a more reasonable 0.... (issue950802)
LGTM http://gwt-code-reviews.appspot.com/950802/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Fix ROO-1488 where forward references were not correctly resolved. (issue958801)
Reviewers: cromwellian, rjrjr, Message: I realized that the server never actually sends diffs, it just sends a current snapshot of value fields, plus with() references for the return object. The problem just boils downs to ensuring that a canonical entity is used when constructing the return-object graph. Description: Fix ROO-1488 where forward references were not correctly resolved. Patch by: cromwellian, bobv Review by: bobv, cromwellian Please review this at http://gwt-code-reviews.appspot.com/958801/show Affected files: M user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestContext.java M user/src/com/google/gwt/requestfactory/client/impl/EntityCodex.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java M user/test/com/google/gwt/requestfactory/server/SimpleFoo.java M user/test/com/google/gwt/requestfactory/shared/SimpleFooRequest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors