Re: Using GWT for a large UI project

2010-09-02 Thread Maxim
Marius

you wrote: but one of our goals is to use plain browser functionality,
available on all devices.

Recently I changed my mind a little bit in connection to that - this
goal is more technical than commercial. Users want certain
functionality, if functionality demands plugin - they will install
plugin. E.g. ref Flash technology. Silverlight gives huge amount to
business customers ( at least to their certain category).

Next - this goal is not mentioned in your document :) Also note - if
you try complex GWT application on your phone you will be likely
disappointed, so available on all devices still is not 100% reality.

But of course if you must traget *nix users, then Silverlight is not
your choice. Just mention that in goals :)

Maxim


On Sep 1, 8:57 pm, marius.andreiana marius.andrei...@gmail.com
wrote:
 Thanks Maxim (saw your email),

 http://demos.telerik.com/silverlight/salesdashboard/says Missing
 plugin. So I left ;)
 I'm sure silverlight can have great results for controlled end user
 environments, but one of our goals is to use plain browser
 functionality, available on all devices.

 On Sep 1, 4:40 pm, Maxim maxim...@gmail.com wrote:



  Marius,

  in your document you compare GWT wih ASP.NET AJAX but I think it
  should be rather compared with Silverlight, this is a client-side
  technology like GWT which is not linked to server. ASP.NET AJAX is
  something very different and demands IIS to be installed server-side.

  My story about this comparison. We are having good customer we were
  trying to develop forusingGWT. Actually skeleton was developedusing
  GWT but then he wanted more modern appearance, and he could pay money
  for commercial libs. We figured out that commercial libraries for
  Silverlight are light years ahead of what GWT 3rd party libraries can
  offer. Price for such libraries are relatively low ( say in comparison
  to developer monthly salary), so cost is not a big problem I think.

  e.g.http://demos.telerik.com/silverlight/salesdashboard/

  Still we love GWT and use it heavily for 
  sayhttp://www.projectkaiser.com:8080/

  One more thing: from time to time we have browser-compatibilty-related
  issues ( not so big though )  with GWT, especially in Firefox.

  Maxim

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC SerializationException when going from GWT 1.7 to GWT 2.0.4

2010-09-02 Thread Blagoja Chavkoski
Hi,

I would say...try with the normal implement Serializable but its important
to add for the classes Uniq serilizationUID
and i think will work...

regards

On Mon, Aug 30, 2010 at 11:35 PM, Ken Wielechowski 
ken.wielechow...@gmail.com wrote:

 In going from GWT 1.7 to GWT 2.0.4, I am getting the following
 exception:

 dispatching incoming RPC call
 com.google.gwt.user.client.rpc.SerializationException:
 java.lang.reflect.InvocationTargetException
 at

 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer
 (ServerSerializationStreamWriter)
 Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
 'java.util.ArrayList' was not included in the set of types which can
 be serialized by this SerializationPolicy or its Class object could
 not be loaded. For security purposes, this type will not be
 serialized.: instance =

 [com.etransxpress.portal.client.utilitymanager.etranslabelvalueb...@3fe42e0a,
 

 The class
 'com.etransxpress.portal.client.utilitymanager.EtransLabelValueBean'
 is defined as follows:

 package com.etransxpress.portal.client.utilitymanager;

 import com.google.gwt.user.client.rpc.IsSerializable;
 @SuppressWarnings(unchecked)
 public class EtransLabelValueBean implements IsSerializable
 {
private String label;
private String value;

public EtransLabelValueBean()
{
}

public EtransLabelValueBean (String label, String value)
{
this.label = label;
this.value = value;
}

public String getLabel() {
return label;
}

public void setLabel(String label) {
this.label = label;
}

public String getValue() {
return value;
}

public void setObject(String value) {
this.value = value;
}
 }

 I am getting this exception where I am populating an ArrayList of
 these objects defined in my program as follows:

private static CollectionEtransLabelValueBean countryList; (which
 is an instance variable)

//Before RPC call is made to server, the following is done:
countryList = new ArrayListEtransLabelValueBean();
//The server side is returning an ArrayList of this data

 The application is deployed on a JBOSS 5.0.1 application server.

 Do you have any ideas on how I can correct this problem.
 Thank you very much.

 Ken Wielechowski

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



I18N with texts from db.

2010-09-02 Thread xworker
Hi all

I want to build a system with I18N where the texts in key/value pairs
wich I want to load from a webservice and cached in the server part of
GWT. I have done this before in JSF applications with hashmaps and now
I'm about to implement it in GWT. Which I18N construct would be best
to use for this purpose? I have looked at the Dictionary, but I'm not
sure if it would be the best option. The Dictionary can be created
like this:

Dictionary theme = Dictionary.getDictionary(CurrentTheme);

the getDictionary method takes a String as input, I'm thinking to
return a String representation of a hashmap from the server part of
GWT and create the Dictionary with it. I will have an admin interface
where admins can manually refresh cache and set cache timeouts.

Thoughts/comments on this?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Deselect items in a CellTree with MultiSelectionModel

2010-09-02 Thread jaga
I got this to multiple selection to work properly by adding a
ButtonCell adjacent to the CheckboxCell. The code is in Bike Shed. The
ButtonCell is also bound to the Selection Model. This takes care of
what seem to be two bugs:
1) the CheckboxCell is not firing a setFieldUpdater event
2) the ButtonCell event is not fired correctly. Giving the table
something else to do, i.e., with the CheckboxCell, helps the event to
propagate correctly.

For the record I also use the Selection Model's selection change
listener to inform the presenter that a selection has changed.

Lastly, you need to make sure your model implements Comparable. The
compareTo, equals, and hashCode have to be well implemented for the
selection model to work ok.



On Aug 26, 9:32 am, jaga j.annes...@gmail.com wrote:
 I suppose this is relevant for a CellTable too?
 The code which does the selection is in model object. The
 object'implements Comparable and the equals, compareTo and hashCode.
 Is it possible to pass in a flag which says whether the row is
 selected, then return false for the equals?

 On Aug 20, 2:09 pm, rhmoller rhmol...@gmail.com wrote:







  I have been digging through the source code for GWT 2.1.0.M2. All
  click events result in adding to the selection. There is no support
  for deselecting items in any of the cell widgets.

  I have filed this issue for it:

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

  On Aug 19, 1:35 pm, rhmoller rhmol...@gmail.com wrote:

   Hi

   I am trying to build a component for selecting multiple items from a
   tree structure using the cellview widgets from GWT 2.1.0.M2.

   I have a custom TreeViewModel with a single MultiSelectionModel object
   which is shared between all NodeInfo objects. I would like it to
   either toggle the selection of items when clicking on them, or support
   CTRL-clicking for deselecting items like in a list box.

   My problem is that I cannotdeselectany of the selected items. What
   do I need to do?

   Best regards
   Rene

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



incubator paging scrolling table current page text box resize

2010-09-02 Thread mariyan nenchev
Hi,

At the moment current page text box from incubator paging scrolling table is
with static width. When the user enters number that is bugger part of the
number will be hidden. How to make this text box resize dynamically
according to the number length?

Regards.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Layout is not displayed

2010-09-02 Thread Florian Rhomberg
Hello!
Can someone tell me why the following code is only displayed if I start my 
application in Eclispse. When I compile my project and try the application in 
eclispe without gwt.codesvr=127.0.0.1:9997 or with a tomcat server the panel is 
empty.

public class DiagnosisHomeDesktop {

  private VerticalPanel layout = new VerticalPanel();
  private final DmisControllerServiceAsync service = 
GWT.create(DmisControllerService.class);
  private DmisConstants constants = new DmisConstants();
  private ScrollPanel east;

  public DiagnosisHomeDesktop(ScrollPanel east){
this.east = east;
  }

  public void createDiagnosisHomeDesktop() {
layout.add(new HTMLFlow(Hello1...));

service.getDiagnosis(Integer.parseInt(Window.Location.getParameter(sessionId)),
 new AsyncCallbackClientDmisSessionDiagnosis() {

  @Override
  public void onFailure(Throwable caught) {
Window.alert(+caught);
  }

  @Override
  public void onSuccess(ClientDmisSessionDiagnosis result) {

east.clear();



layout.setWidth(Window.getClientWidth()-constants.leftNavigationWidth-10+px);
//layout.setLayoutAlign(Alignment.CENTER);
//layout.setAlign(Alignment.CENTER);
layout.setSpacing(5);
layout.add(new HTMLFlow(Hello2...));

if(result != null){

 DiagnosisSummary summary = new 
DiagnosisSummary(result.getSubjectiveSympthomsPatient(), 
result.getObjectiveSympthomsMedicin(), result.getRecord().getPID(), null, 
(Window.getClientWidth()-constants.leftNavigationWidth-10-50), 400);
 layout.add(summary.createSummary());
}
else {
 layout.add(new HTMLFlow(No Diagnosis exists));
}
east.add(layout);
  }});
  }

}

I do ot know why because I used similiar coding for nearly the complete 
application an only there I have the problem. The scroll Panel is normally 
cleared but then no new content is loaded.

Thank you für your help!
Florian

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Piriti xml read error

2010-09-02 Thread Harald Pehl
Hi,

the idea of the XPath expression is to select an element/node/
atrtribute which contains all necessary information for the mapping.
In case of Bus.PickUpPointOptions you have to select a list of
Option elements:

public class Bus {
 public interface BusReader extends XmlReaderBus {}
 public static final BusReader XML = GWT.create(BusReader.class);
 @XmlField String Type;
 @XmlField(//Options) ListOption PickUpPointOptions;
 @XmlField String Fare;
}

- Harald

On Sep 2, 6:16 am, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi Harald,

 I am stuck with the problem defined below. can you pls help on that.

 Regards
 Deepak

 On Sun, Aug 29, 2010 at 12:25 AM, Deepak Singh 
 deepaksingh...@gmail.comwrote:







  Hi Harald,

  While running in development mode, It works fine in IE7 but again gives the
  same exception in chrome.
  Any solution ?

  Could u pls let me know the concept of writing XPath with XMLfield. i mean
  wat would be XPath for a particular xmlfield according to xml ?

  As for example :

  Buses
         Bus
             TypeBusType/Type
             PickUpPointOptions
                    Option
                               SequencepickupSequence /Sequence
                               DescpickupPoint/Desc
                    /Option
                     ..
                     ..
              /PickUpPointOptions
           Farefare/Fare
          /Bus
          Bus
              -
          /Bus
  /Buses
  For the above xml, I have

  *

  public
  **class* Buses {

  *public* *interface* BusesReader *extends* XmlReaderBuses {}

  *public* *static* *final* BusesReader *XML* = GWT.*create*(BusesReader.*
  class*);

  @XmlField(//Bus) ListBus listOfBus;

  }
  public class Bus {

   public interface BusReader extends XmlReaderBus {}
   public static final BusReader XML = GWT.create(BusReader.class);
  �...@xmlfield String Type;
  �...@xmlfield(//PickUpPointOptions) ListOption PickUpPointOptions;
  �...@xmlfield String Fare;

  }

  public class Option {

   public interface OptionReader extends XmlReaderOption {}
   public static final OptionReader XML = GWT.create(OptionReader.class);

  �...@xmlfield int Sequence;
  �...@xmlfield String Desc;
  }

  Am i providing the correct XPath at proper places ?

  Using this, I am able to get the listBus and from this Bus object i get
  ListOption properly but i am not able to read values from Option class. It
  always gives null for Desc and 0 for Sequence.

  Pls suggest.

  Thanks
  Deepak

  On Sat, Aug 28, 2010 at 12:21 AM, Deepak Singh 
  deepaksingh...@gmail.comwrote:

  Hi Harald,

  Thank you very much.
  It worked fine. I am using piriti in my large project so if in future i
  get stuck sometime, i will ask again.

  Thanks
  Deepak

  On Thu, Aug 26, 2010 at 5:39 PM, Harald Pehl .p...@googlemail.comwrote:

  Hi Deepak

  I finally managed to take a closer look to your issues. I created a
  playground project with some simple gwt tests. These tests parse the
  XML you supplied and map the results to StationDetails and Station
  class.

  I found out that your code / mapping annotations needed some minor
  adjustments:
  public class Station {
     ...
    �...@xmlfield int id; // lowercase!
    �...@xmlfield String name; // lowercase!
  }

  public class StationDetails {
     ...
    �...@xmlfield(//Station) // XPath expression to find all Station
  elements
     ListStation listOfStations;
  }

  Making those changes the tests run successfully. You can find the code
  in the SVN repository of Piriti. To test by yourself, please export
  the code and start building:

  svn checkouthttp://piriti.googlecode.com/svn/trunk/piriti
  cd piriti/core
  mvn -DskipTests clean install
  cd ../playground
  mvn eclipse:eclipse clean install

  - Harald

  On 19 Aug., 21:18, Deepak Singh deepaksingh...@gmail.com wrote:
   Hi Harald,

    Apart from this exception mentioned in last post. i am describing my
   original issue as

   I have xml as
   StationDetails
       Station
            id12/id
            nameasd/name
       /Station
       Station
            id12/id
            nameasd/name
       /Station
       Station
            id12/id
            nameasd/name
       /Station
     
   /StationDetails

   Now i am mapping this as follows

   Station.java

   public class Station {
    public interface StationReader extends XmlReaderStation {}
   public static final StationReader XML =
  GWT.create(StationReader.class);
   �...@xmlfield int Id;
   @XmlField String Name;

   }

   public class StationDetails {
    public interface StationDetailsReader extends
  XmlReaderStationDetails {}
   public static final StationDetailsReader XML =
   GWT.create(StationDetailsReader.class);
   �...@xmlfield ListStation listOfStations;

   }

   Now i am reading this as follows:

   Document doc = new XmlParser().parse(strResponse);
   ListStation listOfStations = Station.XML.readList(doc);   Error
  while
   executing this line

   

Serialization Exception on the Client with Bags

2010-09-02 Thread cokol
hello, I'm using TO of kind:

Action {
 String a,b;
 ArrayListContainer list;
}
class Contianer implements IsSerializable {
 Integer i;
 MySerializableClass c;
}

and service:
interface MyService implements RemoteService {
 void call(Action act);
}

which fails with exception (see below) when I fill the list, however
its working if I switch the list to type
ArrayListMySerializableClass or whatever, only in that case above it
fails with almost no hint

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

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CellTable and CeckboxCell

2010-09-02 Thread jaga
I got the multiple selection to work as I and Jocke want by adding a
ButtonCell adjacent to the CheckboxCell. The code is in Bike Shed.
The
ButtonCell is also bound to the Selection Model. This takes care of
what seem to be two bugs:
1) the CheckboxCell is not firing a setFieldUpdater event
2) the ButtonCell event is not fired correctly. Giving the table
something else to do, i.e., with the CheckboxCell, helps the event to
propagate correctly.
For the record I also use the Selection Model's selection change
listener to inform the presenter that a selection has changed.

On Aug 28, 4:17 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 27 août, 21:14, jocke eriksson jock...@gmail.com wrote:

  I have a column of CheckboxCells. The use case is pretty like the one for
  gmail, you can check a checkbox without jumping in to the message. So if it
  is not supported then i think that it should be, or some good workaround at
  least.

 And you are using the SelectionModel to jump to the message ? I
 think you'd rather use ClickableTextCell or similar, and jump from
 the ValueUpdater instead of SelectionModel (and you'd use 
 aMultiSelectionModelwith the CheckboxCell handling the selection).

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to run my DETAILED/PRETTY compiled GWT application locally / on app engine?

2010-09-02 Thread Ingo Jaeckel
hello everyone,

i want to profile the client side code of my gwt application honeycrm.
a lot of times i read i just have to compile my application with
pretty or detailed output style. then i should run and profile it e.g.
with firebug.

compiling my app with another output style is easy i.e. integrated
into the eclipse gwt plugin. but evertime i run my application from
eclipse it is recompiled with obfuscated output style. when i compile
it using detailed and then deploy it to app engine, the gwt plugin
in eclipse compiles it again and deploys the obfuscated js code.

how can i avoid the recompilation to obfuscated code and instead run
the js code compiled with detailed output style locally / when
deployed to app engine? i found no documentation/tutorials about this
yet.. thanks everyone in advance!

kind regards,
ingo

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Serialization Exception on the Client with Bags

2010-09-02 Thread cokol
SOLVED.

see issue

On 2 Sep., 11:56, cokol eplisc...@googlemail.com wrote:
 hello, I'm using TO of kind:

 Action {
  String a,b;
  ArrayListContainer list;}

 class Contianer implements IsSerializable {
  Integer i;
  MySerializableClass c;

 }

 and service:
 interface MyService implements RemoteService {
  void call(Action act);

 }

 which fails with exception (see below) when I fill the list, however
 its working if I switch the list to type
 ArrayListMySerializableClass or whatever, only in that case above it
 fails with almost no hint

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

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Problems with gwt plugin and eclipse

2010-09-02 Thread TBirch
Alex,
Thanks for your help. I've tried everything I can think of.
I will just have to continue using an older version of eclipse and the
gwt plugin for now
as they work okay on both machines.
Terry

On Sep 1, 9:53 am, AlexG alexander.gauss.ax...@googlemail.com wrote:
 Hi TBirch,

 hmmm it really seems that something is going wrong on your
 machines. Don´t know why it isn´t working on your machine.

 If you have everything as 32-Bit-versions, than it should work.
 Maybe someone else had thisproblem?

 Greets Alex

 On 30 Aug., 15:25, TBirch tjfbi...@bellsouth.net wrote:







  Hi Alex,

  Thanks for your suggestion. I will check the on the jdk version on
  that machine.
  However, I also have a 32 bit vista machine. This morning on the 32
  bit machine I downloaded the helios 3.6 version of eclipse and the 3.6
  version of thegwtplugin. When trying to create a standardgwt
  project I get the same error as on the 64 bit machine:
  Errors occurred during the build.
  Errorsrunningbuilder 'Google Web Toolkit Project Validator' on
  project 'contacts'.
  org.eclipse.jdt.internal.core.JavaModel cannot be cast to
  org.eclipse.jdt.core.IJavaProject

  Myproblemdoes not seem to be related to a 64 bit versus 32 issue.
  Could there be another piece of software on both of my machines that
  could be causing aproblem?
  Thanks, Terry

  On Aug 30, 4:52 am, AlexG alexander.gauss.ax...@googlemail.com
  wrote:

   Hi TBirch

   I also had problems, ehwn I get started withGWT.
   I am using Windows 7 64-Bit.

   I have the followong Verison installed, and everything
   works fine:

   Eclipse Helios 3.6 32-Bit !!
   Plugins fomr the Eclipse-plugin-install-feature

   Be sure you have a Java 32-Bit JDK installed, otherwise
   this will nor work with Eclipse 32-Bit.

   Greets Alex

   On 29 Aug., 21:44, TBirch tjfbi...@bellsouth.net wrote:

I amrunning64 bit windows vista and for some reason I am getting
this error:
Errors occurred during the build.
Errorsrunningbuilder 'Google Web Toolkit Project Validator' on
project 'contacts'.
org.eclipse.jdt.internal.core.JavaModel cannot be cast to
org.eclipse.jdt.core.IJavaProject

I have tried several versions of eclipse and and the only way I seem
to be able to create and run a standardgwtproject in eclipse is by
going back to an older version of eclipse i.e Version:
3.5.0.v20090611a-9gEeG1HFtQcmRThO4O3aR_fqSMvJR2sJ
Build id: I20090611-1540

Anyone have any suggestions as I have tried every other combination of
32 and 64 bit eclipse withgwtpluginI can think of.
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



TabLayoutPanel expand to fit content?

2010-09-02 Thread Falcon
I'm pretty new to the GWT layout system. Since I'm using standards
mode I really should use TabLayoutPanel instead of TabPanel. However,
I need the content area of each tab to fill all of the vertical and
horizontal space of its parent. How do I accomplish that?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Howto access instance method from external JavaScript?

2010-09-02 Thread KaiWeing
Hello,

I am looking for a way to post to my event bus via user defined
javascript.

This is what I came up with, but the event is not fired. What's wrong?

// I call this during onModuleLoad
public native void registerExternalEventSink() /*-{
$wnd.fireExternalEvent =
th...@org.test.gwt_platform_client::fireExternalEvent(Ljava/lang/
String;);
}-*/;


private void fireExternalEvent(String eventData) {
SomeEvent.fire(ginjector.getEventBus(), eventData);
}

js call:

fireExternalEvent(mydata); // event is not triggered

Thanks for your input!

Kai

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Caching Images

2010-09-02 Thread Jeff Chimene
Your requirements aren't compatible w/ image bundle. It looks like you'll
have to rely on the browser cache.

On Tue, Aug 31, 2010 at 8:06 AM, pete superp...@geekcity.de wrote:

 Hello,

 I'm kind of confused how to proceed in the following scenario:
 I am writing on a card game, the cards have a small and a full image
 and are dynamical created at start time from an image dir on the
 server (meaning the server reads the image dir and creates cards
 according to filename from the images in the dir)
 Now I would like to cache all those images on the client side and hold
 a cached card array. I read about imagebundle and clientbundle, but
 a) I don't know the filenames at compile time
 b) I have certain scaling methods that maybe depend on the original
 image format (since I read that imagebundle creates one big composed
 image + an interface to kind of cut out the respective image from
 the big image). At least I need to be able to scale the images just as
 it is possible with classical image files...

 Has anyone some tip on how to achieve this the most efficient and
 elegant way? Is ImageBundle still a good way to do that? And if yes,
 how to manage the dynamic nature? Any help would be highly
 appreciated :-)

 Greetz

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



gwt-test-utills test case

2010-09-02 Thread suersh babu
Hi,

I using eclipse 3.4.2 with gwt 2.0.4 ,to test my gwt i have decided to test
using gwt-test-utils so i have edited pom.xml accordingly also i added all
jar which needed. but when i test it gives this error , i am using junit 4.

java.lang.NoClassDefFoundError: AbstractGWTEasyMockTest
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
etc ...


Jar file which i added in class path are following:
cglib-nodep-2.1_3.jar
antlr-runtime-3.0.1.jar
easymock-2.3.jar
easymockclassextension-2.3.jar
javassist-3.8.GA.jar
stringtemplate-3.1-b1.jar


So error is on GWTTestReflectionUtils, and AbstractGwtTest. So is it i am
missing any of jar file, are my procedure which i am following is wrong
please let me known if i am wrong ,any solution much appreciated.


my pom.xml is
project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;

modelVersion4.0.0/modelVersion
groupIdcom.octo.gwt.test17.demo/groupId
artifactIddemo1/artifactId
packagingwar/packaging
version0.1-SNAPSHOT/version
nameGWT 1.7 Tests Utils Demo Application 1/name

properties
gwt.version1.7.0/gwt.version
gwt.test.utils.version0.2/gwt.test.utils.version
/properties

dependencies

dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.7/version
scopetest/scope
/dependency
dependency
groupIdcom.google.gwt/groupId
artifactIdgwt-user/artifactId
version${gwt.version}/version
/dependency
dependency
groupIdcom.google.gwt/groupId
artifactIdgwt-servlet/artifactId
version${gwt.version}/version
/dependency
dependency
groupIdcom.octo.gwt.test17/groupId
artifactIdgwt-test-utils/artifactId
version${gwt.test.utils.version}/version
scopetest/scope
/dependency
dependency
groupIdlog4j/groupId
artifactIdlog4j/artifactId
version1.2.14/version
/dependency
/dependencies

repositories
repository
idgwt-test-utils-repo/id
urlhttp://gwt-test-utils.googlecode.com/svn/maven//url
/repository
/repositories

build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
encodingUTF-8/encoding
source1.5/source
target1.5/target
/configuration
/plugin
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdgwt-maven-plugin/artifactId
version1.1/version
configuration
hostedWebapptarget/hostedWebapp/hostedWebapp
logLevelINFO/logLevel
modulecom.octo.gwt.test17.demo.demo1.MyApp/module

runTargetcom.octo.gwt.test17.demo.demo1.MyApp/MyApp.html/runTarget
styleOBF/style
extraJvmArgs-Xmx512m/extraJvmArgs
/configuration
executions
execution
idcompile/id
goals
goalcompile/goal
/goals
/execution
execution
idgenerateAsync/id
goals
goalgenerateAsync/goal
/goals
/execution
/executions
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
jvm${env.JAVA6_HOME}/bin/java/jvm
argLine-javaagent:target/bootstrap.jar/argLine
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
executions
execution
idcopy/id
phasegenerate-resources/phase
goals
goalcopy/goal
/goals
configuration
artifactItems
artifactItem
groupIdcom.octo.gwt.test17/groupId

artifactIdgwt-test-utils-bootstrap/artifactId


Re: Can not download gwt developer plugin

2010-09-02 Thread Chris Ramsdale
There was an update on our side yesterday and the Developer Plugin page has
been restored. Please let us know if you still experience problems.

-- Chris

On Fri, Aug 27, 2010 at 5:47 PM, Chris Ramsdale cramsd...@google.comwrote:

 You can also use this link in the interim:

  http://gwt.google.com/samples/MissingPlugin


 On Fri, Aug 27, 2010 at 10:45 AM, David Chandler (Google) 
 drfibona...@google.com wrote:

 Oops, there is a broken URL mapping. This will be fixed shortly.

 /dmc
 David Chandler
 Developer Programs Engineer, Google Web Toolkit

 On Aug 26, 9:39 am, Guillaume Lasnier guillaume.ph.lasn...@gmail.com
 wrote:
  Hi,
  I have the same problem not being able to install the GWT
 developerpluginon any browser because the link is broken. Google please
 help,
  this is critical!!!
 
  Please find below the install url for eachpluginI got using the
  cached page on Google:
 
  firefox-old :
{
  caption : Sorry, the GWT DeveloperPluginonly supports
  Firefox 3.0 and 3.5 at present,
  url : http://www.getfirefox.com;,
  supported : false
},
 
opera :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor Opera,
  // TODO(you): If you are reading this, maybe you would be
  interested in contributing an Opera version?
  url : http://code.google.com/webtoolkit/
  makinggwtbetter.html#contributingcode,
  supported : false
},
 
safari-iphone :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor mobile Safari,
  url : troubleshootingUrl,
  supported : false
},
 
webkit-android :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor mobile WebKit,
  url : troubleshootingUrl,
  supported : false
},
 
chrome-lin :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor Chrome on Linux,
  url : troubleshootingUrl,
  supported : false
},
 
chrome-mac :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor Chrome on OS X,
  url : troubleshootingUrl,
  supported : false
},
 
chrome-win :
{
  caption : The GWT DeveloperPluginrequires Chrome 4 or
  later,brso click here to learn about switching to the Chrome
  DevChannel to get early access,
  url : http://dev.chromium.org/getting-involved/dev-
  channel,
  supported : false
},
 
safari-win :
{
  caption : Sorry, there is currently no GWT
 DeveloperPluginfor Safari on Windows,
  url : troubleshootingUrl,
  supported : false
},
 
firefox :
{
  caption : Download the GWT DeveloperPluginbrFor
  Firefox,
  url : https://dl-ssl.google.com/gwt/plugins/firefox/gwt-
  dev-plugin.xpi,
  platforms : Win x86, Linux x86/x86_64, Mac x86/PPC,
  supported : true
},
 
ie :
{
  caption : Download the GWT DeveloperPluginbrFor
  Internet Explorer,
  url : https://dl-ssl.google.com/tag/s/appguid%3D
  %7B9a5e649a-ec63-4c7d-99bf-75adb345e7e5%7D%26lang%3Den%26appname%3DGWT
  %2520Developer%2520Plugin%2520for%2520IE%26needsadmin%3Dfalse/gwt/
  plugins/ie/GwtDevPluginSetup.exe,
  platforms : Win x86,
  supported : true
},
 
chrome4-win :
{
  caption : Download the GWT DeveloperPluginbrFor
  Chrome,
  url : https://dl-ssl.google.com/gwt/plugins/chrome/gwt-
  dev-plugin.crx,
  platforms : Win x86,
  supported : true
},
 
safari-mac :
{
  caption : Download the GWT DeveloperPluginbrFor
  Safari,
  url : https://dl-ssl.google.com/gwt/plugins/safari/gwt-
  dev-plugin.dmg,
  platforms : Mac x86/x86_64/PPC,
  supported : true
}

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, 

Re: How to run my DETAILED/PRETTY compiled GWT application locally / on app engine?

2010-09-02 Thread Chris Conroy
When you run from eclipse, you are running in DevMode which does not cause a
recompile.

If you compile your app as you like (with DETAILED or PRETTY), run from
Eclipse, and then strip the ?gwt.codesvr fragment from your URL, you'll be
served up the DETAILED or PRETTY compiled version that you just created. For
the vast majority of your issues though, debugging via DevMode (read: in
Java) is going to be what you want.

On Thu, Sep 2, 2010 at 6:08 AM, Ingo Jaeckel ingo.jaec...@googlemail.comwrote:

 hello everyone,

 i want to profile the client side code of my gwt application honeycrm.
 a lot of times i read i just have to compile my application with
 pretty or detailed output style. then i should run and profile it e.g.
 with firebug.

 compiling my app with another output style is easy i.e. integrated
 into the eclipse gwt plugin. but evertime i run my application from
 eclipse it is recompiled with obfuscated output style. when i compile
 it using detailed and then deploy it to app engine, the gwt plugin
 in eclipse compiles it again and deploys the obfuscated js code.

 how can i avoid the recompilation to obfuscated code and instead run
 the js code compiled with detailed output style locally / when
 deployed to app engine? i found no documentation/tutorials about this
 yet.. thanks everyone in advance!

 kind regards,
 ingo

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
Chris Conroy
Software Engineer
Google, Atlanta

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How can I develop GWT apps with GAE Python?

2010-09-02 Thread Shedokan
Hello, I am developing an app which is mainly based on ajax and has a
backend of GAE Python.
Currently I'm just compiling the App and copying it to the GAE
directory, but it's just too much hassle waiting 20seconds to compile
it each time instead of the live development mode.

Is there any way of using the Live development mode with ajax sending
to an GAE python backend?

PS: don't offer me to move to GAE java please

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: incubator paging scrolling table current page text box resize

2010-09-02 Thread mariyan nenchev
Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to run my DETAILED/PRETTY compiled GWT application locally / on app engine?

2010-09-02 Thread ingo
hello chris,

thank you so much for your explanation. i did not know for example
that stripping away the ?gwt.codesrv fragment runs my gwt app in
javascript mode. that is very very useful, thanks for the hint. i
already identified some of my applications hotspots and fixed them!

i summed up my experiences around the topic in the wiki of my project:
http://code.google.com/p/honeycrm/wiki/Profiling

happy profiling everyone!

kind regards,
ingo

On 2 Sep., 17:23, Chris Conroy con...@google.com wrote:
 When you run from eclipse, you are running in DevMode which does not cause a
 recompile.

 If you compile your app as you like (with DETAILED or PRETTY), run from
 Eclipse, and then strip the ?gwt.codesvr fragment from your URL, you'll be
 served up the DETAILED or PRETTY compiled version that you just created. For
 the vast majority of your issues though, debugging via DevMode (read: in
 Java) is going to be what you want.

 On Thu, Sep 2, 2010 at 6:08 AM, Ingo Jaeckel 
 ingo.jaec...@googlemail.comwrote:









  hello everyone,

  i want to profile the client side code of my gwt application honeycrm.
  a lot of times i read i just have to compile my application with
  pretty or detailed output style. then i should run and profile it e.g.
  with firebug.

  compiling my app with another output style is easy i.e. integrated
  into the eclipse gwt plugin. but evertime i run my application from
  eclipse it is recompiled with obfuscated output style. when i compile
  it using detailed and then deploy it to app engine, the gwt plugin
  in eclipse compiles it again and deploys the obfuscated js code.

  how can i avoid the recompilation to obfuscated code and instead run
  the js code compiled with detailed output style locally / when
  deployed to app engine? i found no documentation/tutorials about this
  yet.. thanks everyone in advance!

  kind regards,
  ingo

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 Chris Conroy
 Software Engineer
 Google, Atlanta

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Using GWT for a large UI project

2010-09-02 Thread lineman78
I completely agree with marius on the plugin requirement for
silverlight.  Also, until M$ decides to make a full version of
Silverlight available on Linux it will never become popular.  Since
the majority of the people that use Linux are software devs, it would
make sense that you would want to support it to gain acceptance with
devs.  Those who argue that Moonlight is an acceptable alternative and
M$ is giving Novell full support I challenge you to try to use the
most popular feature of Silverlight; DRM streaming, which M$ refuses
to license for x86 because they are afraid their architecture isn't
good enough to withstand a barrage of Linux devs.  Also, I don't see
what silverlight and business customers have to do with each other
other than the corporate insistence of paying for M$ products.  Also,
it has been well documented that with GWT you can architect your
software in such a way that you can output an optimized display for
mobile clients.

On Sep 2, 12:24 am, Maxim maxim...@gmail.com wrote:
 Marius

 you wrote: but one of our goals is to use plain browser functionality,

 available on all devices.

 Recently I changed my mind a little bit in connection to that - this
 goal is more technical than commercial. Users want certain
 functionality, if functionality demands plugin - they will install
 plugin. E.g. ref Flash technology. Silverlight gives huge amount to
 business customers ( at least to their certain category).

 Next - this goal is not mentioned in your document :) Also note - if
 you try complex GWT application on your phone you will be likely
 disappointed, so available on all devices still is not 100% reality.

 But of course if you must traget *nix users, then Silverlight is not
 your choice. Just mention that in goals :)

 Maxim

 On Sep 1, 8:57 pm, marius.andreiana marius.andrei...@gmail.com
 wrote:

  Thanks Maxim (saw your email),

 http://demos.telerik.com/silverlight/salesdashboard/saysMissing
  plugin. So I left ;)
  I'm sure silverlight can have great results for controlled end user
  environments, but one of our goals is to use plain browser
  functionality, available on all devices.

  On Sep 1, 4:40 pm, Maxim maxim...@gmail.com wrote:

   Marius,

   in your document you compare GWT wih ASP.NET AJAX but I think it
   should be rather compared with Silverlight, this is a client-side
   technology like GWT which is not linked to server. ASP.NET AJAX is
   something very different and demands IIS to be installed server-side.

   My story about this comparison. We are having good customer we were
   trying to develop forusingGWT. Actually skeleton was developedusing
   GWT but then he wanted more modern appearance, and he could pay money
   for commercial libs. We figured out that commercial libraries for
   Silverlight are light years ahead of what GWT 3rd party libraries can
   offer. Price for such libraries are relatively low ( say in comparison
   to developer monthly salary), so cost is not a big problem I think.

   e.g.http://demos.telerik.com/silverlight/salesdashboard/

   Still we love GWT and use it heavily for 
   sayhttp://www.projectkaiser.com:8080/

   One more thing: from time to time we have browser-compatibilty-related
   issues ( not so big though )  with GWT, especially in Firefox.

   Maxim

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Speed-Optimization of an application (RPCs, Architecture)

2010-09-02 Thread Olivier TURPIN
in a near future if you need to play with command pattern you could
find some interesting hints with thoses articles :
- Tutorial explaining the basics of gwt-dispatch :
http://borglin.net/gwt-project/?page_id=283
- Nice articles about batching with gwt-dispatch (by the M. David
Chandler)
http://turbomanage.wordpress.com/2010/07/16/dispatchqueue/
http://turbomanage.wordpress.com/2010/07/12/caching-batching-dispatcher-for-gwt-dispatch/

PS it's always good to keep in mind browser's limitation but the
limitation of '2 connection /server' tend to move to more ajaxfriendly
values with the newest version of FF, IE ...

Browser HTTP/1.1HTTP/1.0
IE 6,7  2   4
IE 86   6
Firefox 2   2   8
Firefox 3   6   6
Safari 3,4  4   4
Chrome 1,2  6   ?
Chrome 34   4
Opera 9.63,10.00alpha   4   4
source :
http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/


PS N°2 maybe the user won't hit the 2nd or 3rd tab, you should
consider calling RPC only if needed

On 1 sep, 14:45, Fabian fabi.gin...@web.de wrote:
 Hi Tanguy,

 thank you for your answer. I think for my app it is too late to switch
 to this kind of using commands and due to that having the chance to
 batch them. (since i have only a few days to finish it). I will
 consider it in my next apps.

 Thanks for telling me, that fewer rpc calls are better than more rpc
 calls (considering same amount of data), didn't find this information
 anywhere!

 I think for my app i will just wait until the first rpc send the data
 from the server to the first tab, and then start the other rpcs. That
 should be good enough for my app this time.

 Greetings,
 Fabian

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Howto access instance method from external JavaScript?

2010-09-02 Thread Thomas Broyer

On Sep 2, 4:11 pm, KaiWeing kaiwe...@gmx.net wrote:
 Hello,

 I am looking for a way to post to my event bus via user defined
 javascript.

 This is what I came up with, but the event is not fired. What's wrong?

 // I call this during onModuleLoad
 public native void registerExternalEventSink() /*-{
 $wnd.fireExternalEvent =
 th...@org.test.gwt_platform_client::fireExternalEvent(Ljava/lang/
 String;);

 }-*/;

 private void fireExternalEvent(String eventData) {
 SomeEvent.fire(ginjector.getEventBus(), eventData);

 }

 js call:

 fireExternalEvent(mydata); // event is not triggered

 Thanks for your input!

The this in you code will be translated in to a JavaScript this,
which won't be the object you're expecting. You just have to avoid
using the this keyword as the this object of the method call, and
it's fortunately very easy:

public native void registerExternalEventSink() /*-{
  var that = this;
$wnd.fireExternalEvent = $entry(function(str) {
   t...@org.test.gwt_platform_client::fireExternalEvent(Ljava/lang/
String;)(str);
  });
}-*/;

I also added the $entry() wrapper so that exceptions thrown from
within your code go through your GWT.UncaughtExceptionHandler.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Separate modules for separate views?

2010-09-02 Thread Riley
I'm making an application that will have two types of users, type A
and type B.  Type A users need MUCH MORE functionality than type B
users - in fact, type B users will only be able to see a single
screen, while type A will see more than ten.

I don't want all of the stuff for type A users to be downloaded by
type B users.  However, I would like to reuse the code that type B
*does* need for type A users, since they will also need it.
Essentially, the B functionality is (very nearly) a subset of the A
functionality.

So it would make sense to me to make a module for type A and a module
for type B, right?  And then, have an A.html host page and a separate
B.html host page.   I want them to be in a single project because I'm
using appengine and need them both to deploy simultaneously -
otherwise, maybe I would just make them totally separate apps.


Question 1: Does this separation make sense?

Question 2: How do I achieve this separation?  How do I make a
separate module that also compiles to js?

I started out with the B app pretty complete in an Eclipse project.
Then, I added a module, A.gwt.xml, and included all of the same source
paths, etc, as I saw in B.gwt.xml, but with a different EntryPoint.  I
am assuming that module B will not compile all of the additional A
code, even though the A code is in the same directories, because the A
code will never be called from the B entry point.

Then I created A.html, and went to link to A.nocache.js... but I
realized that no such file was being generated.  How do I tell
eclipse, or the gwt, or whomever, to please compile A.gwt.xml into a
separate, runnable js file?

Thanks for any help.  I realize this might be a big question.

Riley

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How much do you charge for your GWT/development services?

2010-09-02 Thread Jambi
Hey guys,

I know that this isn´t maybe the right place to talk about money. But
we are offering a service like any other (but maybe in a better
way ;) ). I´m just interested how much you guys think is an average
price/hour to charge for a GWT project (And let´s say that you have a
average knowledge and already gathered some experience in this field)?
I´m just curious since i´m new to this business.

best regards, Michael

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Separate modules for separate views?

2010-09-02 Thread Riley
Naturally, though I'd been looking for these answers for an hour
before I posted here, I discovered that if I used the google plugin to
create a new HTML page, it automatically configured whatever it needs
to configure to support two separate HTML pages with different modules
 different entry points.  It seems to be working.

My only remaining question, then, is whether I'm right about how the
compiler works.  To rephrase:

I have two modules, side by side in the same directory.  They both
have the client and shared directories as source.  If module B
hardly references any of the code in these folders, will the final
module B compiled JS omit the unused code?  Or, since module B uses
the entire client folder as a source folder, will all of that unused
code for module A also get compiled into B?

Thanks again,

Riley

On Sep 2, 7:07 pm, Riley rileyl...@gmail.com wrote:
 I'm making an application that will have two types of users, type A
 and type B.  Type A users need MUCH MORE functionality than type B
 users - in fact, type B users will only be able to see a single
 screen, while type A will see more than ten.

 I don't want all of the stuff for type A users to be downloaded by
 type B users.  However, I would like to reuse the code that type B
 *does* need for type A users, since they will also need it.
 Essentially, the B functionality is (very nearly) a subset of the A
 functionality.

 So it would make sense to me to make a module for type A and a module
 for type B, right?  And then, have an A.html host page and a separate
 B.html host page.   I want them to be in a single project because I'm
 using appengine and need them both to deploy simultaneously -
 otherwise, maybe I would just make them totally separate apps.

 Question 1: Does this separation make sense?

 Question 2: How do I achieve this separation?  How do I make a
 separate module that also compiles to js?

 I started out with the B app pretty complete in an Eclipse project.
 Then, I added a module, A.gwt.xml, and included all of the same source
 paths, etc, as I saw in B.gwt.xml, but with a different EntryPoint.  I
 am assuming that module B will not compile all of the additional A
 code, even though the A code is in the same directories, because the A
 code will never be called from the B entry point.

 Then I created A.html, and went to link to A.nocache.js... but I
 realized that no such file was being generated.  How do I tell
 eclipse, or the gwt, or whomever, to please compile A.gwt.xml into a
 separate, runnable js file?

 Thanks for any help.  I realize this might be a big question.

 Riley

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder causes build to fail with out of memory

2010-09-02 Thread Jeff Chimene
It's entirely possible you're at a boundary.
I've seen the same behavior: one more entry in a uibinder file and out
of memory.
You don't say what your current stack size is. I use -Xmx512m

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



ChangeHandler for Element?

2010-09-02 Thread ams
I'd like to add a ChangeHandler to a SelectElement, instead of turning
it into a ListBox. I've tried ListBox.wrap, but that gets an assertion
since it is not attached to the RootPanel. It seems you could do a
JSNI call to but I've not figured this out yet.

Here is a small sample to under stand.

Sample.ui.xml

HTMLPanel
table
trtdNeeds OnChange:g:SelectElement ui:field=needsOnChange
name=a/td/tr
trtdWithout OnChange:g:SelectElement ui:field=noOnChange name=a/
td/tr
/table
/HTMLPanel

Sample.java
class Sample {

@UiField SelectElement needsOnChange;
@UiFiled SelectElement noOnChange;

:
:
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Separate modules for separate views?

2010-09-02 Thread yeti
No, but GWT recommended us to merge trivial modules into one TOP
module to make sure the loaded sequence. Undoubtedly, your way is
correct as well.


I have a project with the same logic, and for it, I created several
Layouts and swiched them on TOP module via commands from server-side
code that responsible to access right

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Getting Started Doc - Server Error

2010-09-02 Thread Kenneth Jacker
[ Ubuntu 10.4/64bit;  gwt-2.0.4;   tomcat-6.0.24 ]

I've been working - step-by-step -- through the Get Started with the
GWT SDK document:

  http://code.google.com/webtoolkit/gettingstarted.html

The app works fine in Development Mode, but fails with the following
dialog when I run in Production Mode:


   REMOTE PROCEDURE CALL - FAILURE
   ---

   Sending name to the server:
   GWT User

   Server replies:
   An error occurred while attempting to contact the server.
   Please check your network connection and try again.


Tomcat is installed and appears to be running.  I am able to
view other pages fine with Firefox via 'localhost' on the
same machine.

Anyone know how to get it working?  Did I miss a step?

Thanks!

-Kenneth

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



[gwt-contrib] Re: Fix the escaping done by UrlBuilder. (issue754803)

2010-09-02 Thread t . broyer

I don't quite understand what this change in RemoteServiceServlet has to
do with UrlBuilder...


http://gwt-code-reviews.appspot.com/754803/diff/21001/22002
File user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
(right):

http://gwt-code-reviews.appspot.com/754803/diff/21001/22002#newcode79
user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java:79:
String contextRelativePath =
URLDecoder.decode(modulePath.substring(contextPath.length()));
Beware! URLDecoder will decode + into a space, whereas it might really
mean a +. What I mean is that this is probably a breaking change.

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

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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread scottb

Okay, so here's my main issue with the general idea.  As far as I can
tell, the lifetime of the 'storage' is the same as the lifetime of
generator instances.

I sort of see how it's expedient to have it accessible via
GeneratorContext... however, the downside is you give up static typing
and red squiggleys if you try to lookup something that isn't there.
Net-net, I'm not sure we want to add more methods to support, that don't
really buy anything.

Instead of passing GeneratorContext's everywhere, any Generator
subsystem could pass around a strongly-typed thing instead; or even
extend GeneratorContext and add a couple of strongly-typed getters.



http://gwt-code-reviews.appspot.com/826802/diff/3001/4001
File dev/core/src/com/google/gwt/core/ext/GeneratorContext.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4001#newcode88
dev/core/src/com/google/gwt/core/ext/GeneratorContext.java:88: * com /
google / gwt / core / client / Foo.properties/code would be exposed
Formatter hates you.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4002
File dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4002#newcode502
dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:502:
return 0;
Thought you'd already committed this. :)

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004
File dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode251
dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:251:
private final MapString, Object storage = new HashMapString,
Object();
As far as I can tell, lifetime of this map should be exactly the same as
the lifetime of generators, right?

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode272
dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:272:
generators.clear();
For sure you want to storage.clear() here.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4005
File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
(left):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4005#oldcode486
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:486:
Memory.maybeDumpMemory(GoldenCudsBuilt);
You've verified that the i18n cached state gets cleared here?

http://gwt-code-reviews.appspot.com/826802/diff/3001/4009
File user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4009#newcode413
user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java:413: throws
AnnotationsError {
No real changes in this file.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4017
File user/src/com/google/gwt/i18n/rebind/ResourceFactory.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4017#newcode84
user/src/com/google/gwt/i18n/rebind/ResourceFactory.java:84: String key
= ResourceFactory.classLocale(clazz, locale);
By the way, there's a class you could use here that might interest you:
com.google.gwt.dev.util.StringKey.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4017#newcode112
user/src/com/google/gwt/i18n/rebind/ResourceFactory.java:112:
Extra space

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

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


[gwt-contrib] Re: Add SafeHtml support to ui widgets. (issue829801)

2010-09-02 Thread pdr

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

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


[gwt-contrib] Re: Fixes a strange compiler bug where types generated into new packages may not be found. (issue831802)

2010-09-02 Thread conroy

lgtm

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

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


[gwt-contrib] [google-web-toolkit] r8697 committed - Remove the unnecessary dependency of the expenses sample on AspectJ....

2010-09-02 Thread codesite-noreply

Revision: 8697
Author: amitman...@google.com
Date: Thu Sep  2 04:06:39 2010
Log: Remove the unnecessary dependency of the expenses sample on AspectJ.

Patch by: amitmanjhi
Review by: rjrjr (tbr)

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

Modified:
 /trunk/samples/expenses/pom.xml

===
--- /trunk/samples/expenses/pom.xml Wed Sep  1 14:06:25 2010
+++ /trunk/samples/expenses/pom.xml Thu Sep  2 04:06:39 2010
@@ -9,7 +9,6 @@
properties
roo.version1.1.0.M2/roo.version
spring.version3.0.3.RELEASE/spring.version
-   aspectj.version1.6.10.M1/aspectj.version
slf4j.version1.6.1/slf4j.version
gae.version1.3.4/gae.version
 gae-test.version1.3.4/gae-test.version
@@ -98,11 +97,6 @@
version${slf4j.version}/version
/dependency
dependency
-   groupIdorg.aspectj/groupId
-   artifactIdaspectjrt/artifactId
-   version${aspectj.version}/version
-   /dependency
-   dependency
groupIdjavax.servlet/groupId
artifactIdservlet-api/artifactId
version2.5/version
@@ -464,43 +458,6 @@
/configuration
/plugin
plugin
-   groupIdorg.codehaus.mojo/groupId
-   artifactIdaspectj-maven-plugin/artifactId
-   version1.0/version
-   dependencies
-	!-- NB: You must use Maven 2.0.9 or above or these are ignored (see  
MNG-2972) --

-   dependency
-   groupIdorg.aspectj/groupId
-   
artifactIdaspectjrt/artifactId
-   
version${aspectj.version}/version
-   /dependency
-   dependency
-   groupIdorg.aspectj/groupId
-   
artifactIdaspectjtools/artifactId
-   
version${aspectj.version}/version
-   /dependency
-   /dependencies
-   executions
-   execution
-   goals
-   goalcompile/goal
-   
goaltest-compile/goal
-   /goals
-   /execution
-   /executions
-   configuration
-   outxmltrue/outxml
-   aspectLibraries
-   aspectLibrary
-   
groupIdorg.springframework/groupId
-   
artifactIdspring-aspects/artifactId
-   /aspectLibrary
-   /aspectLibraries
-   source1.6/source
-   target1.6/target
-   /configuration
-   /plugin
-   plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-resources-plugin/artifactId
version2.4.2/version

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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread conroy

On 2010/09/02 13:44:49, scottb wrote:

Okay, so here's my main issue with the general idea.  As far as I can

tell, the

lifetime of the 'storage' is the same as the lifetime of generator

instances.

I thought we agreed after discussing the previous patch for this that
the GeneratorContext was the right lifetime cycle for these caches?


I sort of see how it's expedient to have it accessible via

GeneratorContext...

however, the downside is you give up static typing and red squiggleys

if you try

to lookup something that isn't there.  Net-net, I'm not sure we want

to add more

methods to support, that don't really buy anything.



Instead of passing GeneratorContext's everywhere, any Generator

subsystem could

pass around a strongly-typed thing instead; or even extend

GeneratorContext and

add a couple of strongly-typed getters.


It's unclear to me from your suggestions how to get the same lifetime
for the caches. If the generators themselves hold onto them, then they
won't survive across different instances of the generator in the same
ModuleSpace.


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

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


[gwt-contrib] Re: Add SafeHtml support to ui widgets. (issue829801)

2010-09-02 Thread rice


http://gwt-code-reviews.appspot.com/829801/diff/7001/8002
File user/src/com/google/gwt/user/User.gwt.xml (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8002#newcode51
user/src/com/google/gwt/user/User.gwt.xml:51: inherits
name=com.google.gwt.safehtml.SafeHtml /
Maybe alphabetize?

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004
File user/src/com/google/gwt/user/client/ui/CheckBox.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004#newcode70
user/src/com/google/gwt/user/client/ui/CheckBox.java:70: * Creates a
check box with the specified text label.
text - html or safe html

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005
File user/src/com/google/gwt/user/client/ui/HTML.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode45
user/src/com/google/gwt/user/client/ui/HTML.java:45: public class HTML
extends Label implements HasDirectionalSafeHtml {
Do you mean to remove HasDirectionalHTML?
In general, changes to interfaces can cause a lot of compatibility
problems -- is there a strategy on how to deprecate the raw HTML
interfaces without breaking all users at once?

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode85
user/src/com/google/gwt/user/client/ui/HTML.java:85:
setHTML(html.asString());
Shouldn't this call some variant of setSafeHtml?

http://gwt-code-reviews.appspot.com/829801/diff/7001/8010
File user/src/com/google/gwt/user/client/ui/MenuItem.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8010#newcode42
user/src/com/google/gwt/user/client/ui/MenuItem.java:42: * Similar to
{...@link #MenuItem(String, boolean)}
Maybe change this to:

Similar to {...@link #MenuItem(String, boolean) MenuItem(String, true)}

to indicate that the effect is like setting the flag to true

http://gwt-code-reviews.appspot.com/829801/diff/7001/8010#newcode227
user/src/com/google/gwt/user/client/ui/MenuItem.java:227:
Spaces

http://gwt-code-reviews.appspot.com/829801/diff/7001/8010#newcode231
user/src/com/google/gwt/user/client/ui/MenuItem.java:231:
Spaces

http://gwt-code-reviews.appspot.com/829801/diff/7001/8010#newcode253
user/src/com/google/gwt/user/client/ui/MenuItem.java:253:
Spaces

http://gwt-code-reviews.appspot.com/829801/diff/7001/8011
File user/src/com/google/gwt/user/client/ui/RadioButton.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8011#newcode77
user/src/com/google/gwt/user/client/ui/RadioButton.java:77: * @param
label this radio button's label
as SafeHtml

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

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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread conroy


http://gwt-code-reviews.appspot.com/826802/diff/3001/4001
File dev/core/src/com/google/gwt/core/ext/GeneratorContext.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4001#newcode88
dev/core/src/com/google/gwt/core/ext/GeneratorContext.java:88: * com /
google / gwt / core / client / Foo.properties/code would be exposed
On 2010/09/02 13:44:49, scottb wrote:

Formatter hates you.


i hate it. i have followed the README exactly. this is either another
formatter bug or this file wasn't formatter properly before.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4002
File dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4002#newcode502
dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java:502:
return 0;
On 2010/09/02 13:44:49, scottb wrote:

Thought you'd already committed this. :)


Nope. This and a couple other changes were pulled in from the old
approach.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004
File dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode251
dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:251:
private final MapString, Object storage = new HashMapString,
Object();
On 2010/09/02 13:44:49, scottb wrote:

As far as I can tell, lifetime of this map should be exactly the same

as the

lifetime of generators, right?


More concretely, it looks like it's tied to the ModuleSpace.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4005
File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
(left):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4005#oldcode486
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:486:
Memory.maybeDumpMemory(GoldenCudsBuilt);
On 2010/09/02 13:44:49, scottb wrote:

You've verified that the i18n cached state gets cleared here?


There are two components that were getting cleared via this hack. The
ResourceFactory is addressed in this patch.

The LocaleUtils I also address, but you may note that there is now now
clearing of the GwtLocaleFactoryImpl. jat says that the
GwtLocaleFactoryImpl was needlessly being cleared and recreated as it
does not change between loads and is safe to share.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4009
File user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4009#newcode413
user/src/com/google/gwt/i18n/rebind/AnnotationsResource.java:413: throws
AnnotationsError {
On 2010/09/02 13:44:49, scottb wrote:

No real changes in this file.


i had some changes earlier but nuked them. formatter hates me.

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

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


[gwt-contrib] Re: Fixes a strange compiler bug where types generated into new packages may not be found. (issue831802)

2010-09-02 Thread zundel


http://gwt-code-reviews.appspot.com/831802/diff/5001/3004
File dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java (right):

http://gwt-code-reviews.appspot.com/831802/diff/5001/3004#newcode257
dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java:257: }
Are we going to need to loop here like we do with optimizers?  Couldn't
additional types found with rebinds lead to further discovery of new
types with JSNI?

Or maybe just run the doFindAdditionalTypesUsingJsni one more time (in
case the generator creates more JSNI)

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

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


[gwt-contrib] Re: Fixes a strange compiler bug where types generated into new packages may not be found. (issue831802)

2010-09-02 Thread scottb


http://gwt-code-reviews.appspot.com/831802/diff/5001/3004
File dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java (right):

http://gwt-code-reviews.appspot.com/831802/diff/5001/3004#newcode257
dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java:257: }
The short answer is no: the looping behavior is intrinsic in how we
interact with JDT.  Once we add the new types (as source), then once
they get compiled by JDT we will visit the compiled units and look for
more rebinds and jsni, iteratively.

I did the reordering here because only Rebinds can actually generate any
new types that weren't in CompilationState before.  JSNI can only
reference existing type.

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

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


[gwt-contrib] Re: Fixes a strange compiler bug where types generated into new packages may not be found. (issue831802)

2010-09-02 Thread Eric Ayers
LGTM2

On Thu, Sep 2, 2010 at 11:30 AM, sco...@google.com wrote:


 http://gwt-code-reviews.appspot.com/831802/diff/5001/3004
 File dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java (right):

 http://gwt-code-reviews.appspot.com/831802/diff/5001/3004#newcode257
 dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java:257: }
 The short answer is no: the looping behavior is intrinsic in how we
 interact with JDT.  Once we add the new types (as source), then once
 they get compiled by JDT we will visit the compiled units and look for
 more rebinds and jsni, iteratively.

 I did the reordering here because only Rebinds can actually generate any
 new types that weren't in CompilationState before.  JSNI can only
 reference existing type.


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




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

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

[gwt-contrib] [google-web-toolkit] r8698 committed - Fixes a strange compiler bug where types generated into new packages m...

2010-09-02 Thread codesite-noreply

Revision: 8698
Author: sco...@google.com
Date: Thu Sep  2 05:59:40 2010
Log: Fixes a strange compiler bug where types generated into new packages  
may not be found.


The bug happened to me when generating types into a package which didn't  
exist on disk, in this  
com.google.gwt.user.client.rpc.core.java.lang.annotation.  The  
WebModeCompiler thought the types didn't exist.  This fix makes it so that  
newly-generated types get packages added immediately.


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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java
 /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java	Wed  
Aug 18 11:56:28 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/jdt/AbstractCompiler.java	Thu  
Sep  2 05:59:40 2010

@@ -246,12 +246,15 @@
 String[] typeNames = outer.doFindAdditionalTypesUsingJsni(branch,  
unit);

 addAdditionalTypes(branch, typeNames);

-typeNames = outer.doFindAdditionalTypesUsingRebinds(branch, unit);
-addAdditionalTypes(branch, typeNames);
-
 typeNames =  
outer.doFindAdditionalTypesUsingArtificialRescues(branch,

 unit);
 addAdditionalTypes(branch, typeNames);
+
+typeNames = outer.doFindAdditionalTypesUsingRebinds(branch, unit);
+addAdditionalTypes(branch, typeNames);
+if (typeNames.length  0) {
+  refreshPackagesFromCompState();
+}

 // Optionally remember this cud.
 //
@@ -516,10 +519,7 @@
   compiler = new CompilerImpl(env, pol, options, req, probFact);

   // Initialize the packages list.
-  for (CompilationUnit unit :  
outer.compilationState.getCompilationUnits()) {

-String packageName = Shared.getPackageName(unit.getTypeName());
-rememberPackage(packageName);
-  }
+  refreshPackagesFromCompState();
 }

 public void clear() {
@@ -546,6 +546,13 @@
   }
   return unit;
 }
+
+private void refreshPackagesFromCompState() {
+  for (CompilationUnit unit :  
outer.compilationState.getCompilationUnits()) {

+String packageName = Shared.getPackageName(unit.getTypeName());
+rememberPackage(packageName);
+  }
+}

 /**
  * Causes the compilation service itself to recognize the specified  
package

@@ -557,13 +564,14 @@
  * ShellJavaScriptHost.
  */
 private void rememberPackage(String packageName) {
-  int i = packageName.lastIndexOf('.');
-  if (i != -1) {
-// Ensure the parent package is also created.
-//
-rememberPackage(packageName.substring(0, i));
-  }
-  knownPackages.add(packageName);
+  if (knownPackages.add(packageName)) {
+int i = packageName.lastIndexOf('.');
+if (i != -1) {
+  // Ensure the parent package is also created.
+  //
+  rememberPackage(packageName.substring(0, i));
+}
+  }
 }
   }

===
--- /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java	 
Fri Aug  6 12:01:02 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java	 
Thu Sep  2 05:59:40 2010

@@ -33,7 +33,7 @@

 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -87,7 +87,7 @@
   @Override
   protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger,
   CompilationUnitDeclaration cud) {
-SetString dependentTypeNames = new HashSetString();
+SetString dependentTypeNames = new LinkedHashSetString();

 // Find all the deferred binding request types.
 FindDeferredBindingSitesVisitor v = new  
FindDeferredBindingSitesVisitor();


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


[gwt-contrib] Re: Add SafeHtml support to ui widgets. (issue829801)

2010-09-02 Thread jlabanca


http://gwt-code-reviews.appspot.com/829801/diff/7001/8003
File user/src/com/google/gwt/user/client/ui/ButtonBase.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8003#newcode50
user/src/com/google/gwt/user/client/ui/ButtonBase.java:50:
extra spaces

http://gwt-code-reviews.appspot.com/829801/diff/7001/8003#newcode52
user/src/com/google/gwt/user/client/ui/ButtonBase.java:52:
getElement().setInnerHTML(html.asString());
I think we should delegate to setHtml(String) in case a subclass
overrides the method:
setHtml(html.asString())

Same for all other files

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004
File user/src/com/google/gwt/user/client/ui/CheckBox.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004#newcode72
user/src/com/google/gwt/user/client/ui/CheckBox.java:72: * Similar to
{...@link #CheckBox(String)}
I don't think you need any of these similar to comments.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004#newcode80
user/src/com/google/gwt/user/client/ui/CheckBox.java:80:
extra spaces

http://gwt-code-reviews.appspot.com/829801/diff/7001/8004#newcode266
user/src/com/google/gwt/user/client/ui/CheckBox.java:266:
extra spaces - also in other files. Auto-format should fix them.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005
File user/src/com/google/gwt/user/client/ui/HTML.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode45
user/src/com/google/gwt/user/client/ui/HTML.java:45: public class HTML
extends Label implements HasDirectionalSafeHtml {
Agreed - HasDirectionSafeHtml doesn't extend HasDirectionHtml, so you'll
need to leave them both in there.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode135
user/src/com/google/gwt/user/client/ui/HTML.java:135: public
HTML(SafeHtml html, boolean wordWrap) {
I argue that we delete this constructor and deprecate the old version.
GWT has a big problem with constructor bloat for every option.  In
general, if a class provides a setter and the argument isn't
fundamentally important to the class (such as the HTML to display), then
we shouldn't have a constructor.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode164
user/src/com/google/gwt/user/client/ui/HTML.java:164: public String
getHTML() {
Should we also have getSafeHtml?

I'm going to argue no even though I brought it up.  It seems like it
would have some value, but not at the cost of having to store the
SafeHtml in a field and manage it if the user calls setText.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8005#newcode199
user/src/com/google/gwt/user/client/ui/HTML.java:199: public void
setSafeHtml(SafeHtml html) {
You can delete the JavaDoc for this method, and it will be inherited
automatically from HasSafeHtml (I think)

http://gwt-code-reviews.appspot.com/829801/diff/7001/8006
File user/src/com/google/gwt/user/client/ui/HTMLPanel.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8006#newcode86
user/src/com/google/gwt/user/client/ui/HTMLPanel.java:86: public
HTMLPanel(String tag, String html) {
We need to overload this constructor too.

http://gwt-code-reviews.appspot.com/829801/diff/7001/8014
File user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8014#newcode255
user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java:255:
Extra newline

http://gwt-code-reviews.appspot.com/829801/diff/7001/8014#newcode284
user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java:284: }
Is there still a newline at the end of this file?

http://gwt-code-reviews.appspot.com/829801/diff/7001/8015
File user/test/com/google/gwt/user/client/ui/HTMLTest.java (right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8015#newcode45
user/test/com/google/gwt/user/client/ui/HTMLTest.java:45:
assertEquals(html, htmlElement.getHTML());
add .toLowerCase.  Some browser capitalize all tags

http://gwt-code-reviews.appspot.com/829801/diff/7001/8015#newcode57
user/test/com/google/gwt/user/client/ui/HTMLTest.java:57:
assertEquals(html, htmlElementWW.getHTML());
.toLowerCase()

http://gwt-code-reviews.appspot.com/829801/diff/7001/8015#newcode72
user/test/com/google/gwt/user/client/ui/HTMLTest.java:72:
assertEquals(html, htmlElementLTR.getHTML());
.toLowerCase

http://gwt-code-reviews.appspot.com/829801/diff/7001/8016
File user/test/com/google/gwt/user/client/ui/InlineHTMLTest.java
(right):

http://gwt-code-reviews.appspot.com/829801/diff/7001/8016#newcode38
user/test/com/google/gwt/user/client/ui/InlineHTMLTest.java:38:
assertEquals(html, htmlElement.getHTML());
.toLowerCase()

http://gwt-code-reviews.appspot.com/829801/diff/7001/8016#newcode50
user/test/com/google/gwt/user/client/ui/InlineHTMLTest.java:50:
assertEquals(html, htmlElementLTR.getHTML());
.toLowerCase()

http://gwt-code-reviews.appspot.com/829801/diff/7001/8016#newcode62
user/test/com/google/gwt/user/client/ui/InlineHTMLTest.java:62:

[gwt-contrib] [google-web-toolkit] r8699 committed - Revert r8691 due to api break...

2010-09-02 Thread codesite-noreply

Revision: 8699
Author: rj...@google.com
Date: Thu Sep  2 06:12:48 2010
Log: Revert r8691 due to api break
[Was: Add debugging information to CssResource.]

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

Deleted:
 /trunk/user/src/com/google/gwt/resources/EnableCssResourceDebugging.gwt.xml
  
/trunk/user/src/com/google/gwt/resources/client/impl/CssResourceObserver.java

 /trunk/user/src/com/google/gwt/resources/css/CssDebugInfo.java
 /trunk/user/src/com/google/gwt/resources/css/CssDebugInfoImpl.java
  
/trunk/user/test/com/google/gwt/resources/client/CssResourceDebugInfoTest.java

Modified:
 /trunk/user/src/com/google/gwt/resources/Resources.gwt.xml
 /trunk/user/src/com/google/gwt/resources/client/CssResource.java
 /trunk/user/src/com/google/gwt/resources/css/ClassRenamer.java
 /trunk/user/src/com/google/gwt/resources/css/ast/CssStylesheet.java
 /trunk/user/src/com/google/gwt/resources/rg/CssResourceGenerator.java
 /trunk/user/test/com/google/gwt/resources/ResourcesSuite.java
 /trunk/user/test/com/google/gwt/resources/client/CSSResourceTest.java

===
---  
/trunk/user/src/com/google/gwt/resources/EnableCssResourceDebugging.gwt.xml	 
Wed Sep  1 12:11:35 2010

+++ /dev/null
@@ -1,22 +0,0 @@
-!-- 
--
-!-- Copyright 2008 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   --
-!-- 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. License for the specific language governing permissions  
and   --
-!-- limitations under the  
License. --

-
-!-- Enables CssResource.getDebugInfo() and records obfuscated name map --
-module
-  inherits name=com.google.gwt.resources.Resources /
-  set-configuration-property name=CssResource.enableDebugInfo  
value=true /
-  replace-with  
class=com.google.gwt.resources.client.impl.CssResourceObserver.Mapper
-when-type-is  
class=com.google.gwt.resources.client.impl.CssResourceObserver /

-  /replace-with
-/module
===
---  
/trunk/user/src/com/google/gwt/resources/client/impl/CssResourceObserver.java	 
Wed Sep  1 12:11:35 2010

+++ /dev/null
@@ -1,103 +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.resources.client.impl;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.resources.client.CssResource;
-import com.google.gwt.resources.client.CssResource.DebugInfo;
-
-import java.util.Map;
-
-/**
- * Enables CssResources to be intercepted before injection. The base
- * implementation is a no-op.
- * p
- * emThis is an internal implementation API that is subject to  
change./em

- */
-public class CssResourceObserver {
-  private static final CssResourceObserver IMPL =  
GWT.create(CssResourceObserver.class);

-
-  /**
-   * An implementation of CssResourceObserver that records CssResource
-   * obfuscation data into a JavaScriptObject accessible on the main  
application

-   * window as code$wnd.gwtCssResource['moduleName']/code.
-   * p
-   * The keys on this object will be of the form
-   * codelt;ClientBundle type name.lt;CssResource method  
name.lt;Raw css class selector/code

-   * . An example key might be
-   * codecom.example.Resources.superButton.button-outer-div/code. The  
value
-   * associated with the key is the (possibly obfuscated) CSS class  
selector

-   * used in the injected code.
-   */
-  public static class Mapper extends CssResourceObserver {
-private final JavaScriptObject myMap;
-
-public Mapper() {
-  myMap = ensureMap();
-}
-
-@Override
-protected T extends CssResource T registerImpl(T resource) {
-

[gwt-contrib] [google-web-toolkit] r8700 committed - This should have been in r8671

2010-09-02 Thread codesite-noreply

Revision: 8700
Author: fabb...@google.com
Date: Thu Sep  2 09:18:59 2010
Log: This should have been in r8671
http://code.google.com/p/google-web-toolkit/source/detail?r=8700

Modified:
 /trunk/eclipse/settings/code-style/gwt-checkstyle.xml

===
--- /trunk/eclipse/settings/code-style/gwt-checkstyle.xml	Fri Aug 27  
09:23:17 2010
+++ /trunk/eclipse/settings/code-style/gwt-checkstyle.xml	Thu Sep  2  
09:18:59 2010

@@ -1,3 +1,4 @@
+//depot/google3/third_party/java_src/gwt/svn/trunk/eclipse/settings/code-style/gwt-checkstyle.xml#3  
-  
edit change 17030460 (text)

 ?xml version=1.0 encoding=UTF-8?
 !--
   This configuration file was written by the eclipse-cs plugin  
configuration editor

@@ -193,7 +194,12 @@
 module name=MethodParamPad/
 module name=NoWhitespaceBefore
 property name=severity value=error/
-property name=tokens value=SEMI,DOT,POST_DEC,POST_INC/
+property name=tokens value=SEMI,POST_DEC,POST_INC/
+/module
+module name=NoWhitespaceBefore
+property name=severity value=error/
+property name=allowLineBreaks value=true/
+property name=tokens value=DOT/
 /module
 module name=RedundantModifier/
 module name=EqualsHashCode/

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


[gwt-contrib] Re: Adding support for Direction.LINE_START/END to DockLayoutPanel and SplitLayoutPanel. (issue828801)

2010-09-02 Thread jlabanca

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

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


[gwt-contrib] Re: Adding support for Direction.LINE_START/END to DockLayoutPanel and SplitLayoutPanel. (issue828801)

2010-09-02 Thread jlabanca

Patch Set 2 updates DOMRtlTest, which was never really in RTL mode until
DockLayoutPanelRtlTest came along. The body isn't put into RTL mode
until RootPanel.get() is called, but DOMRtlTest never called it.

I also renamed DockLayoutPanelTestRtl to DockLayoutPanelRtlTest.


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

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


[gwt-contrib] [google-web-toolkit] r8701 committed - Support adding code-gen/runtime related classes directly to the second...

2010-09-02 Thread codesite-noreply

Revision: 8701
Author: to...@google.com
Date: Thu Sep  2 07:29:17 2010
Log: Support adding code-gen/runtime related classes directly to the  
secondary JDT compilation for the GWT AST.


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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java
 /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java	 
Wed Jul 28 11:12:18 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/jdt/BasicWebModeCompiler.java	 
Thu Sep  2 07:29:17 2010

@@ -30,6 +30,7 @@
 import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;

 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -64,8 +65,8 @@
* Build the initial set of compilation units.
*/
   public CompilationResults getCompilationUnitDeclarations(
-  TreeLogger logger, String[] seedTypeNames)
-  throws UnableToCompleteException {
+  TreeLogger logger, String[] seedTypeNames,
+  ICompilationUnit... additionalUnits) throws  
UnableToCompleteException {


 TypeOracle oracle = compilationState.getTypeOracle();
 SetJClassType intfTypes = oracle.getSingleJsoImplInterfaces();
@@ -80,7 +81,9 @@
 SetCompilationUnit alreadyAdded = new HashSetCompilationUnit();

 ListICompilationUnit icus = new ArrayListICompilationUnit(
-seedTypeNames.length + intfTypes.size());
+seedTypeNames.length + intfTypes.size() + additionalUnits.length);
+
+Collections.addAll(icus, additionalUnits);

 for (String seedTypeName : seedTypeNames) {
   CompilationUnit unit = getUnitForType(logger, classMapBySource,
===
--- /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java	 
Thu Sep  2 05:59:40 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java	 
Thu Sep  2 07:29:17 2010

@@ -27,6 +27,7 @@
 import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event;

 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
@@ -46,12 +47,13 @@

   public static CompilationResults getCompilationUnitDeclarations(
   TreeLogger logger, String[] seedTypeNames,
-  RebindPermutationOracle rebindPermOracle, TypeLinker linker)
-  throws UnableToCompleteException {
+  RebindPermutationOracle rebindPermOracle, TypeLinker linker,
+  ICompilationUnit... additionalUnits) throws  
UnableToCompleteException {

 Event getCompilationUnitsEvent =
 SpeedTracerLogger.start(CompilerEventType.GET_COMPILATION_UNITS);
 CompilationResults results = new  
WebModeCompilerFrontEnd(rebindPermOracle,

-linker).getCompilationUnitDeclarations(logger, seedTypeNames);
+linker).getCompilationUnitDeclarations(logger, seedTypeNames,
+additionalUnits);
 getCompilationUnitsEvent.end();
 return results;
   }
===
--- /trunk/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java	Thu Jun 17  
10:13:10 2010
+++ /trunk/dev/core/src/com/google/gwt/dev/jjs/UnifiedAst.java	Thu Sep  2  
07:29:17 2010

@@ -54,7 +54,7 @@
   return jProgram;
 }

-JsProgram getJsProgram() {
+public JsProgram getJsProgram() {
   return jsProgram;
 }
   }

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


[gwt-contrib] Fixes a bug in LayoutImplIE8 where we convert the unit conversition to an integer before multipl... (issue834801)

2010-09-02 Thread jlabanca

Reviewers: rice,

Description:
Fixes a bug in LayoutImplIE8 where we convert the unit conversition to
an integer before multiplying by the height/width, resulting in too much
rounding. For example, 12pt becomes 12px instead of 15px because the
conversion factor (1.33) is converted to 1. We now multiply by the value
first, then convert to an int before setting the property.


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

Affected files:
  M user/src/com/google/gwt/layout/client/LayoutImplIE8.java


Index: user/src/com/google/gwt/layout/client/LayoutImplIE8.java
===
--- user/src/com/google/gwt/layout/client/LayoutImplIE8.java(revision 8699)
+++ user/src/com/google/gwt/layout/client/LayoutImplIE8.java(working copy)
@@ -105,8 +105,7 @@
 break;

   default:
-value = value
-* (int) getUnitSizeInPixels(layer.container, unit, vertical);
+value = value * getUnitSizeInPixels(layer.container, unit,  
vertical);

 unit = Unit.PX;
 break;
 }
@@ -117,6 +116,6 @@
   }
 }

-layer.getContainerElement().getStyle().setProperty(prop, value, unit);
+layer.getContainerElement().getStyle().setProperty(prop, (int) value,  
unit);

   }
 }


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


[gwt-contrib] Re: Fixes a bug in LayoutImplIE8 where we convert the unit conversition to an integer before multipl... (issue834801)

2010-09-02 Thread rice

LGTM

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

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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread jat

I'll review the rest separately, but I wanted to get this to you first.


http://gwt-code-reviews.appspot.com/826802/diff/3001/4001
File dev/core/src/com/google/gwt/core/ext/GeneratorContext.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4001#newcode74
dev/core/src/com/google/gwt/core/ext/GeneratorContext.java:74: Object
getContextStorage(String key);
I think I would prefer to separate this out, and make it parameterized.
You also need to worry about collisions from different generators/etc,
so I would recommend something more like:

interface CacheK,V {
  boolean contains(K);
  V get(K key);
  void put(K key, V value);
}

in GeneratorContext:
  K,V CacheK,V getCache(Class? clazz);

So a generator would do something like:

   CacheGwtLocale, AbstractResource cache =
ctx.getCache(MyGenerator.class);
   AbstractReource res = cache.get(locale);
   if (res == null) {
 res = computeResource(locale);
 cache.put(locale, res);
   }

That way you get type safety and avoid collisions, rather than having to
have every caller follow some convention of constructing the string
keys.  You could even define getCache on an interface which
GeneratorContext implements, which would make it easier to mock uses of
the cache.

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

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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread jat

The i18n stuff looks good except where commented.


http://gwt-code-reviews.appspot.com/826802/diff/3001/4004
File dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java
(right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4004#newcode402
dev/core/src/com/google/gwt/dev/javac/StandardGeneratorContext.java:402:
}
Suggest instead:
@SuppressWarnings(unchecked)
public K, V CacheK, V getCache(Class? clazz) {
  CacheK, V cache = (CacheK, V) storage.get(clazz);
  if (cache == null) {
cache = new MyCacheK, V();
storage.put(clazz, cache);
  }
  return cache;
}

and it would create an empty cache if it didn't already exist.  You
could still use clazz.getCanonicalName() if you needed to avoid keeping
the class alive by being a key in the map.

You could also just use Map instead of Cache if you prefer.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4015
File user/src/com/google/gwt/i18n/rebind/LocaleUtils.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4015#newcode199
user/src/com/google/gwt/i18n/rebind/LocaleUtils.java:199: return
contextCache;
As mentioned in the other thread, I would suggest moving this into a
GeneratorContext.getCache instead of repeating it.

http://gwt-code-reviews.appspot.com/826802/diff/3001/4017
File user/src/com/google/gwt/i18n/rebind/ResourceFactory.java (right):

http://gwt-code-reviews.appspot.com/826802/diff/3001/4017#newcode47
user/src/com/google/gwt/i18n/rebind/ResourceFactory.java:47: private
static final String CONTEXT_STORAGE_KEY = ResourceFactory;
I think this would be better as a class literal instead of a string,
even if GeneratorContext used the name of the class as the key
internally.  That way you have to worry lessage about collisions and
refactoring happens automatically.

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

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


[gwt-contrib] RR : Factor a bean-like-object editor framework out of the RequestFactory editor work. (issue835801)

2010-09-02 Thread bobv

Reviewers: rjrjr,

Message:
Review requested.

The SimpleBeanEditorDriver will be used to test general Editor framework
behavior without requiring the use of RequestFactory.

Description:
Factor a bean-like-object editor framework out of the RequestFactory
editor work.
Add editor.client.adapters package.
Provide mock implementations for public API interfaces.
Patch by: bobv
Review by: rjrjr


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

Affected files:
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/AddressEditor.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/NameLabel.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/PersonEditor.java

  M user/src/com/google/gwt/editor/Editor.gwt.xml
  D user/src/com/google/gwt/editor/client/BooleanEditor.java
  D user/src/com/google/gwt/editor/client/ByteEditor.java
  D user/src/com/google/gwt/editor/client/CharacterEditor.java
  D user/src/com/google/gwt/editor/client/DoubleEditor.java
  M user/src/com/google/gwt/editor/client/Editor.java
  M user/src/com/google/gwt/editor/client/EditorDelegate.java
  D user/src/com/google/gwt/editor/client/FloatEditor.java
  D user/src/com/google/gwt/editor/client/IntegerEditor.java
  D user/src/com/google/gwt/editor/client/LongEditor.java
  D user/src/com/google/gwt/editor/client/ShortEditor.java
  A user/src/com/google/gwt/editor/client/SimpleBeanEditorDriver.java
  D user/src/com/google/gwt/editor/client/StringEditor.java
  M user/src/com/google/gwt/editor/client/ValueAwareEditor.java
  A user/src/com/google/gwt/editor/client/adapters/BooleanEditor.java
  A user/src/com/google/gwt/editor/client/adapters/ByteEditor.java
  A user/src/com/google/gwt/editor/client/adapters/CharacterEditor.java
  A user/src/com/google/gwt/editor/client/adapters/DoubleEditor.java
  A user/src/com/google/gwt/editor/client/adapters/FloatEditor.java
  A user/src/com/google/gwt/editor/client/adapters/IntegerEditor.java
  A user/src/com/google/gwt/editor/client/adapters/LongEditor.java
  A user/src/com/google/gwt/editor/client/adapters/ShortEditor.java
  A user/src/com/google/gwt/editor/client/adapters/StringEditor.java
  A user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java
  A  
user/src/com/google/gwt/editor/client/impl/AbstractSimpleBeanEditorDriver.java

  A user/src/com/google/gwt/editor/client/impl/SimpleBeanEditorDelegate.java
  A user/src/com/google/gwt/editor/client/testing/MockEditorDelegate.java
  A  
user/src/com/google/gwt/editor/client/testing/MockSimpleBeanEditorDriver.java

  A user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java
  A  
user/src/com/google/gwt/editor/rebind/SimpleBeanEditorDriverGenerator.java

  A user/src/com/google/gwt/editor/rebind/model/EditorAccess.java
  A user/src/com/google/gwt/editor/rebind/model/EditorData.java
  A user/src/com/google/gwt/editor/rebind/model/EditorModel.java
  M  
user/src/com/google/gwt/requestfactory/client/RequestFactoryEditorDriver.java
  M  
user/src/com/google/gwt/requestfactory/client/impl/RequestFactoryEditorDelegate.java
  A  
user/src/com/google/gwt/requestfactory/client/testing/MockRequestFactoryEditorDriver.java

  D user/src/com/google/gwt/requestfactory/rebind/EditorAccess.java
  D user/src/com/google/gwt/requestfactory/rebind/EditorData.java
  D user/src/com/google/gwt/requestfactory/rebind/EditorModel.java
  M  
user/src/com/google/gwt/requestfactory/rebind/RequestFactoryEditorDriverGenerator.java

  A user/test/com/google/gwt/editor/EditorSuite.java
  A user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java
  A user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java
  M user/test/com/google/gwt/requestfactory/RequestFactorySuite.java
  M user/test/com/google/gwt/requestfactory/client/EditorTest.java
  D user/test/com/google/gwt/requestfactory/rebind/EditorModelTest.java


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


[gwt-contrib] [google-web-toolkit] r8704 committed - Missing file from SafeHtml work + whitespace fix

2010-09-02 Thread codesite-noreply

Revision: 8704
Author: r...@google.com
Date: Thu Sep  2 09:08:23 2010
Log: Missing file from SafeHtml work + whitespace fix

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

Modified:
  
/trunk/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/SortableHeader.java
  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellList.java


===
---  
/trunk/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/SortableHeader.java	 
Thu Sep  2 08:33:16 2010
+++  
/trunk/samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/SortableHeader.java	 
Thu Sep  2 09:08:23 2010

@@ -1,12 +1,12 @@
 /*
  * 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
===
---  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellList.java	 
Tue Aug 17 10:14:36 2010
+++  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellList.java	 
Thu Sep  2 09:08:23 2010

@@ -23,6 +23,7 @@
 import com.google.gwt.i18n.client.Constants;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
 import com.google.gwt.sample.showcase.client.ContentWidget;
 import  
com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseData;
 import  
com.google.gwt.sample.showcase.client.ShowcaseAnnotations.ShowcaseRaw;

@@ -88,31 +89,25 @@
 }

 @Override
-public void render(ContactInfo value, Object key, StringBuilder sb) {
-  // Value can be null, so do a null check.
+public void render(ContactInfo value, Object key, SafeHtmlBuilder sb) {
+  // Value can be null, so do a null check..
   if (value == null) {
 return;
   }

-  sb.append(table);
+  sb.appendHtmlConstant(table);

   // Add the contact image.
-  sb.append(trtd rowspan='3');
-  sb.append(imageHtml);
-  sb.append(/td);
-
-  // Add the name.
-  sb.append(td style='font-size:95%;');
-  sb.append(value.getFullName());
-  sb.append(/td);
-  sb.append(/tr);
-
-  // Add the address.
-  sb.append(trtd);
-  sb.append(value.getAddress());
-  sb.append(/td/tr);
-
-  sb.append(/table);
+  sb.appendHtmlConstant(trtd rowspan='3');
+  sb.appendHtmlConstant(imageHtml);
+  sb.appendHtmlConstant(/td);
+
+  // Add the name and address.
+  sb.appendHtmlConstant(td style='font-size:95%;');
+  sb.appendEscaped(value.getFullName());
+  sb.appendHtmlConstant(/td/trtrtd);
+  sb.appendEscaped(value.getAddress());
+  sb.appendHtmlConstant(/td/tr/table);
 }
   }

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


[gwt-contrib] Re: Add SafeHtml support to ui widgets. (issue829801)

2010-09-02 Thread pdr

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

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


[gwt-contrib] [google-web-toolkit] r8705 committed - Fixes a bug in LayoutImplIE8 where we convert the unit conversition to...

2010-09-02 Thread codesite-noreply

Revision: 8705
Author: jlaba...@google.com
Date: Thu Sep  2 09:39:09 2010
Log: Fixes a bug in LayoutImplIE8 where we convert the unit conversition to  
an integer before multiplying by the height/width, resulting in too much  
rounding. For example, 12pt becomes 12px instead of 15px because the  
conversion factor (1.33) is converted to 1. We now multiply by the value  
first, then convert to an int before setting the property.


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

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

Modified:
 /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java

===
--- /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java	Wed Jun  
30 06:04:21 2010
+++ /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java	Thu  
Sep  2 09:39:09 2010

@@ -105,8 +105,7 @@
 break;

   default:
-value = value
-* (int) getUnitSizeInPixels(layer.container, unit, vertical);
+value = value * getUnitSizeInPixels(layer.container, unit,  
vertical);

 unit = Unit.PX;
 break;
 }
@@ -117,6 +116,7 @@
   }
 }

-layer.getContainerElement().getStyle().setProperty(prop, value, unit);
+layer.getContainerElement().getStyle().setProperty(prop,
+(int) (value + 0.5), unit);
   }
 }

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


[gwt-contrib] Adding RTL support to the images used in CellTree. Removing automatic keyboard focus from the co... (issue836801)

2010-09-02 Thread jlabanca

Reviewers: rice,

Description:
Adding RTL support to the images used in CellTree. Removing automatic
keyboard focus from the constructor because it can result in an
IndexOutOfBoundsEception if the tree nodes are loaded asynchronously.


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

Affected files:
  M user/src/com/google/gwt/user/cellview/client/CellTree.java


Index: user/src/com/google/gwt/user/cellview/client/CellTree.java
===
--- user/src/com/google/gwt/user/cellview/client/CellTree.java	(revision  
8705)
+++ user/src/com/google/gwt/user/cellview/client/CellTree.java	(working  
copy)

@@ -53,12 +53,15 @@
*/
   public static interface CleanResources extends Resources {

+@ImageOptions(flipRtl = true)
 @Source(cellTreeClosedArrow.png)
 ImageResource cellTreeClosedItem();

+@ImageOptions(flipRtl = true)
 @Source(cellTreeLoadingClean.gif)
 ImageResource cellTreeLoading();

+@ImageOptions(flipRtl = true)
 @Source(cellTreeOpenArrow.png)
 ImageResource cellTreeOpenItem();

@@ -118,22 +121,25 @@
 /**
  * An image indicating a closed branch.
  */
+@ImageOptions(flipRtl = true)
 ImageResource cellTreeClosedItem();

 /**
  * An image indicating that a node is loading.
  */
+@ImageOptions(flipRtl = true)
 ImageResource cellTreeLoading();

 /**
  * An image indicating an open branch.
  */
+@ImageOptions(flipRtl = true)
 ImageResource cellTreeOpenItem();

 /**
  * The background used for selected items.
  */
-@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
+@ImageOptions(repeatStyle = RepeatStyle.Horizontal, flipRtl = true)
 ImageResource cellTreeSelectedBackground();

 /**
@@ -521,7 +527,6 @@
 this, null, null, getElement(), rootValue);
 keyboardSelectedNode = rootNode = root;
 root.setOpen(true, false);
-keyboardSelectedNode.keyboardEnter(0, false);
   }

   /**


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


[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread conroy

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

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


[gwt-contrib] Re: Adding RTL support to the images used in CellTree. Removing automatic keyboard focus from the co... (issue836801)

2010-09-02 Thread rice

LGTM

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

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


[gwt-contrib] Re: RR : Factor a bean-like-object editor framework out of the RequestFactory editor work. (issue835801)

2010-09-02 Thread rjrjr

LGTM

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

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


[gwt-contrib] [google-web-toolkit] r8707 committed - Added tests for constraint violations....

2010-09-02 Thread codesite-noreply

Revision: 8707
Author: amitman...@google.com
Date: Thu Sep  2 10:56:13 2010
Log: Added tests for constraint violations.

Patch by: amitmanjhi
Review by: robertvawter,fabbott

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

Modified:
 /trunk/user/build.xml
  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java

 /trunk/user/test/com/google/gwt/requestfactory/server/SimpleFoo.java

===
--- /trunk/user/build.xml   Fri Aug 20 07:59:07 2010
+++ /trunk/user/build.xml   Thu Sep  2 10:56:13 2010
@@ -61,6 +61,10 @@
 pathelement location=${gwt.tools.lib}/objectweb/asm-3.1.jar/
 pathelement  
location=${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar /
 pathelement  
location=${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar  
/
+pathelement location=${gwt.tools.lib}/apache/log4j/log4j-1.2.16.jar  
/
+pathelement  
location=${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar  
/
+pathelement  
location=${gwt.tools.lib}/slf4j/slf4j-api/slf4j-api-1.6.1.jar /
+pathelement  
location=${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar /
 pathelement  
location=${gwt.tools}/redist/json/r2_20080312/json-1.5.jar /

 pathelement location=${gwt.dev.jar} /
   /path
===
---  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java	 
Wed Aug 25 17:41:41 2010
+++  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java	 
Thu Sep  2 10:56:13 2010

@@ -26,6 +26,7 @@
 import com.google.gwt.requestfactory.shared.SimpleRequestFactory;
 import com.google.gwt.requestfactory.shared.SyncResult;

+import java.util.Map;
 import java.util.Set;

 /**
@@ -33,6 +34,53 @@
  */
 public class RequestFactoryTest extends GWTTestCase {

+  public void testViolationPresent() {
+final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

+HandlerManager hm = new HandlerManager(null);
+req.init(hm);
+delayTestFinish(5000);
+
+SimpleFooRecord newFoo = (SimpleFooRecord)  
req.create(SimpleFooRecord.class);
+final RequestObjectVoid fooReq =  
req.simpleFooRequest().persist(newFoo);

+
+newFoo = fooReq.edit(newFoo);
+newFoo.setUserName(A); // will cause constraint violation
+
+fooReq.fire(new ReceiverVoid() {
+  public void onSuccess(Void ignore, SetSyncResult syncResults) {
+assertEquals(1, syncResults.size());
+SyncResult syncResult = syncResults.iterator().next();
+assertTrue(syncResult.hasViolations());
+MapString, String violations = syncResult.getViolations();
+assertEquals(1, violations.size());
+assertEquals(size must be between 3 and 30,  
violations.get(userName));

+finishTest();
+  }
+});
+  }
+
+  public void testViolationAbsent() {
+final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

+HandlerManager hm = new HandlerManager(null);
+req.init(hm);
+delayTestFinish(5000);
+
+SimpleFooRecord newFoo = (SimpleFooRecord)  
req.create(SimpleFooRecord.class);
+final RequestObjectVoid fooReq =  
req.simpleFooRequest().persist(newFoo);

+
+newFoo = fooReq.edit(newFoo);
+newFoo.setUserName(Amit); // will not cause violation.
+
+fooReq.fire(new ReceiverVoid() {
+  public void onSuccess(Void ignore, SetSyncResult syncResults) {
+assertEquals(1, syncResults.size());
+SyncResult syncResult = syncResults.iterator().next();
+assertFalse(syncResult.hasViolations());
+finishTest();
+  }
+});
+  }
+
   /*
* TODO: all these tests should check the final values. It will be easy  
when

* we have better persistence than the singleton pattern.
@@ -138,7 +186,8 @@
 new ReceiverSimpleFooRecord() {
   public void onSuccess(SimpleFooRecord finalFooRecord,
   SetSyncResult syncResults) {
-// newFoo hasn't been persisted, so userName is  
the old value.
+// newFoo hasn't been persisted, so userName is  
the old

+// value.
 assertEquals(GWT, finalFooRecord.getUserName());
 finishTest();
   }
@@ -204,7 +253,7 @@
 });
   }

-   public void testPersistRecursiveRelation() {
+  public void testPersistRecursiveRelation() {
 final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

 HandlerManager hm = new HandlerManager(null);
 req.init(hm);
@@ -324,12 +373,12 @@
   public void onSuccess(SimpleFooRecord response,
   SetSyncResult syncResult) {
 SimpleBarRecord bar = req.create(SimpleBarRecord.class);
-RequestObjectString helloReq =  
req.simpleFooRequest().hello(response, bar);

+RequestObjectString 

[gwt-contrib] Refactoring the Showcase sample to use standards mode, and make use of LayoutPanels. The new Sho... (issue837801)

2010-09-02 Thread jlabanca

Reviewers: rice,

Description:
Refactoring the Showcase sample to use standards mode, and make use of
LayoutPanels. The new Showcase looks different, but the features are the
same. The main menu is now a CellTree backed by a TreeViewModel.  The
Application class, which used to perform active layout of the entire
app, has been replaced by layout panels. The ShowcaseShell uses UiBinder
to control the outer layout. The buttons to switch style themes have
been removed. Opening a Category in the main menu prefetches the code
for the sample under the category; the old behavior was for each
ContentWidget to call a static method to preload other examples in the
same category.

Note that this change does not update the examples within showcase aside
from couple of minor tweaks. In a later patch, we will deprecate old
examples, add new examples for new GWT features, and make the examples
look prettier with the rest of the app.  This patch is smaller than it
looks because more of the changes to the examples are related to a
refactor in ContentWidget, so they are repetitive and small.


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

Affected files:
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_ar.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_fr.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_zh.properties

  M samples/showcase/src/com/google/gwt/sample/showcase/Showcase.gwt.xml
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/Application.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidget.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidgetView.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/ContentWidgetView.ui.xml
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/MainMenuTreeViewModel.java

  A samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.css
  M samples/showcase/src/com/google/gwt/sample/showcase/client/Showcase.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.properties
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_ar.properties
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_fr.properties
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants_zh.properties
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseImages.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseResources.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseShell.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseShell.ui.xml
  D  
samples/showcase/src/com/google/gwt/sample/showcase/client/StyleSheetLoader.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellBrowser.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellList.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTable.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellTree.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellValidation.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwBidiFormatting.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwBidiInput.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsExample.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwConstantsWithLookupExample.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDateTimeFormat.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwDictionaryExample.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwMessagesExample.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwNumberFormat.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/i18n/CwPluralFormsExample.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwListBox.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwMenuBar.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwStackPanel.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/lists/CwSuggestBox.java
  M  

[gwt-contrib] Re: Fix the escaping done by UrlBuilder. (issue754803)

2010-09-02 Thread t . broyer

In brief: URIs (RFC 3986) is a mess, and back to URL.encode for the path
in UrlBuilder? (with a second pass though)


http://gwt-code-reviews.appspot.com/754803/diff/21001/22002
File user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java
(right):

http://gwt-code-reviews.appspot.com/754803/diff/21001/22002#newcode79
user/src/com/google/gwt/user/server/rpc/RemoteServiceServlet.java:79:
String contextRelativePath =
URLDecoder.decode(modulePath.substring(contextPath.length()));
On 2010/09/02 10:17:07, hhchan wrote:

On 2010/09/02 09:00:57, tbroyer wrote:
 Beware! URLDecoder will decode + into a space, whereas
 it might really mean a +. What I mean is that this is
 probably a breaking change.



modulePath is only the path though, whcih doesn't include
query string.
Therefore, we shouldn't be seeing '+'.


Why? + is a valid character in path segments, and I can actually map
the servlet at any path I want, including one containing a +:
servlet-mapping
  servlet-namefoo/servlet-name
  url-pattern/foo+bar/url-pattern
/servlet-mapping


I hit this because in one of the tests, the module name is
actually



/com.google.gwt.junit.JUnitTestWithProperties.JUnit.locale$en_US.my.property$one/com.google.gwt.junit.JUnitTestWithProperties.JUnit.locale$en_US.my.property$one.nocache.js'


which gets encoded by the UrlBuilder on the client side
as:



/com.google.gwt.junit.JUnitTestWithProperties.JUnit.locale%24en_US.my.property%24one/com.google.gwt.junit.JUnitTestWithProperties.JUnit.locale%24en_US.my.property%24one.nocache.js'


if I don't decode it here, the tests never pass.


Then I'd rather fix UrlBuilder. The issue is that '$' is a reserved char
in URI, which means that a plain '$' and a %-encoded one (%24) are not
interchangeable (they can mean different things to the server). I faced
something like this with a '+' in the path that was treated as a space
by the server (that was a bit more convoluted, as I was sending a %2B
but Apache mod_jk were decoding it in its request to Tomcat); I raised
an issue and they invoked this obscure rule of RFC 3986:
https://issues.alfresco.com/jira/browse/ALF-1857

Therefore, I think maybe UrlBuilder should rather use URL.encode(), as
if the path were a full URI, but add a second pass to ensure there are
no stray '#' or '?' that could be confused with a hash or query-string
delimiter.


I am not
sure whether module path like this will ever show up in
practice, but I think decoding the path is
more correct anyways.


Well, as it's passed to ServletContext#getResourceAsStream, I don't
think so. The JavaDoc says (from getResource, to which
getResourceAsStream redirects): The path must begin with a / and is
interpreted as relative to the current context root.pThis method
allows the servlet container to make a resource available to servlets
from any source. Resources can be located on a local or remote file
system, in a database, or in a .war file.; also note that it throws a
MalformedURLException if the pathname is not given in the correct
form; so it should be a URL path, which to me means URL-encoded
(though I might be wrong, I'm only interpreting the JavaDoc here!)

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

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


[gwt-contrib] Renamed *Record* to *Proxy*. Also renamed variables in a few classes. (issue825802)

2010-09-02 Thread amitmanjhi

Reviewers: rjrjr,

Description:
Renamed *Record* to *Proxy*. Also renamed variables in a few classes.
Renamed DataTransferObject - ProxyFor.

patch by: amitmanjhi
Review by: rjrjr


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

Affected files:
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/PersonEditorWorkflow.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/client/widgets/SummaryWidget.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/AddressProxy.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/AddressProxyChanged.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/DynaTableRequestFactory.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxy.java
  M  
samples/dynatablerf/src/com/google/gwt/sample/dynatablerf/shared/PersonProxyChanged.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseDetails.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseList.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpenseTree.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/Expenses.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobile.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ExpensesMobileShell.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseDetails.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseEntry.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileExpenseList.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportEntry.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/MobileReportList.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeProxy.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeProxyChanged.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRecord.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRecordChanged.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/EmployeeRequest.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseProxy.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseProxyChanged.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRecord.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRecordChanged.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpenseRequest.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ExpensesEntityTypesProcessor.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportProxy.java
  A  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportProxyChanged.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRecord.java
  D  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRecordChanged.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/request/ReportRequest.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/employee/EmployeeDetailsView.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/employee/EmployeeEditView.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/employee/EmployeeListView.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/employee/EmployeeRenderer.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/report/ReportDetailsView.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/report/ReportEditView.java
  M  
samples/expenses/src/main/java/com/google/gwt/sample/expenses/client/ui/report/ReportListView.java

  M user/src/com/google/gwt/app/client/EditorSupport.java
  M user/src/com/google/gwt/app/client/NullParser.java
  A user/src/com/google/gwt/app/place/AbstractProxyEditActivity.java
  A user/src/com/google/gwt/app/place/AbstractProxyListActivity.java
  A user/src/com/google/gwt/app/place/AbstractProxyListView.java
  D user/src/com/google/gwt/app/place/AbstractRecordEditActivity.java
  D user/src/com/google/gwt/app/place/AbstractRecordListActivity.java
  D user/src/com/google/gwt/app/place/AbstractRecordListView.java
  M 

[gwt-contrib] Re: Fix DevMode memory leaks by attaching cache lifetimes to the GeneratorContext (issue826802)

2010-09-02 Thread jat

LGTM for i18n parts.

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

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


[gwt-contrib] Re: Renamed *Record* to *Proxy*. Also renamed variables in a few classes. (issue825802)

2010-09-02 Thread amitmanjhi

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

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


[gwt-contrib] Re: Renamed *Record* to *Proxy*. Also renamed variables in a few classes. (issue825802)

2010-09-02 Thread rjrjr

LGTM

On 2010/09/02 23:35:48, amitmanjhi wrote:




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

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


[gwt-contrib] [google-web-toolkit] r8708 committed - Add @UiChild annotation to specify how UiBinder should add a child ele...

2010-09-02 Thread codesite-noreply

Revision: 8708
Author: son...@google.com
Date: Thu Sep  2 13:27:55 2010
Log: Add @UiChild annotation to specify how UiBinder should add a child  
element.

Patch by: sonnyf
Reviw by: bobv, rjrjr
Review at http://gwt-code-reviews.appspot.com/794801

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

Added:
 /trunk/user/src/com/google/gwt/uibinder/client/UiChild.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/UiChildParser.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/UiChildParserTest.java

Modified:
 /trunk/dev/core/src/com/google/gwt/core/ext/typeinfo/JPrimitiveType.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/model/OwnerFieldClass.java
  
/trunk/user/test/com/google/gwt/uibinder/rebind/model/OwnerFieldClassTest.java


===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/uibinder/client/UiChild.java	Thu Sep  2  
13:27:55 2010

@@ -0,0 +1,62 @@
+/*
+ * 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.uibinder.client;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Mark a method as the appropriate way to add a child widget to the parent
+ * class.
+ *
+ * p
+ * The limit attribute specifies the number of times the function can be  
safely
+ * called. If no limit is specified, it is assumed to be unlimited. Only  
one
+ * child is permitted under each custom tag specified so the limit  
represents

+ * the number of times the tag can be present in any object.
+ *
+ * p
+ * The tagname attribute indicates the name of the tag this method will  
handle
+ * in the {...@link UiBinder} template. If none is specified, the method name  
must

+ * begin with add, and the tag is assumed to be the remaining characters
+ * (after the add prefix) entirely in lowercase.
+ *
+ * p
+ * For example, code
+ *
+ * @UiChild MyWidget#addCustomChild(Widget w) /code and
+ *
+ *  pre
+ *  p:MyWidget
+ *  p:customchild
+ *  g:SomeWidget /
+ *  /p:customchild
+ *  /p:MyWidget
+ *  /pre would invoke the codeaddCustomChild/code function  
to add

+ *  an instance of SomeWidget.
+ */
+...@documented
+...@retention(RetentionPolicy.RUNTIME)
+...@target(ElementType.METHOD)
+public @interface UiChild {
+
+  int limit() default -1;
+
+  String tagname() default ;
+}
===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UiChildParser.java	 
Thu Sep  2 13:27:55 2010

@@ -0,0 +1,166 @@
+/*
+ * 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.uibinder.elementparsers;
+
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.core.ext.typeinfo.JAbstractMethod;
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import com.google.gwt.core.ext.typeinfo.JMethod;
+import com.google.gwt.core.ext.typeinfo.JParameter;
+import com.google.gwt.dev.util.Pair;
+import com.google.gwt.uibinder.rebind.UiBinderWriter;
+import com.google.gwt.uibinder.rebind.XMLElement;
+import com.google.gwt.uibinder.rebind.XMLElement.Interpreter;
+import com.google.gwt.uibinder.rebind.model.OwnerFieldClass;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Parses any children of widgets that use the {...@link UiChild} annotation.
+ */
+public class UiChildParser implements ElementParser {
+
+  private String fieldName;
+
+  /**
+   * Mapping of child tag to the number of times it has been called
+   */
+  private MapString, Integer numCallsToChildMethod = new HashMapString,  
Integer();

+  private MapString, PairJMethod, 

[gwt-contrib] Re: Change UiBinder Message generation to use consistent examples for HTML and Widget placeholders t... (issue838801)

2010-09-02 Thread rjrjr

Wow, nice to see it's such a small change. And using tag rather than
span is a good choice.

Rather than having that funky protected field, how about adding an
overload of nextPlaceholder that doesn't take an example, and defaults
to tag

On 2010/09/02 23:40:14, mbx wrote:




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

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


[gwt-contrib] [google-web-toolkit] r8709 committed - Rolling back the following due to test failures:...

2010-09-02 Thread codesite-noreply

Revision: 8709
Author: j...@google.com
Date: Thu Sep  2 14:24:35 2010
Log: Rolling back the following due to test failures:

Added tests for constraint violations.

Patch by: amitmanjhi
Review by: robertvawter,fabbott

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

Modified:
 /trunk/user/build.xml
  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java

 /trunk/user/test/com/google/gwt/requestfactory/server/SimpleFoo.java

===
--- /trunk/user/build.xml   Thu Sep  2 10:56:13 2010
+++ /trunk/user/build.xml   Thu Sep  2 14:24:35 2010
@@ -61,10 +61,6 @@
 pathelement location=${gwt.tools.lib}/objectweb/asm-3.1.jar/
 pathelement  
location=${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar /
 pathelement  
location=${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar  
/
-pathelement location=${gwt.tools.lib}/apache/log4j/log4j-1.2.16.jar  
/
-pathelement  
location=${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar  
/
-pathelement  
location=${gwt.tools.lib}/slf4j/slf4j-api/slf4j-api-1.6.1.jar /
-pathelement  
location=${gwt.tools.lib}/slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar /
 pathelement  
location=${gwt.tools}/redist/json/r2_20080312/json-1.5.jar /

 pathelement location=${gwt.dev.jar} /
   /path
===
---  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java	 
Thu Sep  2 10:56:13 2010
+++  
/trunk/user/test/com/google/gwt/requestfactory/client/RequestFactoryTest.java	 
Thu Sep  2 14:24:35 2010

@@ -26,7 +26,6 @@
 import com.google.gwt.requestfactory.shared.SimpleRequestFactory;
 import com.google.gwt.requestfactory.shared.SyncResult;

-import java.util.Map;
 import java.util.Set;

 /**
@@ -34,53 +33,6 @@
  */
 public class RequestFactoryTest extends GWTTestCase {

-  public void testViolationPresent() {
-final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

-HandlerManager hm = new HandlerManager(null);
-req.init(hm);
-delayTestFinish(5000);
-
-SimpleFooRecord newFoo = (SimpleFooRecord)  
req.create(SimpleFooRecord.class);
-final RequestObjectVoid fooReq =  
req.simpleFooRequest().persist(newFoo);

-
-newFoo = fooReq.edit(newFoo);
-newFoo.setUserName(A); // will cause constraint violation
-
-fooReq.fire(new ReceiverVoid() {
-  public void onSuccess(Void ignore, SetSyncResult syncResults) {
-assertEquals(1, syncResults.size());
-SyncResult syncResult = syncResults.iterator().next();
-assertTrue(syncResult.hasViolations());
-MapString, String violations = syncResult.getViolations();
-assertEquals(1, violations.size());
-assertEquals(size must be between 3 and 30,  
violations.get(userName));

-finishTest();
-  }
-});
-  }
-
-  public void testViolationAbsent() {
-final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

-HandlerManager hm = new HandlerManager(null);
-req.init(hm);
-delayTestFinish(5000);
-
-SimpleFooRecord newFoo = (SimpleFooRecord)  
req.create(SimpleFooRecord.class);
-final RequestObjectVoid fooReq =  
req.simpleFooRequest().persist(newFoo);

-
-newFoo = fooReq.edit(newFoo);
-newFoo.setUserName(Amit); // will not cause violation.
-
-fooReq.fire(new ReceiverVoid() {
-  public void onSuccess(Void ignore, SetSyncResult syncResults) {
-assertEquals(1, syncResults.size());
-SyncResult syncResult = syncResults.iterator().next();
-assertFalse(syncResult.hasViolations());
-finishTest();
-  }
-});
-  }
-
   /*
* TODO: all these tests should check the final values. It will be easy  
when

* we have better persistence than the singleton pattern.
@@ -186,8 +138,7 @@
 new ReceiverSimpleFooRecord() {
   public void onSuccess(SimpleFooRecord finalFooRecord,
   SetSyncResult syncResults) {
-// newFoo hasn't been persisted, so userName is  
the old

-// value.
+// newFoo hasn't been persisted, so userName is  
the old value.

 assertEquals(GWT, finalFooRecord.getUserName());
 finishTest();
   }
@@ -253,7 +204,7 @@
 });
   }

-  public void testPersistRecursiveRelation() {
+   public void testPersistRecursiveRelation() {
 final SimpleRequestFactory req =  
GWT.create(SimpleRequestFactory.class);

 HandlerManager hm = new HandlerManager(null);
 req.init(hm);
@@ -373,12 +324,12 @@
   public void onSuccess(SimpleFooRecord response,
   SetSyncResult syncResult) {
 SimpleBarRecord bar = req.create(SimpleBarRecord.class);
-RequestObjectString helloReq = req.simpleFooRequest().hello(
-

[gwt-contrib] incubator and gwt 2.1

2010-09-02 Thread Cameron Braid
What is the plan to bring incubator into compatability with gwt 2.1 ?

Cheers

Cameron

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

[gwt-contrib] Clarify EditorDriver behavior with combinations of Editor mix-in interfaces through brute-force ... (issue840801)

2010-09-02 Thread bobv

Reviewers: rjrjr,

Message:
Review requested.

Description:
Clarify EditorDriver behavior with combinations of Editor mix-in
interfaces through brute-force testing.
Patch by: bobv
Review by: rjrjr


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

Affected files:
  M user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java
  M user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java
  M user/src/com/google/gwt/editor/rebind/model/EditorModel.java
  M user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java
  M user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java


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


[gwt-contrib] Re: Clarify EditorDriver behavior with combinations of Editor mix-in interfaces through brute-force ... (issue840801)

2010-09-02 Thread rjrjr

LGTM

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

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


[gwt-contrib] [google-web-toolkit] r8710 committed - Clarify EditorDriver behavior with combinations of Editor mix-in inter...

2010-09-02 Thread codesite-noreply

Revision: 8710
Author: b...@google.com
Date: Thu Sep  2 16:22:41 2010
Log: Clarify EditorDriver behavior with combinations of Editor mix-in  
interfaces through brute-force testing.

Patch by: bobv
Review by: rjrjr

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

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

Modified:
  
/trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java
  
/trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java

 /trunk/user/src/com/google/gwt/editor/rebind/model/EditorModel.java
 /trunk/user/test/com/google/gwt/editor/client/SimpleBeanEditorTest.java
 /trunk/user/test/com/google/gwt/editor/rebind/model/EditorModelTest.java

===
---  
/trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java	 
Thu Sep  2 10:32:07 2010
+++  
/trunk/user/src/com/google/gwt/editor/client/impl/AbstractEditorDelegate.java	 
Thu Sep  2 16:22:41 2010

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

 import com.google.gwt.editor.client.Editor;
 import com.google.gwt.editor.client.EditorDelegate;
+import com.google.gwt.editor.client.LeafValueEditor;
 import com.google.gwt.editor.client.ValueAwareEditor;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.event.shared.HandlerRegistration;
@@ -43,7 +44,7 @@
   }

   protected EventBus eventBus;
-
+  protected LeafValueEditorT leafValueEditor;
   /**
* This field avoids needing to repeatedly cast {...@link #editor}.
*/
@@ -60,6 +61,13 @@
 if (valueAwareEditor != null) {
   valueAwareEditor.flush();
 }
+
+// See comment in initialize about LeafValueEditors
+if (leafValueEditor != null) {
+  setObject(leafValueEditor.getValue());
+  return;
+}
+
 if (getObject() == null) {
   return;
 }
@@ -67,6 +75,8 @@
 setObject(ensureMutable(getObject()));
 flushValues();
   }
+
+  public abstract T getObject();

   public String getPath() {
 return path;
@@ -86,17 +96,33 @@

   protected abstract void flushValues();

-  protected abstract T getObject();
-
   protected void initialize(EventBus eventBus, String pathSoFar, T object,
   E editor) {
 this.eventBus = eventBus;
 this.path = pathSoFar;
 setEditor(editor);
 setObject(object);
+
+// Set up pre-casted fields to access the editor
+if (editor instanceof LeafValueEditor?) {
+  leafValueEditor = (LeafValueEditorT) editor;
+}
 if (editor instanceof ValueAwareEditor?) {
   valueAwareEditor = (ValueAwareEditorT) editor;
   valueAwareEditor.setDelegate(this);
+}
+
+/*
+ * Unusual case: The user may have installed an editor subtype that  
adds the

+ * LeafValueEditor interface into a plain Editor field. If this has
+ * happened, only set the value and don't descend into any sub-Editors.
+ */
+if (leafValueEditor != null) {
+  leafValueEditor.setValue(object);
+  return;
+}
+
+if (valueAwareEditor != null) {
   valueAwareEditor.setValue(object);
 }
 if (object != null) {
===
---  
/trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java	 
Thu Sep  2 10:32:07 2010
+++  
/trunk/user/src/com/google/gwt/editor/rebind/AbstractEditorDriverGenerator.java	 
Thu Sep  2 16:22:41 2010

@@ -108,7 +108,7 @@
   sw.println(protected void setEditor(%s editor)  
{this.editor=editor;},

   editor.getQualifiedSourceName());
   sw.println(private %s object;, proxy.getQualifiedSourceName());
-  sw.println(protected %s getObject() {return object;},
+  sw.println(public %s getObject() {return object;},
   proxy.getQualifiedSourceName());
   sw.println(protected void setObject(%s object)  
{this.object=object;},

   proxy.getQualifiedSourceName());
@@ -127,7 +127,8 @@
   sw.println(protected void attachSubEditors() {);
   sw.indent();
   for (EditorData d : data) {
-if (d.isBeanEditor()) {
+if (d.isBeanEditor()  !d.isLeafValueEditor()
+|| d.isValueAwareEditor()) {
   String subDelegateType = getEditorDelegate(d.getEditedType(),
   d.getEditorType());
   sw.println(if (editor.%s != null) {, d.getSimpleExpression());
@@ -147,8 +148,15 @@
   sw.indent();
   for (EditorData d : data) {
 if (d.isBeanEditor()) {
-  sw.println(if (%1$sDelegate != null) %1$sDelegate.flush();,
+  sw.println(if (%1$sDelegate != null) { %1$sDelegate.flush();,
   d.getPropertyName());
+  if (d.getSetterName() != null) {
+String mutableObjectExpression =  
mutableObjectExpression(String.format(

+getObject()%s, d.getBeanOwnerExpression()));
+sw.println(%s.%s(%sDelegate.getObject());,
+mutableObjectExpression, d.getSetterName(),  
d.getPropertyName());

+  }
+  sw.println(});
 }
   }
   

[gwt-contrib] RR: Add statistics to optimizers (issue841801)

2010-09-02 Thread zundel

Reviewers: scottb, robertvawter, cromwellian,

Description:
RR: Add statistics to optimizers

Updates the compiler optimizers to returns statistics about each pass
instead of a simple boolean.   This could be used to analyze
the effectiveness of an individual optimizer, tune the compiler
for code size/ compile time trade offs, or predict the effectiveness
of future passes of an optimizer.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JModVisitor.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/DeadCodeElimination.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/Finalizer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/LongCastNormalizer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MethodCallTightener.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java
  A dev/core/src/com/google/gwt/dev/jjs/impl/OptimizerStats.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java
  M  
dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java

  M dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/gflow/DataflowOptimizer.java
  M  
dev/core/src/com/google/gwt/dev/jjs/impl/gflow/liveness/LivenessTransformation.java
  M  
dev/core/src/com/google/gwt/dev/jjs/impl/gflow/unreachable/DeleteNodeVisitor.java



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


[gwt-contrib] Re: RR: Add statistics to optimizers (issue841801)

2010-09-02 Thread cromwellian

On 2010/09/03 03:38:46, zundel wrote:


Just a general comment, if you want to get even more granularity, look
at this old path of mine, which instrumented MethodInliner to give
really good information on exactly how many times something was inlined
vs not, and a count of the failure types, which would tell you how the
optimizer is failing on certain code constructs. Here's a link:

http://gwt-code-reviews.appspot.com/64813/diff/1/2


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

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


[gwt-contrib] Re: RR: Add statistics to optimizers (issue841801)

2010-09-02 Thread Eric Ayers
I'm looking for feedback on this proposed change, mainly, is the statistical
information worth the added complexity?  Currently, this only dumps out a
diagnostic when you specify

  
-Dgwt.jjs.traceMethods=com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimize

on the Compiler command line.  Here's a sample of what the statistical
output looks like on a minimal GWT app:

  Pass 1    ( 0/ 0)
  Pruner 27.94% (  3132/ 11211)Finalizer 45.64% (  2455/
 5379) MakeCallsStatic  7.94% (   812/ 10229) TypeTightener  2.41% (  1226/
50966) MethodCallTightener  1.96% (70/  3569) DeadCodeElimination  1.93%
(  1277/ 66324) MethodInliner 28.84% (  5430/ 18830)
SameParameterValueOptimizer  0.58% (44/  7588)
  Pass 2    ( 0/ 0)
  Pruner 12.24% (  1089/  8895)Finalizer  0.09% ( 4/
 4400) MakeCallsStatic  2.68% (   182/  6796) TypeTightener  0.80% (   272/
33915) MethodCallTightener  1.36% (32/  2353) DeadCodeElimination  0.41%
(   166/ 40201) MethodInliner  9.95% (   956/  9609)
SameParameterValueOptimizer  0.24% (14/  5776)
  Pass 3    ( 0/ 0)
  Pruner  1.79% (   240/ 13392)Finalizer  0.00% ( 0/
 4036) MakeCallsStatic  0.50% (31/  6221) TypeTightener  0.31% (62/
20088) MethodCallTightener  0.05% ( 1/  2190) DeadCodeElimination  0.20%
(74/ 37391) MethodInliner  2.90% (   250/  8608)
SameParameterValueOptimizer  0.11% ( 6/  5325)
  Pass 4    ( 0/ 0)
  Pruner  0.54% (57/ 10492)Finalizer  0.03% ( 1/
 3948) MakeCallsStatic  0.02% ( 1/  6086) TypeTightener  0.05% ( 8/
14660) MethodCallTightener  0.05% ( 1/  2147) DeadCodeElimination  0.47%
(   173/ 36545) MethodInliner  2.07% (   172/  8310)
SameParameterValueOptimizer  0.02% ( 1/  5126)
  Pass 5    ( 0/ 0)
  Pruner  0.67% (66/  9896)Finalizer  0.03% ( 1/
 3747) MakeCallsStatic  0.02% ( 1/  5732) TypeTightener  0.01% ( 2/
13845) MethodCallTightener  0.00% ( 0/  2012) DeadCodeElimination  0.05%
(19/ 35210) MethodInliner  0.20% (16/  8001)
SameParameterValueOptimizer  0.00% ( 0/  4976)
  Pass 6    ( 0/ 0)
  Pruner  0.30% (22/  7338)Finalizer  0.00% ( 0/
 3695) MakeCallsStatic  0.00% ( 0/  5691) TypeTightener  0.07% ( 9/
13660) MethodCallTightener  0.00% ( 0/  2001) DeadCodeElimination  0.06%
(13/ 23220) MethodInliner  0.00% ( 0/  2638)
SameParameterValueOptimizer  0.00% ( 0/  4938)
  Pass 7    ( 0/ 0)
  Pruner  0.10% ( 5/  4890)Finalizer  0.00% ( 0/
 3688) MakeCallsStatic  0.04% ( 2/  5690) TypeTightener  0.00% ( 0/
 4548) MethodCallTightener  0.00% ( 0/  2001) DeadCodeElimination  0.00%
( 0/ 11605) MethodInliner  0.38% (20/  5283)
SameParameterValueOptimizer  0.00% ( 0/  4937)
  Pass 8    ( 0/ 0)
  Pruner  0.04% ( 2/  4886)Finalizer  0.00% ( 0/
 3686) MakeCallsStatic  0.00% ( 0/  5684) TypeTightener  0.01% ( 1/
 9093) MethodCallTightener  0.00% ( 0/  1999) DeadCodeElimination  0.00%
( 0/ 11601) MethodInliner  0.00% ( 0/  2634)
SameParameterValueOptimizer  0.00% ( 0/  4933)
  Pass 9    ( 0/ 0)
  Pruner  0.00% ( 0/  2443)Finalizer  0.00% ( 0/
 3686) MakeCallsStatic  0.00% ( 0/  5684) TypeTightener  0.00% ( 0/
 4546) MethodCallTightener  0.00% ( 0/  1999) DeadCodeElimination  0.00%
( 0/ 11601) MethodInliner  0.00% ( 0/  2634)
SameParameterValueOptimizer  0.00% ( 0/  4933)
DataflowOptimizer  0.46% ( 5/  1080)

I think the information is interesting on its own, but it could prove useful
if we decide to implement a compiler option to allow users to make a
compilation time/code size output trade off.  Our current options are either
minimal optimization or maximum possible optimization.  We could probably
cut the production compile down a bit if we had an in-between option (and
maybe made it the default).

In a couple of places, I got rid of the didChange() overload on JModVisitor
subclasses.  I know that there is a difference, I'm wondering if it is
important.

My eclipse environment is a mess - please don't bother with code formatting
feedback until I dig myself out from under it.

-Eric.

On Thu, Sep 2, 2010 at 11:38 PM, zun...@google.com wrote:

 Reviewers: scottb, robertvawter, cromwellian,

 Description:
 RR: Add statistics to optimizers

 Updates the compiler optimizers to returns statistics about each pass
 instead of a simple boolean.   This could be used to analyze
 the effectiveness of an individual optimizer, tune the compiler
 for code size/ compile time trade offs, or predict the effectiveness
 of future passes of an optimizer.


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

 Affected files:
  M