[gwt-contrib] Public: Move the validation metadata classes to client/metadata. (issue773801)

2010-08-17 Thread nchalko

Reviewers: robertvawter,

Description:
Public: Move the validation metadata classes to client/metadata.


Please review this at http://gwt-code-reviews.appspot.com/773801/show

Affected files:
  A  
user/src/com/google/gwt/validation/client/metadata/ConstraintDescriptorImpl.java
  D  
user/src/com/google/gwt/validation/metadata/ConstraintDescriptorImpl.java



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Public: Move the validation metadata classes to client/metadata. (issue773801)

2010-08-17 Thread bobv

LGTM

http://gwt-code-reviews.appspot.com/773801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Public: Start of a sample application showing GWT validation. (issue760802)

2010-08-17 Thread nchalko

Reviewers: robertvater_google.com,

Description:
Public: Start of a sample application showing GWT validation.


Please review this at http://gwt-code-reviews.appspot.com/760802/show

Affected files:
  A eclipse/samples/Validation/.checkstyle
  A eclipse/samples/Validation/.classpath
  A eclipse/samples/Validation/.project
  A eclipse/samples/Validation/Validation-gwtc.launch
  A eclipse/samples/Validation/Validation.launch
  M eclipse/user/.classpath
  M samples/build.xml
  A samples/validation/build.xml
  A samples/validation/src/com/google/gwt/sample/validation/COPYING
  A  
samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml
  A  
samples/validation/src/com/google/gwt/sample/validation/client/GreetingService.java
  A  
samples/validation/src/com/google/gwt/sample/validation/client/GreetingServiceAsync.java
  A  
samples/validation/src/com/google/gwt/sample/validation/client/Validation.java
  A  
samples/validation/src/com/google/gwt/sample/validation/server/GreetingServiceImpl.java
  A  
samples/validation/src/com/google/gwt/sample/validation/shared/Person.java

  A samples/validation/war/Validation.css
  A samples/validation/war/Validation.html
  A samples/validation/war/WEB-INF/classes/marker
  A samples/validation/war/WEB-INF/web.xml


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8550 committed - Change to CompilationStateBuilder to prevent recursive invalidation on...

2010-08-17 Thread codesite-noreply

Revision: 8550
Author: gwt.mirror...@gmail.com
Date: Tue Aug 17 08:19:27 2010
Log: Change to CompilationStateBuilder to prevent recursive invalidation on  
changed units.


Previously, changing any unit would not only force that unit to be  
recompiled, but we would then transitively invalidate any units depending  
on that unit.  So changing one file could result in hundreds of invalidated  
units.


With this change, we only recompile referrers when a unit changes  
*structurally*.  That is, when its API changes.  This means that a simple  
code change to a unit will only recompile that unit, and API changes  
generally won't go beyond direct referrers.


Patch by: kplatfoot, me
Review by: me, kplatfoot
Review at http://gwt-code-reviews.appspot.com/756802

http://code.google.com/p/google-web-toolkit/source/detail?r=8550

Added:
 /trunk/dev/core/src/com/google/gwt/dev/javac/Dependencies.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitImpl.java
  
/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java

 /trunk/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/SourceFileCompilationUnit.java
 /trunk/dev/core/src/com/google/gwt/dev/util/Util.java
 /trunk/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java
 /trunk/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
  
/trunk/dev/core/test/com/google/gwt/dev/javac/CompilationUnitFileReferenceTest.java


===
--- /dev/null
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/Dependencies.java	Tue Aug  
17 08:19:27 2010

@@ -0,0 +1,184 @@
+/*
+ * 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.dev.javac;
+
+import com.google.gwt.dev.util.collect.HashMap;
+import com.google.gwt.dev.util.collect.Lists;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+/**
+ * Tracks dependencies from a {...@link CompilationUnit} to {...@link  
CompiledClass

+ * CompiledClasses}.
+ */
+class Dependencies {
+  Map qualified = new HashMapCompiledClass>();

+  Map simple = new HashMap();
+  private final String myPackage;
+  private List unresolvedQualified;
+  private List unresolvedSimple;
+
+  Dependencies() {
+this.myPackage = "";
+  }
+
+  /**
+   * Initializes the set of simple and qualified dependency names, but  
does not

+   * resolve them.
+   */
+  Dependencies(String myPackage, List unresolvedQualified,
+  List unresolvedSimple) {
+this.myPackage = (myPackage.length() == 0) ? "" : (myPackage + '.');
+this.unresolvedQualified = unresolvedQualified;
+this.unresolvedSimple = unresolvedSimple;
+  }
+
+  /**
+   * Returns the list of deps that cannot be resolved at all.
+   */
+  List findMissingDeps(Set allValidClasses) {
+List result = Lists.create();
+for (Entry entry : qualified.entrySet()) {
+  String sourceName = entry.getKey();
+  boolean expected = entry.getValue() != null;
+  boolean actual = allValidClasses.contains(sourceName);
+  if (expected != actual) {
+result = Lists.add(result, sourceName);
+  }
+}
+for (Entry entry : simple.entrySet()) {
+  String sourceName = entry.getKey();
+  boolean expected = entry.getValue() != null;
+  boolean actual = allValidClasses.contains(myPackage + sourceName)
+  || allValidClasses.contains("java.lang." + sourceName);
+  if (expected != actual) {
+result = Lists.add(result, sourceName);
+  }
+}
+return result;
+  }
+
+  /**
+   * Resolves unqualified dependencies against the global list of all valid
+   * classes. Must be called before {...@link #validate(String, Map, Map)}.
+   */
+  void resolve(Map allValidClasses) {
+for (String ref : unresolvedQualified) {
+  CompiledClass cc = allValidClasses.get(ref);
+  qualified.put(ref, cc);
+}
+
+for (String ref : unresolvedSimple) {
+  CompiledClass

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
OK, I don't get how exit() being private works.  If we think about the
scenario where we have child resources to create after we get the
"real" id from the server, how are we suppose to save those child
resources?  Not to mention that I don't really care for showing the
"details" place in every case.

There is a bug opened about this already:

http://code.google.com/p/google-web-toolkit/issues/detail?id=5160

just added my star

On Fri, Aug 13, 2010 at 1:50 PM,   wrote:
> Okay, Rayc, this is ready for review.
>
> On 2010/08/13 17:43:18, Ray Ryan wrote:
>
>
>
>
> http://gwt-code-reviews.appspot.com/717801/show
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Continuation of r8542 to actually properly enables double click for (issue774801)

2010-08-17 Thread fredsa

Reviewers: jgw,

Description:
Continuation of r8542 to actually properly enables double click for
- com/google/gwt/user/client/ui/FocusWidget.java
- com/google/gwt/user/client/ui/HTMLTable.java
- com/google/gwt/user/client/ui/Hyperlink.java
- com/google/gwt/user/client/ui/Image.java
- com/google/gwt/user/client/ui/Label.java


Please review this at http://gwt-code-reviews.appspot.com/774801/show

Affected files:
  M user/src/com/google/gwt/user/client/ui/FocusWidget.java
  M user/src/com/google/gwt/user/client/ui/HTMLTable.java
  M user/src/com/google/gwt/user/client/ui/Hyperlink.java
  M user/src/com/google/gwt/user/client/ui/Image.java
  M user/src/com/google/gwt/user/client/ui/Label.java


Index: user/src/com/google/gwt/user/client/ui/FocusWidget.java
===
--- user/src/com/google/gwt/user/client/ui/FocusWidget.java (revision 8543)
+++ user/src/com/google/gwt/user/client/ui/FocusWidget.java (working copy)
@@ -103,7 +103,7 @@
   }

   public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

-return addHandler(handler, DoubleClickEvent.getType());
+return addDomHandler(handler, DoubleClickEvent.getType());
   }

   public HandlerRegistration addFocusHandler(FocusHandler handler) {
Index: user/src/com/google/gwt/user/client/ui/HTMLTable.java
===
--- user/src/com/google/gwt/user/client/ui/HTMLTable.java   (revision 8543)
+++ user/src/com/google/gwt/user/client/ui/HTMLTable.java   (working copy)
@@ -725,7 +725,7 @@
   }

   public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

-return addHandler(handler, DoubleClickEvent.getType());
+return addDomHandler(handler, DoubleClickEvent.getType());
   }

   /**
Index: user/src/com/google/gwt/user/client/ui/Hyperlink.java
===
--- user/src/com/google/gwt/user/client/ui/Hyperlink.java   (revision 8543)
+++ user/src/com/google/gwt/user/client/ui/Hyperlink.java   (working copy)
@@ -142,7 +142,7 @@
   }

   public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

-return addHandler(handler, DoubleClickEvent.getType());
+return addDomHandler(handler, DoubleClickEvent.getType());
   }

   public String getHTML() {
Index: user/src/com/google/gwt/user/client/ui/Image.java
===
--- user/src/com/google/gwt/user/client/ui/Image.java   (revision 8543)
+++ user/src/com/google/gwt/user/client/ui/Image.java   (working copy)
@@ -125,7 +125,7 @@
   image.replaceElement(impl.createStructure(url, left, top, width,  
height));
   // Todo(ecc) This is wrong, we should not be sinking these here on  
such a

   // common widget.After the branch is stable, this should be fixed.
-  image.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS |  
Event.ONMOUSEWHEEL
+  image.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK |  
Event.MOUSEEVENTS | Event.ONMOUSEWHEEL

   | Event.ONLOAD);
 }

@@ -282,7 +282,7 @@
 UnclippedState(Element element) {
   // This case is relatively unusual, in that we swapped a clipped  
image

   // out, so does not need to be efficient.
-  Event.sinkEvents(element, Event.ONCLICK | Event.MOUSEEVENTS
+  Event.sinkEvents(element, Event.ONCLICK | Event.ONDBLCLICK |  
Event.MOUSEEVENTS

   | Event.ONLOAD | Event.ONERROR | Event.ONMOUSEWHEEL);
 }

@@ -294,7 +294,7 @@
   Event.sinkEvents(image.getElement(), Event.ONLOAD);

   // Todo(ecc) this could be more efficient overall.
-  image.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONLOAD
+  image.sinkEvents(Event.ONCLICK | Event.ONDBLCLICK |  
Event.MOUSEEVENTS | Event.ONLOAD

   | Event.ONERROR | Event.ONMOUSEWHEEL);
 }

Index: user/src/com/google/gwt/user/client/ui/Label.java
===
--- user/src/com/google/gwt/user/client/ui/Label.java   (revision 8543)
+++ user/src/com/google/gwt/user/client/ui/Label.java   (working copy)
@@ -216,7 +216,7 @@
   }

   public HandlerRegistration addDoubleClickHandler(DoubleClickHandler  
handler) {

-return addHandler(handler, DoubleClickEvent.getType());
+return addDomHandler(handler, DoubleClickEvent.getType());
   }

   public HandlerRegistration addMouseDownHandler(MouseDownHandler handler)  
{



--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Pascal Patry
On Tuesday, August 17, 2010 11:50:13 Patrick Julien wrote:
> OK, I don't get how exit() being private works.  If we think about the
> scenario where we have child resources to create after we get the
> "real" id from the server, how are we suppose to save those child
> resources?  Not to mention that I don't really care for showing the
> "details" place in every case.
> 
> There is a bug opened about this already:
> 
> http://code.google.com/p/google-web-toolkit/issues/detail?id=5160
> 
> just added my star

Yeah, a very annoying issue in AbstractRecordEditActivity. There is no way this 
can be used in a real web application. 
We definitely need to know when save has been completed. We also have LIST 
operations going directly to EDIT... I don't 
see how we update to this revision of GWT. "exit()" would at least need to be 
protected but simple handlers like 
"onSaveComplete()" and friends would really improve this overall framework.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
Same for Abstract list, yeah, providing a default for showDetails is
nice, making it private is not so much

On Tue, Aug 17, 2010 at 12:30 PM, Pascal Patry  wrote:
> On Tuesday, August 17, 2010 11:50:13 Patrick Julien wrote:
>> OK, I don't get how exit() being private works.  If we think about the
>> scenario where we have child resources to create after we get the
>> "real" id from the server, how are we suppose to save those child
>> resources?  Not to mention that I don't really care for showing the
>> "details" place in every case.
>>
>> There is a bug opened about this already:
>>
>> http://code.google.com/p/google-web-toolkit/issues/detail?id=5160
>>
>> just added my star
>
> Yeah, a very annoying issue in AbstractRecordEditActivity. There is no way 
> this can be used in a real web application.
> We definitely need to know when save has been completed. We also have LIST 
> operations going directly to EDIT... I don't
> see how we update to this revision of GWT. "exit()" would at least need to be 
> protected but simple handlers like
> "onSaveComplete()" and friends would really improve this overall framework.
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Pascal Patry
On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
> Same for Abstract list, yeah, providing a default for showDetails is
> nice, making it private is not so much

That's right... you can always create a new SelectionModel to have
something else than showDetails() that is being called, but then you
loose about half of the whole framework usefulness... so, not that
great either.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
Thanks for all the feedback.

I'm definitely not suggesting that this mechanism is done, it's just a step
along the way. And yes, the hard coded exit points are particularly bad.
Rather than having these activities drive the place controller directly, I'd
like them to emit events like "save worked," "user canceled," and allow you
to wire up what happens in response. Also, don't forget that the
RequestFactory issues events on any record change.

To that end I have thoughts about changes we can make to HandlerManager and
Widget that I think can make things a lot more flexible than what you see
here, and simpler at the same time. I hope to have a design proposal to
share this week.

On Tue, Aug 17, 2010 at 9:40 AM, Pascal Patry  wrote:

> On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
> > Same for Abstract list, yeah, providing a default for showDetails is
> > nice, making it private is not so much
>
> That's right... you can always create a new SelectionModel to have
> something else than showDetails() that is being called, but then you
> loose about half of the whole framework usefulness... so, not that
> great either.
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
RequestFactory issues an event on record change but does it issue an
event on creation?

On Tue, Aug 17, 2010 at 1:04 PM, Ray Ryan  wrote:
> Thanks for all the feedback.
> I'm definitely not suggesting that this mechanism is done, it's just a step
> along the way. And yes, the hard coded exit points are particularly bad.
> Rather than having these activities drive the place controller directly, I'd
> like them to emit events like "save worked," "user canceled," and allow you
> to wire up what happens in response. Also, don't forget that the
> RequestFactory issues events on any record change.
> To that end I have thoughts about changes we can make to HandlerManager and
> Widget that I think can make things a lot more flexible than what you see
> here, and simpler at the same time. I hope to have a design proposal to
> share this week.
> On Tue, Aug 17, 2010 at 9:40 AM, Pascal Patry  wrote:
>>
>> On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
>> > Same for Abstract list, yeah, providing a default for showDetails is
>> > nice, making it private is not so much
>>
>> That's right... you can always create a new SelectionModel to have
>> something else than showDetails() that is being called, but then you
>> loose about half of the whole framework usefulness... so, not that
>> great either.
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Allow merging of modules with the same prefix, for example if you have a (issue754802)

2010-08-17 Thread fabbott

Reviewers: unnurg,

Description:
Allow merging of modules with the same prefix, for example if you have a
directory of widgets that are separated into multiple modules (but in
the
same java package), or if you have src/test roots that each have modules
for the same package.  The existing "exclude" attribute is used to mark
something that no modue should ever touch, i.e. known non-translatable
source.  A new "skip" attribute is used to mark something that *this*
module doesn't want, but that *other* modules might need.  (You could
probably be clever with just include for this case, but sometimes it's
nice to be able to express a negative.)

Review by: unn...@google.com

Please review this at http://gwt-code-reviews.appspot.com/754802/show

Affected files:
  M dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
  M dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
  M dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java
  M dev/core/src/com/google/gwt/dev/resource/impl/PathPrefix.java
  M dev/core/src/com/google/gwt/dev/resource/impl/PathPrefixSet.java
  A dev/core/test/com/google/gwt/dev/cfg/ModuleDefLoaderTest.java
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/One.gwt.xml
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/Three.gwt.xml
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/Two.gwt.xml
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/InOne.java
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/InTwo.java
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/Shared.java
  A dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/Toxic.java
  M dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Allow merging of modules with the same prefix, for example if you have a (issue754802)

2010-08-17 Thread unnurg

LGTM
On 2010/08/17 17:24:51, fabbott wrote:




http://gwt-code-reviews.appspot.com/754802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
It doesn't yet, but it should. I think that change will not make our M3
release, but it should be in M4.

BTW, because we're working on this with the Spring Roo team, we've been
using their issue
tracker.
We're less likely to lose track of issues that are filed there, under
component GWT.

https://jira.springsource.org/browse/ROO

On Tue, Aug 17, 2010 at 10:13 AM, Patrick Julien  wrote:

> RequestFactory issues an event on record change but does it issue an
> event on creation?
>
> On Tue, Aug 17, 2010 at 1:04 PM, Ray Ryan  wrote:
> > Thanks for all the feedback.
> > I'm definitely not suggesting that this mechanism is done, it's just a
> step
> > along the way. And yes, the hard coded exit points are particularly bad.
> > Rather than having these activities drive the place controller directly,
> I'd
> > like them to emit events like "save worked," "user canceled," and allow
> you
> > to wire up what happens in response. Also, don't forget that the
> > RequestFactory issues events on any record change.
> > To that end I have thoughts about changes we can make to HandlerManager
> and
> > Widget that I think can make things a lot more flexible than what you see
> > here, and simpler at the same time. I hope to have a design proposal to
> > share this week.
> > On Tue, Aug 17, 2010 at 9:40 AM, Pascal Patry 
> wrote:
> >>
> >> On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
> >> > Same for Abstract list, yeah, providing a default for showDetails is
> >> > nice, making it private is not so much
> >>
> >> That's right... you can always create a new SelectionModel to have
> >> something else than showDetails() that is being called, but then you
> >> loose about half of the whole framework usefulness... so, not that
> >> great either.
> >>
> >> --
> >> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> >
> > --
> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
I don't know what your schedule looks like but before this patch.
This was still pretty usable and it was less expensive to track
changes in head than it was to use GWT 2.0.  Now, the abstract
activities are pretty much broken.

I understand, and take responsibility, for using GWT head, but at the
same time, what's the point of cutting M3 in this shape?


On Tue, Aug 17, 2010 at 1:42 PM, Ray Ryan  wrote:
> It doesn't yet, but it should. I think that change will not make our M3
> release, but it should be in M4.
> BTW, because we're working on this with the Spring Roo team, we've been
> using their issue tracker. We're less likely to lose track of issues that
> are filed there, under component GWT.
> https://jira.springsource.org/browse/ROO
>
> On Tue, Aug 17, 2010 at 10:13 AM, Patrick Julien  wrote:
>>
>> RequestFactory issues an event on record change but does it issue an
>> event on creation?
>>
>> On Tue, Aug 17, 2010 at 1:04 PM, Ray Ryan  wrote:
>> > Thanks for all the feedback.
>> > I'm definitely not suggesting that this mechanism is done, it's just a
>> > step
>> > along the way. And yes, the hard coded exit points are particularly bad.
>> > Rather than having these activities drive the place controller directly,
>> > I'd
>> > like them to emit events like "save worked," "user canceled," and allow
>> > you
>> > to wire up what happens in response. Also, don't forget that the
>> > RequestFactory issues events on any record change.
>> > To that end I have thoughts about changes we can make to HandlerManager
>> > and
>> > Widget that I think can make things a lot more flexible than what you
>> > see
>> > here, and simpler at the same time. I hope to have a design proposal to
>> > share this week.
>> > On Tue, Aug 17, 2010 at 9:40 AM, Pascal Patry 
>> > wrote:
>> >>
>> >> On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
>> >> > Same for Abstract list, yeah, providing a default for showDetails is
>> >> > nice, making it private is not so much
>> >>
>> >> That's right... you can always create a new SelectionModel to have
>> >> something else than showDetails() that is being called, but then you
>> >> loose about half of the whole framework usefulness... so, not that
>> >> great either.
>> >>
>> >> --
>> >> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>> >
>> > --
>> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Public: Start of a sample application showing GWT validation. (issue760802)

2010-08-17 Thread Arthur Kalmenson
I'm really excited for this validation component, you guys/gals are
doing a great job! But it looks like Validation is using
VerticalPanel, but from my understand we're trying to discourage the
use of table based widgets where possible. Could this be done with
UiBinder and divs instead?

--
Arthur Kalmenson



On Tue, Aug 17, 2010 at 10:35 AM,   wrote:
> Reviewers: robertvater_google.com,
>
> Description:
> Public: Start of a sample application showing GWT validation.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/760802/show
>
> Affected files:
>  A eclipse/samples/Validation/.checkstyle
>  A eclipse/samples/Validation/.classpath
>  A eclipse/samples/Validation/.project
>  A eclipse/samples/Validation/Validation-gwtc.launch
>  A eclipse/samples/Validation/Validation.launch
>  M eclipse/user/.classpath
>  M samples/build.xml
>  A samples/validation/build.xml
>  A samples/validation/src/com/google/gwt/sample/validation/COPYING
>  A
> samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml
>  A
> samples/validation/src/com/google/gwt/sample/validation/client/GreetingService.java
>  A
> samples/validation/src/com/google/gwt/sample/validation/client/GreetingServiceAsync.java
>  A
> samples/validation/src/com/google/gwt/sample/validation/client/Validation.java
>  A
> samples/validation/src/com/google/gwt/sample/validation/server/GreetingServiceImpl.java
>  A
> samples/validation/src/com/google/gwt/sample/validation/shared/Person.java
>  A samples/validation/war/Validation.css
>  A samples/validation/war/Validation.html
>  A samples/validation/war/WEB-INF/classes/marker
>  A samples/validation/war/WEB-INF/web.xml
>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
There are a lot of features and schedules driving M3, this is just one. I
can't make a drastic change at this point, and I can't roll the patch back,
but are there a quick fixes I can make to unbreak you? Make exit() public or
protected? Or can you whip up a patch?

On Tue, Aug 17, 2010 at 10:57 AM, Patrick Julien  wrote:

> I don't know what your schedule looks like but before this patch.
> This was still pretty usable and it was less expensive to track
> changes in head than it was to use GWT 2.0.  Now, the abstract
> activities are pretty much broken.
>
> I understand, and take responsibility, for using GWT head, but at the
> same time, what's the point of cutting M3 in this shape?
>
>
> On Tue, Aug 17, 2010 at 1:42 PM, Ray Ryan  wrote:
> > It doesn't yet, but it should. I think that change will not make our M3
> > release, but it should be in M4.
> > BTW, because we're working on this with the Spring Roo team, we've been
> > using their issue tracker. We're less likely to lose track of issues that
> > are filed there, under component GWT.
> > https://jira.springsource.org/browse/ROO
> >
> > On Tue, Aug 17, 2010 at 10:13 AM, Patrick Julien 
> wrote:
> >>
> >> RequestFactory issues an event on record change but does it issue an
> >> event on creation?
> >>
> >> On Tue, Aug 17, 2010 at 1:04 PM, Ray Ryan  wrote:
> >> > Thanks for all the feedback.
> >> > I'm definitely not suggesting that this mechanism is done, it's just a
> >> > step
> >> > along the way. And yes, the hard coded exit points are particularly
> bad.
> >> > Rather than having these activities drive the place controller
> directly,
> >> > I'd
> >> > like them to emit events like "save worked," "user canceled," and
> allow
> >> > you
> >> > to wire up what happens in response. Also, don't forget that the
> >> > RequestFactory issues events on any record change.
> >> > To that end I have thoughts about changes we can make to
> HandlerManager
> >> > and
> >> > Widget that I think can make things a lot more flexible than what you
> >> > see
> >> > here, and simpler at the same time. I hope to have a design proposal
> to
> >> > share this week.
> >> > On Tue, Aug 17, 2010 at 9:40 AM, Pascal Patry 
> >> > wrote:
> >> >>
> >> >> On Tuesday, August 17, 2010 12:34:29 Patrick Julien wrote:
> >> >> > Same for Abstract list, yeah, providing a default for showDetails
> is
> >> >> > nice, making it private is not so much
> >> >>
> >> >> That's right... you can always create a new SelectionModel to have
> >> >> something else than showDetails() that is being called, but then you
> >> >> loose about half of the whole framework usefulness... so, not that
> >> >> great either.
> >> >>
> >> >> --
> >> >> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> >> >
> >> > --
> >> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
> >>
> >> --
> >> http://groups.google.com/group/Google-Web-Toolkit-Contributors
> >
> > --
> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Public: Start of a sample application showing GWT validation. (issue760802)

2010-08-17 Thread Ray Ryan
This patch is focused on the validation plumbing. The UI is throw away.

On Tue, Aug 17, 2010 at 11:02 AM, Arthur Kalmenson wrote:

> I'm really excited for this validation component, you guys/gals are
> doing a great job! But it looks like Validation is using
> VerticalPanel, but from my understand we're trying to discourage the
> use of table based widgets where possible. Could this be done with
> UiBinder and divs instead?
>
> --
> Arthur Kalmenson
>
>
>
> On Tue, Aug 17, 2010 at 10:35 AM,   wrote:
> > Reviewers: robertvater_google.com,
> >
> > Description:
> > Public: Start of a sample application showing GWT validation.
> >
> >
> > Please review this at http://gwt-code-reviews.appspot.com/760802/show
> >
> > Affected files:
> >  A eclipse/samples/Validation/.checkstyle
> >  A eclipse/samples/Validation/.classpath
> >  A eclipse/samples/Validation/.project
> >  A eclipse/samples/Validation/Validation-gwtc.launch
> >  A eclipse/samples/Validation/Validation.launch
> >  M eclipse/user/.classpath
> >  M samples/build.xml
> >  A samples/validation/build.xml
> >  A samples/validation/src/com/google/gwt/sample/validation/COPYING
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/client/GreetingService.java
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/client/GreetingServiceAsync.java
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/client/Validation.java
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/server/GreetingServiceImpl.java
> >  A
> >
> samples/validation/src/com/google/gwt/sample/validation/shared/Person.java
> >  A samples/validation/war/Validation.css
> >  A samples/validation/war/Validation.html
> >  A samples/validation/war/WEB-INF/classes/marker
> >  A samples/validation/war/WEB-INF/web.xml
> >
> >
> > --
> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
On Tue, Aug 17, 2010 at 2:02 PM, Ray Ryan  wrote:
> There are a lot of features and schedules driving M3, this is just one. I
> can't make a drastic change at this point, and I can't roll the patch back,
> but are there a quick fixes I can make to unbreak you? Make exit() public or
> protected? Or can you whip up a patch?
>

I understand, but if you just make exit() protected in Edit and
showDetails in List protected, we have something we can work with at
least.

Edit no longer has getId() so I'm not sure how we would get around
that but at least we have a chance if these methods are protected

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
On Tue, Aug 17, 2010 at 11:05 AM, Patrick Julien  wrote:

> On Tue, Aug 17, 2010 at 2:02 PM, Ray Ryan  wrote:
> > There are a lot of features and schedules driving M3, this is just one. I
> > can't make a drastic change at this point, and I can't roll the patch
> back,
> > but are there a quick fixes I can make to unbreak you? Make exit() public
> or
> > protected? Or can you whip up a patch?
> >
>
> I understand, but if you just make exit() protected in Edit and
> showDetails in List protected, we have something we can work with at
> least.
>

Patch on its way to open those up, I'll cc you.


> Edit no longer has getId() so I'm not sure how we would get around
> that but at least we have a chance if these methods are protected
>

Why isn't edit.getRecord().getId() enough?



>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
On Tue, Aug 17, 2010 at 11:09 AM, Ray Ryan  wrote:

>
> On Tue, Aug 17, 2010 at 11:05 AM, Patrick Julien wrote:
>
>> On Tue, Aug 17, 2010 at 2:02 PM, Ray Ryan  wrote:
>> > There are a lot of features and schedules driving M3, this is just one.
>> I
>> > can't make a drastic change at this point, and I can't roll the patch
>> back,
>> > but are there a quick fixes I can make to unbreak you? Make exit()
>> public or
>> > protected? Or can you whip up a patch?
>> >
>>
>> I understand, but if you just make exit() protected in Edit and
>> showDetails in List protected, we have something we can work with at
>> least.
>>
>
> Patch on its way to open those up, I'll cc you.
>
>
>> Edit no longer has getId() so I'm not sure how we would get around
>> that but at least we have a chance if these methods are protected
>>
>
> Why isn't edit.getRecord().getId() enough?
>

Ah. It doesn't exist. Will add it.

>
>
>
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
>>
>> I understand, but if you just make exit() protected in Edit and
>> showDetails in List protected, we have something we can work with at
>> least.
>
> Patch on its way to open those up, I'll cc you.

Thank you

>>
>> Edit no longer has getId() so I'm not sure how we would get around
>> that but at least we have a chance if these methods are protected
>
> Why isn't edit.getRecord().getId() enough?


because that doesn't exist.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Public: Start of a sample application showing GWT validation. (issue760802)

2010-08-17 Thread Arthur Kalmenson
Ah, sorry about that.

--
Arthur Kalmenson



On Tue, Aug 17, 2010 at 2:04 PM, Ray Ryan  wrote:
> This patch is focused on the validation plumbing. The UI is throw away.
>
> On Tue, Aug 17, 2010 at 11:02 AM, Arthur Kalmenson 
> wrote:
>>
>> I'm really excited for this validation component, you guys/gals are
>> doing a great job! But it looks like Validation is using
>> VerticalPanel, but from my understand we're trying to discourage the
>> use of table based widgets where possible. Could this be done with
>> UiBinder and divs instead?
>>
>> --
>> Arthur Kalmenson
>>
>>
>>
>> On Tue, Aug 17, 2010 at 10:35 AM,   wrote:
>> > Reviewers: robertvater_google.com,
>> >
>> > Description:
>> > Public: Start of a sample application showing GWT validation.
>> >
>> >
>> > Please review this at http://gwt-code-reviews.appspot.com/760802/show
>> >
>> > Affected files:
>> >  A eclipse/samples/Validation/.checkstyle
>> >  A eclipse/samples/Validation/.classpath
>> >  A eclipse/samples/Validation/.project
>> >  A eclipse/samples/Validation/Validation-gwtc.launch
>> >  A eclipse/samples/Validation/Validation.launch
>> >  M eclipse/user/.classpath
>> >  M samples/build.xml
>> >  A samples/validation/build.xml
>> >  A samples/validation/src/com/google/gwt/sample/validation/COPYING
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/client/GreetingService.java
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/client/GreetingServiceAsync.java
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/client/Validation.java
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/server/GreetingServiceImpl.java
>> >  A
>> >
>> > samples/validation/src/com/google/gwt/sample/validation/shared/Person.java
>> >  A samples/validation/war/Validation.css
>> >  A samples/validation/war/Validation.html
>> >  A samples/validation/war/WEB-INF/classes/marker
>> >  A samples/validation/war/WEB-INF/web.xml
>> >
>> >
>> > --
>> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
>> Why isn't edit.getRecord().getId() enough?
>
> Ah. It doesn't exist. Will add it.


thanks, here are the issues I reported in roo:


ROO-1225 Hard coded exit points for AbstractRecordEditActivity
ROO-1226 Hard coded exit points for AbstractRecordListActivity
ROO-1227 Can't create child resources from AbstractRecordEditActivity anymore
ROO-1228 Event should be fired on record creation

All are marked improvements with the exception of 1227.  I marked this
as a bug since we were able to that before

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Public: Start of a sample application showing GWT validation. (issue760802)

2010-08-17 Thread Arthur Kalmenson
But this is looking to be a really great release for enterprise app
building! I can just imagine how many days and weeks of work this
release would have saved me :D

--
Arthur Kalmenson



On Tue, Aug 17, 2010 at 2:12 PM, Arthur Kalmenson  wrote:
> Ah, sorry about that.
>
> --
> Arthur Kalmenson
>
>
>
> On Tue, Aug 17, 2010 at 2:04 PM, Ray Ryan  wrote:
>> This patch is focused on the validation plumbing. The UI is throw away.
>>
>> On Tue, Aug 17, 2010 at 11:02 AM, Arthur Kalmenson 
>> wrote:
>>>
>>> I'm really excited for this validation component, you guys/gals are
>>> doing a great job! But it looks like Validation is using
>>> VerticalPanel, but from my understand we're trying to discourage the
>>> use of table based widgets where possible. Could this be done with
>>> UiBinder and divs instead?
>>>
>>> --
>>> Arthur Kalmenson
>>>
>>>
>>>
>>> On Tue, Aug 17, 2010 at 10:35 AM,   wrote:
>>> > Reviewers: robertvater_google.com,
>>> >
>>> > Description:
>>> > Public: Start of a sample application showing GWT validation.
>>> >
>>> >
>>> > Please review this at http://gwt-code-reviews.appspot.com/760802/show
>>> >
>>> > Affected files:
>>> >  A eclipse/samples/Validation/.checkstyle
>>> >  A eclipse/samples/Validation/.classpath
>>> >  A eclipse/samples/Validation/.project
>>> >  A eclipse/samples/Validation/Validation-gwtc.launch
>>> >  A eclipse/samples/Validation/Validation.launch
>>> >  M eclipse/user/.classpath
>>> >  M samples/build.xml
>>> >  A samples/validation/build.xml
>>> >  A samples/validation/src/com/google/gwt/sample/validation/COPYING
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/Validation.gwt.xml
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/client/GreetingService.java
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/client/GreetingServiceAsync.java
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/client/Validation.java
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/server/GreetingServiceImpl.java
>>> >  A
>>> >
>>> > samples/validation/src/com/google/gwt/sample/validation/shared/Person.java
>>> >  A samples/validation/war/Validation.css
>>> >  A samples/validation/war/Validation.html
>>> >  A samples/validation/war/WEB-INF/classes/marker
>>> >  A samples/validation/war/WEB-INF/web.xml
>>> >
>>> >
>>> > --
>>> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>>
>>> --
>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8551 committed - Fix relation-id bug using wrong instance...

2010-08-17 Thread codesite-noreply

Revision: 8551
Author: cromwell...@google.com
Date: Tue Aug 17 10:06:27 2010
Log: Fix relation-id bug using wrong instance

Review by: amitman...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8551

Modified:
  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java

 /trunk/user/test/com/google/gwt/valuestore/server/SimpleBar.java

===
---  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Fri Aug 13 14:38:39 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Tue Aug 17 10:06:27 2010

@@ -272,8 +272,8 @@
 Method method = entityElement.getClass().getMethod(methodName);
 Object returnValue = method.invoke(entityElement);
 if (returnValue != null &&  
Record.class.isAssignableFrom(propertyType)) {

-  Method idMethod = entityElement.getClass().getMethod("getId");
-  Long id = (Long) idMethod.invoke(entityElement);
+  Method idMethod = returnValue.getClass().getMethod("getId");
+  Long id = (Long) idMethod.invoke(returnValue);

   String keyRef =

operationRegistry.getSecurityProvider().encodeClassType(propertyType)

===
--- /trunk/user/test/com/google/gwt/valuestore/server/SimpleBar.java	Fri  
Aug 13 14:38:39 2010
+++ /trunk/user/test/com/google/gwt/valuestore/server/SimpleBar.java	Tue  
Aug 17 10:06:27 2010

@@ -55,7 +55,7 @@
   Integer version = 1;

   @Id
-  private Long id = -1L;
+  private Long id = 10L;

   private String userName;

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Continuation of r8542 to actually properly enables double click for (issue774801)

2010-08-17 Thread t . broyer

LGTM, though I'm puzzled by Hyperlink implementing
HasDoubleClickHandlers, given that addClickHandler is deprecated on that
class.

http://gwt-code-reviews.appspot.com/774801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8552 committed - Public: Move the validation metadata classes to client/metadata....

2010-08-17 Thread codesite-noreply

Revision: 8552
Author: ncha...@google.com
Date: Tue Aug 17 10:07:06 2010
Log: Public: Move the validation metadata classes to client/metadata.

Review at http://gwt-code-reviews.appspot.com/773801

Review by: robertvaw...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8552

Added:
 /trunk/user/src/com/google/gwt/validation/client/metadata
  
/trunk/user/src/com/google/gwt/validation/client/metadata/ConstraintDescriptorImpl.java

Deleted:
 /trunk/user/src/com/google/gwt/validation/metadata

===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/validation/client/metadata/ConstraintDescriptorImpl.java	 
Tue Aug 17 10:07:06 2010

@@ -0,0 +1,164 @@
+/*
+ * 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.validation.client.metadata;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.Payload;
+import javax.validation.metadata.ConstraintDescriptor;
+
+/**
+ * A immutable GWT implementation of {...@link ConstraintDescriptor}.
+ *
+ * @param  the constraint annotation to describe.
+ */
+public class ConstraintDescriptorImpl implements
+ConstraintDescriptor {
+
+  /**
+   * Builder for {...@link ConstraintDescriptorImpl}
+   *
+   * @param  the constraint annotation to describe.
+   */
+  public static class Builder {
+private T annotation;
+private Set> groups;
+private Set> payload;
+private List>>  
constraintValidatorClasses;

+private Map attributes;
+private Set> composingConstraints;
+private boolean reportAsSingleViolation;
+
+public ConstraintDescriptorImpl build() {
+  return new ConstraintDescriptorImpl(
+  annotation,
+  groups,
+  payload,
+  constraintValidatorClasses,
+  attributes,
+  composingConstraints,
+  reportAsSingleViolation);
+}
+
+public Builder setAnnotation(T annotation) {
+  this.annotation = annotation;
+  return this;
+}
+
+public Builder setAttributes(Map attributes) {
+  this.attributes = attributes;
+  return this;
+}
+
+public Builder setComposingConstraints(
+Set> composingConstraints) {
+  this.composingConstraints = composingConstraints;
+  return this;
+}
+
+public Builder setConstraintValidatorClasses(
+List>>  
constraintValidatorClasses) {

+  this.constraintValidatorClasses = constraintValidatorClasses;
+  return this;
+}
+
+public Builder setGroups(Set> groups) {
+  this.groups = groups;
+  return this;
+}
+
+public Builder setPayload(Set> payload) {
+  this.payload = payload;
+  return this;
+}
+
+public Builder setReportAsSingleViolation(boolean  
reportAsSingleViolation) {

+  this.reportAsSingleViolation = reportAsSingleViolation;
+  return this;
+}
+  }
+
+  public static  Builder builder() {
+return new Builder();
+  }
+
+  private final T annotation;
+  private final Set> groups;
+  private final Set> payload;
+  private final List>>  
constraintValidatorClasses;

+  private final Map attributes;
+  private final Set> composingConstraints;
+  private final boolean reportAsSingleViolation;
+
+  /**
+   * @param annotation
+   * @param groups
+   * @param payload
+   * @param constraintValidatorClasses
+   * @param attributes
+   * @param composingConstraints
+   * @param reportAsSingleViolation
+   */
+  private ConstraintDescriptorImpl(
+  T annotation,
+  Set> groups,
+  Set> payload,
+  List>>  
constraintValidatorClasses,

+  Map attributes,
+  Set> composingConstraints,
+  boolean reportAsSingleViolation) {
+super();
+this.annotation = annotation;
+this.groups = groups;
+this.payload = payload;
+this.constraintValidatorClasses = constraintValidatorClasses;
+this.attributes = attributes;
+this.composingConstraints = composingConstraints;
+this.reportAsSingleViolation = reportAsSingleViolation;
+  }
+
+  public T getAnnotation() {
+return annotation;
+  }
+
+  public Map getAttributes() {
+return attributes;
+  }
+
+  public Set> getComposingConstraints() {
+return composingConstraints;
+  }
+
+  public List>>  
getConstraintValidatorClasses() {

+return constraintValidatorClasses;
+  }
+
+  publi

[gwt-contrib] Re: Faster edit-distance computation in JsFunctionClusterer (issue669801)

2010-08-17 Thread mmendez

Is there anything else left to do on this change?  Alex's internship is
over, but we'd like to get the change in.

On 2010/08/10 08:44:14, zundel wrote:

Hi Andre, I'm waiting on Ray C or Lex to give the LGTM, but I noticed
this last patch you uploaded left out the editdistance library files.



On Mon, Aug 9, 2010 at 4:48 PM,  

wrote:

>
> http://gwt-code-reviews.appspot.com/669801/diff/33001/34006
> File

dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java

> (right):
>
>

http://gwt-code-reviews.appspot.com/669801/diff/33001/34006#newcode43

>

dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java:43:

> Pattern.compile("function |[_a-zA-Z$][.$_a-zA-Z0-9]*=function");
> On 2010/08/06 02:12:25, cromwellian wrote:
>
>> This regex will incorrect match vtable declarations of the form:
>
>> _.name = function() { ... }
>
>> These prototype declarations cannot be re-ordered, so don't let it
>
> match a
>>
>> single '_' symbol.
>
>
> Fixed.
>
> http://gwt-code-reviews.appspot.com/669801/show
>





--
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA





http://gwt-code-reviews.appspot.com/669801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Added all safehtml packages. (issue771801)

2010-08-17 Thread jat

On 2010/08/16 23:39:47, tbroyer wrote:

The HtmlSanitizer is a good idea, but the implementation is very weak

[2].

Note that the API is what is important, and SimpleHtmlSanitizer is just
that, a simple implementation.  A more involved implementation can be
added later.

Also, we aren't trying to parse HTML with a regex here, it simply looks
for opening tags and allows unescaped on a small set of whitelisted tags
-- everything else gets escaped.  If you think it fails to do its job,
can you supply a string which would not be propertly sanitized?

http://gwt-code-reviews.appspot.com/771801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Makes the terminology used by AbstractListViewAdapter and AbstractPager consistent with HasData.... (issue772801)

2010-08-17 Thread jlabanca

committed as r8553

http://gwt-code-reviews.appspot.com/772801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8554 committed - Allow merging of modules with the same prefix, for example if you have...

2010-08-17 Thread codesite-noreply

Revision: 8554
Author: fabb...@google.com
Date: Tue Aug 17 08:14:13 2010
Log: Allow merging of modules with the same prefix, for example if you have  
a

directory of widgets that are separated into multiple modules (but in the
same java package), or if you have src/test roots that each have modules
for the same package.  The existing "exclude" attribute is used to mark
something that no modue should ever touch, i.e. known non-translatable
source.  A new "skip" attribute is used to mark something that *this*
module doesn't want, but that *other* modules might need.  (You could
probably be clever with just include for this case, but sometimes it's
nice to be able to express a negative.)

