[gwt-contrib] TypeOracle becomes interfaces (issue1113801)
Reviewers: zundel, Description: Refactors TypeOracle into a set of interfaces rather than concrete types. Moves implementation into a new package. Functionally, should be essentially the same. This will allow for alternative implementations of TypeOracle, including server-side type models and GPE integration. This diff was taken from a baseline where I'd already copied/moved files, to make the diff more sane. Lemme know if you need the full patch. Please review this at http://gwt-code-reviews.appspot.com/1113801/show Affected files: M dev/core/src/com/google/gwt/core/ext/typeinfo/JAbstractMethod.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationMethod.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JAnnotationType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JArrayType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JConstructor.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumConstant.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JEnumType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JField.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JGenericType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JMethod.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JPackage.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JParameter.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JParameterizedType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JPrimitiveType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JRawType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JRealClassType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JTypeParameter.java M dev/core/src/com/google/gwt/core/ext/typeinfo/JWildcardType.java M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java M dev/core/src/com/google/gwt/dev/javac/Resolver.java M dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java M dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java M dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java M dev/core/src/com/google/gwt/dev/javac/typemodel/DelegateMembers.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JAbstractMethod.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JAnnotationMethod.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JAnnotationType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JArrayType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JClassType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JConstructor.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JDelegatingClassType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JEnumConstant.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JEnumType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JField.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JGenericType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JMethod.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JPackage.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JParameter.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JParameterizedType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JRawType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JTypeParameter.java M dev/core/src/com/google/gwt/dev/javac/typemodel/JWildcardType.java M dev/core/src/com/google/gwt/dev/javac/typemodel/Substitution.java M dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java M dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracleBuilder.java M dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java M dev/core/test/com/google/gwt/dev/javac/JavaSourceParserTest.java M dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JAbstractMethodTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JArrayTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JClassTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JDelegatingClassTypeTestBase.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JEnumTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JGenericTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JParameterizedTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JRawTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JTypeParameterTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/JWildcardTypeTest.java M dev/core/test/com/google/gwt/dev/javac/typemodel/TypeOracleAnnotationSupportTest.java M user/src/com/google/gwt/user/rebind/rpc/TypeConstrainer.java M user
[gwt-contrib] Re: Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
See updated patch set. http://gwt-code-reviews.appspot.com/1109801/diff/1/2 File user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/2#newcode2 user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java:2: * Copyright 2008 Google Inc. Updated. On 2010/11/15 21:46:14, zundel wrote: fyi dates in new files need to be updated http://gwt-code-reviews.appspot.com/1109801/diff/1/2#newcode24 user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java:24: * Parses widgets that inherit from {...@link com.google.gwt.user.client.ui.HasHorizontalAlignment}. Fixed. On 2010/11/15 22:08:38, rjrjr wrote: wrong class linked http://gwt-code-reviews.appspot.com/1109801/diff/1/3 File user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/3#newcode32 user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java:32: writer.getDesignTime().handleUIObject(writer, elem, fieldName); Removed. On 2010/11/15 22:08:38, rjrjr wrote: why? http://gwt-code-reviews.appspot.com/1109801/diff/1/4 File user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/4#newcode32 user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java:32: writer.getDesignTime().handleUIObject(writer, elem, fieldName); Removed. On 2010/11/15 22:08:38, rjrjr wrote: ditto http://gwt-code-reviews.appspot.com/1109801/diff/1/5 File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/5#newcode1000 user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1000: addWidgetParser("HasAlignment"); Inlined the HasHorizontalAlignment and HasVerticalAlignment parsers. On 2010/11/15 22:08:38, rjrjr wrote: It won't fire for widgets that implement only HasHorizontalAlignment or HasVerticalAlignment, which is not a small set. Is that okay? If so, I'd inline the other two parsers into HasAlignment, or someone will wonder why the more specific ones don't always fire. Should also document in HasAlignmentParser why it's necessary (link to the issue), since it's redundant with BeanParser. http://gwt-code-reviews.appspot.com/1109801/diff/1/6 File user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode2 user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:2: * Copyright 2009 Google Inc. Updated. On 2010/11/15 22:08:38, rjrjr wrote: 2010 http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode38 user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:38: } Added a test case. On 2010/11/15 22:08:38, rjrjr wrote: Should test success case as well. And should test that the two attributes are optional. http://gwt-code-reviews.appspot.com/1109801/diff/1/7 File user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/7#newcode579 user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java:579: "class=\"gwt-StackPanelItem"); Yup. On 2010/11/15 22:08:38, rjrjr wrote: This fails w/o the new parser? http://gwt-code-reviews.appspot.com/1109801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
Has anyone looked at applying this to RequestFactory? Would it be sufficient for the RequestTransport to maintain the token state? -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
http://gwt-code-reviews.appspot.com/1109801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9234 committed - Adds overflow-x and overflow-y to Style since they have at least parti...
Revision: 9234 Author: knor...@google.com Date: Mon Nov 15 15:07:03 2010 Log: Adds overflow-x and overflow-y to Style since they have at least partial support on all browsers. Review at: http://gwt-code-reviews.appspot.com/1100801 Review by: jgw http://code.google.com/p/google-web-toolkit/source/detail?r=9234 Modified: /trunk/user/src/com/google/gwt/dom/client/Style.java === --- /trunk/user/src/com/google/gwt/dom/client/Style.java Wed Aug 11 09:22:23 2010 +++ /trunk/user/src/com/google/gwt/dom/client/Style.java Mon Nov 15 15:07:03 2010 @@ -663,6 +663,8 @@ private static final String STYLE_PADDING_BOTTOM = "paddingBottom"; private static final String STYLE_PADDING = "padding"; private static final String STYLE_OVERFLOW = "overflow"; + private static final String STYLE_OVERFLOW_X = "overflow-x"; + private static final String STYLE_OVERFLOW_Y = "overflow-y"; private static final String STYLE_OPACITY = "opacity"; private static final String STYLE_MARGIN_TOP = "marginTop"; private static final String STYLE_MARGIN_RIGHT = "marginRight"; @@ -877,6 +879,20 @@ clearProperty(STYLE_OVERFLOW); } + /** + * Clears the overflow-x CSS property. + */ + public final void clearOverflowX() { +clearProperty(STYLE_OVERFLOW_X); + } + + /** + * Clears the overflow-y CSS property. + */ + public final void clearOverflowY() { +clearProperty(STYLE_OVERFLOW_Y); + } + /** * Clear the padding css property. */ @@ -1121,6 +1137,20 @@ public final String getOverflow() { return getProperty(STYLE_OVERFLOW); } + + /** + * Gets the overflow-x CSS property. + */ + public final String getOverflowX() { +return getProperty(STYLE_OVERFLOW_X); + } + + /** + * Gets the overflow-y CSS property. + */ + public final String getOverflowY() { +return getProperty(STYLE_OVERFLOW_Y); + } /** * Get the padding css property. @@ -1381,6 +1411,20 @@ public final void setOverflow(Overflow value) { setProperty(STYLE_OVERFLOW, value.getCssName()); } + + /** + * Sets the overflow-x CSS property. + */ + public final void setOverflowX(Overflow value) { +setProperty(STYLE_OVERFLOW_X, value.getCssName()); + } + + /** + * Sets the overflow-y CSS property. + */ + public final void setOverflowY(Overflow value) { +setProperty(STYLE_OVERFLOW_Y, value.getCssName()); + } /** * Set the padding css property. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Check for null as well as undefined in isBodyLoaded() (issue1111801)
When we are waiting for the body to load, we do look for that event. https://s/?fileprint=//depot/google3/third_party/java_src/gwt/svn/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoaded.js The problem is that late loaded apps will never see that event (as I understand it) since their bootstrap code executes well after that event (late loaded apps are those that we bootstrap by appending a script tag with the nocache.js to an already loaded page). Therefore, we need them to correctly receive "true" for isBodyLoaded(). Actually, we run into problems before that since there are places in the code where we do doc.write() if the body is not loaded. Long story short - is BodyLoaded() has to return true/false, not wait for it to become true. There was no good way I could think of to definitively tell if the body is fully loaded, but we got lucky. The only case that is ambiguous (https://s/?change_num=18053214 This worked fine in my test app, but for some reason, in some cases (I haven't fully groked which ones) the body is defined, but null. That's the issue I'm fixing here. - Unnur On Mon, Nov 15, 2010 at 5:46 PM, wrote: > > http://gwt-code-reviews.appspot.com/801/diff/1/2 > File dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js > (right): > > http://gwt-code-reviews.appspot.com/801/diff/1/2#newcode30 > dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js:30: > > return (typeof $doc.body != "undefined" && $doc.body != null); > have we considered trying to use the DOMContentLoaded event instead? > > > http://gwt-code-reviews.appspot.com/801/show > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds some StringInterner references to reduce overall memory usage (issue1108801)
http://gwt-code-reviews.appspot.com/1108801/diff/1/4 File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java (right): http://gwt-code-reviews.appspot.com/1108801/diff/1/4#newcode314 dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:314: JavaToJavaScriptMap jjsmap = GenerateJavaScriptAST.exec(jprogram, jsProgram, this is just for readability. I had a hard time searching around for a variable named 'map' http://gwt-code-reviews.appspot.com/1108801/diff/1/9 File dev/core/src/com/google/gwt/dev/util/StringInterner.java (right): http://gwt-code-reviews.appspot.com/1108801/diff/1/9#newcode52 dev/core/src/com/google/gwt/dev/util/StringInterner.java:52: */ this may not be necessary, but on a large build, I noticed about 5 MB of references to 1 character strings. This seemed to be a convenient shortcut. http://gwt-code-reviews.appspot.com/1108801/diff/1/9#newcode60 dev/core/src/com/google/gwt/dev/util/StringInterner.java:60: } I should go back and check - I found many one character identifiers not being interned and added this code. As you noticed, I also found that a setter missing a call which was probably the real culprit. On 2010/11/15 23:10:20, conroy wrote: this seems reasonable enough to me--though I wonder if it's really necessary. out of curiosity, did you measure how much of a speedup this gave over the normal interning call (which is really just a get on a hash map)? http://gwt-code-reviews.appspot.com/1108801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Check for null as well as undefined in isBodyLoaded() (issue1111801)
http://gwt-code-reviews.appspot.com/801/diff/1/2 File dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js (right): http://gwt-code-reviews.appspot.com/801/diff/1/2#newcode30 dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js:30: return (typeof $doc.body != "undefined" && $doc.body != null); have we considered trying to use the DOMContentLoaded event instead? http://gwt-code-reviews.appspot.com/801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/diff/1/7 File user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/1/7#newcode52 user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java:52: public static final int SERIALIZATION_STREAM_MIN_VERSION = 5; On 2010/11/15 16:02:21, jat wrote: I think the version number needs to be bumped, since I don't believe the implementation fails if any unknown flag bits are set. Version bumped. To avoid having to bump the version in similar cases in the future, it should probably check if any unknown flags values are set and fail the same was as a protocol version mismatch. Added checks for unknown flags. However, I remember complications when Dan Rice increased the version number for changing the long representation, so we should look back over those and see if we can avoid the problems. Any pointers for this? http://gwt-code-reviews.appspot.com/1107801/diff/3001/4002 File user/src/com/google/gwt/user/client/rpc/RpcToken.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4002#newcode37 user/src/com/google/gwt/user/client/rpc/RpcToken.java:37: public @interface Class { On 2010/11/15 16:02:21, jat wrote: Since usually people will have this imported, I would prefer a better name - @Class on an interface isn't going to be clear what it refers to. How about @RpcTokenImplementation? Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008 File user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode170 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:170: String methodName, RpcStatsContext statsContext, AsyncCallback callback, On 2010/11/15 16:02:21, jat wrote: Line length > 80. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode172 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:172: this(streamFactory, methodName, statsContext, callback, null, responseReader); On 2010/11/15 16:02:21, jat wrote: Line length > 80. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode230 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:230: } else if (tokenExceptionHandler != null && caught instanceof RpcTokenException) { On 2010/11/15 16:02:21, jat wrote: Line length. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009 File user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode189 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:189: stob.addRootType(logger, rteType); On 2010/11/15 16:02:21, jat wrote: Should this be conditional on finding an RpcToken subtype? Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode497 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:497: // setRpcToken() On 2010/11/15 16:02:21, jat wrote: Should this check instead be done at setRpcToken time? Perhaps have setRpcToken call protected boolean checkRpcTokenType(RpcToken) which by default returns true, and generate a check there? I know I previously said over chat that a cast was fine, but thinking about it more I think we need a better error here. So, I think you want an instanceof check and then throw an exception with more details about the problem. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode593 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:593: returnStatement.append("return new " + FailingRequestBuilder.class.getName() + "(" On 2010/11/15 16:02:21, jat wrote: If you are going to use a StringBuffer here, don't mix regular + -- use append to add the pieces together. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode605 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:605: w.println("} catch(ClassCastException " + exceptionName + " ) {"); On 2010/11/15 16:02:21, jat wrote: I think if the RpcToken type is checked at setRpcToken time, all of these changes aren't needed, right? Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4010 File user/src/com/google/gwt/user/server/rpc/HybridServiceServlet.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4010#newcode137 user/src/com/google/gwt/user/server/rpc/HybridServiceServlet.java:137: log("An RpcTokenException was thrown while processing this call.", tokenException); On 2010/11/15 16:02:21, jat wrote: Line length. Done. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4018 File user/test/com/google/gwt/user/client/rpc/RpcTokenTest.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4018#newcode67 user/test/com/google/gwt/user/client/rpc/RpcTokenTest.java:67: fail(); On 2010/11/15 16:02:21, jat wrote: Should include
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
I think I read your question wrong. I was thinking you meant an event handler between widgets. Like one widget reacting to events from another widget. Now I see you are talking about injecting listeners to do custom validation. Hmm while I’m sure there are many ways of going about it. I don’t think the core design prohibits these types of injection. Here are two ways it could be done, one not so good and the other good. Self validating widgets: You make an input widget that has self validation logic. Like the reg x validation logic in the GXT textField widget. Now I think this is the simplest way to do validation but it has huge limitations. It can’t tell you if the form is valid enough to submit, and it can’t validate across input fields. Global validating widget: Here you make a widget whose main goal is validation or at least keeping track of validation state. It may handle the logic to display validation errors. It would be able to determine if the form is valid enough to submit even in the case of a multi-page form. It could use the post rendering process loop to create listeners to the value widgets. I don’t think it would be hard to implement and I don’t think it would add much over head. Let me know if I gave you the answer you were looking for :) On Nov 15, 3:11 pm, TedM wrote: > Good good, you guys are so on top of things. I don’t know if I can > explain everything in text, I much prefer a white board, but I will > try. > > Here is the high level process that I take to generate the dynamic > content. > 1. Compile time I define what dynamic widget are available > 2. Runtime - Put the dynamic HTML into a special location. > 3. Runtime - Iterate through the special span tags, doing containers > before widgets > a. As I’m creating widgets I’m making two lists: value containing > widgets, post render widgets (post render widgets are marked with an > interface) > 4. Runtime – After rendering I iterate through all post process > required widgets. > a. Here is where widgets and link up. In my demo the detailed > table example is an example of this. > > I’m sure I missed a step or two but this summarizes the sprite of what > I’m doing. > > If you want Chris I can drive down to atlanta and walk you through my > design. I've never been to a Google building, it kind of a dream of > mean :) I've heard the food is very good. > > On Nov 15, 2:13 pm, Chris Ramsdale wrote: > > > This looks very interesting, indeed. Quick question though, how would one go > > about hooking up event handlers to the views that are bound on the fly? Say > > I wanted to do something trivial like validating user input in a cell? > > > -- Chris > > > On Fri, Nov 12, 2010 at 8:09 AM, TedM wrote: > > > Hi, > > > > I made a run timeUiBindingprototype. This allows for the creation > > > of forms or screens without having to recompile. Let me know if GWT > > > or the incubator is interested. If so I will release the code as an > > > open source project on google source. > > > > Here is the prototype hosted on Google App Engine > > > >http://gwt-binding-fly.appspot.com/ > > > > -- > > >http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Update some references to document to be $doc (issue1112801)
Reviewers: conroy, Description: Update some references to document to be $doc Please review this at http://gwt-code-reviews.appspot.com/1112801/show Affected files: M dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js M dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js M dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js Index: dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js === --- dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js (revision 9233) +++ dev/core/src/com/google/gwt/core/ext/linker/impl/installLocationIframe.js (working copy) @@ -29,7 +29,7 @@ scriptFrame.id = '__MODULE_NAME__'; scriptFrame.style.cssText = 'position:absolute; width:0; height:0; border:none; left: -1000px; top: -1000px; !important'; scriptFrame.tabIndex = -1; - document.body.appendChild(scriptFrame); + $doc.body.appendChild(scriptFrame); frameDoc = scriptFrame.contentDocument; if (!frameDoc) { Index: dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js === --- dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js (revision 9233) +++ dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js (working copy) @@ -32,7 +32,7 @@ if (isBodyLoaded()) { // if the body is loaded, then the tag to download the script can be added // in a non-destructive manner -var script = document.createElement('script'); +var script = $doc.createElement('script'); script.src = filename; $doc.getElementsByTagName('head')[0].appendChild(script); } else { Index: dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js === --- dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js (revision 9233) +++ dev/core/src/com/google/gwt/core/ext/linker/impl/processMetas.js (working copy) @@ -26,7 +26,7 @@ var propertyErrorFunc; var onLoadErrorFunc; - var metas = document.getElementsByTagName('meta'); + var metas = $doc.getElementsByTagName('meta'); for (var i = 0, n = metas.length; i < n; ++i) { var meta = metas[i] , name = meta.getAttribute('name') -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Check for null as well as undefined in isBodyLoaded() (issue1111801)
Reviewers: conroy, Description: Check for null as well as undefined in isBodyLoaded() Please review this at http://gwt-code-reviews.appspot.com/801/show Affected files: M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js Index: dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js === --- dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js (revision 9233) +++ dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js (working copy) @@ -27,7 +27,7 @@ // FF 3.5 and below does not have readyState, but it does allow us to // append to the body before it has finished loading, so we return whether // the body element exists. - return (typeof $doc.body != "undefined"); + return (typeof $doc.body != "undefined" && $doc.body != null); } return (/loaded|complete/.test($doc.readyState)); } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
Responding to some offline questions: In order to have these parsers executed before CellPanelParser, I had to > create a parser for HasAlignment. I see your point about classes that only > use HasHorizontalAlignment or HasVerticalAlignment. I could register those > 2 parsers as well, but that means they get executed twice for anything that > implements HasAlignment. No real harm done since those attributes will be > consumed by the first pass, but that seems sloppy. I can inline them into > HasAlignment, though that is subpar for people who use HasVerticalAlignment > and HasHorizontalAlignment independently. I don't see anything wrong with inlining them if they won't actually fix anything. Beyond the ordering issue, they add no value that isn't already in BeanParser, right? Nothing in the stock widget set implements HasVerticalAlignment directly, so HasVerticalAlignmentParser has no value to add. Does anything not work with the widgets that implement HasHorizontalAlignment or its child interface, HasAutoHorizontalAlignment? If not, there's no reason to break it HasHorizontalAlignmentParser either. If there is a problem, would HasHorizontalAlignmentParser actually fix it? I could use more guidance on testing. I've added a positive check to my > unit testing (sorry for the miss), and there is already a case to confirm > that nothing is written when alignment args aren't entered. I could use a > hand with the UiBinderTest suite. The one test that I included fails > without the parser and passes with it. Do you have any suggestions for > other tests that should be included? The UiBinderTest is a big, fat, slow integration test. What you have there looks exactly right to me, just enough to make sure the whole stack works. Getting the bulk of your coverage from the unit tests by adding the couple of happy paths I mentioned should be plenty. On Mon, Nov 15, 2010 at 2:08 PM, wrote: > > http://gwt-code-reviews.appspot.com/1109801/diff/1/2 > File > user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/2#newcode24 > user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java:24: > * Parses widgets that inherit from {...@link > com.google.gwt.user.client.ui.HasHorizontalAlignment}. > wrong class linked > > http://gwt-code-reviews.appspot.com/1109801/diff/1/3 > File > > user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/3#newcode32 > > user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java:32: > writer.getDesignTime().handleUIObject(writer, elem, fieldName); > why? > > http://gwt-code-reviews.appspot.com/1109801/diff/1/4 > File > > user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/4#newcode32 > > user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java:32: > writer.getDesignTime().handleUIObject(writer, elem, fieldName); > ditto > > http://gwt-code-reviews.appspot.com/1109801/diff/1/5 > File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/5#newcode1000 > user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1000: > addWidgetParser("HasAlignment"); > It won't fire for widgets that implement only HasHorizontalAlignment or > HasVerticalAlignment, which is not a small set. Is that okay? > > If so, I'd inline the other two parsers into HasAlignment, or someone > will wonder why the more specific ones don't always fire. Should also > document in HasAlignmentParser why it's necessary (link to the issue), > since it's redundant with BeanParser. > > http://gwt-code-reviews.appspot.com/1109801/diff/1/6 > File > > user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode2 > > user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:2: > * Copyright 2009 Google Inc. > 2010 > > http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode38 > > user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:38: > } > Should test success case as well. And should test that the two > attributes are optional. > > http://gwt-code-reviews.appspot.com/1109801/diff/1/7 > File user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java > (right): > > http://gwt-code-reviews.appspot.com/1109801/diff/1/7#newcode579 > user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java:579: > "class=\"gwt-StackPanelItem"); > This fails w/o the new parser? > > > http://gwt-code-reviews.appspot.com/1109801/show > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adds some StringInterner references to reduce overall memory usage (issue1108801)
http://gwt-code-reviews.appspot.com/1108801/diff/1/7 File dev/core/src/com/google/gwt/dev/js/ast/JsName.java (right): http://gwt-code-reviews.appspot.com/1108801/diff/1/7#newcode78 dev/core/src/com/google/gwt/dev/js/ast/JsName.java:78: this.shortIdent = StringInterner.get().intern(shortIdent); ah, good call. i should've had this one already. http://gwt-code-reviews.appspot.com/1108801/diff/1/9 File dev/core/src/com/google/gwt/dev/util/StringInterner.java (right): http://gwt-code-reviews.appspot.com/1108801/diff/1/9#newcode60 dev/core/src/com/google/gwt/dev/util/StringInterner.java:60: } this seems reasonable enough to me--though I wonder if it's really necessary. out of curiosity, did you measure how much of a speedup this gave over the normal interning call (which is really just a get on a hash map)? http://gwt-code-reviews.appspot.com/1108801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Public: Handle constraints on Primitive fields. (issue1110801)
Reviewers: rchandia, Description: Public: Handle constraints on Primitive fields. Add TCK test to excercise primitives. Please review this at http://gwt-code-reviews.appspot.com/1110801/show Affected files: M samples/validation/src/com/google/gwt/sample/validation/shared/Person.java M samples/validationtck/src/com/google/gwt/sample/validationtck/TckValidator.java M user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java Index: samples/validation/src/com/google/gwt/sample/validation/shared/Person.java === --- samples/validation/src/com/google/gwt/sample/validation/shared/Person.java (revision 9233) +++ samples/validation/src/com/google/gwt/sample/validation/shared/Person.java (working copy) @@ -17,6 +17,7 @@ import com.google.gwt.user.client.rpc.IsSerializable; +import javax.validation.constraints.Max; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -30,11 +31,23 @@ @Size(min = 4) private String name; + @Max(9) + private long ssn; + public String getName() { return name; } public void setName(String name) { this.name = name; + + } + + public long getSsn() { +return ssn; + } + + public void setSsn(long ssn) { +this.ssn = ssn; } } Index: samples/validationtck/src/com/google/gwt/sample/validationtck/TckValidator.java === --- samples/validationtck/src/com/google/gwt/sample/validationtck/TckValidator.java (revision 9233) +++ samples/validationtck/src/com/google/gwt/sample/validationtck/TckValidator.java (working copy) @@ -17,6 +17,7 @@ import com.google.gwt.validation.client.GwtValidation; +import org.hibernate.jsr303.tck.tests.constraints.application.Building; import org.hibernate.jsr303.tck.tests.constraints.application.SuperWoman; import org.hibernate.jsr303.tck.tests.constraints.application.Woman; @@ -26,8 +27,9 @@ * Top Level validator for the TCK tests */ @GwtValidation(value = { -Woman.class, -SuperWoman.class +Building.class, +SuperWoman.class, +Woman.class }) public interface TckValidator extends Validator { } Index: user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java === --- user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java (revision 9233) +++ user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java (working copy) @@ -24,6 +24,7 @@ import com.google.gwt.core.ext.typeinfo.NotFoundException; import com.google.gwt.core.ext.typeinfo.TypeOracle; import com.google.gwt.dev.jjs.ast.JProgram; +import com.google.gwt.thirdparty.guava.common.primitives.Primitives; import com.google.gwt.user.rebind.ClassSourceFileComposerFactory; import com.google.gwt.user.rebind.SourceWriter; import com.google.gwt.validation.client.impl.AbstractGwtSpecificValidator; @@ -664,7 +665,7 @@ sw.print("violations, "); sw.print("null, "); sw.print("("); - sw.print(property.getElementClass().getCanonicalName()); + sw.print(Primitives.wrap(property.getElementClass()).getCanonicalName()); sw.print(") value, "); sw.println("groups);"); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issues 5479, 5507 and 5571 (and a few other editor-related tweaks) (issue1099801)
NumberLabel/DateLabel parts look good to me with minor issues. http://gwt-code-reviews.appspot.com/1099801/diff/26001/27005 File user/src/com/google/gwt/uibinder/elementparsers/NumberLabelParser.java (right): http://gwt-code-reviews.appspot.com/1099801/diff/26001/27005#newcode70 user/src/com/google/gwt/uibinder/elementparsers/NumberLabelParser.java:70: writer.getOracle().findType(CurrencyData.class.getCanonicalName())); How do you get a CurrencyData instance from the ui.xml file? http://gwt-code-reviews.appspot.com/1099801/diff/26001/27025 File user/test/com/google/gwt/uibinder/elementparsers/DateLabelParserTest.java (right): http://gwt-code-reviews.appspot.com/1099801/diff/26001/27025#newcode230 user/test/com/google/gwt/uibinder/elementparsers/DateLabelParserTest.java:230: public void testChokeOnUnknownPredefinedFormat() throws SAXException { Should there be a test that shows predefinedFormat working and having the right output? http://gwt-code-reviews.appspot.com/1099801/diff/26001/27026 File user/test/com/google/gwt/uibinder/elementparsers/NumberLabelParserTest.java (right): http://gwt-code-reviews.appspot.com/1099801/diff/26001/27026#newcode145 user/test/com/google/gwt/uibinder/elementparsers/NumberLabelParserTest.java:145: b.append(""); I like the parallelism with DateTimeFormat, and we probably should make a similar change to it that includes a PredefinedFormat enum. http://gwt-code-reviews.appspot.com/1099801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
http://gwt-code-reviews.appspot.com/1109801/diff/1/2 File user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/2#newcode24 user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java:24: * Parses widgets that inherit from {...@link com.google.gwt.user.client.ui.HasHorizontalAlignment}. wrong class linked http://gwt-code-reviews.appspot.com/1109801/diff/1/3 File user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/3#newcode32 user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java:32: writer.getDesignTime().handleUIObject(writer, elem, fieldName); why? http://gwt-code-reviews.appspot.com/1109801/diff/1/4 File user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/4#newcode32 user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java:32: writer.getDesignTime().handleUIObject(writer, elem, fieldName); ditto http://gwt-code-reviews.appspot.com/1109801/diff/1/5 File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/5#newcode1000 user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1000: addWidgetParser("HasAlignment"); It won't fire for widgets that implement only HasHorizontalAlignment or HasVerticalAlignment, which is not a small set. Is that okay? If so, I'd inline the other two parsers into HasAlignment, or someone will wonder why the more specific ones don't always fire. Should also document in HasAlignmentParser why it's necessary (link to the issue), since it's redundant with BeanParser. http://gwt-code-reviews.appspot.com/1109801/diff/1/6 File user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode2 user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:2: * Copyright 2009 Google Inc. 2010 http://gwt-code-reviews.appspot.com/1109801/diff/1/6#newcode38 user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java:38: } Should test success case as well. And should test that the two attributes are optional. http://gwt-code-reviews.appspot.com/1109801/diff/1/7 File user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/7#newcode579 user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java:579: "class=\"gwt-StackPanelItem"); This fails w/o the new parser? http://gwt-code-reviews.appspot.com/1109801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9233 committed - Public: GWT version of the JSR 303 Bean Validation TCK...
Revision: 9233 Author: ncha...@google.com Date: Mon Nov 15 10:52:58 2010 Log: Public: GWT version of the JSR 303 Bean Validation TCK So far only one test is wrapped, One test passses and one fails, but this shows the patern to use to get the tests going. The test failure is expected, and represent code that needs to be implemeted. Review at http://gwt-code-reviews.appspot.com/1085801 Review by: rchan...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9233 Added: /trunk/samples/validationtck /trunk/samples/validationtck/README.txt /trunk/samples/validationtck/build.xml /trunk/samples/validationtck/src /trunk/samples/validationtck/src/com /trunk/samples/validationtck/src/com/google /trunk/samples/validationtck/src/com/google/gwt /trunk/samples/validationtck/src/com/google/gwt/sample /trunk/samples/validationtck/src/com/google/gwt/sample/validationtck /trunk/samples/validationtck/src/com/google/gwt/sample/validationtck/Tck.java /trunk/samples/validationtck/src/com/google/gwt/sample/validationtck/TckTestValidator.java /trunk/samples/validationtck/src/com/google/gwt/sample/validationtck/TckValidator.java /trunk/samples/validationtck/src/com/google/gwt/sample/validationtck/ValidationTck.gwt.xml /trunk/samples/validationtck/src/org /trunk/samples/validationtck/src/org/hibernate /trunk/samples/validationtck/src/org/hibernate/jsr303 /trunk/samples/validationtck/src/org/hibernate/jsr303/tck /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/Jsr303Tck.gwt.xml /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org/hibernate /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org/hibernate/jsr303 /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org/hibernate/jsr303/tck /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org/hibernate/jsr303/tck/util /trunk/samples/validationtck/src/org/hibernate/jsr303/tck/super/org/hibernate/jsr303/tck/util/TestUtil.java /trunk/samples/validationtck/src/org/jboss /trunk/samples/validationtck/src/org/jboss/test /trunk/samples/validationtck/src/org/jboss/test/audit /trunk/samples/validationtck/src/org/jboss/test/audit/JbossTestAudit.gwt.xml /trunk/samples/validationtck/src/org/jboss/testharness /trunk/samples/validationtck/src/org/jboss/testharness/JbossTestHarness.gwt.xml /trunk/samples/validationtck/src/org/jboss/testharness/super /trunk/samples/validationtck/src/org/jboss/testharness/super/org /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/AbstractTest.java /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/api /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/api/Configuration.java /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/api/ResourceDescriptor.java /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/impl /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/impl/packaging /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/impl/packaging/TCKArtifact.java /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/spi /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/spi/Containers.java /trunk/samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/spi/StandaloneContainers.java /trunk/samples/validationtck/src/org/testng /trunk/samples/validationtck/src/org/testng/TestNg.gwt.xml /trunk/samples/validationtck/src/org/testng/super /trunk/samples/validationtck/src/org/testng/super/org /trunk/samples/validationtck/src/org/testng/super/org/testng /trunk/samples/validationtck/src/org/testng/super/org/testng/Assert.java /trunk/samples/validationtck/src/org/testng/super/org/testng/IClass.java /trunk/samples/validationtck/src/org/testng/super/org/testng/ITestNGMethod.java /trunk/samples/validationtck/src/org/testng/super/org/testng/collections /trunk/samples/validationtck/src/org/testng/super/org/testng/collections/Maps.java /trunk/samples/validationtck/test /trunk/samples/validationtck/test/com /trunk/samples/validationtck/test/com/google /trunk/samples/validationtck/test/com/google/gwt /trunk/samples/validationtck/test/com/google/gwt/sample /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/TckGwtSuite.java /trunk/samples/validationtck/test/com/google/gwt/sample/validationtck/ValidationTckTest.gwt.xml /trun
[gwt-contrib] [google-web-toolkit] r9232 committed - Edited wiki page RequestFactory_2_1_1 through web user interface.
Revision: 9232 Author: b...@google.com Date: Mon Nov 15 13:43:22 2010 Log: Edited wiki page RequestFactory_2_1_1 through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9232 Modified: /wiki/RequestFactory_2_1_1.wiki === --- /wiki/RequestFactory_2_1_1.wiki Mon Nov 15 13:42:53 2010 +++ /wiki/RequestFactory_2_1_1.wiki Mon Nov 15 13:43:22 2010 @@ -29,13 +29,13 @@ * The value in the domain object will be replaced if anything in the VP's state has changed. * If you don't want the destructive operation, don't use value objects, or use the to-be-written service helper / Locator to cook up your own id scheme. * Since we currently support Date (and it is mutable) the RF client-side code will use a subclass of Date that can be frozen to ensure that the owning EntityProxy must be edited. + += What's coming = + * (Issue 5111) Extracting a `ServiceHelper` for `ReflectiveServiceLayer` for a simple API to interface with existing systems * This should include support for bulk operations API in `ReflectiveServiceLayer` to allow query plan optimization * A `Locator` can be specified for entire RequestFactory declarations as well as individual proxy types * Support for custom validation strategies. - -= What's coming = - * (Issue 5550) Refactor the Codex types to make them injectable. * (Issue 5523) Client-side caching of requests and EntityProxy persistence * (Issue 5368) Remove integer version constraint -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
http://gwt-code-reviews.appspot.com/1109801/diff/1/2 File user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java (right): http://gwt-code-reviews.appspot.com/1109801/diff/1/2#newcode2 user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java:2: * Copyright 2008 Google Inc. fyi dates in new files need to be updated http://gwt-code-reviews.appspot.com/1109801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] RR : First pass at implementing ValueProxy support. (issue1108802)
Reviewers: rchandia, rjrjr, Message: Review requested. Rodrigo, since Ray is otherwise occupied this week, please consider yourself the sole reviewer for this patch. Description: First pass at implementing ValueProxy support. Resolve issue 5522, issue 5373, issue 5559. http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1 Patch by: bobv Review by: rchandia,rjrjr Please review this at http://gwt-code-reviews.appspot.com/1108802/show Affected files: M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/console/HttpClientTransport.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Address.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/domain/Person.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/PersonSource.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/server/SchoolCalendarService.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/AddressProxy.java M samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java M user/src/com/google/gwt/autobean/client/impl/JsoSplittable.java M user/src/com/google/gwt/autobean/server/BeanMethod.java M user/src/com/google/gwt/autobean/server/SimpleBeanHandler.java M user/src/com/google/gwt/autobean/server/impl/JsonSplittable.java M user/src/com/google/gwt/autobean/server/impl/TypeUtils.java M user/src/com/google/gwt/autobean/shared/impl/EnumMap.java M user/src/com/google/gwt/requestfactory/client/impl/AbstractRequestFactoryEditorDriver.java M user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java M user/src/com/google/gwt/requestfactory/rebind/model/EntityProxyModel.java M user/src/com/google/gwt/requestfactory/rebind/model/RequestFactoryModel.java M user/src/com/google/gwt/requestfactory/server/ReflectiveServiceLayer.java M user/src/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidator.java A user/src/com/google/gwt/requestfactory/server/RequestState.java A user/src/com/google/gwt/requestfactory/server/Resolver.java M user/src/com/google/gwt/requestfactory/server/SimpleRequestProcessor.java M user/src/com/google/gwt/requestfactory/server/testing/InProcessRequestFactory.java A user/src/com/google/gwt/requestfactory/shared/BaseProxy.java M user/src/com/google/gwt/requestfactory/shared/EntityProxy.java M user/src/com/google/gwt/requestfactory/shared/RequestContext.java A user/src/com/google/gwt/requestfactory/shared/ValueProxy.java M user/src/com/google/gwt/requestfactory/shared/Violation.java M user/src/com/google/gwt/requestfactory/shared/impl/AbstractRequestContext.java M user/src/com/google/gwt/requestfactory/shared/impl/AbstractRequestFactory.java A user/src/com/google/gwt/requestfactory/shared/impl/BaseProxyCategory.java D user/src/com/google/gwt/requestfactory/shared/impl/CollectionProperty.java M user/src/com/google/gwt/requestfactory/shared/impl/Constants.java M user/src/com/google/gwt/requestfactory/shared/impl/EntityProxyCategory.java D user/src/com/google/gwt/requestfactory/shared/impl/EnumProperty.java M user/src/com/google/gwt/requestfactory/shared/impl/IdFactory.java A user/src/com/google/gwt/requestfactory/shared/impl/Poser.java D user/src/com/google/gwt/requestfactory/shared/impl/Property.java M user/src/com/google/gwt/requestfactory/shared/impl/SimpleEntityProxyId.java A user/src/com/google/gwt/requestfactory/shared/impl/SimpleProxyId.java A user/src/com/google/gwt/requestfactory/shared/impl/ValueProxyCategory.java A user/src/com/google/gwt/requestfactory/shared/impl/posers/DatePoser.java M user/src/com/google/gwt/requestfactory/shared/messages/EntityCodex.java M user/src/com/google/gwt/requestfactory/shared/messages/IdMessage.java M user/src/com/google/gwt/requestfactory/shared/messages/IdUtil.java M user/src/com/google/gwt/requestfactory/shared/messages/MessageFactory.java M user/src/com/google/gwt/requestfactory/shared/messages/ResponseMessage.java M user/src/com/google/gwt/requestfactory/shared/messages/ViolationMessage.java M user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java M user/test/com/google/gwt/requestfactory/client/RequestFactoryTestBase.java M user/test/com/google/gwt/requestfactory/rebind/model/RequestFactoryModelTest.java M user/test/com/google/gwt/requestfactory/server/RequestFactoryInterfaceValidatorTest.java M user/test/com/google/gwt/requestfactory/server/SimpleBar.java M user/test/com/google/gwt/requestfactory/server/SimpleFoo.java A user/test/com/google/gwt/requestfactory/server/SimpleValue.java M user/test/com/google/gwt/requestfactory/shared/BaseFooProxy.java M user/test/com/google/gwt/requestfactory/shared/SimpleBarProxy.java M user/test/com/google/gwt/requestfactory/share
[gwt-contrib] [google-web-toolkit] r9231 committed - Edited wiki page RequestFactory_2_1_1 through web user interface.
Revision: 9231 Author: b...@google.com Date: Mon Nov 15 13:42:53 2010 Log: Edited wiki page RequestFactory_2_1_1 through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9231 Modified: /wiki/RequestFactory_2_1_1.wiki === --- /wiki/RequestFactory_2_1_1.wiki Mon Nov 15 09:22:36 2010 +++ /wiki/RequestFactory_2_1_1.wiki Mon Nov 15 13:42:53 2010 @@ -10,13 +10,11 @@ * A service method declared in a `RequestContext` can take parameters of `EntityProxyId` type to avoid the need to `find()` an object just to use it as a method parameter. * TODO: Allow return types of `EntityProxyId`. * Multiple methods may be invoked in a single `RequestContext` before `fire()` is called. + * (Issue 5549) Support boolean is/hasFoo() properties = What's in review = - -= What's coming = - -Stuff not yet published: +http://gwt-code-reviews.appspot.com/1108802: * (Issue 5522, issue 5357) Value types / Embedded objects * A user-defined value object must extend the empty ValueProxy interface and declare a @ProxyFor annotation. * ValueProxy instances are never sparse and will implement equals() and hashCode() based on the values in the proxy. @@ -35,10 +33,12 @@ * This should include support for bulk operations API in `ReflectiveServiceLayer` to allow query plan optimization * A `Locator` can be specified for entire RequestFactory declarations as well as individual proxy types * Support for custom validation strategies. + += What's coming = + * (Issue 5550) Refactor the Codex types to make them injectable. * (Issue 5523) Client-side caching of requests and EntityProxy persistence * (Issue 5368) Remove integer version constraint - * (Issue 5549) Support boolean is/hasFoo() properties = Add to 2.1.1 smoke testing = * The server components of RequestFactory have been completely rewritten. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Issue 5518 Fix: Panel Alignment Attributes Have No Effect (issue1109801)
Reviewers: jgw, Description: Issue 5518 Fix: Panel Alignment Attributes Have No Effect Please review this at http://gwt-code-reviews.appspot.com/1109801/show Affected files: A user/src/com/google/gwt/uibinder/elementparsers/HasAlignmentParser.java A user/src/com/google/gwt/uibinder/elementparsers/HasHorizontalAlignmentParser.java A user/src/com/google/gwt/uibinder/elementparsers/HasVerticalAlignmentParser.java M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java A user/test/com/google/gwt/uibinder/elementparsers/HasAlignmentParserTest.java M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Adds some StringInterner references to reduce overall memory usage (issue1108801)
Reviewers: conroy, Description: Adds some StringInterner references to reduce overall memory usage under compile report (soyc). On A large code base, I witnessed a reduction from 369M to 301M of heap when running the compileReport. Please review this at http://gwt-code-reviews.appspot.com/1108801/show Affected files: M dev/core/src/com/google/gwt/core/ext/linker/impl/StandardCastableTypeMap.java M dev/core/src/com/google/gwt/core/ext/soyc/impl/DependencyRecorder.java M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java M dev/core/src/com/google/gwt/dev/jjs/SourceOrigin.java M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java M dev/core/src/com/google/gwt/dev/js/ast/JsName.java M dev/core/src/com/google/gwt/dev/util/Memory.java M dev/core/src/com/google/gwt/dev/util/StringInterner.java M dev/core/src/com/google/gwt/soyc/SoycDashboard.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: GWT version of the JSR 303 Bean Validation TCK (issue1085801)
LGTM On 2010/11/15 20:20:20, Nick Chalko wrote: http://gwt-code-reviews.appspot.com/1085801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: GWT version of the JSR 303 Bean Validation TCK (issue1085801)
http://gwt-code-reviews.appspot.com/1085801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Good good, you guys are so on top of things. I don’t know if I can explain everything in text, I much prefer a white board, but I will try. Here is the high level process that I take to generate the dynamic content. 1. Compile time I define what dynamic widget are available 2. Runtime - Put the dynamic HTML into a special location. 3. Runtime - Iterate through the special span tags, doing containers before widgets a. As I’m creating widgets I’m making two lists: value containing widgets, post render widgets (post render widgets are marked with an interface) 4. Runtime – After rendering I iterate through all post process required widgets. a. Here is where widgets and link up. In my demo the detailed table example is an example of this. I’m sure I missed a step or two but this summarizes the sprite of what I’m doing. If you want Chris I can drive down to atlanta and walk you through my design. I've never been to a Google building, it kind of a dream of mean :) I've heard the food is very good. On Nov 15, 2:13 pm, Chris Ramsdale wrote: > This looks very interesting, indeed. Quick question though, how would one go > about hooking up event handlers to the views that are bound on the fly? Say > I wanted to do something trivial like validating user input in a cell? > > -- Chris > > On Fri, Nov 12, 2010 at 8:09 AM, TedM wrote: > > Hi, > > > I made a run time UiBinding prototype. This allows for the creation > > of forms or screens without having to recompile. Let me know if GWT > > or the incubator is interested. If so I will release the code as an > > open source project on google source. > > > Here is the prototype hosted on Google App Engine > > >http://gwt-binding-fly.appspot.com/ > > > -- > >http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: GWT version of the JSR 303 Bean Validation TCK (issue1085801)
LGTM except for a problematic comment in samples/build.xml http://gwt-code-reviews.appspot.com/1085801/diff/54001/55001 File samples/build.xml (right): http://gwt-code-reviews.appspot.com/1085801/diff/54001/55001#newcode59 samples/build.xml:59: ' http://gwt-code-reviews.appspot.com/1085801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add a permissions model to the Chrome NPAPI plugin. (issue1084801)
http://gwt-code-reviews.appspot.com/1084801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a new CommonResources class that provides access to commonly used styles in GWT. For now,... (issue1106801)
committed as r9228 http://gwt-code-reviews.appspot.com/1106801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Adding a new widget CellWidget that can wrap any Cell and turn it into a Widget. CellWidget can... (issue1103801)
committed as r9229 http://gwt-code-reviews.appspot.com/1103801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes issue http://code.google.com/p/google-web-toolkit/issues/detail?id=5578 (issue1098801)
Can you take one more look? I had broken non-entity types, e.g. collections. Only changes from patch set 4 are in RequestFactoryInterfaceValidator.java On 2010/11/15 19:33:16, rjrjr wrote: http://gwt-code-reviews.appspot.com/1098801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Fixes issue http://code.google.com/p/google-web-toolkit/issues/detail?id=5578 (issue1098801)
http://gwt-code-reviews.appspot.com/1098801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Would GWT and/or incubator be interested in Run Time UiBinding
This looks very interesting, indeed. Quick question though, how would one go about hooking up event handlers to the views that are bound on the fly? Say I wanted to do something trivial like validating user input in a cell? -- Chris On Fri, Nov 12, 2010 at 8:09 AM, TedM wrote: > Hi, > > I made a run time UiBinding prototype. This allows for the creation > of forms or screens without having to recompile. Let me know if GWT > or the incubator is interested. If so I will release the code as an > open source project on google source. > > Here is the prototype hosted on Google App Engine > > http://gwt-binding-fly.appspot.com/ > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Yeah I'm not a big fan of XForms. I don't have my thought summarized at the moment. Over all it's an outdated, unsupported standard that doesn't have much momentum. On Nov 15, 1:44 pm, Amir Kashani wrote: > Ted, > > Are you familiar with the XForms specification? I think the original goal > was to get browser vendors to implement it to replace HTML forms, which > doesn't seem to be happening, but it's a very solid in dealing with a lot of > the use cases of form creation pretty gracefully. EMC even has a GWT > implementation of the spec that's meant to be used with one of their > products, though it's not open > source:https://community.emc.com/docs/DOC-3100. I think there are other > open-source > JavaScript implementations out there. > > Anyway, it'd might be interesting to have an open-source GWT implementation > available. > > - Amir > > On Mon, Nov 15, 2010 at 8:42 AM, TedM wrote: > > The current implementation has the following functionality > > > 1. dynamic forms > > 2. dynamic workflow > > 3. submission of form data > > 4. submission of attachments > > 5. client and server validation > > > And UI editor on the way. > > > But the current implementation is a project that I'm the architect > > for. The prototype I put on Google App Engine is a Prototype based on > > a prototype that I used to sell the idea to my company. > > > To open source this, I would like to do it in the following order. > > 1. Schedule a meeting with you Google guys the first or second week of > > December > > 2. Draw up my designs and clean up my prototype. > > 3. Then I'll meet with you guys so I can get my design and vision > > aligned with yours. > > 4. Then I'll build it to your vision > > > What do you think? > > > -- > >http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Thank you, John for your post. Let me see if I can summarize your concerns and then I’ll show you how my solution takes your concerns into account. Adding dynamic functionality may come at a global cost: The example you used is reflection, which I think is a perfect example of a dynamic functionality that would impact performance even if the functionality wasn’t used. I would also agree with you, global performance is paramount and should not be sacrificed lightly. Now I believe I have taken this view point into my design. What you see as dynamic in the demo is nothing more than a special widget (Let’s call it the renderer Widget) that takes in HTML (with special span tags) and then injects widgets into that HTML. So with this design you can see that the renderer widget is not like the reflection functionality. If the rendering widget is not used in the program then it will have no impact on the compiled code base. If it is used in the code base, its impact (in terms of performance) is limited to the rendering of the form. Once the rendering is done then only normal GWT or GXT widgets remain alongside some metadata that is used for the save button. Dynamic Vs Compile: You note, that doing things at compile time can lead to much better optimizations. On this note I also agree with you. Compiling should always be preferred over dynamic, unless it is the nature of the thing you’re building is to change. An example in GWT that I can use is the FlexTable. The FlexTable is designed for a user that wants to be able to change a grid like structure on the fly. I see my renderer widget in a similar light as the FlexTable design. So let me know if my comments have any merit, if you have any questions, if you have any objections. Side note I checked out your train games, pretty cool. I’m also an aspiring game developer and CGI artist. On Nov 15, 11:56 am, John Tamplin wrote: > On Mon, Nov 15, 2010 at 11:42 AM, TedM wrote: > > The current implementation has the following functionality > > > 1. dynamic forms > > 2. dynamic workflow > > 3. submission of form data > > 4. submission of attachments > > 5. client and server validation > > > And UI editor on the way. > > > But the current implementation is a project that I'm the architect > > for. The prototype I put on Google App Engine is a Prototype based on > > a prototype that I used to sell the idea to my company. > > > To open source this, I would like to do it in the following order. > > 1. Schedule a meeting with you Google guys the first or second week of > > December > > 2. Draw up my designs and clean up my prototype. > > 3. Then I'll meet with you guys so I can get my design and vision > > aligned with yours. > > 4. Then I'll build it to your vision > > > What do you think? > > This is just a general comment from me personally -- I recognize that > there are times that you need dynamic functionality, but realize that > you pay a significant cost for it. Typical structures used to handle > dynamic content don't optimize well, and the compiler is unable to > remove a lot of code because it might be used depending on the data > received from the server. > > Personally, when you can get away with it, you are much better off > either generating static code from dynamic data (which of course means > recompiling your app) or rendering the dynamic parts on the server. I > don't know if either of those are feasible for your use case. > > Just because something is expensive doesn't meant it shouldn't be in > GWT -- if what you need to do is expensive, that doesn't change the > fact that you still need to do it. However, it would need to be done > in a way so that most people, who do not actually need that > functionality, do not wind up using it by mistake or paying the cost > because some library they use does. An example is reflection -- it > would be possible to implement reflection in GWT, but the problem is > that then almost all of the useful optimizations the compiler does > goes away. You can never remove a method that isn't referenced > (including after inlining it where you can) because there might be a > reflective call to it, you can no longer tighten argument types based > on the callsites, etc. So, rather than promoting functionality that > people definitely want but encourages them to write code that compiles > poorly, we chose to leave out reflection. > > -- > John A. Tamplin > Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
On 15 November 2010 10:25, John Tamplin wrote: > On Mon, Nov 15, 2010 at 1:08 PM, Hilco Wijbenga > wrote: >> On a side note, I'm not clear why we can't mandate a particular Ant >> version. Ant 1.8.1 still works with JDK1.4 so no issues there. It's a >> best practice to provide the tools with the build where possible so we >> could even do that. Even if people would want to run an older Ant, >> they could still use GWT's Ant (whatever version it might be) for >> their GWT code (i.e. their Ant build could call a separate Ant build >> for the GWT parts). Why do we need to support older Ants? It's not >> like GWT works with JDK1.4. > > Especially on Linux distros, many of the ones still in regular use > don't have newer ants available by default. If there is a good reason > to require an upgrade we can do that, but absent a good reason we > shouldn't require manually installing packages on those distros. I realise we've gone off on a bit of a tangent here but I'd love to know which Linux distro(s) you're talking about. Even Debian Lenny (i.e. stable) comes with 1.7. Besides, it's not like Ant is something that gets installed by default so anyone who does install it will do so because they need it. They are far more likely to go with the latest. Regardless, coming back to best practices, Ant should be part of the GWT release. If we're really worried about older Ants, then allow the build to be kicked off by any Ant and then have it use GWT's Ant (internally) to actually do the build. That gives us the best of both worlds: a reproducible build that works with any Ant. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9230 committed - Cherry picking r9216 and r9220 into release branch.
Revision: 9230 Author: jlaba...@google.com Date: Mon Nov 15 02:27:58 2010 Log: Cherry picking r9216 and r9220 into release branch. http://code.google.com/p/google-web-toolkit/source/detail?r=9230 Added: /releases/2.1/tools/api-checker/config/gwt21_22userApi.conf Deleted: /releases/2.1/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java /releases/2.1/user/src/com/google/gwt/user/client/impl/DOMImplMozillaOld.java /releases/2.1/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplOldMozilla.java /releases/2.1/user/src/com/google/gwt/xml/client/impl/XMLParserImplMozillaOld.java Modified: /releases/2.1/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml /releases/2.1/user/src/com/google/gwt/dom/DOM.gwt.xml /releases/2.1/user/src/com/google/gwt/junit/JUnitMessageQueue.java /releases/2.1/user/src/com/google/gwt/junit/JUnitShell.java /releases/2.1/user/src/com/google/gwt/resources/Resources.gwt.xml /releases/2.1/user/src/com/google/gwt/user/CaptionPanel.gwt.xml /releases/2.1/user/src/com/google/gwt/user/DOM.gwt.xml /releases/2.1/user/src/com/google/gwt/user/Focus.gwt.xml /releases/2.1/user/src/com/google/gwt/user/History.gwt.xml /releases/2.1/user/src/com/google/gwt/user/Popup.gwt.xml /releases/2.1/user/src/com/google/gwt/user/RichText.gwt.xml /releases/2.1/user/src/com/google/gwt/user/UserAgent.gwt.xml /releases/2.1/user/src/com/google/gwt/user/cellview/CellView.gwt.xml /releases/2.1/user/src/com/google/gwt/user/cellview/client/AbstractHasData.java /releases/2.1/user/src/com/google/gwt/user/cellview/client/CellList.java /releases/2.1/user/src/com/google/gwt/user/cellview/client/CellTable.java /releases/2.1/user/src/com/google/gwt/xml/XML.gwt.xml /releases/2.1/user/test/com/google/gwt/dom/client/ElementTest.java /releases/2.1/user/test/com/google/gwt/junit/JUnitMessageQueueTest.java /releases/2.1/user/test/com/google/gwt/user/client/Profile.java === --- /dev/null +++ /releases/2.1/tools/api-checker/config/gwt21_22userApi.conf Mon Nov 15 02:27:58 2010 @@ -0,0 +1,139 @@ +#existing API + +# dirRoot_old is missing because refJars are being supplied +name_old gwt21userApi +#sourceFiles is specified as colon-separated list of files +sourceFiles_old com/google/gwt + +#excludedFiles is specified as colon-separated ant patterns +excludedFiles_old com/google/gwt/benchmarks/BenchmarkReport.java\ +:com/google/gwt/benchmarks/BenchmarkShell.java\ +:com/google/gwt/benchmarks/client/Benchmark.java\ +:**/linker/**\ +:**/rebind/**\ +:**/server/**\ +:**/tools/**\ +:com/google/gwt/regexp/shared/**\ +:com/google/gwt/autobean/shared/impl/StringQuoter.java\ +:com/google/gwt/core/client/impl/WeakMapping.java\ +:com/google/gwt/core/ext/**\ +:com/google/gwt/dev/*.java\ +:com/google/gwt/dev/asm/**\ +:com/google/gwt/dev/cfg/**\ +:com/google/gwt/dev/generator/**\ +:com/google/gwt/dev/javac/**\ +:com/google/gwt/dev/jdt/**\ +:com/google/gwt/dev/jjs/*.java\ +:com/google/gwt/dev/jjs/ast/**\ +:com/google/gwt/dev/jjs/impl/**\ +:com/google/gwt/dev/js/**\ +:com/google/gwt/dev/json/**\ +:com/google/gwt/dev/resource/**\ +:com/google/gwt/dev/shell/**\ +:com/google/gwt/dev/ui/**\ +:com/google/gwt/dev/util/**\ +:com/google/gwt/junit/*.java\ +:com/google/gwt/junit/client/GWTTestCase.java\ +:com/google/gwt/junit/client/impl/GWTRunner.java\ +:com/google/gwt/junit/remote/**\ +:com/google/gwt/resources/css/**\ +:com/google/gwt/resources/ext/**\ +:com/google/gwt/resources/rg/**\ +:com/google/gwt/requestfactory/shared/impl/MessageFactoryHolder.java\ +:com/google/gwt/rpc/client/impl/ClientWriterFactory.java\ +:com/google/gwt/rpc/client/impl/EscapeUtil.java\ +:com/google/gwt/soyc/**\ +:com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java\ +:com/google/gwt/user/client/rpc/core/java/util/LinkedHashMap_CustomFieldSerializer.java\ +:com/google/gwt/uibinder/attributeparsers/**\ +:com/google/gwt/uibinder/elementparsers/**\ +:com/google/gwt/uibinder/testing/**\ +:com/google/gwt/util/**\ +:com/google/gwt/validation/**\ + +## +#new Api + +dirRoot_new ./ +name_new gwt22userApi +#sourceFiles is specified as colon-separated list of files +sourceFiles_new dev/core/super\ +:user/src\ +:user/super\ + +#excludedFiles is specified as colon-separated ant patterns +# The last 3 entries exclude the validation stuff. +# Bug: http://code.google.com/p/google-web-toolkit/issues/detail?id=5566 +excludedFiles_new user/src/com/google/gwt/benchmarks/BenchmarkReport.java\ +:user/src/com/google/gwt/benchmarks/BenchmarkShell.java\ +:user/src/com/google/gwt/benchmarks/client/Benchmark.java\ +:**/linker/**\ +:**/rebind/**\ +:**/server/**\ +:**/tools/**\ +:user/src/com/google/gwt/regexp/shared/**\ +:user/src/com/google/gwt/autobean/shared/impl/StringQuoter.java\ +:user/src/com/google/gwt/core/client/impl/WeakMapping.java\ +:user/src/com/google/gwt/junit/*.java\ +:user/src/com/google/gwt/junit/client/GWTTestCase.java\ +:user/src/com/google/gwt/junit/clien
[gwt-contrib] Re: Public: GWT version of the JSR 303 Bean Validation TCK (issue1085801)
http://gwt-code-reviews.appspot.com/1085801/diff/40002/42001 File samples/build.xml (right): http://gwt-code-reviews.appspot.com/1085801/diff/40002/42001#newcode59 samples/build.xml:59: On 2010/11/11 22:05:51, rchandia wrote: Remove this to prevent validationtck from being built and copied into the distributable bits. Done. http://gwt-code-reviews.appspot.com/1085801/diff/40002/42013 File samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/AbstractTest.java (right): http://gwt-code-reviews.appspot.com/1085801/diff/40002/42013#newcode23 samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/AbstractTest.java:23: On 2010/11/11 22:05:51, rchandia wrote: Add the "modified by Google" snippet Done. http://gwt-code-reviews.appspot.com/1085801/diff/40002/42014 File samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/api/Configuration.java (right): http://gwt-code-reviews.appspot.com/1085801/diff/40002/42014#newcode20 samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/api/Configuration.java:20: * On 2010/11/11 22:05:51, rchandia wrote: Add the "modified by Google" snippet Done. http://gwt-code-reviews.appspot.com/1085801/diff/40002/42017 File samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/spi/Containers.java (right): http://gwt-code-reviews.appspot.com/1085801/diff/40002/42017#newcode14 samples/validationtck/src/org/jboss/testharness/super/org/jboss/testharness/spi/Containers.java:14: * On 2010/11/11 22:05:51, rchandia wrote: Add the modified by Google snippet Done. http://gwt-code-reviews.appspot.com/1085801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Ted, Are you familiar with the XForms specification? I think the original goal was to get browser vendors to implement it to replace HTML forms, which doesn't seem to be happening, but it's a very solid in dealing with a lot of the use cases of form creation pretty gracefully. EMC even has a GWT implementation of the spec that's meant to be used with one of their products, though it's not open source: https://community.emc.com/docs/DOC-3100. I think there are other open-source JavaScript implementations out there. Anyway, it'd might be interesting to have an open-source GWT implementation available. - Amir On Mon, Nov 15, 2010 at 8:42 AM, TedM wrote: > The current implementation has the following functionality > > 1. dynamic forms > 2. dynamic workflow > 3. submission of form data > 4. submission of attachments > 5. client and server validation > > And UI editor on the way. > > But the current implementation is a project that I'm the architect > for. The prototype I put on Google App Engine is a Prototype based on > a prototype that I used to sell the idea to my company. > > To open source this, I would like to do it in the following order. > 1. Schedule a meeting with you Google guys the first or second week of > December > 2. Draw up my designs and clean up my prototype. > 3. Then I'll meet with you guys so I can get my design and vision > aligned with yours. > 4. Then I'll build it to your vision > > What do you think? > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Public: GWT version of the JSR 303 Bean Validation TCK (issue1085801)
http://gwt-code-reviews.appspot.com/1085801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9229 committed - Adding a new widget CellWidget that can wrap any Cell and turn it into...
Revision: 9229 Author: jlaba...@google.com Date: Mon Nov 15 04:05:13 2010 Log: Adding a new widget CellWidget that can wrap any Cell and turn it into a Widget. CellWidget can be used on its own (it isn't abstract) to wrap a widget. It can also be used inside a Composite to create a formal version of an existing Cell, such as creating EditText from EditTextCell. This feature will not be included in GWT 2.1.1. Review at http://gwt-code-reviews.appspot.com/1103801 Review by: sbruba...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9229 Added: /trunk/user/src/com/google/gwt/user/cellview/client/CellWidget.java /trunk/user/test/com/google/gwt/user/cellview/client/CellWidgetTest.java Modified: /trunk/user/test/com/google/gwt/user/cellview/CellViewSuite.java === --- /dev/null +++ /trunk/user/src/com/google/gwt/user/cellview/client/CellWidget.java Mon Nov 15 04:05:13 2010 @@ -0,0 +1,231 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.user.cellview.client; + +import com.google.gwt.cell.client.Cell; +import com.google.gwt.cell.client.ValueUpdater; +import com.google.gwt.dom.client.Document; +import com.google.gwt.dom.client.Element; +import com.google.gwt.event.logical.shared.ValueChangeEvent; +import com.google.gwt.event.logical.shared.ValueChangeHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.resources.client.CommonResources; +import com.google.gwt.safehtml.shared.SafeHtmlBuilder; +import com.google.gwt.user.client.Event; +import com.google.gwt.user.client.ui.HasValue; +import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.view.client.HasKeyProvider; +import com.google.gwt.view.client.ProvidesKey; + +/** + * A {...@link Widget} that wraps a {...@link Cell}. + * + * @param the type that the Cell represents + */ +public class CellWidget extends Widget implements HasKeyProvider, +HasValue { + + /** + * Create the default element used to wrap the Cell. The default element is a + * div with display set to inline-block. + * + * @return the default wrapper element + */ + private static Element createDefaultWrapperElement() { +Element div = Document.get().createDivElement(); +div.setClassName(CommonResources.getInlineBlockStyle()); +return div; + } + + /** + * The cell being wrapped. + */ + private final Cell cell; + + /** + * The key provider for the value. + */ + private final ProvidesKey keyProvider; + + /** + * The current cell value. + */ + private C value; + + /** + * The {...@link ValueUpdater} used to trigger value update events. + */ + private final ValueUpdater valueUpdater = new ValueUpdater() { +public void update(C value) { + ValueChangeEvent.fire(CellWidget.this, value); +} + }; + + /** + * Construct a new {...@link CellWidget} with the specified cell and an initial + * value of null. + * + * @param cell the cell to wrap + */ + public CellWidget(Cell cell) { +this(cell, null, null); + } + + /** + * Construct a new {...@link CellWidget} with the specified cell and key + * provider, and an initial value of null. + * + * @param cell the cell to wrap + * @param keyProvider the key provider used to get keys from values + */ + public CellWidget(Cell cell, ProvidesKey keyProvider) { +this(cell, null, keyProvider); + } + + /** + * Construct a new {...@link CellWidget} with the specified cell and initial + * value. + * + * @param cell the cell to wrap + * @param initialValue the initial value of the Cell + */ + public CellWidget(Cell cell, C initialValue) { +this(cell, initialValue, null); + } + + /** + * Construct a new {...@link CellWidget} with the specified cell, initial value, + * and key provider. + * + * @param cell the cell to wrap + * @param initialValue the initial value of the Cell + * @param keyProvider the key provider used to get keys from values + */ + public CellWidget(Cell cell, C initialValue, ProvidesKey keyProvider) { +this(cell, initialValue, keyProvider, createDefaultWrapperElement()); + } + + /** + * Creates a {...@link CellWidget} with the specified cell, initial value, key + * provider, using the specified element as the wrapper around the cell. + * + * @param cell the cell to wrap + * @param initialValue t
[gwt-contrib] [google-web-toolkit] r9228 committed - Adding a new CommonResources class that provides access to commonly us...
Revision: 9228 Author: jlaba...@google.com Date: Mon Nov 15 02:38:06 2010 Log: Adding a new CommonResources class that provides access to commonly used styles in GWT. For now, the only style defined is a cross browser implementation of inline block, but we can expand to include more common styles later. Review at http://gwt-code-reviews.appspot.com/1106801 Review by: sbruba...@google.com http://code.google.com/p/google-web-toolkit/source/detail?r=9228 Added: /trunk/user/src/com/google/gwt/resources/client/CommonResources.java /trunk/user/src/com/google/gwt/resources/client/inline-block.css === --- /dev/null +++ /trunk/user/src/com/google/gwt/resources/client/CommonResources.java Mon Nov 15 02:38:06 2010 @@ -0,0 +1,71 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.resources.client; + +import com.google.gwt.core.client.GWT; + +/** + * Generally useful styles and resources used throughout GWT widgets and cells. + */ +public class CommonResources { + + /** + * The {...@link ClientBundle} of resources. + */ + static interface Bundle extends ClientBundle { + +@Source("inline-block.css") +InlineBlockStyle inlineBlockStyle(); + } + + /** + * Cross-browser implementation of the "display: inline-block" CSS property. + */ + static interface InlineBlockStyle extends CssResource { + +/** + * The inline block style. + */ +String inlineBlock(); + } + + /** + * Lazily loaded singleton. + */ + private static Bundle instance; + + /** + * Ensure that the shared {...@link Bundle} is created and return it. + * + * @return the {...@link Bundle} of resources + */ + private static Bundle ensureResources() { +if (instance == null) { + instance = GWT.create(Bundle.class); +} +return instance; + } + + /** + * Get the style class name that simulates a "display: inline-block" effect + * across browsers. + */ + public static String getInlineBlockStyle() { +InlineBlockStyle style = ensureResources().inlineBlockStyle(); +style.ensureInjected(); +return style.inlineBlock(); + } +} === --- /dev/null +++ /trunk/user/src/com/google/gwt/resources/client/inline-block.css Mon Nov 15 02:38:06 2010 @@ -0,0 +1,59 @@ +/* + * Copyright 2010 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +/* + * Cross-browser implementation of the "display: inline-block" CSS property. + * See http://www.w3.org/TR/CSS21/visuren.html#propdef-display for details. + * Tested on IE 6 & 7, FF 2.0 & 3.0, Safari 2 & 3, Webkit, Chrome and Opera 9. + * + * Original author: att...@google.com (Attila Bodis) + */ + +/* + * Firefox hack is needed for versions < FF3. But since the user.agent property + * does not allow us to specify directly for (versions < FF3), we will need to + * use the following two rules to workaround. + */ +/* Firefox versions >= FF 1.5 */ +...@if user.agent gecko1_8 { + .inlineBlock { +/* + * Note on funny syntax: what we really need is this: "display: -moz-inline-box;" + * but "\\" is needed to make GWT's CssResource escape the "-" character properly. + */ +display: \\-moz-inline-box; /* This is ignored by FF3 and later*/ + } +} + +/* Default rule; only Safari, Webkit, Opera, FF3 handle it without hacks. */ +.inlineBlock { + position: relative; + display: inline-block; +} + +/* + * IE specific rules (for IE version IE6/7) + * On IE, "display: inline-block" only gives the element layout, but doesn't + * give it inline behavior. Subsequently setting display to inline does the + * trick. + */ +...@if user.agent ie6 { + .inlineBlock { +/* workaround to make IE "hasLayout" */ +zoom: 1; +display: inline; + } +} -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9227 committed - A few small changes to BidiFormatter. Mainly, it now uses DirectionEst...
Revision: 9227 Author: gwt.mirror...@gmail.com Date: Mon Nov 15 10:31:51 2010 Log: A few small changes to BidiFormatter. Mainly, it now uses DirectionEstimator that can be modified instead of the constant estimating function of BidiUtils. http://code.google.com/p/google-web-toolkit/source/detail?r=9227 Modified: /trunk/user/src/com/google/gwt/i18n/shared/BidiFormatter.java === --- /trunk/user/src/com/google/gwt/i18n/shared/BidiFormatter.java Mon Oct 11 12:09:16 2010 +++ /trunk/user/src/com/google/gwt/i18n/shared/BidiFormatter.java Mon Nov 15 10:31:51 2010 @@ -211,6 +211,8 @@ private boolean alwaysSpan; private Direction contextDir; + private DirectionEstimator directionEstimator = + WordCountDirectionEstimator.get(); /** * @param contextDir The context direction @@ -240,14 +242,14 @@ * Returns "dir=ltr" or "dir=rtl", depending on {...@code str}'s estimated * direction, if it is not the same as the context direction. Otherwise, * returns the empty string. - * + * * @param str String whose direction is to be estimated * @param isHtml Whether {...@code str} is HTML / HTML-escaped * @return "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR text * in non-LTR context; else, the empty string. */ public String dirAttr(String str, boolean isHtml) { -return knownDirAttr(BidiUtils.get().estimateDirection(str, isHtml)); +return knownDirAttr(directionEstimator.estimateDirection(str, isHtml)); } /** @@ -266,7 +268,7 @@ * @return {...@code str}'s estimated overall direction */ public Direction estimateDirection(String str) { -return BidiUtils.get().estimateDirection(str); +return directionEstimator.estimateDirection(str); } /** @@ -279,7 +281,7 @@ * @return {...@code str}'s estimated overall direction */ public Direction estimateDirection(String str, boolean isHtml) { -return BidiUtils.get().estimateDirection(str, isHtml); +return directionEstimator.estimateDirection(str, isHtml); } /** @@ -296,6 +298,10 @@ public Direction getContextDir() { return contextDir; } + + public DirectionEstimator getDirectionEstimator() { +return directionEstimator; + } /** * Returns whether the context direction is RTL. @@ -354,8 +360,12 @@ */ public String markAfter(String str, boolean isHtml) { str = BidiUtils.get().stripHtmlIfNeeded(str, isHtml); -return dirResetIfNeeded(str, BidiUtils.get().estimateDirection(str), false, -true); +return dirResetIfNeeded(str, directionEstimator.estimateDirection(str), +false, true); + } + + public void setDirectionEstimator(DirectionEstimator directionEstimator) { +this.directionEstimator = directionEstimator; } /** @@ -407,12 +417,13 @@ * @return Input string after applying the above processing. */ public String spanWrap(String str, boolean isHtml, boolean dirReset) { -Direction dir = BidiUtils.get().estimateDirection(str, isHtml); +Direction dir = directionEstimator.estimateDirection(str, isHtml); return spanWrapWithKnownDir(dir, str, isHtml, dirReset); } /** - * Like {...@link #spanWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)}, + * Like + * {...@link #spanWrapWithKnownDir(com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)}, * but assumes {...@code isHtml} is false and {...@code dirReset} is true. * * @param dir {...@code str}'s direction @@ -424,7 +435,8 @@ } /** - * Like {...@link #spanWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)}, + * Like + * {...@link #spanWrapWithKnownDir(com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)}, * but assumes {...@code dirReset} is true. * * @param dir {...@code str}'s direction @@ -543,12 +555,13 @@ * @return Input string after applying the above processing. */ public String unicodeWrap(String str, boolean isHtml, boolean dirReset) { -Direction dir = BidiUtils.get().estimateDirection(str, isHtml); +Direction dir = directionEstimator.estimateDirection(str, isHtml); return unicodeWrapWithKnownDir(dir, str, isHtml, dirReset); } /** - * Like {...@link #unicodeWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)}, + * Like + * {...@link #unicodeWrapWithKnownDir(com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)}, * but assumes {...@code isHtml} is false and {...@code dirReset} is true. * * @param dir {...@code str}'s direction @@ -560,7 +573,8 @@ } /** - * Like {...@link #unicodeWrapWithKnownDir(HasDirection.Direction, String, boolean, boolean)}, + * Like + * {...@link #unicodeWrapWithKnownDir(com.google.gwt.i18n.client.HasDirection.Direction, String, boolean, boolean)}, * but assumes {...@code d
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
On Mon, Nov 15, 2010 at 1:08 PM, Hilco Wijbenga wrote: > In 1.8.0, it doesn't seem to affect older Ants (I just ran the build > with 1.7.0). > > On a side note, I'm not clear why we can't mandate a particular Ant > version. Ant 1.8.1 still works with JDK1.4 so no issues there. It's a > best practice to provide the tools with the build where possible so we > could even do that. Even if people would want to run an older Ant, > they could still use GWT's Ant (whatever version it might be) for > their GWT code (i.e. their Ant build could call a separate Ant build > for the GWT parts). Why do we need to support older Ants? It's not > like GWT works with JDK1.4. Especially on Linux distros, many of the ones still in regular use don't have newer ants available by default. If there is a good reason to require an upgrade we can do that, but absent a good reason we shouldn't require manually installing packages on those distros. > By the way, are you sure the build works with 1.6.5? I just tried it > (without my changes) and I get I will double check, but I believe one of the internal build systems still uses 1.6.5, though it might have been upgraded. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
The contributing code doc lists Ant 1.7.0 as a minimum to build. http://code.google.com/webtoolkit/makinggwtbetter.html#contributingcode On Nov 15, 12:08 pm, Hilco Wijbenga wrote: > On 15 November 2010 09:37, John Tamplin wrote: > > > > > On Mon, Nov 15, 2010 at 12:30 PM, Hilco Wijbenga > > wrote: > >> Seehttp://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-se... > >> for more details. > > >> In short, by default Ant includes its own JARs on 's classpath. > >> This means the effective classpath depends on where the build is being > >> run. (I.e. it depends on what version of Ant you're running, which > >> extra JARs you've added, etcetera.) This means the build result will > >> most likely be different on different machines. To guarantee a > >> repeatable build, the build should set the classpath, not Ant. By > >> adding includeantruntime="false" we say that *we* will take care of > >> the classpath and that Ant should not just dump everything there. > > >> It's like saying "no" to global variables. :-) > > > When was that attribute added? We still have people using ant 1.6.5, > > so if older ants will fail we can't add that attribute. > > In 1.8.0, it doesn't seem to affect older Ants (I just ran the build > with 1.7.0). > > On a side note, I'm not clear why we can't mandate a particular Ant > version. Ant 1.8.1 still works with JDK1.4 so no issues there. It's a > best practice to provide the tools with the build where possible so we > could even do that. Even if people would want to run an older Ant, > they could still use GWT's Ant (whatever version it might be) for > their GWT code (i.e. their Ant build could call a separate Ant build > for the GWT parts). Why do we need to support older Ants? It's not > like GWT works with JDK1.4. > > By the way, are you sure the build works with 1.6.5? I just tried it > (without my changes) and I get > > Buildfile: build.xml > > BUILD FAILED > java.lang.NoSuchFieldError: fFeatures > at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source) > at > org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown > Source) > at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown > Source) > at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown > Source) > at org.apache.xerces.parsers.SAXParser.(Unknown Source) > at org.apache.xerces.parsers.SAXParser.(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source) > at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown > Source) > at > org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:205) > at > org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163) > at > org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193) > at > org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140) > at > org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91) > at org.apache.tools.ant.Main.runBuild(Main.java:653) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) > > Total time: 0 seconds > java.lang.NoSuchFieldError: fFeatures > at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at java.lang.Class.newInstance0(Class.java:355) > at java.lang.Class.newInstance(Class.java:308) > at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source) > at > org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown > Source) > at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown > Source) > at org.apache.xerce
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
On 15 November 2010 09:37, John Tamplin wrote: > On Mon, Nov 15, 2010 at 12:30 PM, Hilco Wijbenga > wrote: >> See >> http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html >> for more details. >> >> In short, by default Ant includes its own JARs on 's classpath. >> This means the effective classpath depends on where the build is being >> run. (I.e. it depends on what version of Ant you're running, which >> extra JARs you've added, etcetera.) This means the build result will >> most likely be different on different machines. To guarantee a >> repeatable build, the build should set the classpath, not Ant. By >> adding includeantruntime="false" we say that *we* will take care of >> the classpath and that Ant should not just dump everything there. >> >> It's like saying "no" to global variables. :-) > > When was that attribute added? We still have people using ant 1.6.5, > so if older ants will fail we can't add that attribute. In 1.8.0, it doesn't seem to affect older Ants (I just ran the build with 1.7.0). On a side note, I'm not clear why we can't mandate a particular Ant version. Ant 1.8.1 still works with JDK1.4 so no issues there. It's a best practice to provide the tools with the build where possible so we could even do that. Even if people would want to run an older Ant, they could still use GWT's Ant (whatever version it might be) for their GWT code (i.e. their Ant build could call a separate Ant build for the GWT parts). Why do we need to support older Ants? It's not like GWT works with JDK1.4. By the way, are you sure the build works with 1.6.5? I just tried it (without my changes) and I get Buildfile: build.xml BUILD FAILED java.lang.NoSuchFieldError: fFeatures at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.SAXParser.(Unknown Source) at org.apache.xerces.parsers.SAXParser.(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:205) at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:163) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:193) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140) at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91) at org.apache.tools.ant.Main.runBuild(Main.java:653) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) Total time: 0 seconds java.lang.NoSuchFieldError: fFeatures at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.SAXParser.(Unknown Source) at org.apache.xerces.parsers.SAXParser.(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at org.apache.tools.ant
[gwt-contrib] [google-web-toolkit] r9226 committed - Edited wiki page UnderstandingMemoryLeaks through web user interface.
Revision: 9226 Author: j...@google.com Date: Mon Nov 15 09:38:43 2010 Log: Edited wiki page UnderstandingMemoryLeaks through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9226 Modified: /wiki/UnderstandingMemoryLeaks.wiki === --- /wiki/UnderstandingMemoryLeaks.wiki Mon Nov 15 09:34:58 2010 +++ /wiki/UnderstandingMemoryLeaks.wiki Mon Nov 15 09:38:43 2010 @@ -1,3 +1,5 @@ +_DomEventsAndMemoryLeaks is an older article with a bit more background on the underlying leak-prevention strategy._ + There are two basic kinds of memory leaks: * Java-esque leaks: Objects that are unintentionally reachable, often in maps and lists. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9225 committed - Edited wiki page DomEventsAndMemoryLeaks through web user interface.
Revision: 9225 Author: j...@google.com Date: Mon Nov 15 09:37:23 2010 Log: Edited wiki page DomEventsAndMemoryLeaks through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9225 Modified: /wiki/DomEventsAndMemoryLeaks.wiki === --- /wiki/DomEventsAndMemoryLeaks.wiki Wed Mar 5 15:40:08 2008 +++ /wiki/DomEventsAndMemoryLeaks.wiki Mon Nov 15 09:37:23 2010 @@ -1,9 +1,6 @@ #summary An explanation of DOM events, memory leaks, and how GWT handles both. - -= DOM Events, Memory Leaks, and You = - -Joel Webber +_This article is a bit old (but still correct). I've added a more recent writeup at UnderstandingMemoryLeaks, with a bit more advice on dealing with these issues in practice._ You may ask yourself, "Why do I have to use bitfields to sink DOM events?", and you may ask yourself, "Why can I not add event listeners directly to elements?". If you find yourself asking these questions, it's probably time to dig into the murky depths of DOM events and memory leaks. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: protected com.google.gwt.user.client.ui.Widget.addHandler(H, Type)
sounds reasonable, thanks. But it seems like the Widget is indeed capable of firing "anonymous" events, because of the public fireEvent() method defined in the HasHandlers interface - so its a little confusing if I can fire any event from external code on a Widget but can only add handlers for customized events in its subclasses, I think the contract between fireEvent() and addEventHandler() would match if both were protected or public. In my usecase I would be able fire a WidgetScannedEvent() from external code (WidgetScanner) ( due to the public fireEvent() on the Widget ) regardless if its a Button, a Label or a TextBox, but unfortunately I cannot handle that event at a Widget level. On 10 Nov., 16:41, Joel Webber wrote: > The point of that method being protected is that under normal circumstances > you don't want to be able to add handlers to a widget that's not capable of > firing them in the first place. So a widget subclass creates > addFooHandler(), then uses this method internally. > > Are you saying you want to add a custom event handler to a widget, then > force that widget to fire the event from external code? Sounds like it wants > to be a subclass. > > Le 9 novembre 2010 01:56, cokol a écrit : > > > why is com.google.gwt.user.client.ui.Widget.addHandler(H, Type) > > protected? in case I want to fire a custom event on a widget so that > > the widget is not aware of custom event handler, it makes it difficult > > to manage. > > > thanks > > > -- > >http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
On Mon, Nov 15, 2010 at 12:30 PM, Hilco Wijbenga wrote: > See > http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html > for more details. > > In short, by default Ant includes its own JARs on 's classpath. > This means the effective classpath depends on where the build is being > run. (I.e. it depends on what version of Ant you're running, which > extra JARs you've added, etcetera.) This means the build result will > most likely be different on different machines. To guarantee a > repeatable build, the build should set the classpath, not Ant. By > adding includeantruntime="false" we say that *we* will take care of > the classpath and that Ant should not just dump everything there. > > It's like saying "no" to global variables. :-) When was that attribute added? We still have people using ant 1.6.5, so if older ants will fail we can't add that attribute. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9224 committed - Created wiki page through web user interface.
Revision: 9224 Author: j...@google.com Date: Mon Nov 15 09:34:58 2010 Log: Created wiki page through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9224 Added: /wiki/UnderstandingMemoryLeaks.wiki === --- /dev/null +++ /wiki/UnderstandingMemoryLeaks.wiki Mon Nov 15 09:34:58 2010 @@ -0,0 +1,68 @@ +There are two basic kinds of memory leaks: + + * Java-esque leaks: Objects that are unintentionally reachable, often in maps and lists. + * IE-esque honest-to-god leaks: Objects that will never get collected because they've run afoul of a design flaw in IE (and some old versions of other browsers). + +*Java-esque Leaks* + +You can actually analyze the first case using standard Java tools in dev mode. They won't correctly tell you the *amount* of memory leaked, but they will tell you which objects are leaked, which is often quite illuminating. The actual amount of memory leaked in the browser should be proportional to the amount leaked in the JVM for "normal" objects; but for native/dom objects it can be quite different. Again, it's important to note that these aren't actually "leaks" in the C/malloc sense of the word -- they'll eventually get cleaned up, but could hang around longer than you want them to. + +*IE Leaks* + +Now we get to IE leaks (I refer to them as IE leaks because they're a very specific variety that only happen in IE, though to be fair they could occur in antediluvian versions of Mozilla). These are leaks that follow a very specific pattern (detailed in the references below) involving a circular reference between a Javascript object and a native COM object (DOM elements, XHR, XML elements, et al). To be very clear, no other circular ref will do -- it must involve one object of each type (again, see the references below for details). + +As covered in detail on the GWT wiki (see below), the core GWT widget system has a very specific event-handling system that makes it impossible to trigger an IE leak, as long as you don't go straight to JSNI and hook up event handlers yourself (using things like Event.sinkEvents() is just fine). The same goes for built-ins like XHR/RequestBuilder, Timer, Window events, and the like. + +*"Leaks" on Other Browsers* + +Any remotely recent version of WebKit (Chrome, Safari, et al) or Gecko (Firefox) does not leak memory in the same way that IE does. They can, however, exhibit slightly different behavior when cleaning up circular references between native and Javascript objects. I can't speak to precisely what Firefox does, but Chrome's generational garbage collector won't collect objects involved in these references until it does a "major compaction". This happens less frequently than early-generation collections, so you may find native objects hanging around a bit longer than you'd expect. + +*Observing Memory Usage* + +First, let's start with the assumption that you're looking at memory in Task Manager (or Process Explorer). What you'll typically see is that, even in a reasonably-behaved web app, memory will increase to a point, then stabilize. If you're refreshing the app, you'll also typically see the memory appear to increase slowly over time -- but if you do it long enough, it will eventually drop back down, usually to a higher point than where it started, but stable. There's also a subtly confusing behavior when you minimize the browser window -- memory will drop to a very low level, then increase rapidly once you restore the window. The important thing to keep in mind here is that memory usage naturally fluctuates, and watching it increase over a single refresh is not sufficient to prove a leak. In a true leak situation, memory usage will increase without bound, and it takes some time to prove that. + +*IE8 Caveat* + +Observing memory usage on IE8 is a bit trickier. It appears to be allocating memory for a given instance of a page in a pool, which it then dumps on unload. This means that all of an app's memory will be freed when you close or refresh it. So if you want to find leaks on IE8, you need to watch its usage *while it's running*, which can take some time. + +*Exacerbating Factors* + +Ok, so why am I seeing gobs of memory wasted on IE? Often it's the case that your app isn't actually leaking memory on IE, but simply consuming a lot more than on other browsers. The most common cause I've run into has been DirectX filters, usually when trying to hack CSS opacity support. Whenever you see a CSS property that starts with "filter:", whether it be "filter:opacity(...)" or "filter:progid:DXImageTransform..." and so forth, you're using a DirectX filter. These little beasts can use a *lot* of memory, because they all seem to allocate an additional offscreen buffer for every element they're applied to. + +My advice? Get rid of them. Accept that your app won't be as pretty in
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
On 15 November 2010 08:27, wrote: > Can you explain the problem this is fixing? See http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html for more details. In short, by default Ant includes its own JARs on 's classpath. This means the effective classpath depends on where the build is being run. (I.e. it depends on what version of Ant you're running, which extra JARs you've added, etcetera.) This means the build result will most likely be different on different machines. To guarantee a repeatable build, the build should set the classpath, not Ant. By adding includeantruntime="false" we say that *we* will take care of the classpath and that Ant should not just dump everything there. It's like saying "no" to global variables. :-) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r9223 committed - Edited wiki page RequestFactory_2_1_1 through web user interface.
Revision: 9223 Author: b...@google.com Date: Mon Nov 15 09:22:36 2010 Log: Edited wiki page RequestFactory_2_1_1 through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=9223 Modified: /wiki/RequestFactory_2_1_1.wiki === --- /wiki/RequestFactory_2_1_1.wiki Mon Nov 8 10:58:24 2010 +++ /wiki/RequestFactory_2_1_1.wiki Mon Nov 15 09:22:36 2010 @@ -19,13 +19,12 @@ Stuff not yet published: * (Issue 5522, issue 5357) Value types / Embedded objects * A user-defined value object must extend the empty ValueProxy interface and declare a @ProxyFor annotation. - * This intentionally prevents the VP from being passed into RequestContext.edit(): * ValueProxy instances are never sparse and will implement equals() and hashCode() based on the values in the proxy. * The VP will include the ids for any referenced EntityProxy fields, but will not force data for the referenced EP's to be returned unless there's a with() clause in play. * A ValueProxy returned from an immutable EntityProxy is immutable. The EntityProxy must be placed into an editable mode via the usual RequestContext.edit() before you can make a call like entityProxy.getValue().setFoo("bar"). -* A VP returned from a service method invocation is mutable, since mutating it wouldn't be expected to alter the state of any EntityProxy. - * The sometimes-mutable nature of a VP is slightly confusing, but it can be resolved by asking: Did I get the ValueProxy from a getter or an onSuccess()? -* A new "Proxy" interface will be added as a superclass of ValueProxy and EntityProxy to allow `RequestFactory.create` to operate on both value and entity types. +* A VP returned from a service method invocation is immutable. + * A new RequestContext.edit() overload will be added to support `valueObject.getEntityProxy().setFoo(42)`. If it were possible to place a `ValueProxy` into an editable mode without a reference to a `RequestContext`, it would be impossible for the mutable `ValueProxy` to guarantee that its `EntityProxy` getters could return mutable objects. +* A new "BaseProxy" interface will be added as a superclass of ValueProxy and EntityProxy to allow `RequestFactory.create` to operate on both value and entity types. * Because ValueProxy doesn't have a stableId() method, there's no way to use a VP with a call to find() or with any other service method that has an EntityProxyId argument. * If you think about a Date object, there's no real meaning in giving a Date an id. * If an EntityProxy has a value property, all of the properties of the VP are checked for mutations and sent to the server. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
On Mon, Nov 15, 2010 at 11:42 AM, TedM wrote: > The current implementation has the following functionality > > 1. dynamic forms > 2. dynamic workflow > 3. submission of form data > 4. submission of attachments > 5. client and server validation > > And UI editor on the way. > > But the current implementation is a project that I'm the architect > for. The prototype I put on Google App Engine is a Prototype based on > a prototype that I used to sell the idea to my company. > > To open source this, I would like to do it in the following order. > 1. Schedule a meeting with you Google guys the first or second week of > December > 2. Draw up my designs and clean up my prototype. > 3. Then I'll meet with you guys so I can get my design and vision > aligned with yours. > 4. Then I'll build it to your vision > > What do you think? This is just a general comment from me personally -- I recognize that there are times that you need dynamic functionality, but realize that you pay a significant cost for it. Typical structures used to handle dynamic content don't optimize well, and the compiler is unable to remove a lot of code because it might be used depending on the data received from the server. Personally, when you can get away with it, you are much better off either generating static code from dynamic data (which of course means recompiling your app) or rendering the dynamic parts on the server. I don't know if either of those are feasible for your use case. Just because something is expensive doesn't meant it shouldn't be in GWT -- if what you need to do is expensive, that doesn't change the fact that you still need to do it. However, it would need to be done in a way so that most people, who do not actually need that functionality, do not wind up using it by mistake or paying the cost because some library they use does. An example is reflection -- it would be possible to implement reflection in GWT, but the problem is that then almost all of the useful optimizations the compiler does goes away. You can never remove a method that isn't referenced (including after inlining it where you can) because there might be a reflective call to it, you can no longer tighten argument types based on the callsites, etc. So, rather than promoting functionality that people definitely want but encourages them to write code that compiles poorly, we chose to leave out reflection. -- John A. Tamplin Software Engineer (GWT), Google -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Thanks Christian, I just started a dialog with Chris Conroy. Hopefully it will be fruitful. Based on the feed back I'm getting this is a very common problem. I'm hopeful, I get to do this and get to do it in alignment with the GWT vision. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
The current implementation has the following functionality 1. dynamic forms 2. dynamic workflow 3. submission of form data 4. submission of attachments 5. client and server validation And UI editor on the way. But the current implementation is a project that I'm the architect for. The prototype I put on Google App Engine is a Prototype based on a prototype that I used to sell the idea to my company. To open source this, I would like to do it in the following order. 1. Schedule a meeting with you Google guys the first or second week of December 2. Draw up my designs and clean up my prototype. 3. Then I'll meet with you guys so I can get my design and vision aligned with yours. 4. Then I'll build it to your vision What do you think? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
> > 3. They think it doesn't have value. I would change this to either 1- It's out of the scope of GWT at the moment or 2- They have other priorities and can't get it in the roadmap yet. Do you know how I can get in contact with someone from GWT? I think you're at the right place, just be patient :D Btw, just to tell that I'm also interested in something like that as I will have to design one soon for my own projects. Cheers, On Sun, Nov 14, 2010 at 9:08 PM, TedM wrote: > > Thanks, > > I wasn't thinking in the line of GWTDesigner. The problem that I'm > solving at work is related to dynamic form definition. I want my > business user to be able to define forms and send them out, without > compiling and without things software installed on their locals. I'm > going to make a UI that plays through the browser (using GWT) that > will allow a non-technical person to design these forms. > > personally think this idea would be a great addition to GWT, but I > don't want to start writing the OS version until I can talk to a GWT > or incubator guy. > > The out comes of that talk will be one of the following. > 1. They like the idea, and maybe I can bounce my architectural ideas > off them and then I build it with there input. > 2. They already have this on their road map and don't need my help > 3. They think it doesn't have value. > > Do you know how I can get in contact with someone from GWT? > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- Christian Goudreau www.arcbees.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Patch for Issue 5588: Fix Ant warning about includeantruntime not being set (issue1105801)
Can you explain the problem this is fixing? http://gwt-code-reviews.appspot.com/1105801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Would GWT and/or incubator be interested in Run Time UiBinding
Ted, this is the right list for this sort of thing. I can't speak to the specifics of your project at the moment--though you'd probably get a better response if you included a design doc and/or code. On Sun, Nov 14, 2010 at 9:08 PM, TedM wrote: > > Thanks, > > I wasn't thinking in the line of GWTDesigner. The problem that I'm > solving at work is related to dynamic form definition. I want my > business user to be able to define forms and send them out, without > compiling and without things software installed on their locals. I'm > going to make a UI that plays through the browser (using GWT) that > will allow a non-technical person to design these forms. > > personally think this idea would be a great addition to GWT, but I > don't want to start writing the OS version until I can talk to a GWT > or incubator guy. > > The out comes of that talk will be one of the following. > 1. They like the idea, and maybe I can bounce my architectural ideas > off them and then I build it with there input. > 2. They already have this on their road map and don't need my help > 3. They think it doesn't have value. > > Do you know how I can get in contact with someone from GWT? > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add support for RpcTokens, which, if set, are sent with each RPCRequest to (issue1107801)
You have line length issues in various places. http://gwt-code-reviews.appspot.com/1107801/diff/1/7 File user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/1/7#newcode52 user/src/com/google/gwt/user/client/rpc/impl/AbstractSerializationStream.java:52: public static final int SERIALIZATION_STREAM_MIN_VERSION = 5; I think the version number needs to be bumped, since I don't believe the implementation fails if any unknown flag bits are set. To avoid having to bump the version in similar cases in the future, it should probably check if any unknown flags values are set and fail the same was as a protocol version mismatch. However, I remember complications when Dan Rice increased the version number for changing the long representation, so we should look back over those and see if we can avoid the problems. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4002 File user/src/com/google/gwt/user/client/rpc/RpcToken.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4002#newcode37 user/src/com/google/gwt/user/client/rpc/RpcToken.java:37: public @interface Class { Since usually people will have this imported, I would prefer a better name - @Class on an interface isn't going to be clear what it refers to. How about @RpcTokenImplementation? http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008 File user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode170 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:170: String methodName, RpcStatsContext statsContext, AsyncCallback callback, Line length > 80. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode172 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:172: this(streamFactory, methodName, statsContext, callback, null, responseReader); Line length > 80. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4008#newcode230 user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java:230: } else if (tokenExceptionHandler != null && caught instanceof RpcTokenException) { Line length. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009 File user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode189 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:189: stob.addRootType(logger, rteType); Should this be conditional on finding an RpcToken subtype? http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode497 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:497: // setRpcToken() Should this check instead be done at setRpcToken time? Perhaps have setRpcToken call protected boolean checkRpcTokenType(RpcToken) which by default returns true, and generate a check there? I know I previously said over chat that a cast was fine, but thinking about it more I think we need a better error here. So, I think you want an instanceof check and then throw an exception with more details about the problem. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode593 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:593: returnStatement.append("return new " + FailingRequestBuilder.class.getName() + "(" If you are going to use a StringBuffer here, don't mix regular + -- use append to add the pieces together. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4009#newcode605 user/src/com/google/gwt/user/rebind/rpc/ProxyCreator.java:605: w.println("} catch(ClassCastException " + exceptionName + " ) {"); I think if the RpcToken type is checked at setRpcToken time, all of these changes aren't needed, right? http://gwt-code-reviews.appspot.com/1107801/diff/3001/4010 File user/src/com/google/gwt/user/server/rpc/HybridServiceServlet.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4010#newcode137 user/src/com/google/gwt/user/server/rpc/HybridServiceServlet.java:137: log("An RpcTokenException was thrown while processing this call.", tokenException); Line length. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4018 File user/test/com/google/gwt/user/client/rpc/RpcTokenTest.java (right): http://gwt-code-reviews.appspot.com/1107801/diff/3001/4018#newcode67 user/test/com/google/gwt/user/client/rpc/RpcTokenTest.java:67: fail(); Should include the exception to help debugging a failure just from the logs. http://gwt-code-reviews.appspot.com/1107801/diff/3001/4018#newcode133 user/test/com/google/gwt/user/client/rpc/RpcTokenTest.java:133: ((ServiceDefTarget) service).setRpcToken(token); As mentioned earlier, it really seems like this error should be caught here, rather than when the service is actually called. http://gwt-code-reviews.appspot.com/1107801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: First-pass for adding HTML5's Canvas. (issue1082801)
http://gwt-code-reviews.appspot.com/1082801/diff/1/10 File user/src/com/google/gwt/html5/canvas/client/CssColor.java (right): http://gwt-code-reviews.appspot.com/1082801/diff/1/10#newcode23 user/src/com/google/gwt/html5/canvas/client/CssColor.java:23: public class CssColor implements IsFillStyle, IsStrokeStyle { On 2010/11/10 20:01:31, tbroyer wrote: On 2010/11/10 18:04:03, pdr wrote: > > The root problem is that we are adding types to a spec specifically designed to > return "any" type. I think that throwing a cast exception is the correct > behavior. WebIDL maps "any" to Object in its Java bindings, and you'd use "instanceof" to know which object you actually have. In JS you'd use feature detection or "instanceof" to know what you're dealing with. In GWT, it's not possible to use "instanceof" as you cannot disambiguate JSOs (pattern and gradient). That's why I ended proposing either a union-type or using Object (but providing is() helpers in the pattern and gradient types). That'd lead to code such as: StrokeStyle savedStrokeStyle = canvas.getStrokeStyle(); // restore previously saved style: canvas.setStrokeStyle(savedStrokeStyle); // what am I dealing with? String color = savedStrokeStyle.isCssColor(); if (color == null) { CanvasGradient gradient = savedStrokeStyle.isGradient(); if (gradient != null) { ... } } or: Object savedStrokeStyle = canvas.getStrokeStyle(); // restore previously saved style: er... accept Object? //canvas.setStrokeStyle(savedStrokeStyle); // copying between canvas could be made easy though: canvas.copyStrokeStyle(otherCanvas); // what am I dealing with? if (savedStrokeStyle instanceof String) { String color = (String) savedStrokeStyle; ... } else if (CanvasGradient.is(savedStrokeStyle)) { CanvasGradient gradient = (CanvasGradient) savedStrokeStyle; ... } else if (CanvasPattern.is(savedStrokeStyle)) { ... } The union type feels and looks better, IMO. What I don't really like is the special-cased CssColor type, and additional wrapping, which wouldn't be necessary with either approach above (a union-type could be implemented as JSO, with a special-cased DevMode to be able to "turn a string into a JSO": http://timepedia.blogspot.com/2009/04/gwts-type-system-is-more-powerful-than.html ; the overhead would only be in DevMode, web mode would look like exactly as you'd have done in "plain old JS") The new implementation (FillStrokeStyle, CssColor, CanvasGradient, CanvasPattern) are now all JSOs. All of the isScript checks are a little messy, so I will probably switch everything to use supersource. http://gwt-code-reviews.appspot.com/1082801/diff/24001/25007 File user/src/com/google/gwt/html5/canvas/client/CanvasPixelArray.java (right): http://gwt-code-reviews.appspot.com/1082801/diff/24001/25007#newcode32 user/src/com/google/gwt/html5/canvas/client/CanvasPixelArray.java:32: public class CanvasPixelArray extends JavaScriptObject { On 2010/11/10 21:00:02, jlabanca wrote: Per the spec, CanvasPixelArray should have getLength(). http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dfnReturnLink-0 "The CanvasPixelArray object thus represents h×w×4 integers. The length attribute of a CanvasPixelArray object must return this number." Done. http://gwt-code-reviews.appspot.com/1082801/diff/24001/25009 File user/src/com/google/gwt/html5/canvas/client/Context2d.java (right): http://gwt-code-reviews.appspot.com/1082801/diff/24001/25009#newcode226 user/src/com/google/gwt/html5/canvas/client/Context2d.java:226: boolean anticlockwise) /*-{ On 2010/11/11 02:02:45, tbroyer wrote: On 2010/11/10 21:00:02, jlabanca wrote: > It looks like the spec says its optional: > http://www.whatwg.org/specs/web-apps/current-work/complete/the-canvas-element.html#canvas-context-2d And if you want the W3C spec: http://www.w3.org/TR/2dcontext/#canvasrenderingcontext2d Done. http://gwt-code-reviews.appspot.com/1082801/diff/24001/25010 File user/src/com/google/gwt/html5/canvas/client/CssColor.java (right): http://gwt-code-reviews.appspot.com/1082801/diff/24001/25010#newcode64 user/src/com/google/gwt/html5/canvas/client/CssColor.java:64: public String asString() { On 2010/11/10 21:00:02, jlabanca wrote: JavaDoc Done. http://gwt-code-reviews.appspot.com/1082801/diff/24001/25011 File user/src/com/google/gwt/html5/canvas/client/ImageData.java (right): http://gwt-code-reviews.appspot.com/1082801/diff/24001/25011#newcode29 user/src/com/google/gwt/html5/canvas/client/ImageData.java:29: public class ImageData extends JavaScriptObject { On 2010/11/10 21:00:02, jlabanca wrote: I think you mentioned added convienence methods to get the rgba values at a specified row/column index. I think we should add those methods because the structore of CanvasPixelArray isn't obvious. int getRedPixelAt(int row, int column) { return gwtData()[row *
[gwt-contrib] Re: Switching CellList to trigger selection on click instead of mousedown. Selection causes the cell... (issue1102801)
committed as r9220 http://gwt-code-reviews.appspot.com/1102801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Issues 5479, 5507 and 5571 (and a few other editor-related tweaks) (issue1099801)
The 3rd patch set adds tests, UiBinder element parsers for DateLabel and NumberLabel, and the ToggleButton (issue 5571) which I forgot in previous patches. I found some issues with generics in UiBinder and had to relax a check in UiBinderParser (but I believe this is taken care of later on, see the comment in the code, and comments below). In case you fear this delays things too much for the 2.1.1 release; it's possible to split this patch into subparts: 1. everything except ValueLabel et al. (straightforward) 2. ValueLabel and the DateLabel and NumberLabel subclasses (without UiBinder support) 3. UiBinder parsers for DateLabel and NumberLabel 4. UiBinder fix for generics (so ValueLabel's @UiConstructor can be used) http://gwt-code-reviews.appspot.com/1099801/diff/26001/27006 File user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java (right): http://gwt-code-reviews.appspot.com/1099801/diff/26001/27006#newcode267 user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java:267: // Type matching will be checked by UiBinderWriter#maybeWriteFieldSetter This was causing errors with ValueLabel's DoubleRenderer in the UiBinderTest: resourceType were the JGenericType Renderer whereas ownerField's type were either a JRawType or JParameterizedType. There's actually a more subtle issue within BeanParser which prevents using because the uiField's type for the ValueLabel is ValueLabel (which accepts a Renderer argument in its ctor) but the ownerFieldClass is the JGenericType ValueLabel (expecting a Renderer). I tried changing the ownerFieldClass to uiField.getType() (when uiField is not null *and* its getType().getRawType() is more specific than the 'type' –otherwise the fails on the text="" attribute because the uiField's type is Widget) but it then fails because the JParameterizedClass renames constructor's argument to "arg0". Overall, there's some improvements needed around generics. http://gwt-code-reviews.appspot.com/1099801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors