Aw: Serialization Exception

2011-07-14 Thread Jens
Do you have a no-arg default constructor in your class?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vTvqxrR5ZM4J.
To post to this group, send email to google-web-toolkit@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: Resizing display regions in a complex ui

2011-07-14 Thread Anders
Thanks! Looking at your code example cleared up the sizing issues.
Dunno if it's the best implementation but I ended up making an app
controller class that handles the application layout, and is used to
hook up the different mappers in the entry point class:

public class AppControllerImpl implements AppController {

private static class LayoutHandler implements
PlaceChangeEvent.Handler {

private AppController app;

public LayoutHandler(AppController app) {
this.app = app;
}

@Override
public void onPlaceChange(PlaceChangeEvent event) {
Place place = event.getNewPlace();

if (place instanceof HomeScreenPlace) {
app.setHomeScreentLayout();
} else if (place instanceof DetailsPlace){
...
} else if (place instanceof SettingsPlace) {
...
} else {
app.setHomeScreenLayout();
}
}
}

private DockLayoutPanel container = new DockLayoutPanel(Unit.PCT);
private SimplePanel header = new SimplePanel();
private SimplePanel side = new SimplePanel();
private SimplePanel main = new SimplePanel();
private SimplePanel footer = new SimplePanel();

public AppControllerImpl(EventBus eventBus) {

container.addNorth(header, 25);
container.addWest(side, 25);
container.addSouth(footer, 25);
container.add(main);

eventBus.addHandler(PlaceChangeEvent.TYPE, new 
LayoutHandler(this));

}


@Override
public DockLayoutPanel getAppContainer() {
return container;
}

@Override
public AcceptsOneWidget getHeaderDisplay() {
return new AcceptsOneWidget() {
@Override
public void setWidget(IsWidget activityWidget) {
Widget widget = 
Widget.asWidgetOrNull(activityWidget);
header.setVisible((widget != null));
header.setWidget(widget);
}
};
}

   ...

@Override
public void setHomeScreenLayout() {
container.setWidgetSize(header, 25);
container.setWidgetSize(footer, 0);
container.setWidgetSize(side, 25);
}

...

}


The app controller is used as follows in the entry point:

public void onModuleLoad() {

ClientFactory factory = GWT.create(ClientFactory.class);
EventBus eventBus = factory.getEventBus();
PlaceController placeController = factory.getPlaceController();
AppController appController = factory.getAppController();

// Start ActivityManager for all display regions with the
ActivityMapper
HeaderActivityMapper headerMapper = new
HeaderActivityMapper(factory);
ActivityManager headerManager = new
ActivityManager(headerMapper, eventBus);
 
headerManager.setDisplay(appController.getHeaderDisplay());

   ...

// Start PlaceHistoryHandler with the
PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper=
GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new
PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus,
defaultPlace);

 
RootLayoutPanel.get().add(appController.getAppContainer());
historyHandler.handleCurrentHistory();

}


On Jul 12, 4:33 pm, Mauro Bertapelle mauro.bertape...@gmail.com
wrote:
 you may find this thread 
 interesting:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...

 On Jul 12, 4:07 pm, Anders dr.kr...@gmail.com wrote:







  Thanks for the quick reply! Sounds like the DockPanelLayout is the way
  to go. In my little proof-of-concept app I got lost in what you
  described as the 'non-trivial size computation' using just a
  LayoutPanel with manual resizing. Hence the question here!

  Keep up the good work with your blog!

  On Jul 12, 3:14 pm, Thomas Broyer t.bro...@gmail.com wrote:

   On Tuesday, July 12, 2011 11:52:27 AM UTC+2, Anders wrote:

Hi,

Reading Thomas Broyer's post 'GWT 2.1 Activities – nesting?
YAGNI!' (check it out herehttp://tbroyer.posterous.com/archive/9/2010)

   Direct link:http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni

really cleared things up with regards on how to handle more complex ui
designs. Abandoning the concept of nesting and going for a couple of
activity mappers to show/hide display 

Re: Integrating datejs

2011-07-14 Thread tdk


On 13 Jul., 17:22, Thomas Broyer t.bro...@gmail.com wrote:
 FYI, searching for datejs gwt on Google leads 
 tohttp://code.google.com/p/kiyaa/wiki/Moduleswhich already provides a GWT
 wrapper for DateJS.

this no good, it doesn't even compile. It inherits stuff that isn't
part of the jar file.
I just copied the DateJs.java class into my project, but using it
fails with a JavaScript exception:

com.google.gwt.core.client.JavaScriptException: (TypeError):
this[16908544].clearTime is not a function

This happens when I do a DateJS.today().getTimezone().

I had this problem too when using the stuff without a wrapper...

-- 
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-toolkit@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.



Setting Entry point different html pages

2011-07-14 Thread aman
Hi,

I am changing my html page by using Window.Location.replace(newURL);
now I want to set the Entrypoint class for the html page having
newURL.

Thanks,

Aman

-- 
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-toolkit@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: Playing MP3 and AVI in GWT application

2011-07-14 Thread shahid
The trouble is HTML 5 is not supported on majority of the user's
browser. Also what do you do for backward compatibility?

On Jul 13, 5:45 pm, David Chandler drfibona...@google.com wrote:
 HTML5 to the rescue...

 http://www.slideshare.net/turbomanage/gwt-plus-html-5

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...

 The APIs are changing slightly in GWT 2.4 to enable you to more easily
 specify multiple formats.

 /dmc









 On Wed, Jul 13, 2011 at 12:10 PM, shahid shahidza...@gmail.com wrote:
  What is the best way to support playing MP3(audio) and AVI (video)
  files in a GWT application. We have gone a long way into developing
  our application on top of GWT and now we have a requirement to support
  playing mp3 and avi files. However I can't find a widget or player
  that I can use with GWT to support both of these formats. Has anyone
  used this functionality in your application and how? What is the best
  practice ?

  --
  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-toolkit@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.

 --
 David Chandler
 Developer Programs Engineer, GWT+GAE
 w:http://code.google.com/
 b:http://turbomanage.wordpress.com/
 b:http://googlewebtoolkit.blogspot.com/
 t: @googledevtools

-- 
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-toolkit@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.



Changing extension of compiler generated .html files

2011-07-14 Thread Nitin
Is there a way I can tell GWT Compiler to generate MD5.cache.html
files with some other extension.
For eg. I want file generated should be something like
MD5.cache.htm

(.htm instead of .html)

-- 
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-toolkit@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: Playing MP3 and AVI in GWT application

2011-07-14 Thread Alain Ekambi
You still can fallback to Flash if the HTML5 features are not supported i
would say.

2011/7/14 shahid shahidza...@gmail.com

 The trouble is HTML 5 is not supported on majority of the user's
 browser. Also what do you do for backward compatibility?

 On Jul 13, 5:45 pm, David Chandler drfibona...@google.com wrote:
  HTML5 to the rescue...
 
  http://www.slideshare.net/turbomanage/gwt-plus-html-5
 
  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...
 
  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...
 
  The APIs are changing slightly in GWT 2.4 to enable you to more easily
  specify multiple formats.
 
  /dmc
 
 
 
 
 
 
 
 
 
  On Wed, Jul 13, 2011 at 12:10 PM, shahid shahidza...@gmail.com wrote:
   What is the best way to support playing MP3(audio) and AVI (video)
   files in a GWT application. We have gone a long way into developing
   our application on top of GWT and now we have a requirement to support
   playing mp3 and avi files. However I can't find a widget or player
   that I can use with GWT to support both of these formats. Has anyone
   used this functionality in your application and how? What is the best
   practice ?
 
   --
   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-toolkit@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.
 
  --
  David Chandler
  Developer Programs Engineer, GWT+GAE
  w:http://code.google.com/
  b:http://turbomanage.wordpress.com/
  b:http://googlewebtoolkit.blogspot.com/
  t: @googledevtools

 --
 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-toolkit@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 API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.appspot.com/

-- 
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-toolkit@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: Playing MP3 and AVI in GWT application

2011-07-14 Thread Rob Coops
Then there is only one real solution, Adobe Flash...

Pretty much everyone and their mother has a Flash Player installed (for
those that do not use HTML5 (Apple iStuff is the main group there without
Flash)). If you set the system to prefer HTML5 and then switch back to Flash
if this is not available you are future proof and able to deal with what
ever way that coin will flip.

For the widget simply use two and load which ever one the users browser will
support. If the users browser is capable to deal with HTML5 like Chrome or
Firefox you simply load the HTML5 widget, if you are being visited by an
older IE version simply push the Flash version over.

Using MVP you would simply have to views and a few lines of code to decide
which one to show the user not unlike deciding to show the user the mobile
version of the view instead of the full fledged desktop version.

Regards,

Rob

On Thu, Jul 14, 2011 at 10:12 AM, shahid shahidza...@gmail.com wrote:

 The trouble is HTML 5 is not supported on majority of the user's
 browser. Also what do you do for backward compatibility?

 On Jul 13, 5:45 pm, David Chandler drfibona...@google.com wrote:
  HTML5 to the rescue...
 
  http://www.slideshare.net/turbomanage/gwt-plus-html-5
 
  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...
 
  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...
 
  The APIs are changing slightly in GWT 2.4 to enable you to more easily
  specify multiple formats.
 
  /dmc
 
 
 
 
 
 
 
 
 
  On Wed, Jul 13, 2011 at 12:10 PM, shahid shahidza...@gmail.com wrote:
   What is the best way to support playing MP3(audio) and AVI (video)
   files in a GWT application. We have gone a long way into developing
   our application on top of GWT and now we have a requirement to support
   playing mp3 and avi files. However I can't find a widget or player
   that I can use with GWT to support both of these formats. Has anyone
   used this functionality in your application and how? What is the best
   practice ?
 
   --
   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-toolkit@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.
 
  --
  David Chandler
  Developer Programs Engineer, GWT+GAE
  w:http://code.google.com/
  b:http://turbomanage.wordpress.com/
  b:http://googlewebtoolkit.blogspot.com/
  t: @googledevtools

 --
 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-toolkit@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.



-- 
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-toolkit@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.



ListDataProvider.getList does not return a list

2011-07-14 Thread gwernol
I'm using the ListDataProvider. I can write code like:

public class MyListPanel extends VerticalPanel {
private TextCell textCell = new TextCell();
private CellListString cellList = new CellListString(textCell);
private ListDataProviderString dataProvider = new
ListDataProviderString();

private void createUI() {
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setSize(100%, 5em);

dataProvider.addDataDisplay(cellList);

scrollPanel.setWidget(cellList);
add(scrollPanel);
}

public ListString getList() {
return dataProvider.getList();
}

public addToList(String item) {
System.out.println(addToList: item= + item);
dataProvider.getList().add(item);
System.out.println(item is now  +dataProvider.getList());
}
}

If I call myListPanel.addToList(dan), then the list is updated as
expected, but, the System output is something like:

addToList: item=dan
addToList: list is now com.google.gwt.view.client.ListDataProvider
$ListWrapper@7755c16a

Note that dataProvider.getList() is returning a ListWrapper not a
ListString.

Elsewhere my code calls myListPanel.getList() and puts the returned
array into a ListString field an object that I pass back to the
server. This of course results in a Serialization Exception, as the
object should contain a ListString but actually contains a
ListWrapper.

The JavaDoc says that:

public java.util.ListT getList()
Get the list that backs this model. Changes to the list will be
reflected in the model.

This is clearly not true. Is this bug going to be fixed? At the very
least the documentation should be updated asap as its misleading right
now.

Thanks,

Dan

-- 
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-toolkit@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.



R: Re: R: Re: Re: Can't install Google Web Toolkit Developer Plugin under Chrome

2011-07-14 Thread Vlad
Nope, I try to install the plugin from a folder where it has been 
extracted...

Il giorno mercoledì 13 luglio 2011 17:45:40 UTC+2, Chak Lai ha scritto:

 You may want to try the offline installation
 Chrome - https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx


Is there anywhere a log for reading a and eventually find what's going on?

 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IRE_20aMuMcJ.
To post to this group, send email to google-web-toolkit@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 development mode on a separate web server

2011-07-14 Thread Thomas Broyer
Did you follow these instructions? 
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#How_do_I_use_my_own_server_in_development_mode_instead_of_GWT's

If you're using the Google Plugin for Eclipse, simply right-click your 
project → Run As → Web Application (running on an external server).
Or you can edit an existing launch configuration: uncheck run built-in 
server (equivalent to -noserver) in the Server tab, and set the -startupUrl 
value to your server's address (e.g. http://test-server/myapp/) in the 
Arguments tab (you can actually even use -startupUrl several times).

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/UbPqI2ND9IQJ.
To post to this group, send email to google-web-toolkit@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: Playing MP3 and AVI in GWT application

2011-07-14 Thread dreamer
Hi,

We don't have to build the page entirely using GWT widgets,
if playing these in any html is possible, it should be possible even
with GWT.
with HTML5 it is snap to implement this, but GWT does not prevent to
launch player and play anything you want.

Even you can mix Flash with GWT.

You can build your site almost with 99% with pure HTML and just WITH
one or two GWT widgets.
Still  it is GWT app.

GWT is just a javascript, how much you want in your page, that is up
to you.
My wish is to go 100% and develop like in Visual Basic using GWT
designer. May be couple of more years to realize this.

Even add RPC/actions to buttons, should be under the hood, developer
should add method, and just
should declare, if it is client or server. GWT should take care. I
have to come up with whole new proxy pattern to achieve this, to mask
my client code.


-Venu
http://schoolk12.appspot.com/


On Jul 14, 1:44 am, Rob Coops rco...@gmail.com wrote:
 Then there is only one real solution, Adobe Flash...

 Pretty much everyone and their mother has a Flash Player installed (for
 those that do not use HTML5 (Apple iStuff is the main group there without
 Flash)). If you set the system to prefer HTML5 and then switch back to Flash
 if this is not available you are future proof and able to deal with what
 ever way that coin will flip.

 For the widget simply use two and load which ever one the users browser will
 support. If the users browser is capable to deal with HTML5 like Chrome or
 Firefox you simply load the HTML5 widget, if you are being visited by an
 older IE version simply push the Flash version over.

 Using MVP you would simply have to views and a few lines of code to decide
 which one to show the user not unlike deciding to show the user the mobile
 version of the view instead of the full fledged desktop version.

 Regards,

 Rob







 On Thu, Jul 14, 2011 at 10:12 AM, shahid shahidza...@gmail.com wrote:
  The trouble is HTML 5 is not supported on majority of the user's
  browser. Also what do you do for backward compatibility?

  On Jul 13, 5:45 pm, David Chandler drfibona...@google.com wrote:
   HTML5 to the rescue...

  http://www.slideshare.net/turbomanage/gwt-plus-html-5

  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...

  http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/g...

   The APIs are changing slightly in GWT 2.4 to enable you to more easily
   specify multiple formats.

   /dmc

   On Wed, Jul 13, 2011 at 12:10 PM, shahid shahidza...@gmail.com wrote:
What is the best way to support playing MP3(audio) and AVI (video)
files in a GWT application. We have gone a long way into developing
our application on top of GWT and now we have a requirement to support
playing mp3 and avi files. However I can't find a widget or player
that I can use with GWT to support both of these formats. Has anyone
used this functionality in your application and how? What is the best
practice ?

--
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-toolkit@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.

   --
   David Chandler
   Developer Programs Engineer, GWT+GAE
   w:http://code.google.com/
   b:http://turbomanage.wordpress.com/
   b:http://googlewebtoolkit.blogspot.com/
   t: @googledevtools

  --
  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-toolkit@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.

-- 
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-toolkit@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: Integrating datejs

2011-07-14 Thread Thomas Broyer
Given that DateJS changes the built-in Date object, I wouldn't be surprised 
that it doesn't work cross-window/cross-frame (changing built-in types is 
considered bad practice anyway). Using add-linker name=xs / (beware: 
deprecated) might be the only workaround.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bamr0xNCj3EJ.
To post to this group, send email to google-web-toolkit@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: Please help - GWT Designer / UiBinder bug or clueless new user?

2011-07-14 Thread dreamer
Can you please try going to source and adding, if supported, brings up
at ..
-Venu
http://schoolk12.appspot.com/

On Jul 13, 8:10 am, cri chuck.irvine...@gmail.com wrote:
 I posted this issue before but didn't get any help so trying again...
 Using GWT Designer, when looking at a UiBinder *.ui.xml file in the
 Design tab, the setStyle property doesn't appear in the
 Properties window. Shouldn't the property be there? The docs seem to
 indicate that it should be. Thanks

 Chuck

-- 
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-toolkit@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.



best architecture for GWT + Spring

2011-07-14 Thread Ernesto Reig
Hello everybody.
I have been discussing this topic with some collegues and we would like to
know the GWT community expert opinion :)
As the title says, the discussion is about the best architecture (or best
practices) for building enterprise web applications with GWT and Spring, and
the different options available are:

 - GWT MVP front-end + Spring MVC + Spring architecture back-end*.
 - GWT MVP front-end + Spring architecture back-end*.
 - Spring MVC + GWT components inside html´s and JSP´s + Spring architecture
back-end*.

*Spring architecture back-end is composed of several different maven
modules/projects (separated by functionality) each one made with Spring.

From my point of view, the best option is the second one. With that option
you are not mixing concepts nor using two design patterns together for the
same thing (GWT MVP and Spring MVP), which I think is nonsense. Also you can
develop the GWT part completely independent with the back-end part (with no
Spring MVC in the middle). So you can make the front-end part with GWT, thus
using the GWT best practices and features like Activities, Places,
RequestFactory, etc. And the back-end part focusing on every module
independently, using the technologies you want (Spring in this case) for
each one.

What do you think about this? Every point is appreciated.

Thank you very much.

-- 
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-toolkit@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: best architecture for GWT + Spring

2011-07-14 Thread dmen
I have been using the first option, with Spring MVC acting as a
restful web service layer. See for example:
http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/

The upside is that the server side is completely unaware of the client
side technology. Indeed I have been reusing some common services with
either GWT, ExtJS and jQuery in different applications.

The downside is that you loose all the GWT RPC convenience.

-- 
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-toolkit@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: Changing extension of compiler generated .html files

2011-07-14 Thread Magno Machado
I don't know if there's an easier way (perhaps manualy changing the file
names and patching the app.nocache.js?), but maybe it can be done with a
custom linker

On Thu, Jul 14, 2011 at 5:29 AM, Nitin mishranitin2...@gmail.com wrote:

 Is there a way I can tell GWT Compiler to generate MD5.cache.html
 files with some other extension.
 For eg. I want file generated should be something like
 MD5.cache.htm

 (.htm instead of .html)

 --
 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-toolkit@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.




-- 
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

-- 
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-toolkit@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: Integrating datejs

2011-07-14 Thread tdk
thanx for helping, I've given up on it, too much hassle and I don't
think it's worth it for what I need...

-- 
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-toolkit@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.



Dev Plugin for Firefox 5

2011-07-14 Thread tdk
Is the Developer Plugin for Firefox 5 available somewhere?

I would like to upgrade my Firefox (it keeps pestering to do so ;),
but without the GWT Developer Plugin I can't really work...

-- 
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-toolkit@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.



Can I/Should I test my *ServiceImpl class? (GAE+GWT+MVP)

2011-07-14 Thread Drew Spencer
Hey coders,

I wonder if anyone can help me. I'm still learning GAE+GWT and trying to get 
into unit testing as I go along. I have finally managed to get my head 
around MVP and have written some basic tests to test my presenters, using 
mock objects for the view and server-side service. All good.

My question is this: *How can I test whether my RPC calls are working? 
Should I even be trying to test them?*

For example, in my ServiceImpl class I have a function fillDatastore() that 
populates it with some dummy data - I would like to be able to run this on 
the datastore stub, using LocalServiceTestHelper, a bit like this test, but 
using my server side code instead of putting the actual insert code into the 
test itself: 
http://code.google.com/appengine/docs/java/tools/localunittesting.html#Writing_Datastore_and_Memcache_Tests

As far as I understand it - I can't use GWT.create() to make a real rpc 
service in a TestCase (have to mock it), and I can't create a datastore stub 
inside a GwtTest. If anyone can point me in the right direction, tell me 
where I'm confused I would appreciate it greatly.

Cheers,

Drew

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZSdzjFFXD3kJ.
To post to this group, send email to google-web-toolkit@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: Please help - GWT Designer / UiBinder bug or clueless new user?

2011-07-14 Thread cri
Sorry, Venu, I don't understand what you are asking me to do. What do
you mean by going to source and what do you mean by adding, if
supported, bring up at '.'  Thanks. -Chuck

On Jul 14, 6:10 am, dreamer venugopal.vasire...@gmail.com wrote:
 Can you please try going to source and adding, if supported, brings up
 at ..
 -Venuhttp://schoolk12.appspot.com/

 On Jul 13, 8:10 am, cri chuck.irvine...@gmail.com wrote:







  I posted this issue before but didn't get any help so trying again...
  Using GWT Designer, when looking at a UiBinder *.ui.xml file in the
  Design tab, the setStyle property doesn't appear in the
  Properties window. Shouldn't the property be there? The docs seem to
  indicate that it should be. Thanks

  Chuck

-- 
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-toolkit@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: best architecture for GWT + Spring

2011-07-14 Thread cri
Definitely #2 for the reasons you mentions, with the GWT RPC server
side attaching to the Spring application context.

On Jul 14, 6:15 am, Ernesto Reig erniru...@gmail.com wrote:
 Hello everybody.
 I have been discussing this topic with some collegues and we would like to
 know the GWT community expert opinion :)
 As the title says, the discussion is about the best architecture (or best
 practices) for building enterprise web applications with GWT and Spring, and
 the different options available are:

  - GWT MVP front-end + Spring MVC + Spring architecture back-end*.
  - GWT MVP front-end + Spring architecture back-end*.
  - Spring MVC + GWT components inside html´s and JSP´s + Spring architecture
 back-end*.

 *Spring architecture back-end is composed of several different maven
 modules/projects (separated by functionality) each one made with Spring.

 From my point of view, the best option is the second one. With that option
 you are not mixing concepts nor using two design patterns together for the
 same thing (GWT MVP and Spring MVP), which I think is nonsense. Also you can
 develop the GWT part completely independent with the back-end part (with no
 Spring MVC in the middle). So you can make the front-end part with GWT, thus
 using the GWT best practices and features like Activities, Places,
 RequestFactory, etc. And the back-end part focusing on every module
 independently, using the technologies you want (Spring in this case) for
 each one.

 What do you think about this? Every point is appreciated.

 Thank you very much.

-- 
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-toolkit@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.



jetty 6 vs tomcat 6 ?

2011-07-14 Thread Elhanan
hi..

is there any preferred server between the 2  (from development
perspective) , when the production server would be websphere 7 (we
don't have rads, just websphere developer edition)

-- 
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-toolkit@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: Dev Plugin for Firefox 5

2011-07-14 Thread Thomas Broyer
The latest version of the plugin is compatible with Firefox 5. I use it 
every working day.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Obm36r-ndH0J.
To post to this group, send email to google-web-toolkit@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

2011-07-14 Thread richip
Not originally, but I added it (not the first time I got bit by this)
and it's still giving me a SerializationException:

com.google.gwt.user.client.rpc.SerializationException
at
com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:
153)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
125)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
179)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:
52)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:
40)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.serial(HashMap_FieldSerializer.java:
23)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
126)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
179)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldSerializer.java:
20)
at
com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSerializer.java:
33)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
126)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
179)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:
52)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:
40)
at
com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.serial(HashMap_FieldSerializer.java:
23)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
126)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
179)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldSerializer.java:
20)
at
com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSerializer.java:
33)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
126)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
179)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
com.enabil.vega.gwt.client.VegaService_Proxy.createShellAccount(VegaService_Proxy.java:
61)
at
com.enabil.vega.gwt.client.task.accountcreation.core.AccountCreationCreateShellAccountController.handleAppTaskFinished(AccountCreationCreateShellAccountController.java:
67)
at
com.enabil.vega.gwt.client.task.navwizard.core.VegaNavigationWizard.onNavFinishedEvent(VegaNavigationWizard.java:
342)
at
com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNavEvent.java:
32)
at
com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNavEvent.java:
1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:
193)
at
com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:
88)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
127)
at
com.enabil.vega.gwt.client.task.navwizard.core.VegaNavigationWizard
$2.onClick(VegaNavigationWizard.java:236)
at
com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:
98)
at
com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:
1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:
193)
at
com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:
88)
at
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
127)
at
com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

Re: Please help - GWT Designer / UiBinder bug or clueless new user?

2011-07-14 Thread dreamer
edit xml file directly in source mode, instead  in design mode , see
if it accepts.

On Jul 14, 5:58 am, cri chuck.irvine...@gmail.com wrote:
 Sorry, Venu, I don't understand what you are asking me to do. What do
 you mean by going to source and what do you mean by adding, if
 supported, bring up at '.'  Thanks. -Chuck

 On Jul 14, 6:10 am, dreamer venugopal.vasire...@gmail.com wrote:







  Can you please try going to source and adding, if supported, brings up
  at ..
  -Venuhttp://schoolk12.appspot.com/

  On Jul 13, 8:10 am, cri chuck.irvine...@gmail.com wrote:

   I posted this issue before but didn't get any help so trying again...
   Using GWT Designer, when looking at a UiBinder *.ui.xml file in the
   Design tab, the setStyle property doesn't appear in the
   Properties window. Shouldn't the property be there? The docs seem to
   indicate that it should be. Thanks

   Chuck

-- 
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-toolkit@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: SEVERE: The Cell Widget is attempting to render itself within the render loop

2011-07-14 Thread Christian Goudreau
It seems to happen when I have editable checkbox column and a selection 
handler.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/PbLqUPpHxHQJ.
To post to this group, send email to google-web-toolkit@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 + Tomcat + Realm FORM authentication

2011-07-14 Thread Jose María Zaragoza

Hi:

I would like to use realm FORM authentication in my GWT application,
running on Tomcat 7.x

I got it working using by FormPanel ( with target = _top ) and
web.xml configuration as

form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/error.jsp/form-error-page
/form-login-config

As I said, all works fine.

But there is a problem: I loss the advantages of asynchrononus calls
and during the login process doesn't look like a GWT app.

I would like my login page calls asynchrononusly to j_security_check
(realm) and process the response.
So, if I try to access to protected resource ( 
http://localhost:8080/protected/file.html),
Tomcat redirect to login page

I can to do this with RequestBuilder , but , if user/credentials are
right , the response.getText()  contains the content of the protected
resource ( file.html), but I don't know how to paint this content in
web browser.
This content can be a HTML file, or a PNG image, or a XML file. I want
to show the protected content as I do it with the FormPanel widget
( and target = _top )

Furthermore, with RequestBuilder , I loss the protected URL (http://
localhost:8080/protected/file.html) in browser's URL bar

Did anyone do it ? Any ideas ?

Thanks and 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-toolkit@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.



RPC Timeout because of delay at server side

2011-07-14 Thread Rock
Hi Guys,
I have a GWT application which I used for Installation of multiple
servers using PERL scripts. These installation scripts can take as
long as 2-3 hours to execute, because of this the client requests
times out, after around 1 hour, with the following response in the
onFailure() method:

com.google.gwt.user.client.rpc.StatusCodeException: !DOCTYPE HTML
PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/
html4/loose.dtd
HTMLHEADMETA HTTP-EQUIV=Content-Type CONTENT=text/html;
charset=iso-8859-1
TITLEERROR: The requested URL could not be retrieved/TITLE
STYLE type=text/css!--BODY{background-color:#ff;font-
family:verdana,sans-serif}PRE{font-family:sans-serif}--/STYLE
/HEADBODYH1ERROR/H1H2The requested URL could not be
retrieved/H2
HR noshade size=1pxPWhile trying to retrieve the URL:
A HREF=[no URL][no URL]/APThe following error was
encountered:ULLI
STRONGRead Timeout/STRONG/ULPThe system returned:
PREI[No Error]/I/PREP
A Timeout occurred while waiting to read data from the network.  The
network
or server may be down or congested.  Please retry your request.
PYour cache administrator is A HREF=mailto:webmaster;webmaster/
A.
BR clear=allHR noshade size=1pxADDRESS
Generated Tue, 12 Jul 2011 07:12:18 GMT by tklcnis (squid/
2.5.STABLE9)/ADDRESS
/BODY/HTML

Although the code at my server end keeps on running even after the
timeouts and the installations are completed successfully, but when I
return the data from server function saying installation completed,
the request is already outdated/stale and nothing happens as it has
already declared request as failed.

How can I increase the RPC timeout to infinite, so that it never
timesout.

Using Tomcat 6.0 and GWT: 1.7

Please Help

-- 
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-toolkit@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 development mode on a separate web server

2011-07-14 Thread Sohaib
You can use myeclipse ide for seperate servers if you want. 

www.myeclipseide.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/aeTERC0m7D4J.
To post to this group, send email to google-web-toolkit@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 for samsung smart TV, maple browser

2011-07-14 Thread Dominic
Our company made a google TV application with GWT, and we want to port
it to the samsung smart TV.
Samsung TV uses the maple browser.
When we run the apps, I think the browser detection fails, and the app
doesn't seem to run.
Is there a compile setting I should add to make it work with that
browser? Is it supported?

Thanks,
Dominic

-- 
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-toolkit@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 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread Michel Jonker
Hi,
This is a cross post from the AppEngine group, but since I got no
response there, I want to try this group.

I am trying to figure out the best practise to consume my App Engine
services from both Android and GWT.
Since the services are not that data oriented, I first considered GWT-
RPC.
But given the fact that the GPE 2.4 sample project voor Android comes
with
RequestFactory, I am leaning towards this approach.
I was hoping someone could validate this 'best practise' :
When you have both Android and GWT consumers of your App Engine
service,
apply the RequestFactory pattern.

TIA

Michel Jonker

-- 
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-toolkit@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.



Internal Compiler Error / Xerces

2011-07-14 Thread Jörn Gersdorf
Hi all,

we have a GWT project which is suddenly not compiling anymore but
failing with an INternal Compiler error at
com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:
128).

This happens since a collegue of mine has made some changes
(unfortunately he's two weeks on vacation so I can't ask him what
could have caused the problem). I experienced the problem with GWT 2.2
and also the same error after upgrading to 2.3. I'm compiling using
the GWT plugin in Eclipse.

I'm on Eclipse Helios, running Google Web Toolkit SDK 2.3.0
2.3.0.r36v201105191508
com.google.gwt.eclipse.sdkbundle.e36.feature.feature.group and
Google Plugin for Eclipse 3.6   2.3.2.r36v201106211634
com.google.gdt.eclipse.suite.e36.feature.feature.group.

I appreciate any help on this. Thank you very much.

Kind regards,
Jörn

The error is as follows:

   [WARN] Configuration property
UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration
is off, leaving your users more vulnerable to cross-site scripting
attacks. This property will default to true in future releases of GWT.
   [ERROR] Errors in 'file:/C:/workspaces/LIQ/DEVELOPMENT/
LoanIQ_EventManagerWAR/src/main/java/eventmanager/support/admin/client/
view/mqcrud/MQCrudView.java'
  [ERROR]  Internal compiler error
java.lang.AbstractMethodError:
org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/
String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/
Object;
at
com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:
128)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl
$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at
com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:
64)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:
178)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:
148)
at
com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:
126)
at
com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:
48)
at
com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:
60)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:
681)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
41)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:74)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
285)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
274)
at
com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:
91)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:
106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.process(AbstractCompiler.java:251)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.compile(AbstractCompiler.java:170)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
$CompilerImpl.compile(AbstractCompiler.java:285)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access
$400(AbstractCompiler.java:139)
at
com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:
587)
at
com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:
124)
at
com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:
54)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:
525)
at
com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:
35)
at 

entry point being ignored

2011-07-14 Thread Benjamin
Hi All,

I was happily coding away in IntelliJ and moved a large chunk of code
into another module, and then added that module to my main GWT project
as a dependency. Everything works perfectly in dev mode when I run the
debugger etc. When I deploy to app engine it's as if my Entry Point
module is never called.  The HTML welcome page loads but the entry
point doesn't do anything. No errors or anything - it's very hard to
debug since i can't even get my java to run.

any thoughts?!

Ben

-- 
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-toolkit@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: entry point being ignored

2011-07-14 Thread Dennis Haupt
did you put a Window.alert in your entry point so you can check if it's
called at all?
did you register the moved entry point in your main gwt .xml?

2011/7/14 Benjamin bsaut...@gmail.com

 Hi All,

 I was happily coding away in IntelliJ and moved a large chunk of code
 into another module, and then added that module to my main GWT project
 as a dependency. Everything works perfectly in dev mode when I run the
 debugger etc. When I deploy to app engine it's as if my Entry Point
 module is never called.  The HTML welcome page loads but the entry
 point doesn't do anything. No errors or anything - it's very hard to
 debug since i can't even get my java to run.

 any thoughts?!

 Ben

 --
 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-toolkit@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.



-- 
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-toolkit@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: Internal Compiler Error / Xerces

2011-07-14 Thread Juan Pablo Gardella
I think is a classpath issue. You have more than a SAX Parser in your
classpath and this is the problem. I have a similar problem and resolve (in
maven, not in eclipse). See this
threadhttp://groups.google.com/group/google-web-toolkit/browse_thread/thread/4645c2e495492306

2011/7/14 Jörn Gersdorf joern.gersd...@gmail.com

 Hi all,

 we have a GWT project which is suddenly not compiling anymore but
 failing with an INternal Compiler error at

 com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:
 128).

 This happens since a collegue of mine has made some changes
 (unfortunately he's two weeks on vacation so I can't ask him what
 could have caused the problem). I experienced the problem with GWT 2.2
 and also the same error after upgrading to 2.3. I'm compiling using
 the GWT plugin in Eclipse.

 I'm on Eclipse Helios, running Google Web Toolkit SDK 2.3.0
 2.3.0.r36v201105191508
 com.google.gwt.eclipse.sdkbundle.e36.feature.feature.group and
 Google Plugin for Eclipse 3.6   2.3.2.r36v201106211634
 com.google.gdt.eclipse.suite.e36.feature.feature.group.

 I appreciate any help on this. Thank you very much.

 Kind regards,
 Jörn

 The error is as follows:

   [WARN] Configuration property
 UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration
 is off, leaving your users more vulnerable to cross-site scripting
 attacks. This property will default to true in future releases of GWT.
   [ERROR] Errors in 'file:/C:/workspaces/LIQ/DEVELOPMENT/
 LoanIQ_EventManagerWAR/src/main/java/eventmanager/support/admin/client/
 view/mqcrud/MQCrudView.java'
  [ERROR]  Internal compiler error
 java.lang.AbstractMethodError:
 org.apache.xerces.dom.ElementNSImpl.setUserData(Ljava/lang/
 String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/
 Object;
at

 com.google.gwt.uibinder.rebind.W3cDocumentBuilder.startElement(W3cDocumentBuilder.java:
 128)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
 Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
 Source)
at
 org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
 Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl
 $NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
 $FragmentContentDispatcher.dispatch(Unknown Source)
at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
 Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
 Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at
 com.google.gwt.uibinder.rebind.W3cDomHelper.documentFor(W3cDomHelper.java:
 64)
at

 com.google.gwt.uibinder.rebind.UiBinderGenerator.getW3cDoc(UiBinderGenerator.java:
 178)
at

 com.google.gwt.uibinder.rebind.UiBinderGenerator.generateOnce(UiBinderGenerator.java:
 148)
at

 com.google.gwt.uibinder.rebind.UiBinderGenerator.generate(UiBinderGenerator.java:
 126)
at

 com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:
 48)
at

 com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:
 60)
at

 com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:
 681)
at
 com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
 41)
at com.google.gwt.dev.shell.StandardRebindOracle
 $Rebinder.rebind(StandardRebindOracle.java:74)
at

 com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
 285)
at

 com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
 274)
at

 com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:
 91)
at

 com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:
 106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.process(AbstractCompiler.java:251)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:
 444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.compile(AbstractCompiler.java:170)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox
 $CompilerImpl.compile(AbstractCompiler.java:285)
at
 com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access
 $400(AbstractCompiler.java:139)
at
 com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:
 587)
at

 

Re: GWT 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread Juan Pablo Gardella
If you use GWT-RPC and JPA (with Hibernate provider) you will have
serialization
problemshttp://code.google.com/intl/es/webtoolkit/articles/using_gwt_with_hibernate.html.
To solution this, you have this alternatives:

1) Use DTO
2) Use Gilead
3) Use a 
Filterhttp://books.google.com/books?id=OG816JSZYVcCpg=PA159lpg=PA159dq=hibernate+filter+gwtsource=blots=BM1BDJyWl9sig=Q18Zdh2kOVQmWu2n8L4IpGs-uIohl=esei=VxIfTtrhMsOCgAeY_oyYAwsa=Xoi=book_resultct=resultresnum=4ved=0CDkQ6AEwAw#v=onepageq=hibernate%20filter%20gwtf=false.
You can read this
http://groups.google.com/group/google-web-toolkit-contributors/msg/b3ccc61d4eebd21ctoo
and 
herehttp://groups.google.com/group/google-web-toolkit/browse_thread/thread/7e46e8c33e7ee5dayou
have a sample implementation with GWT 2.3.0.

With RF you will no have this problem and is efficient. But as you said, is
oriented to data services and (to me) is more complicated. GWT-RPC is more
general and you will write less code.

Hope helps to decide.




2011/7/14 Michel Jonker michel.jon...@e-office.com

 Hi,
 This is a cross post from the AppEngine group, but since I got no
 response there, I want to try this group.

 I am trying to figure out the best practise to consume my App Engine
 services from both Android and GWT.
 Since the services are not that data oriented, I first considered GWT-
 RPC.
 But given the fact that the GPE 2.4 sample project voor Android comes
 with
 RequestFactory, I am leaning towards this approach.
 I was hoping someone could validate this 'best practise' :
 When you have both Android and GWT consumers of your App Engine
 service,
 apply the RequestFactory pattern.

 TIA

 Michel Jonker

 --
 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-toolkit@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.



-- 
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-toolkit@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: GWT for samsung smart TV, maple browser

2011-07-14 Thread Jeff Chimene
On 07/14/2011 06:30 AM, Dominic wrote:
 Our company made a google TV application with GWT, and we want to port
 it to the samsung smart TV.
 Samsung TV uses the maple browser.
 When we run the apps, I think the browser detection fails, and the app
 doesn't seem to run.
 Is there a compile setting I should add to make it work with that
 browser? Is it supported?
 
 Thanks,
 Dominic
 

Short answer: no. Long answer: maybe, but you have to pick a browser
work-alike and extensively test the results. The work-alike fails to
adequately support your application, you may have to customize the
generated Javascript. You'll also want to find out what rendering agent
the maple browser uses.

There are probably other comments about this topic in the group
archives. ISTR that you want to create a custom definition to select a
fall-back user agent among those that are supported.

Start with /com/google/gwt/user/UserAgent.gwt.xml

-- 
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-toolkit@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: GWT 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread Thomas Broyer
With ValueProxy, you can with RequestFactory do everything you would with 
GWT-RPC (well, with the major exception of polymorphism –though this will be 
fixed soon– and transportable types –which don't include java.util.Map for 
instance, though once again will be fixed in due time–).
GWT-RPC can also be a real pain (particularly with non-web apps) as the 
client and server must be compiled from the exact same code or they won't be 
able to deserialize what the other end point sent. And I can assure you'll 
likely hit those even while developing your app! RF on the other hand makes 
migrations easier (no serialization policy files, to begin with).
But honestly, if you want to build an Android app, I wonder why you 
hesitate: support for GWT-RPC from Java is not official, and likely to break 
with a future version of GWT, whereas Android is officially a target plaform 
for RF. Just use ValueProxy all over the place if you don't need 
EntityProxy, it'll be just like RPC.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/2EmtzJM4fHwJ.
To post to this group, send email to google-web-toolkit@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.



Aw: GWT 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread Jens
If your services are not that data oriented pure JSON may be enough? 

Using Google's AutoBeans you could easily define bean-like interfaces to 
transport some information between client and server. AutoBeans are 
internally used by RequestFactory and if you use them directly you won't 
have that data oriented feel of RequestFactory. AutoBeans are just an easy 
way to serialize/deserialize bean-like interfaces (you even do not have to 
implement them) to/from JSON. 

Your server part could then be something like simple REST web services and 
if you ever want to use a third front end beside Android/GWT you just have 
to deal with simple JSON.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/xYMKyRyuPeEJ.
To post to this group, send email to google-web-toolkit@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 Timeout because of delay at server side

2011-07-14 Thread Jeff Chimene
On 07/14/2011 05:32 AM, Rock wrote:
 Hi Guys,
 I have a GWT application which I used for Installation of multiple
 servers using PERL scripts. These installation scripts can take as
 long as 2-3 hours to execute, because of this the client requests
 times out, after around 1 hour, with the following response in the
 onFailure() method:
Your scripts need to communicate with the client on a regular basis.
Look at the gwtupload project for some ideas on this topic.

-- 
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-toolkit@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: Please help - GWT Designer / UiBinder bug or clueless new user?

2011-07-14 Thread cri
Sure. That works fine. It's GWT Designer properties panel that is
having the issue.

On Jul 14, 9:22 am, dreamer venugopal.vasire...@gmail.com wrote:
 edit xml file directly in source mode, instead  in design mode , see
 if it accepts.

 On Jul 14, 5:58 am, cri chuck.irvine...@gmail.com wrote:







  Sorry, Venu, I don't understand what you are asking me to do. What do
  you mean by going to source and what do you mean by adding, if
  supported, bring up at '.'  Thanks. -Chuck

  On Jul 14, 6:10 am, dreamer venugopal.vasire...@gmail.com wrote:

   Can you please try going to source and adding, if supported, brings up
   at ..
   -Venuhttp://schoolk12.appspot.com/

   On Jul 13, 8:10 am, cri chuck.irvine...@gmail.com wrote:

I posted this issue before but didn't get any help so trying again...
Using GWT Designer, when looking at a UiBinder *.ui.xml file in the
Design tab, the setStyle property doesn't appear in the
Properties window. Shouldn't the property be there? The docs seem to
indicate that it should be. Thanks

Chuck

-- 
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-toolkit@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

2011-07-14 Thread cri
Just a wild guess. Is this problem happening in Chrome? If so,
completely clear your browser cache and retry.

On Jul 14, 9:06 am, richip ric...@gmail.com wrote:
 Not originally, but I added it (not the first time I got bit by this)
 and it's still giving me a SerializationException:

 com.google.gwt.user.client.rpc.SerializationException
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:
 153)
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 125)
     at
 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 179)
     at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
     at
 com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:
 52)
     at
 com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:
 40)
     at
 com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.serial(HashMap_FieldSerializer.java:
 23)
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 126)
     at
 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 179)
     at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
     at
 com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldSerializer.java:
 20)
     at
 com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSerializer.java:
 33)
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 126)
     at
 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 179)
     at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
     at
 com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:
 52)
     at
 com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer.serialize(HashMap_CustomFieldSerializer.java:
 40)
     at
 com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.serial(HashMap_FieldSerializer.java:
 23)
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 126)
     at
 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 179)
     at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
     at
 com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldSerializer.java:
 20)
     at
 com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSerializer.java:
 33)
     at
 com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:
 126)
     at
 com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:
 179)
     at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
     at
 com.enabil.vega.gwt.client.VegaService_Proxy.createShellAccount(VegaService_Proxy.java:
 61)
     at
 com.enabil.vega.gwt.client.task.accountcreation.core.AccountCreationCreateShellAccountController.handleAppTaskFinished(AccountCreationCreateShellAccountController.java:
 67)
     at
 com.enabil.vega.gwt.client.task.navwizard.core.VegaNavigationWizard.onNavFinishedEvent(VegaNavigationWizard.java:
 342)
     at
 com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNavEvent.java:
 32)
     at
 com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNavEvent.java:
 1)
     at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
     at
 com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:
 193)
     at
 com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:
 88)
     at
 com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:
 127)
     at
 com.enabil.vega.gwt.client.task.navwizard.core.VegaNavigationWizard
 $2.onClick(VegaNavigationWizard.java:236)
     at
 com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:
 98)
     at
 com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:
 1)
     at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
     at
 com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:
 193)
     at
 com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:
 88)
     at
 

Aw: RPC Timeout because of delay at server side

2011-07-14 Thread Jens
Maybe when you start your long running job your server should just notify 
the client that it has received the job request and that it gets started. 
Once that is done the client could ask the server periodically (using a GWT 
Timer) if the job is done or if something went wrong during job execution.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/jUx__3k94lEJ.
To post to this group, send email to google-web-toolkit@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: GWT client server communication

2011-07-14 Thread soetommy
Hi,

Can you tell me how you implemented the client and server codes for gwt for 
tcp connection to server?

Thanks a lot!

Soe


-- 
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-toolkit@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

2011-07-14 Thread richip
I've figured it out, but am not sure how to fix it. The List that I'm
using uses a class that has a field that uses generic types. In the
above case, VStruct has one field (fieldType) that's of type
FieldTypeT. So I'm guessing it has nothing to do with Lists but
rather that one type. So what's the rule with generics? Should I use a
field of type FieldTypeT extends Serializable?

On Jul 14, 11:04 am, cri chuck.irvine...@gmail.com wrote:
 Just a wild guess. Is this problem happening in Chrome? If so,
 completely clear your browser cache and retry.

 On Jul 14, 9:06 am, richip ric...@gmail.com wrote:







  Not originally, but I added it (not the first time I got bit by this)
  and it's still giving me a SerializationException:

  com.google.gwt.user.client.rpc.SerializationException
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(Serialize 
  rBase.java:
  153)
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase 
  .java:
  125)
      at
  com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali 
  ze(ClientSerializationStreamWriter.java:
  179)
      at
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write 
  Object(AbstractSerializationStreamWriter.java:
  126)
      at
  com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase 
  .serialize(Map_CustomFieldSerializerBase.java:
  52)
      at
  com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer 
  .serialize(HashMap_CustomFieldSerializer.java:
  40)
      at
  com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.seria 
  l(HashMap_FieldSerializer.java:
  23)
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase 
  .java:
  126)
      at
  com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali 
  ze(ClientSerializationStreamWriter.java:
  179)
      at
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write 
  Object(AbstractSerializationStreamWriter.java:
  126)
      at
  com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldS 
  erializer.java:
  20)
      at
  com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSeri 
  alizer.java:
  33)
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase 
  .java:
  126)
      at
  com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali 
  ze(ClientSerializationStreamWriter.java:
  179)
      at
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write 
  Object(AbstractSerializationStreamWriter.java:
  126)
      at
  com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase 
  .serialize(Map_CustomFieldSerializerBase.java:
  52)
      at
  com.google.gwt.user.client.rpc.core.java.util.HashMap_CustomFieldSerializer 
  .serialize(HashMap_CustomFieldSerializer.java:
  40)
      at
  com.google.gwt.user.client.rpc.core.java.util.HashMap_FieldSerializer.seria 
  l(HashMap_FieldSerializer.java:
  23)
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase 
  .java:
  126)
      at
  com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali 
  ze(ClientSerializationStreamWriter.java:
  179)
      at
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write 
  Object(AbstractSerializationStreamWriter.java:
  126)
      at
  com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serialize(VStruct_FieldS 
  erializer.java:
  20)
      at
  com.enabil.vega.gwt.shared.VStruct_FieldSerializer.serial(VStruct_FieldSeri 
  alizer.java:
  33)
      at
  com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase 
  .java:
  126)
      at
  com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.seriali 
  ze(ClientSerializationStreamWriter.java:
  179)
      at
  com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write 
  Object(AbstractSerializationStreamWriter.java:
  126)
      at
  com.enabil.vega.gwt.client.VegaService_Proxy.createShellAccount(VegaService 
  _Proxy.java:
  61)
      at
  com.enabil.vega.gwt.client.task.accountcreation.core.AccountCreationCreateS 
  hellAccountController.handleAppTaskFinished(AccountCreationCreateShellAccou 
  ntController.java:
  67)
      at
  com.enabil.vega.gwt.client.task.navwizard.core.VegaNavigationWizard.onNavFi 
  nishedEvent(VegaNavigationWizard.java:
  342)
      at
  com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNa 
  vEvent.java:
  32)
      at
  com.enabil.vega.gwt.client.task.navwizard.core.VegaNavEvent.dispatch(VegaNa 
  vEvent.java:
  1)
      at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
      at
  com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.ja 
  va:
  193)
      at
  

rpc with multiple data objects

2011-07-14 Thread fchas
my I'm writing a mysql persisted gwt app and I have several data
objects that I want shared to the UI for crud operations but I'm
confused about how to represent the objects in the service.  the
online examples use one data object and I don't know how to map
multiple objects in the service.  do I need one service and servlet
mapping per object or is there a better way?  i'm new to java servlets
so please pardon my complete ignorance.

-- 
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-toolkit@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

2011-07-14 Thread iPeel
I've had so many of these which are nothing to do with serialization
errors themselves, but references to null objects or null objects
within the object class.



On Jul 14, 6:22 am, richip ric...@gmail.com wrote:
 We're coming up with a SerializationException for an RPC call DTO that
 we can't seem to resolve. Essentially, I've added an instance of a
 class that extends ArrayListVStruct (where VStruct is a Serializable
 class) and contains one Serializable field. Does someone know what our
 problem might be? If not, are there tips on how to debug /.
 troubleshoot these SerializationException problems?

-- 
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-toolkit@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 with multiple data objects

2011-07-14 Thread Juan Pablo Gardella
Check this 
threadhttp://groups.google.com/group/google-web-toolkit/browse_thread/thread/7e46e8c33e7ee5da.
Hope helps

2011/7/14 fchas charlesford...@gmail.com

 my I'm writing a mysql persisted gwt app and I have several data
 objects that I want shared to the UI for crud operations but I'm
 confused about how to represent the objects in the service.  the
 online examples use one data object and I don't know how to map
 multiple objects in the service.  do I need one service and servlet
 mapping per object or is there a better way?  i'm new to java servlets
 so please pardon my complete ignorance.

 --
 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-toolkit@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.



-- 
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-toolkit@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: A gwt-sample. Integrate Spring, JPA2.

2011-07-14 Thread Juan Pablo Gardella
An interensting related thread, GWT 2.4: RequestFactory versus GWT-
RPC: 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/d68fa207e1e36e7e


On 12 jul, 15:18, Kayode Odeyemi drey...@gmail.com wrote:
 Thanks Juan. I hit a road block on this sometime ago. It's good to have this
 online. I only saw this implementation in the book Google App Engine Java
 and
 GWT Application Development for the Connectr App sample.

 Thanks a lot.

 On Tue, Jul 12, 2011 at 5:23 PM, Adolfo Panizo Touzon 









 adolfo.pan...@gmail.com wrote:
  Interesting! Thanks!.

  2011/7/12 Juan Pablo Gardella gardellajuanpa...@gmail.com

  Hi folks,

  I update the sample. I add an Hibernate Filter, an alternative to DTOs
  or Gilead to the solve the problem of serialization in GWT-RPC
  comunication. See
 http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html.

  With this filter, proxys are put to null and initialize collection
  convert to java collections frameworks implementation. For example
  PersistenSet to HashSet. With this filter can solve LIE.

  Is an alternative to Gilead or DTOs. Other alternatives, I think are
  intrusive (Gilead) or generate a lot of duplicate code (DTOs). Is
  tested with GWT 2.3.0. Or more complicate as RF. RF is better I
  suppose, but to me, more complicated.

  Best regards,
  Juan

  On May 27, 4:06 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com
  wrote:
   Hi folks,

   I wanna contribute to the communitiy with a little sample. I put
  inhttps://bitbucket.org/gardellajuanpablo/gwt-sample/wiki/Home

   Features:

      - JPA 2.
      - gin.
      - gwt-dispatch. Handlers are spring managed beans.
      - jsr-330 in client and server side.
      - Spring.
      - Spring Security.
      - H2 database.
      - Build by maven.
      - Runnable by jetty (mvn jetty:deploy-war).
      - Autogenerate database by reading domain classes.

   Use activity and places.

   Regards,
   Juan

  --
  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-toolkit@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.

  --
  El precio es lo que pagas. El valor es lo que recibes.
  Warren Buffet

   --
  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-toolkit@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.

 --
 Odeyemi 'Kayode O.http://www.sinati.com. t: @charyorde

-- 
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-toolkit@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: GWT 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread Aidan O'Kelly
I'm using RequestFactory for a 'non-data-orientated' app and its works
very nicely.

Chained method invocation:

MyServiceRC serviceRequest = appRequestFactory.MyServiceRC();
serviceRequest.giveMeAString().to(stringReceiver);
if (needPojo == true)
serviceRequest.giveMeAPojo().to(pojoReceiver); // Pojo would be a
ValueProxy for example.

// Now fire both methods in one RPC request, and do whatever
processing we want once both completed.
serviceRequest.fire(processStringAndPojoReceiver);

A pretty nice way to call server side methods. You are certainly not
restricted just to persisting and retrieving datastore objects with
RequestFactory.





On Thu, Jul 14, 2011 at 10:36 AM, Michel Jonker
michel.jon...@e-office.com wrote:
 Hi,
 This is a cross post from the AppEngine group, but since I got no
 response there, I want to try this group.

 I am trying to figure out the best practise to consume my App Engine
 services from both Android and GWT.
 Since the services are not that data oriented, I first considered GWT-
 RPC.
 But given the fact that the GPE 2.4 sample project voor Android comes
 with
 RequestFactory, I am leaning towards this approach.
 I was hoping someone could validate this 'best practise' :
 When you have both Android and GWT consumers of your App Engine
 service,
 apply the RequestFactory pattern.

 TIA

 Michel Jonker

 --
 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-toolkit@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.



-- 
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-toolkit@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.



Failed to read file path/._library.jar - What could be wrong?

2011-07-14 Thread Ingert Doe
Hi! I want to use the google-api-java-client on the server-side in a
GWT/GAE project but I keep getting strange errors in the console when
I do a test run of my code.

To rule out any other factors, I'v created a new GWT/GAE project (with
the GWT project sample). I added references to the google-api-java-
client (project-properties-java build path- libraries in eclipse).
I also set the Source attachment to the source jars, as mentioned on
the google-api-java-client setup page (http://code.google.com/p/google-
api-java-client/wiki/Setup) and copied the required jars to the war/
lib directory.

I then added the simple youtube example (http://code.google.com/p/
google-api-java-client/wiki/SampleProgram) to my GreetingServiceImpl
method and tweaked it to return the answer of the query to the client.
When I select Debug as - Web Application I get a series of (to me)
strange warnings in the console that I hope someone here can help me
solve.

Notice that all warnings follow a simular pattern:
1) All libraries pertaining to google-api-java-client are affected
(nothing else)
2) The warnings say they can't open ._library.jar which is the thing
that confuses me the most, does anyone know what this means?

--- snip ---

[WARN] Failed to read file: /Volumes/PROJECTS/workspace/GApiTest/war/
WEB-INF/lib/._google-api-client-1.4.1-beta.jar
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:127)
at java.util.jar.JarFile.init(JarFile.java:135)
at java.util.jar.JarFile.init(JarFile.java:99)
at
org.mortbay.jetty.webapp.TagLibConfiguration.configureWebApp(TagLibConfiguration.java:
174)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1247)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
186)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
162)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
172)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
119)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:500)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1055)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:804)
at com.google.gwt.dev.DevMode.main(DevMode.java:309)

--- snip ---

Warnings continue for all jars in the google-api-java-client package
(including all dependencies)

._google-api-client-extensions-1.4.1-beta.jar
._google-api-client-googleapis-1.4.1-beta.jar
._google-api-client-googleapis-extensions-1.4.1-beta.jar
._commons-codec-1.3.jar
._commons-logging-1.1.1.jar
._gson-1.6.jar
._guava-r09.jar
._httpclient-4.0.3.jar
._httpcore-4.0.1.jar
._jackson-core-asl-1.6.7.jar
._jsr305-1.3.9.jar
._junit-4.8.2.jar
._servlet-api-2.5.jar
._transaction-api-1.1.jar
._xmlParserAPIs-2.6.2.jar
._xpp3-1.1.4c.jar


Note the code actually works fine and I get no errors/warnings in the
console after the app has launched, but these initial warnings confuse
me

-- 
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-toolkit@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: Many problems with designer LoginManager tutorial

2011-07-14 Thread Eric Clayberg
The tutorial you are referencing assumes that you are creating a GWT Java 
based app rather than a UiBinder app. It also assumes that you are using the 
full version of GWT Designer and have installed the GWT SDK somewhere 
specific. To answer your questions above...

1) The path would be the directory you unzipped the SDK to. If you are using 
the GPE, this step is not needed (GWT Designer will just use the SDK 
included with the GPE).

2) A Composite is standard GWT Java component used as a container for other 
widgets. The Composite wizard is part of the full GWT Designer tool. 

3) FlexTable only accepts children when used in a GWT Java class. It does 
not accept children in a UiBinder context.

4) A widgets variable property refers to its Java variable name (field or 
local variable).

5) The CSS editor is currently available only in the GWT Java context. That 
will be coming to the UiBinder editor soon.

The basic problem here is that the tutorial is entirely written from the POV 
of a GWT Java app and not a UiBinder app. By going down the UiBinder path, 
the rest of the tutorial does not apply. You need the full version of GWT 
Designer installed and you need to access the GWT Java Composite wizard in 
step #2.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/uWhODOTen6EJ.
To post to this group, send email to google-web-toolkit@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 Timeout because of delay at server side

2011-07-14 Thread Aidan O'Kelly
 How can I increase the RPC timeout to infinite, so that it never
 timesout.


FYI, 'Read Timeout' is being caused by the OS's TCP stack, so you
cannot/should not hope to increase this time-out from GWT client code,
you must use one of the methods suggested. (keep-alive's or polling
the server to check for completion )

-- 
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-toolkit@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: best architecture for GWT + Spring

2011-07-14 Thread t.dave
i'd also agree with going the route of #2, and keeping GWT-RPC for
convenience.  yes, it's nice architecturally to say your client and
server are loosely coupled via JSON, but in practice writing JSNI
objects to read the JSON is hard to debug and can be rather tedious.

i did that previously with a grails backend, and because grails at
that point was unproven to me wanted to be able to swap it out for
something later and not even tie myself into a java backend.  i
wouldn't recommend it.  unless you have requirements that you can't
have a java backend or really don't think it's going to last, i'd keep
GWT-RPC and have that attach to spring as the previous poster
mentioned.

you might also have requirements of different (non-GWT) clients
calling your restful server side and still want to go with JSON, but
again i'd think about having multiple input/output formats (GWT-RPC,
JSON, XML, etc) all calling into the same services layer instead of
trying to standardize on one input/output data format.

hope that helps!


ps. only my $.02, not necessarily an expert opinion.  :)



On Jul 14, 8:04 am, cri chuck.irvine...@gmail.com wrote:
 Definitely #2 for the reasons you mentions, with the GWT RPC server
 side attaching to the Spring application context.

 On Jul 14, 6:15 am, Ernesto Reig erniru...@gmail.com wrote:







  Hello everybody.
  I have been discussing this topic with some collegues and we would like to
  know the GWT community expert opinion :)
  As the title says, the discussion is about the best architecture (or best
  practices) for building enterprise web applications with GWT and Spring, and
  the different options available are:

   - GWT MVP front-end + Spring MVC + Spring architecture back-end*.
   - GWT MVP front-end + Spring architecture back-end*.
   - Spring MVC + GWT components inside html´s and JSP´s + Spring architecture
  back-end*.

  *Spring architecture back-end is composed of several different maven
  modules/projects (separated by functionality) each one made with Spring.

  From my point of view, the best option is the second one. With that option
  you are not mixing concepts nor using two design patterns together for the
  same thing (GWT MVP and Spring MVP), which I think is nonsense. Also you can
  develop the GWT part completely independent with the back-end part (with no
  Spring MVC in the middle). So you can make the front-end part with GWT, thus
  using the GWT best practices and features like Activities, Places,
  RequestFactory, etc. And the back-end part focusing on every module
  independently, using the technologies you want (Spring in this case) for
  each one.

  What do you think about this? Every point is appreciated.

  Thank you very much.

-- 
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-toolkit@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 Timeout because of delay at server side

2011-07-14 Thread Alfredo Quiroga-Villamil
Hello Aidan:

I wouldn't personally suggest increasing the timeout value. Instead you can
do one or two things:

1. Poll the server every X amount of time and create a mechanism in the
backend server to let you know when the process/es completed.
2. Implement Server Push (Take a look at Jetty Continuations).

Regards,

Alfredo

On Thu, Jul 14, 2011 at 5:12 PM, Aidan O'Kelly aida...@gmail.com wrote:

  How can I increase the RPC timeout to infinite, so that it never
  timesout.
 

 FYI, 'Read Timeout' is being caused by the OS's TCP stack, so you
 cannot/should not hope to increase this time-out from GWT client code,
 you must use one of the methods suggested. (keep-alive's or polling
 the server to check for completion )

 --
 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-toolkit@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.




-- 
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

-- 
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-toolkit@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.



Maven repo with GWT snapshots or RCs

2011-07-14 Thread Alexander Orlov
Is there a Maven repo with GWT snapshots or at least GWT milestones or
RCs? Also I haven't found any repo with gwt-servlet-deps or
requestfactory-* libs.

Every hint is appreciated!

-Alex

-- 
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-toolkit@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: Maven repo with GWT snapshots or RCs

2011-07-14 Thread Juan Pablo Gardella
You can dowload the sources and compile in last instances.

2011/7/14 Alexander Orlov alexander.or...@loxal.net

 Is there a Maven repo with GWT snapshots or at least GWT milestones or
 RCs? Also I haven't found any repo with gwt-servlet-deps or
 requestfactory-* libs.

 Every hint is appreciated!

 -Alex

 --
 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-toolkit@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.



-- 
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-toolkit@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: Maven repo with GWT snapshots or RCs

2011-07-14 Thread David Chandler
I plan to push 2.4.0-rc1 to Maven Central tomorrow. Found a couple issues
today while smoke testing so need to rebuild. Requestfactory-* libs will be
pushed separately with a different groupId after more testing, probably
early next week as the new groupId (com.google.web.bindery) will likely hold
things up first time out.

/dmc

On Thu, Jul 14, 2011 at 6:48 PM, Alexander Orlov
alexander.or...@loxal.netwrote:

 Is there a Maven repo with GWT snapshots or at least GWT milestones or
 RCs? Also I haven't found any repo with gwt-servlet-deps or
 requestfactory-* libs.

 Every hint is appreciated!

 -Alex

 --
 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-toolkit@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.




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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-toolkit@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: Maven repo with GWT snapshots or RCs

2011-07-14 Thread Alexander Orlov
Working with the SYSTEM scope isn't the nice way to work with Maven.
Also I don't want JARs in my Git repo.

-Alex

On Jul 15, 12:49 am, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 You can dowload the sources and compile in last instances.

 2011/7/14 Alexander Orlov alexander.or...@loxal.net







  Is there a Maven repo with GWT snapshots or at least GWT milestones or
  RCs? Also I haven't found any repo with gwt-servlet-deps or
  requestfactory-* libs.

  Every hint is appreciated!

  -Alex

  --
  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-toolkit@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.

-- 
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-toolkit@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: GWT 2.4: RequestFactory versus GWT-RPC

2011-07-14 Thread David Chandler
FYI, bobv updated the RF developer guide yesterday with a separate section
on transportable types, discussion of polymorphic type-mapping rules, and
slight re-wording of the Overview section.

http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

/dmc

On Thu, Jul 14, 2011 at 4:24 PM, Aidan O'Kelly aida...@gmail.com wrote:

 I'm using RequestFactory for a 'non-data-orientated' app and its works
 very nicely.

 Chained method invocation:

 MyServiceRC serviceRequest = appRequestFactory.MyServiceRC();
 serviceRequest.giveMeAString().to(stringReceiver);
 if (needPojo == true)
serviceRequest.giveMeAPojo().to(pojoReceiver); // Pojo would be a
 ValueProxy for example.

 // Now fire both methods in one RPC request, and do whatever
 processing we want once both completed.
 serviceRequest.fire(processStringAndPojoReceiver);

 A pretty nice way to call server side methods. You are certainly not
 restricted just to persisting and retrieving datastore objects with
 RequestFactory.





 On Thu, Jul 14, 2011 at 10:36 AM, Michel Jonker
 michel.jon...@e-office.com wrote:
  Hi,
  This is a cross post from the AppEngine group, but since I got no
  response there, I want to try this group.
 
  I am trying to figure out the best practise to consume my App Engine
  services from both Android and GWT.
  Since the services are not that data oriented, I first considered GWT-
  RPC.
  But given the fact that the GPE 2.4 sample project voor Android comes
  with
  RequestFactory, I am leaning towards this approach.
  I was hoping someone could validate this 'best practise' :
  When you have both Android and GWT consumers of your App Engine
  service,
  apply the RequestFactory pattern.
 
  TIA
 
  Michel Jonker
 
  --
  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-toolkit@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.
 
 

 --
 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-toolkit@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.




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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-toolkit@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: Maven repo with GWT snapshots or RCs

2011-07-14 Thread Alexander Orlov
On Jul 15, 12:57 am, David Chandler drfibona...@google.com wrote:
 I plan to push 2.4.0-rc1 to Maven Central tomorrow. Found a couple issues

Very nice!

 today while smoke testing so need to rebuild. Requestfactory-* libs will be
 pushed separately with a different groupId after more testing, probably
 early next week as the new groupId (com.google.web.bindery) will likely hold
 things up first time out.

A different groupId makes sense as RF isn't GWT-specific.

-Alex

-- 
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-toolkit@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.



Using TextResources in UiBinder

2011-07-14 Thread Isaac Truett
I want to include a block of text from a ClientBundle's TextResource in a
UiBinder template.

Logically, I want this:

!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
ui:with field=res type=foo.resources.ClientResources/
div
{res.myTextResource.getText}
/div
/ui:UiBinder

But this just prints the literal {res.myTextResource.getText}. And yet
this:

!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
ui:with field=res type=foo.resources.ClientResources/
div id={res.myTextResource.getText}
/div
/ui:UiBinder

... yields the content of myTextResource in the ID of the div.

So, is there some voodoo hidden somewhere that allows me to use {res.foo}
notation outside of an attribute? All of the examples shown in Declarative
Layout with UiBinder are for setting attributes. If this isn't currently
possible, is there a reason not to allow what I'm trying to do? Or is there
a better approach that is equally or more concise?

Thanks,
Isaac

-- 
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-toolkit@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: A gwt-sample. Integrate Spring, JPA2.

2011-07-14 Thread Craig Mitchell
This is the active thread:  
https://groups.google.com/forum/#!topic/google-web-toolkit/kZwRAds9two

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/VQX5J8RFZycJ.
To post to this group, send email to google-web-toolkit@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.



Cloning an array?

2011-07-14 Thread Adrian Blakey
What do I have to do to get gwtc to translate something like: String[] foo =
(String[])bar.clone();?

gwtc ouputs: [ERROR] Line nn: Cannot invoke clone() on the array type
String[]

I understand that clone is implemented by the java compiler for all arrays
and there isn't a method on a java class that can be emulated. I tried a
couple of things to get this to work by emulation but gwtc barfs with other
errors.

Is the only work around to change the code to System.arraycopy and then
supply a js emulation for arraycopy?

Adrian Blakey
adrianbla...@gmail.com
skype: adrianblakey
facetime: adrianbla...@gmail.com
(510) 747-8057

-- 
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-toolkit@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 Editor with dynamic ListBox problem

2011-07-14 Thread vinayak kulkarni
Hi,
Problem: How to use dynamic listbox with editor framework
I have the simple use case to display a ListString in the listbox.
Then, the selected item in the listbox needs to be flushed from the
UI.
The values of the listbox are not static, they come from the DB during
runtime.

I wanted to implement it with editor mechanism.
But, the problem is, the input is - ListString  to show all the
values in the listbox
  the output is just String -  to be
flushed by the editor framework.

Previously, i used LeafValueEditorString with getValue() and
setValue().
getValue() -- flushes the selected value to the editor driver
setValue() -- unimplemented since it cannot accept the String
I implemented one more method setAllValues() to show the dropdown
values.

How, to handle this situation? when the getValue() and setValue() are
not of the same type?

I could think of ValueListBox with setAcceptablevalues(). But, how
does editor make a call to it?

Here is the flow:
  Model
 -- ListString listValues
 .. other objects

ModelView implements EditorModel
   .. Model attributes with direct mapping
  MyListBox listValues

MyListBox implements LeafValueEditorString
getValue()
setValue()

Presenter
  -- Get model
  -- editor driver.edit(model object)
  set to view
 = The view is updated with model object

Let me know if there is any other way to make MyListBox widget to be
editor compliant and accepts ListString but gives out String

-- 
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-toolkit@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: Add chunking to the xsiframe linker (issue1477802)

2011-07-14 Thread zundel

LGTM

http://gwt-code-reviews.appspot.com/1477802/

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


Re: [gwt-contrib] persistent unit cache w/newer entries

2011-07-14 Thread Eric Ayers
Hi Stephen,

The line of code you mentioned is used by a background thread that loads up
the persistent unit cache in the background while the compiler is off doing
other things.  Eventually, on the first request to retrieve from the cache,
the two threads sync up (see references to  unitCacheMapLoader.await();).

The logic you are looking at is trying to handle the case where the
MemoryCache might have been pre-populated by another mechanism  other than
reading them out of the log file directory.  For example, you might load in
a .gwtar file compiled on July 13, but later you might read in a cached unit
compiled on July 1.  The persistent unit cache is stale and should be
disregarded.

But I see your point about the unit being the same other than a dependency
update.  I'm wondering if it would be sufficient for the test should be
changed to =?

On Wed, Jul 13, 2011 at 11:31 AM, Stephen Haberman 
stephen.haber...@gmail.com wrote:

 Hi,

 In PersistentUnitCache, if there are multiple units for the same path,
 this check (line 500-ish):

if (oldEntry != null
   unit.getLastModified()  oldEntry.getUnit().getLastModified())

 Only uses the newer entry if its timestamp is newer. I don't think this
 is sufficient though.

 While messing around with dependencies, I ran into a situation where:

 * 1st compile
  * UnitA is cached with apiRefs=X
 * Make changes
  * apiRef X changes
 * 2nd compile
  * UnitA is read from cache
  * UnitA is seen invalid due to X changed, recompiled
  * UnitA' (with updated dependencies) is written to cache
 * 3rd compile
  * UnitA is read from cache
  * UnitA' is read from cache, but skipped because the timestamp of
UnitA didn't change, so UnitA' is not considered newer than UnitA
  * UnitA is seen invalid, recompiled
  * UnitA'' is written to cache
 * 4th compile
  * Both UnitA' and UnitA'' are skipped, UnitA is invalidated,
recompiled, etc.

 So, UnitA keeps getting recompiled on subsequent compiles, even though
 apiRef X is no longer changing, until after a certain number of times,
 the unit cache flushes, and AFAICT, UnitA' is kept over UnitA, so then
 it can finally stopped be recompiled.

 Basically, I think either newer units should always win, or the new vs.
 old check should consider more than just the timestamp, e.g. if
 dependencies changed. That being said, I don't know what other use
 cases the last modified check was for, other than just avoiding an
 unnecessary map update?

 Does that make sense, or am I missing something?

 Thanks,
 Stephen

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




-- 
Eric Ayers | Software Engineer | zun...@google.com | +1 404 487 9229

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

[gwt-contrib] [google-web-toolkit] r10454 committed - tag the 2.3 release

2011-07-14 Thread codesite-noreply

Revision: 10454
Author:   mrruss...@google.com
Date: Thu Jul 14 05:37:11 2011
Log:  tag the 2.3 release

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

Added:
 /tags/2.3.0

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


[gwt-contrib] Notify DesignTimeUtils about all beans, not only about UIObjects. (issue1483801)

2011-07-14 Thread scheglov

Reviewers: zundel,

Description:
Notify DesignTimeUtils about all beans, not only about UIObjects.


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

Affected files:
  M user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java


Index: user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java
===
--- user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java	 
(revision 10452)
+++ user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java	 
(working copy)

@@ -55,6 +55,9 @@
*/
   public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
+
+writer.getDesignTime().handleUIObject(writer, elem, fieldName);
+
 final MapString, String setterValues = new HashMapString, String();
 final MapString, String localizedValues =  
fetchLocalizedAttributeValues(

 elem, writer);
Index: user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java
===
--- user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java	 
(revision 10452)
+++ user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java	 
(working copy)

@@ -29,9 +29,6 @@

   public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
-
-writer.getDesignTime().handleUIObject(writer, elem, fieldName);
-
 String debugId = elem.consumeStringAttribute(debugId, null);
 if (null != debugId) {
   writer.addStatement(%s.ensureDebugId(%s);, fieldName, debugId);


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


Re: [gwt-contrib] persistent unit cache w/newer entries

2011-07-14 Thread Stephen Haberman

 For example, you might load in a .gwtar file compiled on July 13, but
 later you might read in a cached unit compiled on July 1.

Ah, sure, that makes sense. I forgot that units could be coming from
places other than just gwt-unitCache.

 But I see your point about the unit being the same other than a
 dependency update.  I'm wondering if it would be sufficient for the
 test should be changed to =?

Yeah, that would handle what I was seeing, where the unit had two
entries in the unit cache, and the 2nd one was correct.

In your scenario, an archive could have a unit with the same timestamp
but correct dependencies, and with = could loose out to a unit cache
unit same timestamp but older dependencies that came in later. But that
would just mean the unit getting recompiled once and then the new unit
cache entry (with the same deps as the archive unit) would win the next
time around.

I was thinking about the case where the archive unit had invalid
dependencies, and, if loaded later than any unit cache entries, could
cause a continual recompile. However, I imagine archive units having
invalid dependencies is unlikely to happen.

- Stephen

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


[gwt-contrib] Re: Notify DesignTimeUtils about all beans, not only about UIObjects. (issue1483801)

2011-07-14 Thread zundel

LGTM

http://gwt-code-reviews.appspot.com/1483801/

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


[gwt-contrib] [google-web-toolkit] r10455 committed - Notify DesignTimeUtils about all beans, not only about UIObjects....

2011-07-14 Thread codesite-noreply

Revision: 10455
Author:   scheg...@google.com
Date: Thu Jul 14 09:46:50 2011
Log:  Notify DesignTimeUtils about all beans, not only about UIObjects.

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

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

Modified:
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java

===
--- /trunk/user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java	 
Tue Nov  9 08:44:38 2010
+++ /trunk/user/src/com/google/gwt/uibinder/elementparsers/BeanParser.java	 
Thu Jul 14 09:46:50 2011

@@ -55,6 +55,9 @@
*/
   public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
+
+writer.getDesignTime().handleUIObject(writer, elem, fieldName);
+
 final MapString, String setterValues = new HashMapString, String();
 final MapString, String localizedValues =  
fetchLocalizedAttributeValues(

 elem, writer);
===
---  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java	 
Fri Jul 23 14:20:15 2010
+++  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UIObjectParser.java	 
Thu Jul 14 09:46:50 2011

@@ -29,9 +29,6 @@

   public void parse(XMLElement elem, String fieldName, JClassType type,
   UiBinderWriter writer) throws UnableToCompleteException {
-
-writer.getDesignTime().handleUIObject(writer, elem, fieldName);
-
 String debugId = elem.consumeStringAttribute(debugId, null);
 if (null != debugId) {
   writer.addStatement(%s.ensureDebugId(%s);, fieldName, debugId);

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


[gwt-contrib] [google-web-toolkit] r10456 committed - Add chunking to the xsiframe linker...

2011-07-14 Thread codesite-noreply

Revision: 10456
Author:   unn...@google.com
Date: Thu Jul 14 10:42:16 2011
Log:  Add chunking to the xsiframe linker

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

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

Modified:
  
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java
  
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptAlreadyIncluded.js
  
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/installScriptEarlyDownload.js

 /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
 /trunk/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
 /trunk/dev/core/test/com/google/gwt/core/linker/ScriptChunkingTest.java
 /trunk/user/test/com/google/gwt/core/ext/LinkerTest.gwt.xml
 /trunk/user/test/com/google/gwt/core/ext/test/LinkerTest.java

===
---  
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java	 
Thu Jun 23 07:36:26 2011
+++  
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java	 
Thu Jul 14 10:42:16 2011

@@ -26,6 +26,7 @@
 import com.google.gwt.core.ext.linker.EmittedArtifact;
 import com.google.gwt.core.ext.linker.SelectionProperty;
 import com.google.gwt.core.ext.linker.SoftPermutation;
+import com.google.gwt.core.ext.linker.StatementRanges;
 import com.google.gwt.dev.util.DefaultTextOutput;
 import com.google.gwt.dev.util.TextOutput;
 import com.google.gwt.dev.util.Util;
@@ -41,6 +42,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.SortedMap;
+import java.util.SortedSet;
 import java.util.TreeMap;

 /**
@@ -54,6 +56,11 @@
* goes away?
*/

+  /**
+   * A configuration property indicating how large each script tag should  
be.

+   */
+  private static final String CHUNK_SIZE_PROPERTY  
= iframe.linker.script.chunk.size;

+
   /**
* File name for computeScriptBase.js.
*/
@@ -93,6 +100,56 @@
   buf.replace(pos, pos + len, replace);
 }
   }
+
+  /**
+   * Split a JavaScript string into multiple chunks, at statement  
boundaries.

+   * This method is made default access for testing.
+   *
+   * @param ranges Describes where the statements are located within the
+   *  JavaScript code. If codenull/code, then return  
codejs/code

+   *  unchanged.
+   * @param js The JavaScript code to be split up.
+   * @param charsPerChunk The number of characters to be put in each  
script tag.

+   * @param scriptChunkSeparator The string to insert between chunks.
+   */
+  public static String splitPrimaryJavaScript(StatementRanges ranges,  
String js,

+  int charsPerChunk, String scriptChunkSeparator) {
+if (charsPerChunk  0 || ranges == null) {
+  return js;
+}
+
+StringBuilder sb = new StringBuilder();
+int bytesInCurrentChunk = 0;
+
+for (int i = 0; i  ranges.numStatements(); i++) {
+  int start = ranges.start(i);
+  int end = ranges.end(i);
+  int length = end - start;
+  if (bytesInCurrentChunk  0  bytesInCurrentChunk + length   
charsPerChunk) {

+if (lastChar(sb) != '\n') {
+  sb.append('\n');
+}
+sb.append(scriptChunkSeparator);
+bytesInCurrentChunk = 0;
+  }
+  if (bytesInCurrentChunk  0) {
+char lastChar = lastChar(sb);
+if (lastChar != '\n'  lastChar != ';'  lastChar != '}') {
+  /*
+   * Make sure this statement has a separator from the last one.
+   */
+  sb.append(;);
+}
+  }
+  sb.append(js, start, end);
+  bytesInCurrentChunk += length;
+}
+return sb.toString();
+  }
+
+  private static char lastChar(StringBuilder sb) {
+return sb.charAt(sb.length() - 1);
+  }

   /**
* This method is left in place for existing subclasses of
@@ -139,7 +196,27 @@
   public boolean supportsDevModeInJunit(LinkerContext context) {
 return (getHostedFilename() != );
   }
-
+
+  /**
+   * Extract via {@link #CHUNK_SIZE_PROPERTY} the number of characters to  
be

+   * included in each chunk.
+   */
+  protected int charsPerChunk(LinkerContext context, TreeLogger logger) {
+SortedSetConfigurationProperty configProps =  
context.getConfigurationProperties();

+for (ConfigurationProperty prop : configProps) {
+  if (prop.getName().equals(CHUNK_SIZE_PROPERTY)) {
+return Integer.parseInt(prop.getValues().get(0));
+  }
+}
+// CompilerParameters.gwt.xml indicates that if this property is -1,  
then

+// no chunking is performed, so we return that as the default.  Since
+// Core.gwt.xml contains a definition for this property, this should  
never
+// happen in production, but some tests mock out the  
ConfigurationProperties
+// so we want to have a reasonable default rather than making them all  
add

+// a value for this property.
+return -1;
+  }
+
   protected CollectionArtifact? doEmitCompilation(TreeLogger logger,
 

[gwt-contrib] Update to the staleness check when loading the PersistentUnitCache (issue1483803)

2011-07-14 Thread zundel

Reviewers: tobyr,

Description:
Update to the staleness check when loading the PersistentUnitCache
so that a unit that has changed dependencies (but nothing else) will
be properly loaded.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java


Index: dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java
===
--- dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java	 
(revision 10447)
+++ dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java	(working  
copy)

@@ -500,12 +500,20 @@
 }
   }
   UnitCacheEntry entry = new UnitCacheEntry(unit,  
UnitOrigin.PERSISTENT);
-  UnitCacheEntry oldEntry =  
unitMap.get(unit.getResourcePath());
-  if (oldEntry != null  unit.getLastModified()   
oldEntry.getUnit().getLastModified()) {

-super.remove(oldEntry.getUnit());
+  UnitCacheEntry existingEntry =  
unitMap.get(unit.getResourcePath());

+  /*
+   * Don't assume that an existing entry is stale - an entry  
might

+   * have been loaded already from another source like a
+   * CompilationUnitArchive that is more up to date. If the
+   * timestamps are the same, accept the latest version. If it  
turns
+   * out to be stale, it will be recompiled and the updated  
unit

+   * will win this test the next time the session starts.
+   */
+  if (existingEntry != null  unit.getLastModified() =  
existingEntry.getUnit().getLastModified()) {

+super.remove(existingEntry.getUnit());
 unitMap.put(unit.getResourcePath(), entry);
 unitMapByContentId.put(unit.getContentId(), entry);
-  } else if (oldEntry == null) {
+  } else if (existingEntry == null) {
 unitMap.put(unit.getResourcePath(), entry);
 unitMapByContentId.put(unit.getContentId(), entry);
   }


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


[gwt-contrib] Re: Update to the staleness check when loading the PersistentUnitCache (issue1483803)

2011-07-14 Thread tobyr

LGTM

http://gwt-code-reviews.appspot.com/1483803/

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


[gwt-contrib] Re: Update to the staleness check when loading the PersistentUnitCache (issue1483803)

2011-07-14 Thread zundel


http://gwt-code-reviews.appspot.com/1483803/diff/1/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java
File dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java
(right):

http://gwt-code-reviews.appspot.com/1483803/diff/1/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java#newcode512
dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java:512: if
(existingEntry != null  unit.getLastModified() =
existingEntry.getUnit().getLastModified()) {
Effectively, a one character change.   becomes =

http://gwt-code-reviews.appspot.com/1483803/

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


[gwt-contrib] Re: JsoNormalizer did not give unique names to devirtualized (issue1467812)

2011-07-14 Thread zundel

I found an ok place to do the dup method check.   Its good in the sense
that it should be relatively cheap and all the method signature is
available, but its going to be distant from the source of the offending
code that put the method there.

http://gwt-code-reviews.appspot.com/1467812/

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


Re: [gwt-contrib] persistent unit cache w/newer entries

2011-07-14 Thread Eric Ayers
I'm committing patch  now:
http://gwt-code-reviews.**appspot.com/1483803/http://gwt-code-reviews.appspot.com/1483803/

On Thu, Jul 14, 2011 at 2:28 PM, Stephen Haberman 
stephen.haber...@gmail.com wrote:


  For example, you might load in a .gwtar file compiled on July 13, but
  later you might read in a cached unit compiled on July 1.

 Ah, sure, that makes sense. I forgot that units could be coming from
 places other than just gwt-unitCache.

  But I see your point about the unit being the same other than a
  dependency update.  I'm wondering if it would be sufficient for the
  test should be changed to =?

 Yeah, that would handle what I was seeing, where the unit had two
 entries in the unit cache, and the 2nd one was correct.

 In your scenario, an archive could have a unit with the same timestamp
 but correct dependencies, and with = could loose out to a unit cache
 unit same timestamp but older dependencies that came in later. But that
 would just mean the unit getting recompiled once and then the new unit
 cache entry (with the same deps as the archive unit) would win the next
 time around.

 I was thinking about the case where the archive unit had invalid
 dependencies, and, if loaded later than any unit cache entries, could
 cause a continual recompile. However, I imagine archive units having
 invalid dependencies is unlikely to happen.

 - Stephen

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




-- 
Eric Ayers | Software Engineer | zun...@google.com | +1 404 487 9229

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

Re: [gwt-contrib] persistent unit cache w/newer entries

2011-07-14 Thread Stephen Haberman

 I'm committing patch  now:

Awesome, thanks.

- Stephen

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


[gwt-contrib] [google-web-toolkit] r10457 committed - Update to the staleness check when loading the PersistentUnitCache...

2011-07-14 Thread codesite-noreply

Revision: 10457
Author:   zun...@google.com
Date: Thu Jul 14 12:29:52 2011
Log:  Update to the staleness check when loading the PersistentUnitCache
so that a unit that has changed dependencies (but nothing else) will
be properly loaded.

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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java	 
Tue Jun 14 05:20:58 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/javac/PersistentUnitCache.java	 
Thu Jul 14 12:29:52 2011

@@ -500,12 +500,20 @@
 }
   }
   UnitCacheEntry entry = new UnitCacheEntry(unit,  
UnitOrigin.PERSISTENT);
-  UnitCacheEntry oldEntry =  
unitMap.get(unit.getResourcePath());
-  if (oldEntry != null  unit.getLastModified()   
oldEntry.getUnit().getLastModified()) {

-super.remove(oldEntry.getUnit());
+  UnitCacheEntry existingEntry =  
unitMap.get(unit.getResourcePath());

+  /*
+   * Don't assume that an existing entry is stale - an entry  
might

+   * have been loaded already from another source like a
+   * CompilationUnitArchive that is more up to date. If the
+   * timestamps are the same, accept the latest version. If it  
turns
+   * out to be stale, it will be recompiled and the updated  
unit

+   * will win this test the next time the session starts.
+   */
+  if (existingEntry != null  unit.getLastModified() =  
existingEntry.getUnit().getLastModified()) {

+super.remove(existingEntry.getUnit());
 unitMap.put(unit.getResourcePath(), entry);
 unitMapByContentId.put(unit.getContentId(), entry);
-  } else if (oldEntry == null) {
+  } else if (existingEntry == null) {
 unitMap.put(unit.getResourcePath(), entry);
 unitMapByContentId.put(unit.getContentId(), entry);
   }

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


[gwt-contrib] Re: JsoNormalizer did not give unique names to devirtualized (issue1467812)

2011-07-14 Thread zundel


http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(right):

http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java#newcode1413
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:1413:
checkForDupMethods(x);
On 2011/07/14 21:58:22, scottb wrote:

In this case the normal thing to do is change line 1425 to return
super.visit(x);.  The default implementation will call the

JDeclaredType

overload.


Done.

http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java#newcode1628
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:1628:
throw new InternalCompilerException(Name collision in Type  +
x.getName()
On 2011/07/14 21:58:22, scottb wrote:

Signature collision


Done.

http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java#newcode1632
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:1632:
}
On 2011/07/14 21:58:22, scottb wrote:

While you're in here, you could also check that each unique method has

a unique

name / poly name.


Wimped out and added a TODO()

http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java
File dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java
(right):

http://gwt-code-reviews.appspot.com/1467812/diff/15001/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java#newcode155
dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java:155:
private MapString, Integer jsoMethodInstances = new HashMapString,
Integer();
On 2011/07/14 21:58:22, scottb wrote:

Javadoc instead of one-line.


Done.

http://gwt-code-reviews.appspot.com/1467812/

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


[gwt-contrib] sanitize the bad codeserver name before outputting the error message for security (issue1483804)

2011-07-14 Thread unnurg

Reviewers: cromwellian,

Description:
sanitize the bad codeserver name before outputting the error message for
security


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

Affected files:
  M dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
  M dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html


Index: dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
===
--- dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js	(revision  
10456)
+++ dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js	(working  
copy)

@@ -314,10 +314,18 @@
   if ($errFn) {
 $errFn($moduleName);
   } else {
-__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  + codeServer,
+__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  +

+simpleEscape(codeServer),
 Follow the underlying troubleshooting instructions);
  
loadIframe(http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM;);

   }
+}
+
+function simpleEscape(originalString) {
+  return originalString.replace(,amp;)
+.replace(,lt;)
+.replace(,gt;)
+.replace(\,quot;);
 }

 function tryConnectingToPlugin(sessionId, url) {
Index: dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
===
--- dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	(revision  
10456)
+++ dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	(working  
copy)

@@ -295,12 +295,20 @@
   if (errFn) {
 errFn(modName);
   } else {
-__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  + $hosted,
+__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  +

+simpleEscape($hosted),
 Follow the underlying troubleshooting instructions);
  
loadIframe(http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM;);

   }
 }
   }
+}
+
+function simpleEscape(originalString) {
+  return originalString.replace(,amp;)
+.replace(,lt;)
+.replace(,gt;)
+.replace(\,quot;);
 }

 window.onunload = function() {


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


[gwt-contrib] [google-web-toolkit] r10458 committed - sanitize the bad codeserver name before outputting the error message f...

2011-07-14 Thread codesite-noreply

Revision: 10458
Author:   unn...@google.com
Date: Thu Jul 14 13:38:35 2011
Log:  sanitize the bad codeserver name before outputting the error  
message for security


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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
 /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

===
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js	Wed  
May 18 13:47:13 2011
+++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js	Thu  
Jul 14 13:38:35 2011

@@ -314,11 +314,19 @@
   if ($errFn) {
 $errFn($moduleName);
   } else {
-__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  + codeServer,
+__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  +

+simpleEscape(codeServer),
 Follow the underlying troubleshooting instructions);
  
loadIframe(http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM;);

   }
 }
+
+function simpleEscape(originalString) {
+  return originalString.replace(,amp;)
+.replace(,lt;)
+.replace(,gt;)
+.replace(\,quot;);
+}

 function tryConnectingToPlugin(sessionId, url) {
   // Note that the order is important
===
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	Wed  
May 18 13:47:13 2011
+++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	Thu  
Jul 14 13:38:35 2011

@@ -295,13 +295,21 @@
   if (errFn) {
 errFn(modName);
   } else {
-__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  + $hosted,
+__gwt_displayGlassMessage(Plugin failed to connect to Development  
Mode server at  +

+simpleEscape($hosted),
 Follow the underlying troubleshooting instructions);
  
loadIframe(http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM;);

   }
 }
   }
 }
+
+function simpleEscape(originalString) {
+  return originalString.replace(,amp;)
+.replace(,lt;)
+.replace(,gt;)
+.replace(\,quot;);
+}

 window.onunload = function() {
 };

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


[gwt-contrib] [google-web-toolkit] r10459 committed - JsoNormalizer did not give unique names to devirtualized...

2011-07-14 Thread codesite-noreply

Revision: 10459
Author:   zun...@google.com
Date: Thu Jul 14 13:39:15 2011
Log:  JsoNormalizer did not give unique names to devirtualized
methods from Object overrides or DualJsoImpl types.  The
obfuscated namer papered over this, but if you turn on
pretty mode, you can run into problems if two interfaces
have DualJsoImpl types with the same method names.

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

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

Added:
 /trunk/dev/core/test/com/google/gwt/dev/jjs/impl/JsoDevirtualizerTest.java
Modified:
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
 /trunk/dev/core/src/com/google/gwt/dev/jjs/impl/JsoDevirtualizer.java

===
--- /dev/null
+++  
/trunk/dev/core/test/com/google/gwt/dev/jjs/impl/JsoDevirtualizerTest.java	 
Thu Jul 14 13:39:15 2011

@@ -0,0 +1,95 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+
+package com.google.gwt.dev.jjs.impl;
+
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.dev.javac.testing.impl.MockJavaResource;
+import com.google.gwt.dev.jjs.ast.JMethod;
+import com.google.gwt.dev.jjs.ast.JProgram;
+
+/**
+ * Tests for the {@link JsoDevirtualizer} visitor.
+ */
+public class JsoDevirtualizerTest extends OptimizerTestBase {
+
+  /**
+   * JsoDevirtualizer should allow dual Java/JSO implementations of the  
same

+   * interface, so long as there is only one of each. If there are multiple
+   * methods with the same method name, it should distinguish between them.
+   */
+  public void testDualJsoImpl() throws UnableToCompleteException {
+
+sourceOracle.addOrReplace(new  
MockJavaResource(com.google.gwt.lang.Cast) {

+  @Override
+  public CharSequence getContent() {
+StringBuffer code = new StringBuffer();
+code.append(package com.google.gwt.lang;);
+code.append(public class Cast {);
+code.append(  public static boolean isJavaObject(Object o) {  
return true; };);
+code.append(  public static boolean isJavaScriptObject(Object o)  
{ return true; };);

+code.append(});
+return code;
+  }
+});
+
+addSnippetImport(com.google.gwt.lang.Cast);
+addSnippetImport(com.google.gwt.core.client.JavaScriptObject);
+
+addSnippetClassDecl(
+interface Iface1 { int a(); },
+static class J1 implements Iface1 {,
+  public int a() { return 1; },
+},
+static class Jso1 extends JavaScriptObject implements Iface1 {,
+  protected Jso1() { },
+  public final int a() { return 2; },
+  public static native Jso1 create() /*-{ return {} }-*/;,
+},
+static interface Iface2 { int a(); },
+static class J2 implements Iface2 {,
+  public int a() { return 3; },
+},
+static class Jso2 extends JavaScriptObject implements Iface2 {,
+  protected Jso2() { },   public final int a() { return 4; },
+  public static native Jso2 create() /*-{ return {} }-*/;,
+},
+static Iface1 val1 = new J1();,
+static Iface1 val2 = Jso1.create();,
+static Iface2 val3 = new J2();,
+static Iface2 val4 = Jso2.create(););
+
+StringBuilder code = new StringBuilder();
+code.append(int result = val1.a() + val2.a() + val3.a() + val4.a(););
+
+// The salient point in the results below is that the JSO method used  
for
+// val1 and val1 has a different name the method used for val2 and  
val3.

+StringBuffer expected = new StringBuffer();
+expected.append(int result = );
+expected.append(JavaScriptObject.a__devirtual$(EntryPoint.val1) + );
+expected.append(JavaScriptObject.a__devirtual$(EntryPoint.val2) + );
+expected.append(JavaScriptObject.a0__devirtual$(EntryPoint.val3) + );
+expected.append(JavaScriptObject.a0__devirtual$(EntryPoint.val4););
+
+optimize(void, code.toString()).intoString(expected.toString());
+  }
+
+  @Override
+  protected boolean optimizeMethod(JProgram program, JMethod method) {
+JsoDevirtualizer.exec(program);
+return true;
+  }
+}
===
---  
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java	 
Tue Jul 12 06:13:56 2011
+++  
/trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java	 
Thu Jul 14 13:39:15 2011

@@ -153,6 +153,7 

[gwt-contrib] Re: Add Provided Field Null Validation (issue1486801)

2011-07-14 Thread rchandia


http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
(right):

http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1645
user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1645:
private void writeFieldNullCheck(IndentedWriter niceWriter, OwnerField
ownerField) {
Would it be OK to perform this test only if not running in prod mode?

if (!GWT.isProdMode()  owner ...

http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1651
user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1651:
niceWriter.write(});
This change in behavior needs a test. Unfortunately we do not have a
tests for UiBinderWriter when generating code for UiBinder interfaces.

UiRendererValidationTest is very similar to what you want, though. It
tests the generation of UiRenderer interfaces. Relies on
AbstractUiBinderWriterTest to set up a mock TypeOracle, fill it with
classes and set up all classes needed by UiBinderWriter.

You will want to add the ability to AbstractUiBinderWriterTest to define
useSafeHtmlTemplates and useLazyWidgetBuilders instead of setting them
to true.  See AbstractUiBinderWriterTest#init() second to last line.
Also add mock classes that use UiBinder (instead of UiRenderer) and the
@UiField annotations you need.

http://gwt-code-reviews.appspot.com/1486801/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1683
user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1683:
writeFieldNullCheck(niceWriter, ownerField);
I think this code is not reached when using lazy widget binding, which
will be the default in a not so long future. The same issue would be
present in that case. It would be nice to fix it there too.

See #writeBinderForRenderableStrategy()

http://gwt-code-reviews.appspot.com/1486801/

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


[gwt-contrib] Re: sanitize the bad codeserver name before outputting the error message for security (issue1483804)

2011-07-14 Thread skybrian

LGTM

http://gwt-code-reviews.appspot.com/1483804/

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