Review at http://gwt-code-reviews.appspot.com/754802

Review by: unn...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8554

Added:
 /trunk/dev/core/test/com/google/gwt/dev/cfg/ModuleDefLoaderTest.java
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/One.gwt.xml
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/Three.gwt.xml
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/Two.gwt.xml
 /trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client
  
/trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/InOne.java
  
/trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/InTwo.java
  
/trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/Shared.java
  
/trunk/dev/core/test/com/google/gwt/dev/cfg/testdata/merging/client/Toxic.java

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
 /trunk/dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/PathPrefix.java
 /trunk/dev/core/src/com/google/gwt/dev/resource/impl/PathPrefixSet.java
  
/trunk/dev/core/test/com/google/gwt/dev/resource/impl/DefaultFiltersTest.java


===
--- /dev/null
+++ /trunk/dev/core/test/com/google/gwt/dev/cfg/ModuleDefLoaderTest.java	 
Tue Aug 17 08:14:13 2010

@@ -0,0 +1,55 @@
+/*
+ * 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.dev.cfg;
+
+import com.google.gwt.core.ext.TreeLogger;
+
+import junit.framework.TestCase;
+
+/**
+ * Test for the module def loading
+ */
+public class ModuleDefLoaderTest extends TestCase {
+
+  /**
+   * Test of merging multiple modules in the same package space.
+   * This exercises the interaction of include, exclude, and skip  
attributes.

+   */
+  public void testModuleMerging() throws Exception {
+TreeLogger logger = TreeLogger.NULL;
+ModuleDef one = ModuleDefLoader.loadFromClassPath(logger,
+"com.google.gwt.dev.cfg.testdata.merging.One", false);
+ 
assertNotNull(one.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InOne.java"));
+ 
assertNotNull(one.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Shared.java"));
+ 
assertNull(one.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InTwo.java"));
+ 
assertNull(one.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Toxic.java"));

+
+ModuleDef two = ModuleDefLoader.loadFromClassPath(logger,
+"com.google.gwt.dev.cfg.testdata.merging.Two", false);
+ 
assertNotNull(two.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InOne.java"));
+ 
assertNotNull(two.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Shared.java"));
+ 
assertNotNull(two.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InTwo.java"));
+ 
assertNull(two.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Toxic.java"));

+
+ModuleDef three = ModuleDefLoader.loadFromClassPath(logger,
+"com.google.gwt.dev.cfg.testdata.merging.Three", false);
+ 
assertNotNull(three.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InOne.java"));
+ 
assertNotNull(three.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Shared.java"));
+ 
assertNull(three.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/InTwo.java"));
+ 
assertNull(three.findSourceFile("com/google/gwt/dev/cfg/testdata/merging/client/Toxic.java"));

+  }
+
+}

[gwt-contrib] [google-web-toolkit] r8555 committed - Rolling back r8550: Change to CompilationStateBuilder to prevent recur...

2010-08-17 Thread codesite-noreply

Revision: 8555
Author: roytibur...@google.com
Date: Tue Aug 17 08:39:10 2010
Log: Rolling back r8550: Change to CompilationStateBuilder to prevent  
recursive invalidation on changed units.


Broke some users.

Review by: sco...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8555

Deleted:
 /trunk/dev/core/src/com/google/gwt/dev/javac/Dependencies.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationState.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitImpl.java
  
/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnitInvalidator.java

 /trunk/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
 /trunk/dev/core/src/com/google/gwt/dev/javac/SourceFileCompilationUnit.java
 /trunk/dev/core/src/com/google/gwt/dev/util/Util.java
 /trunk/dev/core/test/com/google/gwt/dev/javac/CompilationStateTest.java
 /trunk/dev/core/test/com/google/gwt/dev/javac/CompilationStateTestBase.java
  
/trunk/dev/core/test/com/google/gwt/dev/javac/CompilationUnitFileReferenceTest.java


===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/Dependencies.java	Tue Aug  
17 04:56:43 2010

+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * 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.dev.javac;
-
-import com.google.gwt.dev.util.collect.HashMap;
-import com.google.gwt.dev.util.collect.Lists;
-
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-/**
- * Tracks dependencies from a {...@link CompilationUnit} to {...@link  
CompiledClass

- * CompiledClasses}.
- */
-class Dependencies {
-  Map qualified = new HashMapCompiledClass>();

-  Map simple = new HashMap();
-  private final String myPackage;
-  private List unresolvedQualified;
-  private List unresolvedSimple;
-
-  Dependencies() {
-this.myPackage = "";
-  }
-
-  /**
-   * Initializes the set of simple and qualified dependency names, but  
does not

-   * resolve them.
-   */
-  Dependencies(String myPackage, List unresolvedQualified,
-  List unresolvedSimple) {
-this.myPackage = (myPackage.length() == 0) ? "" : (myPackage + '.');
-this.unresolvedQualified = unresolvedQualified;
-this.unresolvedSimple = unresolvedSimple;
-  }
-
-  /**
-   * Returns the list of deps that cannot be resolved at all.
-   */
-  List findMissingDeps(Set allValidClasses) {
-List result = Lists.create();
-for (Entry entry : qualified.entrySet()) {
-  String sourceName = entry.getKey();
-  boolean expected = entry.getValue() != null;
-  boolean actual = allValidClasses.contains(sourceName);
-  if (expected != actual) {
-result = Lists.add(result, sourceName);
-  }
-}
-for (Entry entry : simple.entrySet()) {
-  String sourceName = entry.getKey();
-  boolean expected = entry.getValue() != null;
-  boolean actual = allValidClasses.contains(myPackage + sourceName)
-  || allValidClasses.contains("java.lang." + sourceName);
-  if (expected != actual) {
-result = Lists.add(result, sourceName);
-  }
-}
-return result;
-  }
-
-  /**
-   * Resolves unqualified dependencies against the global list of all valid
-   * classes. Must be called before {...@link #validate(String, Map, Map)}.
-   */
-  void resolve(Map allValidClasses) {
-for (String ref : unresolvedQualified) {
-  CompiledClass cc = allValidClasses.get(ref);
-  qualified.put(ref, cc);
-}
-
-for (String ref : unresolvedSimple) {
-  CompiledClass cc = findBySimpleName(ref, allValidClasses);
-  allValidClasses.get(ref);
-  simple.put(ref, cc);
-}
-unresolvedQualified = unresolvedSimple = null;
-  }
-
-  /**
-   * Validate that all of my existing dependencies can be found in the  
global

-   * set of valid classes, and resolve to structurally identical APIs.
-   *
-   * @return true if all of my dependencies are valid
-   */
-  boolean validate(Map allValidClasses,
-  Map cachedStructurallySame) {
-for (Entry entry : qualified.entrySet()) {

[gwt-contrib] Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread rjrjr

Reviewers: jlabanca,

Description:
Allows subclasses to take control of exit points in
AbstractRecordListActivity and AbstractRecordEditActivity

https://jira.springsource.org/browse/ROO-1225
https://jira.springsource.org/browse/ROO-1226
https://jira.springsource.org/browse/ROO-1227


Please review this at http://gwt-code-reviews.appspot.com/771802/show

Affected files:
  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  M user/src/com/google/gwt/app/place/AbstractRecordListActivity.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
http://gwt-code-reviews.appspot.com/771802

On Tue, Aug 17, 2010 at 11:14 AM, Patrick Julien  wrote:

> >> Why isn't edit.getRecord().getId() enough?
> >
> > Ah. It doesn't exist. Will add it.
>
>
> thanks, here are the issues I reported in roo:
>
>
> ROO-1225 Hard coded exit points for AbstractRecordEditActivity
> ROO-1226 Hard coded exit points for AbstractRecordListActivity
> ROO-1227 Can't create child resources from AbstractRecordEditActivity
> anymore
> ROO-1228 Event should be fired on record creation
>
> All are marked improvements with the exception of 1227.  I marked this
> as a bug since we were able to that before
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Patrick Julien
On Tue, Aug 17, 2010 at 3:50 PM, Ray Ryan  wrote:
> http://gwt-code-reviews.appspot.com/771802


this would satisfy my current needs

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread jlabanca

LGTM


http://gwt-code-reviews.appspot.com/771802/diff/1/2
File user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
(right):

http://gwt-code-reviews.appspot.com/771802/diff/1/2#newcode121
user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java:121:
// when bugs are fixed
Join with line above.

http://gwt-code-reviews.appspot.com/771802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8556 committed - Preliminary implementation of the server-side sync method. When a reco...

2010-08-17 Thread codesite-noreply

Revision: 8556
Author: amitman...@google.com
Date: Tue Aug 17 09:57:01 2010
Log: Preliminary implementation of the server-side sync method. When a  
record is to

be passed as a parameter, we now pass its uniqueId().

The correct methods on the server are being invoked. However, the  
snapshotting
and change detection are not done. So there will be exceptions on the  
client.


Review by: cromwell...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8556

Deleted:
 /trunk/user/test/com/google/gwt/requestfactory/server/SimpleFooRequest.java
Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java

 /trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordImpl.java
  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/ReflectionBasedOperationRegistry.java

 /trunk/user/src/com/google/gwt/requestfactory/server/RequestDefinition.java
  
/trunk/user/src/com/google/gwt/requestfactory/server/SampleDataPopulator.java

 /trunk/user/src/com/google/gwt/requestfactory/shared/RequestData.java
 /trunk/user/src/com/google/gwt/requestfactory/shared/RequestFactory.java
  
/trunk/user/test/com/google/gwt/requestfactory/server/JsonRequestProcessorTest.java

 /trunk/user/test/com/google/gwt/valuestore/shared/SimpleFooRequest.java

===
---  
/trunk/user/test/com/google/gwt/requestfactory/server/SimpleFooRequest.java	 
Fri Jul 30 11:32:15 2010

+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.requestfactory.server;
-
-import com.google.gwt.requestfactory.shared.RecordListRequest;
-import com.google.gwt.requestfactory.shared.RequestObject;
-import com.google.gwt.requestfactory.shared.Service;
-import com.google.gwt.valuestore.shared.SimpleFooRecord;
-
-/**
- * Do nothing test interface.
- */
-...@service(com.google.gwt.requestfactory.server.SimpleFoo.class)
-public interface SimpleFooRequest {
-  RequestObject countSimpleFoo();
-  RecordListRequest findAll();
-  RequestObject findSimpleFooById(Long id);
-  RequestObject privateMethod();
-}
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java	 
Mon Aug 16 06:28:43 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesMobile.java	 
Tue Aug 17 09:57:01 2010

@@ -95,7 +95,6 @@
 ExpensesRequestFactory.class);
 requestFactory.init(eventBus);

-final long finalEmployeeId = employeeId;
  
requestFactory.employeeRequest().findEmployee(Value.of(employeeId)).fire(

 new Receiver() {
   public void onSuccess(EmployeeRecord employee,
===
---  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordImpl.java	 
Mon Aug 16 20:22:31 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordImpl.java	 
Tue Aug 17 09:57:01 2010

@@ -62,6 +62,11 @@
   public RecordSchema getSchema() {
 return jso.getSchema();
   }
+
+  public String getUniqueId() {
+return jso.getId() + "-" + (isFuture ? "IS" : "NO") + "-"
++ getSchema().getToken().getName();
+  }

   public Integer getVersion() {
 return jso.getVersion();
===
---  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java	 
Mon Aug 16 20:22:31 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/rebind/RequestFactoryGenerator.java	 
Tue Aug 17 09:57:01 2010

@@ -638,7 +638,8 @@
   JClassType classType = parameter.getType().isClassOrInterface();
   if (classType != null
   &&  
classType.isAssignableTo(typeOracle.findType(Record.class.getName( {

-sb.append(".getId()");
+sb.insert(0, "((" + classType.getQualifiedBinaryName() + "Impl"  
+ ")");

+sb.append(").getUniqueId()");
   }
 }
 return "new Object[] {" + sb.toString() + "}";
===
---  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Tue Aug 17 10:06:27 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/server/JsonRequestProcessor.java	 
Tue Aug 17 09:57:01 2010

@@ -17,7 +17,6 @@

 import com.google.gwt.reques

Re: [gwt-contrib] Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread Patrick Julien
When is the record updated to have the real id from the server?  We
have getRecord() now which we can use getId() but the receiver no
longer updates the record from one obtained from the server

On Tue, Aug 17, 2010 at 3:49 PM,   wrote:
> Reviewers: jlabanca,
>
> Description:
> Allows subclasses to take control of exit points in
> AbstractRecordListActivity and AbstractRecordEditActivity
>
> https://jira.springsource.org/browse/ROO-1225
> https://jira.springsource.org/browse/ROO-1226
> https://jira.springsource.org/browse/ROO-1227
>
>
> Please review this at http://gwt-code-reviews.appspot.com/771802/show
>
> Affected files:
>  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
>  M user/src/com/google/gwt/app/place/AbstractRecordListActivity.java
>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread rjrjr

http://gwt-code-reviews.appspot.com/771802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread rjrjr


http://gwt-code-reviews.appspot.com/771802/diff/1/2
File user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
(right):

http://gwt-code-reviews.appspot.com/771802/diff/1/2#newcode121
user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java:121:
// when bugs are fixed
On 2010/08/17 20:03:32, jlabanca wrote:

Join with line above.


Done.

http://gwt-code-reviews.appspot.com/771802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread Ray Ryan
If you call getRecord() within exit(), it will have the real id. I'll update
the javadoc.

On Tue, Aug 17, 2010 at 1:32 PM, Patrick Julien  wrote:

> When is the record updated to have the real id from the server?  We
> have getRecord() now which we can use getId() but the receiver no
> longer updates the record from one obtained from the server
>
> On Tue, Aug 17, 2010 at 3:49 PM,   wrote:
> > Reviewers: jlabanca,
> >
> > Description:
> > Allows subclasses to take control of exit points in
> > AbstractRecordListActivity and AbstractRecordEditActivity
> >
> > https://jira.springsource.org/browse/ROO-1225
> > https://jira.springsource.org/browse/ROO-1226
> > https://jira.springsource.org/browse/ROO-1227
> >
> >
> > Please review this at http://gwt-code-reviews.appspot.com/771802/show
> >
> > Affected files:
> >  M user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
> >  M user/src/com/google/gwt/app/place/AbstractRecordListActivity.java
> >
> >
> > --
> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Allows subclasses to take control of exit points in (issue771802)

2010-08-17 Thread rjrjr

http://gwt-code-reviews.appspot.com/771802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] RFC: i18n Messages Additions

2010-08-17 Thread John Tamplin
Here are several additions I am making to the GWT Messages functionality.
 Before finalizing it for review, I would like to get some feedback.

*Extended Plurals
*
Some applications want to have messages like "JohnT, JeffH, and 3 others
have recommended this movie", instead of trying to list all users.

0 - No one has recommended this movie
1 - {1} has recommended this movie
2 - {1} and {2} have recommended this movie
3 - {1}, {2}, and one other have recommended this movie
4+ - {1}, {2}, and {0,number} others have recommended this movie

(with the trick being that the total count needs to be altered by the number
of explicit entries, and that adjusted number is used to drive plural rule
selection, which gets more complicated for languages like Arabic with 6
plural forms).

There have already been requests to allow customizing the form to use even
if the language doesn't require it. For example, "You have no messages" when
the count is 0 even though English doesn't grammatically require it. I
propose the following to accomplish both goals:

@DefaultMessage("{1}, {2}, and {0,number} others have recommended this
movie")
@PluralText({
  "=0", "No one has recommended this movie",
  "=1", "{1} has recommended this movie",
  "=2", "{1} and {2} have recommended this movie",
  "one", "{1}, {2}, and one other have recommended this movie"})
String recommenders(@Optional @Example("3") @PluralCount @Offset(2) int
count, String name1, String name2);

The new pieces are @Offset(2) which means to subtract 2 from the value
before applying normal plural rules, and plural forms "=n", which means if
the original value matches the specified value that form is used instead of
any normal plural lookups. If the value doesn't match any "=n" plural forms,
then the offset (if any) is subtracted and the normal plural rules for the
locale apply.

I am not sure if there is a use case for it, but I was thinking of
supporting forms like "=1..3" as well.

*Static Placeholders
*
Translators shouldn't see things like HTML markup, because it isn't clear to
them whether they should translate portions inside the placeholder or can be
confused by it. The recommendation is to use placeholders to hide those
parts from the translator, and put them back into the translated string.

UiBinder already takes care of a similar situation, but if you using
Messages directly you have to do it yourself, using something like the
following:

private static final String BEGIN_BOLD = "";
private static final String END_BOLD = "";

@DefaultMessage("This is {0}important{1}")
String important(@Example(BEGIN_BOLD) String beginBold, @Example(END_BOLD)
String endBold);
...
msg.important(BEGIN_BOLD, END_BOLD);

It works, but is a lot of boilerplate that is easy to get wrong. I propose
the following:

@DefaultMessage("This is {beginBold,}important{endBold,}")
String important();
...
msg.important();

For escaping, I propose using single quote like elsewhere in Messages, such
as "This is {beginLink,}..{endLink,}" -- the
single quotes protect the braces from ending the parameter, and any single
quotes in the static content would be doubled.  Note that we still have work
to do getting these out of the generated and translated property files, just
like we currently expect the full {0,number,currency} in the translated
files.  That will probably be a task for next quarter, when I intend to
improve support for integration with external translation tools.

*List Rendering
*
Right now, if you want to render a list, you have to do all the work
yourself and have some way of getting locale-specific separators. CLDR
defines the data needed to do this, so I propose adding:

@DefaultMessage("The values are {0,list,number}")
@PluralText({"=0", "There are no values",
  "one", "The value is {0,list,number}"})
String values(@PluralCount List list);

  or

String values(@PluralCount int... list);

  or

String values(@PluralCount int[] list);

...

Example results for English (using the varargs method):

msg.values() => "There are no values"
msg.values(1001) => "The value is 1,001"
msg.values(1,2) => "The values are 1 and 2"
msg.values(1,2,3) => "The values are 1, 2, and 3"

Basically, if the format is list, then the remainder of the argument tag is
a format applied to each element of the list.

*Format Arguments, for Selectable Currency Codes / Timezones
*
If you format a currency value with {0,number,currency}, you get the locales
default currency. It would be nice to be able to specify the currency in the
message (if for example it is always in USD regardless of the locale) or in
a dynamic parameter. I propose adding a general way to add parameters to
formats and subformats:

*Examples:*

   - {0,number:curcode=USD,currency}
  - always uses USD as the currency, regardless of the locale
   - {0,number:curcode=$curCode,\xA4 #,##0}
  - refers to a String parameter named curCode
   - {1,localdatetime:tz=0,yMd hms}
  - uses a timezone constructed from just an hour offset from G

[gwt-contrib] [google-web-toolkit] r8557 committed - First cut at keyboard navigation for CellTree...

2010-08-17 Thread codesite-noreply

Revision: 8557
Author: r...@google.com
Date: Tue Aug 17 11:18:17 2010
Log: First cut at keyboard navigation for CellTree

Review at http://gwt-code-reviews.appspot.com/758802

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8557

Modified:
  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/ContactTreeViewModel.java

 /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.css
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTreeClean.css
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTreeNodeView.java

===
---  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/ContactTreeViewModel.java	 
Tue Aug 17 10:14:36 2010
+++  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/ContactTreeViewModel.java	 
Tue Aug 17 11:18:17 2010

@@ -21,8 +21,11 @@
 import com.google.gwt.cell.client.CompositeCell;
 import com.google.gwt.cell.client.FieldUpdater;
 import com.google.gwt.cell.client.HasCell;
+import com.google.gwt.cell.client.ValueUpdater;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.NativeEvent;
+import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
 import  
com.google.gwt.sample.showcase.client.content.cell.ContactDatabase.Category;

@@ -99,6 +102,16 @@
 public int compareTo(LetterCount o) {
   return (o == null) ? -1 : (firstLetter - o.firstLetter);
 }
+
+@Override
+public boolean equals(Object o) {
+  return compareTo((LetterCount) o) == 0;
+}
+
+@Override
+public int hashCode() {
+  return firstLetter;
+}

 /**
  * Increment the count.
@@ -185,6 +198,15 @@
   }
 });
 contactCell = new CompositeCell(hasCells) {
+  @Override
+  public void onBrowserEvent(Element parent, ContactInfo value, Object  
key,

+  NativeEvent event, ValueUpdater valueUpdater) {
+if ("keyup".equals(event.getType())
+&& event.getKeyCode() == KeyCodes.KEY_ENTER) {
+   
selectionModel.setSelected(value, !selectionModel.isSelected(value));

+}
+  }
+
   @Override
   public void render(ContactInfo value, Object key, StringBuilder sb) {
 sb.append("");
===
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.css	Mon  
Jun  7 12:20:31 2010
+++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.css	Tue  
Aug 17 11:18:17 2010

@@ -23,9 +23,29 @@
   padding-right: 3px;
 }

+/*
+div:focus { outline: none; }
+*/
+
+.keyboardSelectedItem {
+  background-color: #00;
+}
+
 .openItem {

 }
+
+.topItem {
+
+}
+
+.topItemImage {
+
+}
+
+.topItemImageValue {
+
+}

 @sprite .selectedItem {
   gwt-image: 'cellTreeSelectedBackground';
@@ -39,15 +59,3 @@
   padding-left: 16px;
   outline: none;
 }
-
-.topItem {
-
-}
-
-.topItemImage {
-
-}
-
-.topItemImageValue {
-
-}
===
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java	Mon  
Aug  2 11:31:26 2010
+++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java	Tue  
Aug 17 11:18:17 2010

@@ -21,6 +21,7 @@
 import com.google.gwt.dom.client.Style.Display;
 import com.google.gwt.dom.client.Style.Position;
 import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.CssResource;
 import com.google.gwt.resources.client.ImageResource;
@@ -38,6 +39,33 @@
  * A view of a tree.
  */
 public class CellTree extends Composite implements HasAnimation {
+
+  /**
+   * A cleaner version of the table that uses less graphics.
+   */
+  public static interface CleanResources extends Resources {
+
+@Source("cellTreeClosedArrow.png")
+ImageResource cellTreeClosedItem();
+
+@Source("cellTreeLoadingClean.gif")
+ImageResource cellTreeLoading();
+
+@Source("cellTreeOpenArrow.png")
+ImageResource cellTreeOpenItem();
+
+@Source("CellTreeClean.css")
+CleanStyle cellTreeStyle();
+  }
+
+  /**
+   * A cleaner version of the table that uses less graphics.
+   */
+  public static interface CleanStyle extends Style {
+String topItem();
+
+String topItemImageValue();
+  }

   /**
* A node animation.
@@ -310,6 +338,11 @@
  */
 String itemValue();

+/**
+ * Applied to the keyboard selected item.
+ */
+String keyboardSelectedItem();
+
 /**
  * Applied to open tree items.
  */
@@ -340,33 +373,6 @@
  */
 String topItemImageValue();
   }
-
-  /**
-   * A cleaner version of the table that uses less graphics.
-   */
-  public static interface CleanStyle exte

[gwt-contrib] Added the Expenses app to the list of GWT samples, and modified each sample's build.xml file to ... (issue752803)

2010-08-17 Thread cramsdale

Reviewers: Dan Rice,

Description:
Added the Expenses app to the list of GWT samples, and modified each
sample's build.xml file to set its source path


Please review this at http://gwt-code-reviews.appspot.com/752803/show

Affected files:
  M samples/build.xml
  M samples/common.ant.xml
  M samples/dynatable/build.xml
  M samples/dynatablerf/build.xml
  A samples/expenses/build.xml
  A samples/expenses/pom.xml
  A samples/expenses/src/log4j.properties
  A samples/expenses/src/main/java/META-INF/jdoconfig.xml
  A samples/expenses/src/main/java/META-INF/persistence.xml
  A samples/expenses/src/main/java/com/google/gwt/mobile/Mobile.gwt.xml
  A  
samples/expenses/src/main/java/com/google/gwt/mobile/client/MobileScrollPanel.java
  A  
samples/expenses/src/main/java/com/google/gwt/mobile/client/Momentum.java

  A samples/expenses/src/main/java/com/google/gwt/mobile/client/Point.java
  A  
samples/expenses/src/main/java/com/google/gwt/mobile/client/Scroller.java

  A samples/expenses/src/main/java/com/google/gwt/mobile/client/Touch.java
  A  
samples/expenses/src/main/java/com/google/gwt/mobile/client/TouchEvent.java
  A  
samples/expenses/src/main/java/com/google/gwt/mobile/client/TouchHandler.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/Expenses.gwt.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/ExpensesCommon.gwt.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/ExpensesMobile.gwt.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/LoadExpensesDB.gwt.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/DataGenerationService.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/DataGenerationServiceAsync.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetailsCellTable.css
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseList.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseList.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseListCellTable.css
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/Expenses.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobile.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobileShell.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobileShell.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesShell.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesShell.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/GetValue.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/LoadExpensesDB.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseDetails.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseDetails.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseList.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobilePage.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportList.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/PhaseAnimation.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ScaffoldMobileShell.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ScaffoldShell.ui.xml
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/SortableHeader.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/desktop.css
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/mobile.css
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRecord.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRecordChanged.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java
  A  
samples/expe

[gwt-contrib] [google-web-toolkit] r8558 committed - Allows subclasses to take control of exit points in...

2010-08-17 Thread codesite-noreply

Revision: 8558
Author: rj...@google.com
Date: Tue Aug 17 11:40:14 2010
Log: Allows subclasses to take control of exit points in
AbstractRecordListActivity and AbstractRecordEditActivity

https://jira.springsource.org/browse/ROO-1225
https://jira.springsource.org/browse/ROO-1226
https://jira.springsource.org/browse/ROO-1227

Review at http://gwt-code-reviews.appspot.com/771802

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8558

Modified:
 /trunk/user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
 /trunk/user/src/com/google/gwt/app/place/AbstractRecordListActivity.java

===
---  
/trunk/user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java	 
Mon Aug 16 20:22:31 2010
+++  
/trunk/user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java	 
Tue Aug 17 11:40:14 2010

@@ -70,16 +70,16 @@
 if ((unsavedChangesWarning == null)
 || Window.confirm(unsavedChangesWarning)) {
   if (requestObject != null) {
-requestObject.reset(); // silence the next mayStop() call when  
place

-  }
-  // changes
-  if (creating) {
-display.showActivityWidget(null);
-  } else {
-exit();
-  }
+// silence the next mayStop() call when place changes
+requestObject.reset();
+  }
+  exit(false);
 }
   }
+
+  public R getRecord() {
+return record;
+  }

   public String mayStop() {
 if (requestObject != null && requestObject.isChanged()) {
@@ -113,10 +113,10 @@
   return;
 }
 boolean hasViolations = false;
-
-// TODO(amit) at the moment we only get one response, and futures  
are buggy.
-// So forcing the issue for now, but the more code involved may  
have to come back

-// when bugs are fixed
+
+// TODO(amit) at the moment we only get one response, and futures  
are
+// buggy. So forcing the issue for now, but the more involved code  
may

+// have to come back when bugs are fixed
 assert response.size() == 1;
 SyncResult syncResult = response.iterator().next();
 record = cast(syncResult.getRecord());
@@ -124,25 +124,25 @@
   hasViolations = true;
   view.showErrors(syncResult.getViolations());
 }
-//for (SyncResult syncResult : response) {
-//  Record syncRecord = syncResult.getRecord();
-//  if (creating) {
-//if (futureId == null | 
| !futureId.equals(syncResult.getFutureId())) {

-//  continue;
-//}
-//record = cast(syncRecord);
-//  } else {
-//if (!syncRecord.getId().equals(record.getId())) {
-//  continue;
-//}
-//  }
-//  if (syncResult.hasViolations()) {
-//hasViolations = true;
-//view.showErrors(syncResult.getViolations());
-//  }
-//}
+// for (SyncResult syncResult : response) {
+// Record syncRecord = syncResult.getRecord();
+// if (creating) {
+// if (futureId == null | 
| !futureId.equals(syncResult.getFutureId())) {

+// continue;
+// }
+// record = cast(syncRecord);
+// } else {
+// if (!syncRecord.getId().equals(record.getId())) {
+// continue;
+// }
+// }
+// if (syncResult.hasViolations()) {
+// hasViolations = true;
+// view.showErrors(syncResult.getViolations());
+// }
+// }
 if (!hasViolations) {
-  exit();
+  exit(true);
 } else {
   requestObject = toCommit;
   requestObject.clearUsed();
@@ -165,7 +165,7 @@
   futureId = tempRecord.getId();
   doStart(display, tempRecord);
 } else {
-  fireFindRequest(Value.of(record.getId()), new Receiver() {
+  fireFindRequest(Value.of(getRecord().getId()), new Receiver() {
 public void onSuccess(R record, Set syncResults) {
   if (AbstractRecordEditActivity.this.display != null) {
 doStart(AbstractRecordEditActivity.this.display, record);
@@ -174,6 +174,24 @@
   });
 }
   }
+
+  /**
+   * Called when the user cancels or has successfully saved. This default
+   * implementation tells the {...@link PlaceController} to show the details  
of the

+   * edited record, or clears the display if a creation was canceled.
+   * 
+   * If we're creating, a call to getRecord() from here will return a  
record

+   * with the correct id. However, other properties may be stale or unset.
+   *
+   * @param saved true if changes were comitted
+   */
+  protected void exit(boolean saved) {
+if (!saved && creating) {
+  display.showActivityWidget(null);
+} else {
+  placeController.goTo(new ProxyPlace(getRecord(), Operation.DETAILS));
+}
+  }

   /**
* Called to fetch the details of the edited record.
@@ -195,11 +213,4 @@
 view.showErrors(

[gwt-contrib] Re: Added all safehtml packages. (issue771801)

2010-08-17 Thread xtof


http://gwt-code-reviews.appspot.com/771801/diff/1/10
File user/src/com/google/gwt/safehtml/shared/EscapeUtils.java (right):

http://gwt-code-reviews.appspot.com/771801/diff/1/10#newcode29
user/src/com/google/gwt/safehtml/shared/EscapeUtils.java:29: * Returns a
SafeHtml constructed from a safe string, i.e. without escaping
This method's doc should stipulate the same constraints on its argument
as does SafeHtmlBuilder#appendHtmlConstant(String).

http://gwt-code-reviews.appspot.com/771801/diff/1/14
File user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java
(right):

http://gwt-code-reviews.appspot.com/771801/diff/1/14#newcode116
user/src/com/google/gwt/safehtml/shared/SafeHtmlBuilder.java:116: *
Boolean and numeric types converted to String are always HTML safe -- no
This comment should go above all the append(boolean/numeric type)
methods (I think methods got reordered)?

http://gwt-code-reviews.appspot.com/771801/diff/1/28
File user/test/com/google/gwt/safehtml/shared/SafeHtmlBuilderTest.java
(right):

http://gwt-code-reviews.appspot.com/771801/diff/1/28#newcode41
user/test/com/google/gwt/safehtml/shared/SafeHtmlBuilderTest.java:41:
new SafeHtmlBuilder().appendHtmlConstant("Yabba dabba &
doo\n").appendEscaped("What's up so&so\n").append(html);
Line length?

http://gwt-code-reviews.appspot.com/771801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Continuation of r8542 to actually properly enables double click for (issue774801)

2010-08-17 Thread Fred Sauer
Excellent point, Thomas. I'll undo the double click capabilities from
Hyperlink since it's already available to Anchor via FocusWidget.

On Tue, Aug 17, 2010 at 11:20 AM,  wrote:

> LGTM, though I'm puzzled by Hyperlink implementing
> HasDoubleClickHandlers, given that addClickHandler is deprecated on that
> class.
>
>
> http://gwt-code-reviews.appspot.com/774801/show
>



-- 
Fred Sauer
Developer Advocate
Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@google.com

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Fix broken client date JSON serialization in RecordJsoImp l (issue775801)

2010-08-17 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/775801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: History integration for the RequestFactory apps. (issue717801)

2010-08-17 Thread Ray Ryan
r8558

On Tue, Aug 17, 2010 at 12:56 PM, Patrick Julien  wrote:

> On Tue, Aug 17, 2010 at 3:50 PM, Ray Ryan  wrote:
> > http://gwt-code-reviews.appspot.com/771802
>
>
> this would satisfy my current needs
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Continuation of r8542 to actually properly enables double click for (issue774801)

2010-08-17 Thread fredsa

http://gwt-code-reviews.appspot.com/774801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Improving performance of CellTable. CellTable called StringBuilder#length() before and after ren... (issue775802)

2010-08-17 Thread jlabanca

Reviewers: Dan Rice,

Description:
Improving performance of CellTable. CellTable called
StringBuilder#length() before and after rendering each cell to determine
if we need to add a blank space to force the cell to render, but
length() does an array join on the underlying array in IE, killing
performance.  Instead, we now put a DIV between the TD and the cell
contents, which forces the cell to render. This patch also optimizes
some Cells.


Please review this at http://gwt-code-reviews.appspot.com/775802/show

Affected files:
  M user/src/com/google/gwt/cell/client/ActionCell.java
  M user/src/com/google/gwt/cell/client/CheckboxCell.java
  M user/src/com/google/gwt/cell/client/TextInputCell.java
  M user/src/com/google/gwt/user/cellview/client/CellTable.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Added all safehtml packages. (issue771801)

2010-08-17 Thread t . broyer

On 2010/08/17 20:19:04, xtof wrote:

On 2010/08/17 18:39:28, jat wrote:
> On 2010/08/16 23:39:47, tbroyer wrote:
> > The HtmlSanitizer is a good idea, but the implementation is very

weak [2].

>
> Note that the API is what is important, and SimpleHtmlSanitizer is

just that,

a
> simple implementation.  A more involved implementation can be added

later.

>
> Also, we aren't trying to parse HTML with a regex here, it simply

looks for

> opening tags and allows unescaped on a small set of whitelisted tags

--

> everything else gets escaped.  If you think it fails to do its job,

can you

> supply a string which would not be propertly sanitized?


Looking at the code more closely it would merely "fail" by overly
rejecting tags that are whitelisted: i.e. "should be bold"
would be sanitized to "

[gwt-contrib] Re: Added all safehtml packages. (issue771801)


On 2010/08/17 23:05:06, tbroyer wrote:

On 2010/08/17 20:19:04, xtof wrote:
> On 2010/08/17 18:39:28, jat wrote:
> > On 2010/08/16 23:39:47, tbroyer wrote:
> > > The HtmlSanitizer is a good idea, but the implementation is very

weak [2].

> >
> > Note that the API is what is important, and SimpleHtmlSanitizer is

just

that,
> a
> > simple implementation.  A more involved implementation can be

added later.

> >
> > Also, we aren't trying to parse HTML with a regex here, it simply

looks for

> > opening tags and allows unescaped on a small set of whitelisted

tags --

> > everything else gets escaped.  If you think it fails to do its

job, can you

> > supply a string which would not be propertly sanitized?



Looking at the code more closely it would merely "fail" by overly

rejecting tags

that are whitelisted: i.e. "should be bold" would be

sanitized to

" In other words, does SimpleHtmlSanitizer adhere to the SafeHtml type

contract?


> I believe it does, but of course would like arguments/hunches

towards the

> contrary.



SafeHtml calls for XSS mitigation, and SimpleHtmlSanitizer doesn't

sanitize most

XSS attacks, that use attributes:
"

style='position:absolute;z-index:2147483646;left:0px;top:0px;right:0px;bottom:0px'

onmousemove=\"alert("you've been highjacked");\">"

That's not true, this would be turned into  Having said that, I kind of agree that SimpleHtmlSanitizer is of

pretty

limited
> use; one of the few scenarios where I can see it used is for

rendering

> messages/snippets that are formatted with limited HTML markup, and

are

obtained
> from a complex backend that the developer of the GWT client doesn't

quite want

> to trust to uphold the SafeHtml type contract.  I wouldn't be

terribly opposed

> to droppping it.
>
> I didn't want to implement a full parser, because parsing full HTML

(say in an

> email app) inside the browser generally seems like a bad approach.



I agree, and I'd be OK with removing HtmlSanitizer from this patch to

better

reintroduce it later.




http://gwt-code-reviews.appspot.com/771801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8559 committed - Fix broken client date JSON serialization in RecordJsoImp l...


Revision: 8559
Author: gwt.mirror...@gmail.com
Date: Tue Aug 17 13:12:08 2010
Log: Fix broken client date JSON serialization in RecordJsoImp l

Review at http://gwt-code-reviews.appspot.com/775801

http://code.google.com/p/google-web-toolkit/source/detail?r=8559

Modified:
  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordJsoImpl.java


===
---  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordJsoImpl.java	 
Mon Aug 16 20:22:31 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/client/impl/RecordJsoImpl.java	 
Tue Aug 17 13:12:08 2010

@@ -284,7 +284,7 @@
 }

 if (value instanceof Date) {
-  double millis = ((Date) value).getTime();
+  long millis = ((Date) value).getTime();
   setString(property.getName(), String.valueOf(millis));
   return;
 }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Adds a markTimeline() method to SpeedTracerLogger. (issue776801)


Reviewers: scottb, conroy, fabbott,

Description:
Adds a markTimeline() method to SpeedTracerLogger.
Adds a way to change the format of the log from HTML to
just raw JSON.
Adds a few more instrumentation points to the compiler.


Please review this at http://gwt-code-reviews.appspot.com/776801/show

Affected files:
  M dev/core/src/com/google/gwt/dev/GWTCompiler.java
  M dev/core/src/com/google/gwt/dev/Permutation.java
  M dev/core/src/com/google/gwt/dev/Precompile.java
  M dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  M  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/CompilerEventType.java
  M  
dev/core/src/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLogger.java
  M  
dev/core/test/com/google/gwt/dev/util/log/speedtracer/SpeedTracerLoggerTest.java

  M user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
  M user/src/com/google/gwt/user/rebind/ui/ImageBundleBuilder.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Improving performance of CellTable. CellTable called StringBuilder#length() before and after ren... (issue775802)


LGTM++


http://gwt-code-reviews.appspot.com/775802/diff/1/3
File user/src/com/google/gwt/cell/client/CheckboxCell.java (right):

http://gwt-code-reviews.appspot.com/775802/diff/1/3#newcode37
user/src/com/google/gwt/cell/client/CheckboxCell.java:37: "";
Can the space before the close bracket be eliminated?  Same comment for
INPUT_UNCHECKED.

http://gwt-code-reviews.appspot.com/775802/diff/1/4
File user/src/com/google/gwt/cell/client/TextInputCell.java (right):

http://gwt-code-reviews.appspot.com/775802/diff/1/4#newcode69
user/src/com/google/gwt/cell/client/TextInputCell.java:69: }
You can save some work by rewriting lines 62-68 something like this:

String s = viewData != null ? viewData : (value != null ?  value :
null);
if (s != null) {
  sb.append("");
} else {
  sb.append("");
}

http://gwt-code-reviews.appspot.com/775802/diff/1/5
File user/src/com/google/gwt/user/cellview/client/CellTable.java
(right):

http://gwt-code-reviews.appspot.com/775802/diff/1/5#newcode699
user/src/com/google/gwt/user/cellview/client/CellTable.java:699:
sb.append(i % 2 == 0 ? evenRowStyle : oddRowStyle);
The compiler may already catch this but if not you can rewrite i %2 as i
& 0x1.

http://gwt-code-reviews.appspot.com/775802/diff/1/5#newcode701
user/src/com/google/gwt/user/cellview/client/CellTable.java:701:
sb.append(" ").append(selectedRowStyle);
You could define selectedRowStyle as " " + style.selectedRow() in line
690 and avoid the extra append here

http://gwt-code-reviews.appspot.com/775802/diff/1/5#newcode708
user/src/com/google/gwt/user/cellview/client/CellTable.java:708:
sb.append(" ").append(firstColumnStyle);
Same trick as for selectedRowStyle above

http://gwt-code-reviews.appspot.com/775802/diff/1/5#newcode712
user/src/com/google/gwt/user/cellview/client/CellTable.java:712:
sb.append(" ").append(lastColumnStyle);
Same trick as for selectedRowStyle above

http://gwt-code-reviews.appspot.com/775802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Make the login widget prettier and give dummy authentication better values (issue775803)


Reviewers: Ray Ryan,

Description:
Make the login widget prettier and give dummy authentication better
values


Please review this at http://gwt-code-reviews.appspot.com/775803/show

Affected files:
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml
  M  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml

  M user/src/com/google/gwt/requestfactory/server/UserInformation.java


Index:  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml

===
---  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml	 
(revision 8559)
+++  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml	 
(working copy)

@@ -20,8 +20,11 @@
   left: 75%;
   right: 0%;
   text-align: center;
-  background-color: yellow;
+  background-color: white;
+  color: #7b8fae;
 }
+
+

 .title {
   border-bottom: 1px solid #c3c3c3;
Index:  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml

===
---  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml	 
(revision 8559)
+++  
bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml	 
(working copy)

@@ -51,7 +51,8 @@
   left: 75%;
   right: 0%;
   text-align: center;
-  background-color: yellow;
+  background-color: #777;
+  color: #def;
 }

 .users {
Index: user/src/com/google/gwt/requestfactory/server/UserInformation.java
===
--- user/src/com/google/gwt/requestfactory/server/UserInformation.java	 
(revision 8559)
+++ user/src/com/google/gwt/requestfactory/server/UserInformation.java	 
(working copy)

@@ -36,7 +36,7 @@

 @Override
 public String getEmail() {
-  return "";
+  return "Dummy Email";
 }

 @Override
@@ -56,7 +56,7 @@

 @Override
 public String getName() {
-  return "";
+  return "Dummy User";
 }

 @Override


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Make the login widget prettier and give dummy authentication better values (issue775803)


LGTM. But please don't make the parallel change to Roo until tomorrow,
Alan is converting the template system.

On 2010/08/18 01:13:55, unnurg wrote:




http://gwt-code-reviews.appspot.com/775803/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Make the login widget prettier and give dummy authentication better values (issue775803)

Sounds good - I'll hold off on that until tomorrow - thanks for the heads up.
- Unnur

On Tue, Aug 17, 2010 at 6:15 PM,   wrote:
> LGTM. But please don't make the parallel change to Roo until tomorrow,
> Alan is converting the template system.
>
> On 2010/08/18 01:13:55, unnurg wrote:
>
>
>
>
> http://gwt-code-reviews.appspot.com/775803/show
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r8560 committed - Make the login widget prettier and give dummy authentication better va...


Revision: 8560
Author: unn...@google.com
Date: Tue Aug 17 15:49:51 2010
Log: Make the login widget prettier and give dummy authentication better  
values


Review at http://gwt-code-reviews.appspot.com/775803

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8560

Modified:
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml
  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml

 /trunk/user/src/com/google/gwt/requestfactory/server/UserInformation.java

===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml	 
Wed Aug  4 17:46:23 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ExpensesShell.ui.xml	 
Tue Aug 17 15:49:51 2010

@@ -20,9 +20,10 @@
   left: 75%;
   right: 0%;
   text-align: center;
-  background-color: yellow;
-}
-
+  background-color: white;
+  color: #7b8fae;
+}
+
 .title {
   border-bottom: 1px solid #c3c3c3;
 }
===
---  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml	 
Mon Aug 16 20:22:31 2010
+++  
/trunk/bikeshed/src/com/google/gwt/sample/expenses/gwt/client/ScaffoldShell.ui.xml	 
Tue Aug 17 15:49:51 2010

@@ -51,7 +51,8 @@
   left: 75%;
   right: 0%;
   text-align: center;
-  background-color: yellow;
+  background-color: #777;
+  color: #def;
 }

 .users {
===
---  
/trunk/user/src/com/google/gwt/requestfactory/server/UserInformation.java	 
Fri Aug 13 14:38:39 2010
+++  
/trunk/user/src/com/google/gwt/requestfactory/server/UserInformation.java	 
Tue Aug 17 15:49:51 2010

@@ -36,7 +36,7 @@

 @Override
 public String getEmail() {
-  return "";
+  return "Dummy Email";
 }

 @Override
@@ -56,7 +56,7 @@

 @Override
 public String getName() {
-  return "";
+  return "Dummy User";
 }

 @Override

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors