Re: Is they a way to create minimise buttons?

2008-11-24 Thread jamesluo...@gmail.com

Hi, Ananda

  May you asked at wrong place? If you don't mind import thirdparty
project, you can have a look gwt-ext or mywidget project, it's very
easy to implement your require.

James

On 11月24日, 下午6时42分, Ananda [EMAIL PROTECTED] wrote:
 Hi Every one

 Greeting to everyone..

 I want to create a popup like a screens in windows.

 More precisely I am require to create a popup having close , minimize,
 maximize buttons.

 Is there any way to create these? Can any give me a hint so that I can work
 on that?

 Regards
 Ananda
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Generators - create multiple classes?

2008-11-24 Thread Riyaz Mansoor


For a widget I'm creating I've got a generator which creates the
required class. Now I have a requirement to create another class (and
possibly more) for the same generator marker interface. Can this be
done? ie - can a single generator return more than 1 created class?

I really won't to avoid creating multiple marker interfaces that the
user (using this widget) would have to use (in a repetitive -
boilerplate code kinda way) - especially if a single generator (for a
single marker interface) can create multiple classes.

I have thought of the following solution, but would like to get
thought of experts on following it - as it seems quite a ways out :)

MarkerI1 extends RemoteService
MarkerI2 extends MarkerI1

write 2 generators - each for MarkerI1 and MarkerI2

user only needs to extend markerI2

extending for MarkerI3 seems a really ODD way of doing this (if it can
be done this way)

Just had this idea as I was writing: can I run the same marker
interface through multiple generators like the following?

  generate-with
class=rm.gwt.activetable.rebind.ActiveTableGenerator1 
  when-type-assignable
class=rm.gwt.activetable.client.model.ActiveTableEntity/
  /generate-with
  generate-with
class=rm.gwt.activetable.rebind.ActiveTableGenerator2 
  when-type-assignable
class=rm.gwt.activetable.client.model.ActiveTableEntity/
  /generate-with
  generate-with
class=rm.gwt.activetable.rebind.ActiveTableGenerator3 
  when-type-assignable
class=rm.gwt.activetable.client.model.ActiveTableEntity/
  /generate-with






--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RE: Is they a way to create minimise buttons?

2008-11-24 Thread Ananda

Thanks James,

Is there a way to implement without using third party jar files?

I am using GWT 1.5.3 version..is it possible to implement the same in GWT
alone?

Ananda

-Original Message-
From: Google-Web-Toolkit@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
com
Sent: Monday, November 24, 2008 1:38 PM
To: Google Web Toolkit
Subject: Re: Is they a way to create minimise buttons?


Hi, Ananda

  May you asked at wrong place? If you don't mind import thirdparty
project, you can have a look gwt-ext or mywidget project, it's very
easy to implement your require.

James

On 11月24日, 下午6时42分, Ananda [EMAIL PROTECTED] wrote:
 Hi Every one

 Greeting to everyone..

 I want to create a popup like a screens in windows.

 More precisely I am require to create a popup having close , minimize,
 maximize buttons.

 Is there any way to create these? Can any give me a hint so that I can
work
 on that?

 Regards
 Ananda


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SmartGWT 1.0 Released

2008-11-24 Thread Riyaz Mansoor


Hey Sanjiv

Great work as always. Good to see you back - involved in GWT
development work.

Riyaz

On Nov 24, 12:34 am, Sanjiv Jivan [EMAIL PROTECTED] wrote:
 Hi Fransceso,
 If you found a library that meets your needs, then good for you.
 Compile output size and runtime performance are two separate issues. A third
 party widget written in GWT Java, regardless of how small it compiles down
 to, doesn't magically make it run fast. Nor does it make it magically render
 perfectly on all browsers. As an example a TableGrid written in GWT Java
 could still perform really poorly, and not display consistently on all
 browsers.  There are obviously several aspects to GWT that helps avoid leaks
 and such but this does not mean that any third party code written in GWT is
 100% leak free. The GWT 1.6 event API is really neat and SmartGWT users
 it. Well written code is what will perform well and display consistently
 across various browser.

 On the issue of performance, there are numerous posts made by paying GXT
 users that the performance of GWT-Ext is still better than GXT. You can
 search their forums. This is not to suggest that performance improvements
 cannot be made in SmartGWT. If you can give specifics, it would certainly
 help in resolving them. But without specifics like whether it was the
 initial load time, performance of specific widgets etc it will be difficult
 to act on. Feel free to post on the SmartGWT forums or create an issue on
 the smartgwt google code project.

 On the issue of compile output size :  The SmartClient library is extremely
 stable and developed over the past 8 years.  If you peruse their forums, you
 will find that pretty much all questions are met with an answer explaining
 how the user can accomplish what they're trying to do. Their library is
 virtually bug free. I realize this is a strong statement, but its true. Only
 some 4-5 issues were patched post-release. Compare this to the bugs forum of
 any of your favorite libraries. SmartGWT will inherit these attributes once
 its past the few initial minor releases and issues are flushed out during
 this period.  Due to the high level of stability of SmartClient, it can be
 viewed as the kernel of your web app which should be configured to be
 gzipped with an Expires Never header for a given version. This means that
 the browser will cache the kernel (SmartClient JS files) and the only code
 that gets downloaded is your application code, and not any code related to
 the widget / framework. Future releases of SmartGWT will provide a GWT
 linker that only pulls in the required files so this should cut down the
 total size of the application.

 The SmartGWT showcase has some 250 samples which is 6 times more than the
 GXT showcase so its not quite apples to apples when it comes to initial load
 time.

 Finally please read my blog 
 entryhttp://www.jroller.com/sjivan/entry/smartgwt_1_0_releasedif you haven't
 already done so. I go over the SmartGWT fundamentals, the concept of a
 DataSource and how it will lead to a cleaner architecture and can cut
 application code significantly. I mention how a master detail page can be
 written in as little as 10 lines using a reusable DataSource definition that
 describes an entity / model class. Plus the reduced number of lines of code
 on the server as well.

 This is the first release of SmartGWT and while it is quite stable and has
 been tested and used by early adopters for the past four weeks, users can
 expect any rough edges / bugs / performance issues / better skins etc to be
 ironed out over the course of the next few minor releases.

 As mentioned earlier, if users have found a library that meets their needs,
 thats great and there's no need to look further. And for the others, feel
 free to evaluate SmartGWT to see if it helps meet your requirements. If you
 feel that there are things that can be improved please post on the SmartGWT
 forum or create an issue on the google code project page.

 Thanks,
 Sanjiv

 On Sun, Nov 23, 2008 at 5:49 AM, francescoNemesi [EMAIL PROTECTED] wrote:

  Hello,

  smartGwt looks very appealing and very rich in features, but it is
  very slow. This is due to the fact that it is a JSNI wrapper around
  the Smart Client framework. This means loosing all the benefits of
  having a pure GWT implementation (I will not go into details on this).

  I think a comparison with GXT (also known as GWT Ext, at this address
 http://extjs.com/products/gxt/) does not make any sense as GXT is a
  pure GWT feature implementation and it is lightining fast once
  compiled.

  The only appropriate comparison would be with gwt-ext (http://
  code.google.com/p/gwt-ext/) which is JSNI wrapper around the ExtJS
  javascript framework (developed by the same company that developed
  GXT), much like smartGwt is a JSNI wrapper around the Smart Client
  framework.

  This forum is full of people complaining about how slow and cumbersome
  gwt-ext is, and I think exactly the same 

gwt-user.jar without javax.servlet package?

2008-11-24 Thread Veljko

Hi,

is it possible to have gwt-user.jar without javax.servlet package?
Problem is in case when you have Websphere Application Server and
classloading policy PARENT_LAST. Then you got error for RPC servlet:

Servlet [...]: not a servlet class

Solution is:

- change classloader mode to PARENT_FIRST (which I don't like, other
issues)
- delete package from JAR (which I did it)

Could be javax.servlet package move in stand alone JAR or some other
solution?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to redirect to another EntryPoint class

2008-11-24 Thread rajasekhar

I need to redirect to home page.because the problem without
redirecting is when I refresh the home page it is going to login page
again .Please let me know how to handle this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Dockpanel question

2008-11-24 Thread jake H

 Hello i m trying to make a page like the mail application.
What i want look like this one

---
|1   |
|-|
|   ||
|   ||
|   2  |3   |
|   ||
|   ||
||___|

1 and 2 are static but in 3 frame i want to be refreshed any time i m
pressing a treeItem from 2 menu.
This is how i m trying to make this happen.

First.java


 private TopPanel topPanel = new TopPanel();
  private SecondMenu new2 = new SecondMenu();
  private ThirdMenu new1 = new ThirdMenu(example);
  public void onModuleLoad() {

topPanel.setWidth(100%);
new2.setWidth(100%);
new1.setWidth(100%);

DockPanel outer = new DockPanel();
outer.add(topPanel, DockPanel.NORTH);
outer.add(new2, DockPanel.WEST);
outer.add(new1, DockPanel.CENTER);
outer.setWidth(100%);

outer.setSpacing(4);
 RootPanel.get().add(outer);


By using this, it is created a page like the one i want

Inside the SecondMenu i have made a TreeListener which force the
ThirdMenu to be redisned again after a TreeItem is pressed. This the
code


SecondMenu.java


tree.addTreeListener(new TreeListener(){
 public void onTreeItemSelected(TreeItem item) {
  ThirdMenu neo = new ThirdMenu(item.getText());
 }
  public void onTreeItemStateChanged(TreeItem item) {
if (item.getState()){
//  currChapter.setText(item.getText());
}
 }


In the thirdmenu so far , i just print in the its region what user
parses.

However when i try to do that nothing happened. It seems that the menu
i created is a static one and nothing changes.
So indide the ThirdMenu i put this:   RootPanel.get().clear();  and
then printing the argument

But the result is a blank page with no menus at all , neither Toppanel
nor secondmenu.

Any 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to implement signed applet upload images to server side

2008-11-24 Thread kilkenny

Hi Avd

Just use Ant (or your favorite build tool) to sign the jars, that is
probably the easiest way = http://ant.apache.org/manual/CoreTasks/signjar.html

To easy integration of your applet you could have a look at the GwtAI
project = http://code.google.com/p/gwtai/

From where do you want to upload the image, from the applet of from
the web-application? From the applet just transfer the file like you
would in a standalone application. From the web-application you can
use GWT's FileUpload widget, see =
http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FileUpload.html

Hope that helps.
Adrian

On 22 Nov., 09:02, avd [EMAIL PROTECTED] wrote:
 hello sir,
 i made a signed applet for access the client side directories.but my
 problem is that how can i implement signed applet in gwt and another
 problem is how can i upload images from client side to server.

 please help me.

 with regards
 avd
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Aspect-Oriented Programming for GWT, GWTENT-0.5 now available for downloa

2008-11-24 Thread Ping

Hi James,

Great Work!

I'll try it as soon as I can.

Some questions: you implemented it using plain java and generators, or
are you using some javascript to the mix?

On Nov 24, 8:26 am, Ananda [EMAIL PROTECTED] wrote:
 Thanks James,

 Is there a way to implement without using third party jar files?

 I am using GWT 1.5.3 version..is it possible to implement the same in GWT
 alone?

 Ananda

 -Original Message-
 From: Google-Web-Toolkit@googlegroups.com

 [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
 com
 Sent: Monday, November 24, 2008 1:38 PM
 To: Google Web Toolkit
 Subject: Re: Is they a way to create minimise buttons?

 Hi, Ananda

   May you asked at wrong place? If you don't mind import thirdparty
 project, you can have a look gwt-ext or mywidget project, it's very
 easy to implement your require.

 James

 On 11月24日, 下午6时42分, Ananda [EMAIL PROTECTED] wrote:
  Hi Every one

  Greeting to everyone..

  I want to create a popup like a screens in windows.

  More precisely I am require to create a popup having close , minimize,
  maximize buttons.

  Is there any way to create these? Can any give me a hint so that I can
 work
  on that?

  Regards
  Ananda
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



on clicking MenuBar items differnet components to be added

2008-11-24 Thread zubair

Hi All,


I have created  different menuItems in the menuBar,

MenuItem dashBoardItem = new MenuItem(DashBoard Summary, command);
MenuBar menuHome = new MenuBar();
MenuItem home = new MenuItem(Home, command);
MenuBar eventSource = new MenuBar(true);
MenuItem eventSummary = new MenuItem(Summary, command);
MenuItem eventmessage = new MenuItem(Message Format, command);
MenuItem ecentCommands = new MenuItem(Execution Commands, command);
MenuItem rules = new MenuItem(Rules, command);
MenuItem notification = new MenuItem(Notifications, command);
MenuItem users = new MenuItem(users, command);
MenuItem group = new MenuItem(Groups, command);
MenuItem reports = new MenuItem(Reports, command);
MenuItem systemSettings = new MenuItem(System Settings, command);


 As my understandign goes. if the user clicks  menu bar items a
command.execute is being called.


Command command = new Command() {
public void execute(){

Window.alert(Command Fired);

}
};

My requirement is, I need to add different  Components   based on the
menuItems clicked.

it is highly appreciated if any one can help me in resolving the same.


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Is they a way to create minimise buttons?

2008-11-24 Thread jamesluo...@gmail.com

Hi, Ananda,

  You can have a look the showcase project of GWT, especially this
class: gwt-windows-1.5.2\samples\Showcase\src\com\google\gwt\sample
\showcase\client\content\popups\CwDialogBox.java

Hope that helps
James

On 11月24日, 下午7时26分, Ananda [EMAIL PROTECTED] wrote:
 Thanks James,

 Is there a way to implement without using third party jar files?

 I am using GWT 1.5.3 version..is it possible to implement the same in GWT
 alone?

 Ananda

 -Original Message-
 From: Google-Web-Toolkit@googlegroups.com

 [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
 com
 Sent: Monday, November 24, 2008 1:38 PM
 To: Google Web Toolkit
 Subject: Re: Is they a way to create minimise buttons?

 Hi, Ananda

   May you asked at wrong place? If you don't mind import thirdparty
 project, you can have a look gwt-ext or mywidget project, it's very
 easy to implement your require.

 James

 On 11月24日, 下午6时42分, Ananda [EMAIL PROTECTED] wrote:
  Hi Every one

  Greeting to everyone..

  I want to create a popup like a screens in windows.

  More precisely I am require to create a popup having close , minimize,
  maximize buttons.

  Is there any way to create these? Can any give me a hint so that I can
 work
  on that?

  Regards
  Ananda
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Aspect-Oriented Programming for GWT, GWTENT-0.5 now available for downloa

2008-11-24 Thread jamesluo...@gmail.com

Hi, Ping,
  Thank you. the implement is using plain java and generators. AspectJ
expression request AspectJ jars, but this just request in Compile
time.
James

On 11月24日, 下午9时51分, Ping [EMAIL PROTECTED] wrote:
 Hi James,

 Great Work!

 I'll try it as soon as I can.

 Some questions: you implemented it using plain java and generators, or
 are you using some javascript to the mix?

 On Nov 24, 8:26 am, Ananda [EMAIL PROTECTED] wrote:

  Thanks James,

  Is there a way to implement without using third party jar files?

  I am using GWT 1.5.3 version..is it possible to implement the same in GWT
  alone?

  Ananda

  -Original Message-
  From: Google-Web-Toolkit@googlegroups.com

  [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
  com
  Sent: Monday, November 24, 2008 1:38 PM
  To: Google Web Toolkit
  Subject: Re: Is they a way to create minimise buttons?

  Hi, Ananda

May you asked at wrong place? If you don't mind import thirdparty
  project, you can have a look gwt-ext or mywidget project, it's very
  easy to implement your require.

  James

  On 11月24日, 下午6时42分, Ananda [EMAIL PROTECTED] wrote:
   Hi Every one

   Greeting to everyone..

   I want to create a popup like a screens in windows.

   More precisely I am require to create a popup having close , minimize,
   maximize buttons.

   Is there any way to create these? Can any give me a hint so that I can
  work
   on that?

   Regards
   Ananda
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Can Google Adsense be used with GWT

2008-11-24 Thread Rick

Hi Arthur

Thanks for feedback.
I placed the script provided by Google into HTML file and it was
working nice. But I want little more. I want to use it as widgets and
then add these widgets to RootPanel whenever required. and can control
the position where it shows. For this I put the script into a native
method and called this method on Click of a button. But I did not get
success. Using it in html will be something like hard code and does
not give user much flexibility.

On Nov 24, 8:06 am, Arthur Kalmenson [EMAIL PROTECTED] wrote:
 HiRick,

 AFAIK, GoogleAdSensewon't work very well unless your site is Search
 Engine Optimized. If it is, you should be able to add GoogleAdSense
 to your site like you would with any other site built with Javascript
 and HTML. You can integrate it either with JSNI or put it into the
 HTML file that starts your GWT app.

 --
 Arthur Kalmenson

 On Sun, Nov 23, 2008 at 12:00 AM,Rick[EMAIL PROTECTED] wrote:

  I have developed a web site using GWT1.5. I want to show Google
 Adsenseon it. DO GWT have support for GoogleAdsense. Any comments/
  updates in this regard will be highly appreciated.

  Regards

 RickSmith
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Mixing up XMLParser with DOM...

2008-11-24 Thread Cristiano

Hello Everyone,

How to 'cast' or 'transform' a com.google.gwt.xml.client.Document to
a com.google.gwt.dom.client.Document ???

I'm dealing with the requirement of handling DOM elements retrieved by
a server (as an HTTP xml/text response), parse them with XMLParser
and them into an existing document:

I handle the DOM of the current page with
com.google.gwt.dom.client.Document and com.google.gwt.user.client.DOM.

I handle the HTTP request with the RequestBuilder.

I parse them with com.google.gwt.xml.client.XMLParser.

However the com.google.gwt.xml.client.XMLParser do return a
com.google.gwt.dom.client.Document, and I cannot add it to a
com.google.gwt.dom.client.Document because appendChild does not
accept as input a com.google.gwt.xml.client.Element: it wants a
com.google.gwt.doc.client.Element.

Can you help me in find the right direction resolve this (I'm using
eclipse)?

Thanks,
Cristiano

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Mixing up XMLParser with DOM...

2008-11-24 Thread Jason Morris

This is something you simply can't do cleanly across all the browsers. The 
elements returned by the 
XMLParser are totally different classes to the HTMLParser. The way to do this 
is to set the 
innerHTML on an HTML Element object to the value returned from the 
RequestBuilder. Then you can use 
the normal Element.getChildNodes() to fetch the DOM objects that were returned 
from the service.

Cristiano wrote:
 Hello Everyone,
 
 How to 'cast' or 'transform' a com.google.gwt.xml.client.Document to
 a com.google.gwt.dom.client.Document ???
 
 I'm dealing with the requirement of handling DOM elements retrieved by
 a server (as an HTTP xml/text response), parse them with XMLParser
 and them into an existing document:
 
 I handle the DOM of the current page with
 com.google.gwt.dom.client.Document and com.google.gwt.user.client.DOM.
 
 I handle the HTTP request with the RequestBuilder.
 
 I parse them with com.google.gwt.xml.client.XMLParser.
 
 However the com.google.gwt.xml.client.XMLParser do return a
 com.google.gwt.dom.client.Document, and I cannot add it to a
 com.google.gwt.dom.client.Document because appendChild does not
 accept as input a com.google.gwt.xml.client.Element: it wants a
 com.google.gwt.doc.client.Element.
 
 Can you help me in find the right direction resolve this (I'm using
 eclipse)?
 
 Thanks,
 Cristiano
 
  
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



javascript error getBoxObjectFor ?

2008-11-24 Thread Ed

Hellu,

Sometimes I get in web mode the following javascript exception (in
1.5.2):

ExceptionString=[com.google.gwt.core.client.JavaScriptException:
[MESSAGE: (TypeError): Value undefined (result of expression
$doc.getBoxObjectFor) is not object.
 line: 2049
 sourceId: 558
 sourceURL: 
http://test1.hobby-site.com/bv-web/test1/declare/021AE21A6901E0D955FA9F1F3C1D8C6D.cache.html]]


No idea what to do with this. Any idea?

BTW: at this moment I don't know exactly when they occur as it occurs
during a Selenium test and the error is received in the backend
through the ExceptionHandler.

-- Ed
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: javascript error getBoxObjectFor ?

2008-11-24 Thread Ed

Extra note:
The line the error refer to:
function BBc(a){if(Element.prototype.getBoundingClientRect){return
a.getBoundingClientRect().left+(Bed(),Ded).scrollLeft}else{return
$doc.getBoxObjectFor(a).screenX-$doc.getBoxObjectFor
($doc.documentElement).screenX}}

Btw: Sometimes it happens quite a lot this error..
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



SWFUpload library for GWT

2008-11-24 Thread Mark Renouf

Hello,

I wanted to gauge interest in a GWT interface to using SWFUpload
(http://www.swfupload.org/).

While work continues on GWT support for file uploads using Gears, I
need a more compatible and short term solution to a problem that's
come up. I also feel that having more than one option is good practice
to ensure compatibility with the most number of users. I'm currently
putting this together for my own needs but I wanted to see if anyone
else in the community would be interested in helping to complete
this.

The SWFUpload javascript library is around 30KB and and the associated
flash control is 11KB. It's also recently had support added to work
around the new security restrictions in flash player 10 (which is what
has forced me to scrap my own implementation and move to this one).

My goal is a nice GWT wrapper to make it very simple to drop into any
existing GWT app. To my knowledge no such thing exists yet (please
speak up if you know of one).

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Google chrome issue with GWT in History Management

2008-11-24 Thread Rick

Hello All

I am a facing a issue regarding History Management. I am performing
two actions on two button click. One button adds node in history using
History.newItem. and Second button redirects it to the same HTML page
again. Following code is used to redirect it:

public static native void reDirectPage(String html)/*-{
 var text = $wnd.location.href;
 var index = text.lastIndexOf(/);
 var subString = text.substring(0,index+1);
 var targetString = subString+html;
 $wnd.location.href = targetString;

 }-*/;

But after adding nodes in history , redirection is not happening in
Chrome whereas it is working fine in Mozilla and IE. In chrome it just
replace the URL and does not load entrypoint again.

Is it a bug of Google Chrome or I am using wrong way of redirecting.

Any comments in this regard will be highly appreciated.

Thanks and regards

Rick Smith


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



best way to test an image file exists?

2008-11-24 Thread darkflame

I'm curious what people think would be the best way to test if an
image file exists on a sever.
Seeing as Picture.setUrl' doesn't cause any error/exception if the
image doesn't exist, the only way I can think of doing it using using
a timer and checking if the size is bigger then the little red-x
things :-/

Is there a better method?
If I used RequestBuilder I could treat it like any other file, but if
the image is big (1MB), that will waste a hell of a lot of loading
time. (and presumably wont be cached if loaded that way).

Idly I want a method that would load or prefetch the image if it
exists, and trigger a different block of code if it doesn't.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



javascript window.opener not working

2008-11-24 Thread gabidp

Hi!

I have a window which opens a popup with a native javascript method:
public static native void open_new_window(String url, String name,
String options) /*-{
 open(url, name, options);
}-*/;

This new window has a button, and when someone clicks it, I want to do
something on the original window with this function:
  public native void test()
/*-{
$wnd.opener.document.forms[0].testForm.value = AA
}-*/;

The problem seems to be that $wnd.opener does not reference my
original window. How can I do that?

Thank you!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread Lothar Kimmeringer

darkflame schrieb:

 Is there a better method?
 If I used RequestBuilder I could treat it like any other file, but if
 the image is big (1MB), that will waste a hell of a lot of loading
 time. (and presumably wont be cached if loaded that way).

You can use RequestBuilder and use the HEAD-Method. This returns
just the HTTP-Response-header and no content. It is commonly used
for - you might guess it ;-) - checking the existance or change
of a resource before loading it.


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Google chrome issue with GWT in History Management

2008-11-24 Thread Au Lai Seong

Ya. event the history management also not work in gmail. i think they
are using the same concept.

On Mon, Nov 24, 2008 at 9:13 PM, Rick [EMAIL PROTECTED] wrote:

 Hello All

 I am a facing a issue regarding History Management. I am performing
 two actions on two button click. One button adds node in history using
 History.newItem. and Second button redirects it to the same HTML page
 again. Following code is used to redirect it:

 public static native void reDirectPage(String html)/*-{
 var text = $wnd.location.href;
 var index = text.lastIndexOf(/);
 var subString = text.substring(0,index+1);
 var targetString = subString+html;
 $wnd.location.href = targetString;

  }-*/;

 But after adding nodes in history , redirection is not happening in
 Chrome whereas it is working fine in Mozilla and IE. In chrome it just
 replace the URL and does not load entrypoint again.

 Is it a bug of Google Chrome or I am using wrong way of redirecting.

 Any comments in this regard will be highly appreciated.

 Thanks and regards

 Rick Smith


 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: making a programmatic browser

2008-11-24 Thread Isaac Truett

I think you're on the wrong forum. This one is dedicated to the Google
Web Toolkit, which is a platform for building AJAX web applications.
You might want to try one for general programming, or perhaps specific
to your language of choice.


On Sun, Nov 23, 2008 at 9:34 AM, bmihura [EMAIL PROTECTED] wrote:

 How do I make a programmatic browser that can interact with an
 arbitrary website? I want it to act like a person would; it should
 enter text, select menu items, click checkboxes, then push buttons
 that post that information.

 For example, I'd like to programmatically check a few shopping
 websites like Ebay and CraigsList every day for rare items, and
 automatically get an email whenever one of these items shows up.

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread darkflame

fantastic :D Cheers :)

On Nov 24, 2:32 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 darkflame schrieb:

  Is there a better method?
  If I used RequestBuilder I could treat it like any other file, but if
  the image is big (1MB), that will waste a hell of a lot of loading
  time. (and presumably wont be cached if loaded that way).

 You can use RequestBuilder and use the HEAD-Method. This returns
 just the HTTP-Response-header and no content. It is commonly used
 for - you might guess it ;-) - checking the existance or change
 of a resource before loading it.

 Regards, Lothar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread alex.d

You can send a RPC-Request to your server/backend, check the existens
of the file, and send true/false back.

On 24 Nov., 14:59, darkflame [EMAIL PROTECTED] wrote:
 oh...it seems GWT dosnt support the Head method only Post / Get :-/
 (apperently Saffire dosnt support it)

 On Nov 24, 2:40 pm, darkflame [EMAIL PROTECTED] wrote:

  fantastic :D Cheers :)

  On Nov 24, 2:32 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:

   darkflame schrieb:

Is there a better method?
If I used RequestBuilder I could treat it like any other file, but if
the image is big (1MB), that will waste a hell of a lot of loading
time. (and presumably wont be cached if loaded that way).

   You can use RequestBuilder and use the HEAD-Method. This returns
   just the HTTP-Response-header and no content. It is commonly used
   for - you might guess it ;-) - checking the existance or change
   of a resource before loading it.

   Regards, Lothar


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread darkflame

oh...it seems GWT dosnt support the Head method only Post / Get :-/
(apperently Saffire dosnt support it)

On Nov 24, 2:40 pm, darkflame [EMAIL PROTECTED] wrote:
 fantastic :D Cheers :)

 On Nov 24, 2:32 pm, Lothar Kimmeringer [EMAIL PROTECTED] wrote:



  darkflame schrieb:

   Is there a better method?
   If I used RequestBuilder I could treat it like any other file, but if
   the image is big (1MB), that will waste a hell of a lot of loading
   time. (and presumably wont be cached if loaded that way).

  You can use RequestBuilder and use the HEAD-Method. This returns
  just the HTTP-Response-header and no content. It is commonly used
  for - you might guess it ;-) - checking the existance or change
  of a resource before loading it.

  Regards, Lothar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SWFUpload library for GWT

2008-11-24 Thread Diyko

http://www.gwt-ext.com:8080/demo-ux/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread Lothar Kimmeringer

darkflame schrieb:
 oh...it seems GWT dosnt support the Head method only Post / Get :-/
 (apperently Saffire dosnt support it)

It's a FAQ here. You can use the protected contructor using an
anonymous inner class:

RequestBuilder builder = new RequestBuilder(HEAD, url) {
 /* nothing to override */
};

I'm wondering if HEAD is not supported by Safari, because this
method is implemented by HTTP-servers since the time where one
kilobyte weighted one kilogram.


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread Jason Morris

It's not really that Safari doesn't support it, it just doesn't allow for 
XmlHttpRequest objects to 
have a Method of anything other that GET / POST. The issue may have actually 
been resolved (I'm open 
to correction here), but some people are still using versions of Safari with 
this problem.

Lothar Kimmeringer wrote:
 darkflame schrieb:
 oh...it seems GWT dosnt support the Head method only Post / Get :-/
 (apperently Saffire dosnt support it)
 
 It's a FAQ here. You can use the protected contructor using an
 anonymous inner class:
 
 RequestBuilder builder = new RequestBuilder(HEAD, url) {
  /* nothing to override */
 };
 
 I'm wondering if HEAD is not supported by Safari, because this
 method is implemented by HTTP-servers since the time where one
 kilobyte weighted one kilogram.
 
 
 Regards, Lothar
 
  
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Serialization questions

2008-11-24 Thread jon918

I have a few serialization-related questions:

1) In 1.5 there is now support for managing the serialization using
the SerializationStreamFactory on the client. However on the server, I
don't see how I can retrieve the SerializationPolicy for my module
without using a GWT RPC call. Must I use the default serialization
policy to take advantage of this feature?

2) RpcServletUtils.writeResponse double-buffers the output when it
gzip's the response payload. Why is this done instead of writing
directly to the response output stream? Is sending the content length
critical for some reason?

3) Are there plans to open up the RPC APIs more than they are today in
general.

Thanks!

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



Re: Why use GWT?

2008-11-24 Thread rakesh wagh

Adam, did you even try GWT?
Because if you had developed a 3-4 screen application with server
connectivity you would have already answered your question. I will not
do gwt-jquery comparison here, but just few cents about gwt itself.

That who is using list is incomplete.
I can bet you that gwt's who is using list(if honestly made) will be
bigger than any other ajax tech adaption. Jquery's adaption list is
created by jquery itself. gwt's list you posted is not created by
google or the gwt team. FYI, we have done more than 3(big) projects
successfully overt the past 2 years and we do not care to be part of
any such lists.
GWT is more than a UI library, it is  a paradigm shift in developing
web applications. People who have spend there life in struts and other
similar web based framework will typically take a while to understand
this paradigm change. If you liked and respected swing and javascript
for what ever they are, you will probably like and understand gwt much
faster than some one who doesn't. Very fast, here are some basic
advantages that make gwt a toolkit of choice:
- Google's beta releases are production quality!
- You get answers to your question within 24 hours from a great user
community. Like you just did for this thread!
- Apache, A great license, without any fine prints.
- Dozens of supporting projects, which make GWT even better.
- Check smart gwt or ext gwt for really rich widgets.
- Couple gwt with spring and hibernate and with little plumbing you
are dealing with only java objects from client browser to the data
layer.
- A very small technology and tool stack required for the entire
project.
- Generated js is super-super fast and tiny(relatively)! You end up
writing fast and small apps.  compare it with flex and or any other
toolkit of your choice. (btw, comparing it with lo level libs like
prototype.js is wrong)
- Every thing is so modular and object oriented. you can write long
lasting apps and manage huge application easily.
- Creating reusable widgets is a snap. And that is what you do with
gwt most of the time.
- Some really great features that are unique to gwt: locale mgmt,
history token management, image bundle, exception handling  and rpc
mechanism
- I am yet to see a more elegant and easier way to communicate data
back and forth the server then gwt's rpc. You send a generic arraylist
to your client code. You cannot beat this!
- Strongly typed java is always better compared to js. You end up
making less mistakes as 80% errors are resolved by eclipse as you type
your code.
- Never seen a better way of debugging my code.
- Listeners architecture(if you understand and implement correctly) is
a great tool to decouple your app widgets/classes and make them more
reusable. Great way of event handling!
- Can keep going ...
all in all gwt rocks!!
Fine prints: There is a learning curve if you really want to build
long lasting production ready code(depends on your java experience and
understanding of swing, layouts, event handling etc). Else use one of
the ready to go widget libraries, try smart gwt.

Rakesh Wagh

On Nov 22, 8:58 pm, adam [EMAIL PROTECTED] wrote:
 I see herehttp://docs.jquery.com/Sites_Using_jQuerythat lots of big
 projects, most of which are probably led by some smart, deep-thinking,
 open-minded individuals, are using jQuery and hand-written javascript.
 I notice that this list of projects using 
 GWThttp://www.ociweb.com/mark/programming/GWT.html#WhoIsUsingItdoesn't
 look as impressive.

 Why are leaders on big projects deciding to use tools other than GWT?
 Do they have any good reasons to not use GWT? Should they use GWT? If
 so, why?

 If this has already been covered in another post, please point me to
 it; no need to reinvent the
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Compiling in 1.5.3

2008-11-24 Thread Jason Morris

You need to switch to using the Java 5 way of declaring Collections (ie: using 
generics):

public ListToolOptions toolList = null;

slledru wrote:
 I am trying to move my app from 1.4 to 1.5.3.
 I am using ant to build and am getting following warnings and would
 like to get rid of them.
 What am I doing wrong?
 I am using JDK1.6.
 
  [java] Scanning source for uses of the deprecated gwt.typeArgs
 javadoc annotation; please use Java parameterized types instead
  [java]Type com.sirsidynix.client.request.report.ReportRunInfo
  [java]   Field toolList
  [java]  [WARN] Unable to recognize
 'java.util.Listjava.util.List' as a type name (is it fully qualified?)
  [java] com.google.gwt.core.ext.typeinfo.NotFoundException: Unable
 to recognize 'java.util.Listjava.util.List' as a type name (is it
 fully qualified?)
  [java]   at com.google.gwt.core.ext.typeinfo.TypeOracle.parseImpl
 (TypeOracle.java:892)
 
 
 And in ReportRunInfo, I have:
 /**
  * @gwt.typeArgs
 java.util.Listcom.sirsidynix.client.reports.tools.ToolOptions
  */
 public List toolList = null;
 
  
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



javascript stack trace

2008-11-24 Thread Ed

Is there a way to get more stacktrace information in javascript in the
exception handler?

This information can then be used to send to the backend for further
analyses. (ofcourse this is only usefull when running in pretty or
detail mode).

-- Ed
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: best way to test an image file exists?

2008-11-24 Thread darkflame

I'll guess I'll use this method then and test it on a few versions of
Safari.

Cheers for all the help :)

On Nov 24, 3:35 pm, Jason Morris [EMAIL PROTECTED] wrote:
 It's not really that Safari doesn't support it, it just doesn't allow for 
 XmlHttpRequest objects to
 have a Method of anything other that GET / POST. The issue may have actually 
 been resolved (I'm open
 to correction here), but some people are still using versions of Safari with 
 this problem.



 Lothar Kimmeringer wrote:
  darkflame schrieb:
  oh...it seems GWT dosnt support the Head method only Post / Get :-/
  (apperently Saffire dosnt support it)

  It's a FAQ here. You can use the protected contructor using an
  anonymous inner class:

  RequestBuilder builder = new RequestBuilder(HEAD, url) {
   /* nothing to override */
  };

  I'm wondering if HEAD is not supported by Safari, because this
  method is implemented by HTTP-servers since the time where one
  kilobyte weighted one kilogram.

  Regards, Lothar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Dockpanel question

2008-11-24 Thread cores

I dont think that this is possible with DockPanel.

You have to create a Vertical Panel , then calling Topmenu()
and then a HorizontalPanel() with a Tree listner inside it so it will
change the right side.

If Dockpanel can do this , i m really curious to see how it is done.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Why use GWT?

2008-11-24 Thread Brian

For what it's worth, there's a Josh Bloch video where he talks about
javascript vs gwt.  Clearly he's a java hacker, but still interesting:
Starts at 5:40
http://www.youtube.com/watch?v=RR1E5zO-eBo

I really think the reluctance to pickup gwt (and use other toolkits)
are strong anti-java, pro-dynamic language, anti-static-type language
preferences.  There are just so many reasons to use gwt, as long as
you can tollerate java.


On Nov 24, 10:05 am, rakesh wagh [EMAIL PROTECTED] wrote:
 Adam, did you even try GWT?
 Because if you had developed a 3-4 screen application with server
 connectivity you would have already answered your question. I will not
 do gwt-jquery comparison here, but just few cents about gwt itself.

 That who is using list is incomplete.
 I can bet you that gwt's who is using list(if honestly made) will be
 bigger than any other ajax tech adaption. Jquery's adaption list is
 created by jquery itself. gwt's list you posted is not created by
 google or the gwt team. FYI, we have done more than 3(big) projects
 successfully overt the past 2 years and we do not care to be part of
 any such lists.
 GWT is more than a UI library, it is  a paradigm shift in developing
 web applications. People who have spend there life in struts and other
 similar web based framework will typically take a while to understand
 this paradigm change. If you liked and respected swing and javascript
 for what ever they are, you will probably like and understand gwt much
 faster than some one who doesn't. Very fast, here are some basic
 advantages that make gwt a toolkit of choice:
 - Google's beta releases are production quality!
 - You get answers to your question within 24 hours from a great user
 community. Like you just did for this thread!
 - Apache, A great license, without any fine prints.
 - Dozens of supporting projects, which make GWT even better.
 - Check smart gwt or ext gwt for really rich widgets.
 - Couple gwt with spring and hibernate and with little plumbing you
 are dealing with only java objects from client browser to the data
 layer.
 - A very small technology and tool stack required for the entire
 project.
 - Generated js is super-super fast and tiny(relatively)! You end up
 writing fast and small apps.  compare it with flex and or any other
 toolkit of your choice. (btw, comparing it with lo level libs like
 prototype.js is wrong)
 - Every thing is so modular and object oriented. you can write long
 lasting apps and manage huge application easily.
 - Creating reusable widgets is a snap. And that is what you do with
 gwt most of the time.
 - Some really great features that are unique to gwt: locale mgmt,
 history token management, image bundle, exception handling  and rpc
 mechanism
 - I am yet to see a more elegant and easier way to communicate data
 back and forth the server then gwt's rpc. You send a generic arraylist
 to your client code. You cannot beat this!
 - Strongly typed java is always better compared to js. You end up
 making less mistakes as 80% errors are resolved by eclipse as you type
 your code.
 - Never seen a better way of debugging my code.
 - Listeners architecture(if you understand and implement correctly) is
 a great tool to decouple your app widgets/classes and make them more
 reusable. Great way of event handling!
 - Can keep going ...
 all in all gwt rocks!!
 Fine prints: There is a learning curve if you really want to build
 long lasting production ready code(depends on your java experience and
 understanding of swing, layouts, event handling etc). Else use one of
 the ready to go widget libraries, try smart gwt.

 Rakesh Wagh

 On Nov 22, 8:58 pm, adam [EMAIL PROTECTED] wrote:

  I see herehttp://docs.jquery.com/Sites_Using_jQuerythatlots of big
  projects, most of which are probably led by some smart, deep-thinking,
  open-minded individuals, are using jQuery and hand-written javascript.
  I notice that this list of projects using 
  GWThttp://www.ociweb.com/mark/programming/GWT.html#WhoIsUsingItdoesn't
  look as impressive.

  Why are leaders on big projects deciding to use tools other than GWT?
  Do they have any good reasons to not use GWT? Should they use GWT? If
  so, why?

  If this has already been covered in another post, please point me to
  it; no need to reinvent the
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT Compilation and Custom Project Structure Question

2008-11-24 Thread Suri

Hi,

As part of making my GWT module, I wanted to have my code separated in
a way that might allow for extensibility if needed. I have my
structure as follows:


gwt/src
- packageA
   - client
   - SomeClient.java
   - common
- CommonBean.java
   - public
   - PackageA.gwt.xml  (includes a line inherits
name=packageA.Common/ )
   - Common.gwt.xml   (all this has in between the module tags
is source path=common//

1) When trying to compile this code, I get

  [ERROR] Unable to find 'packageA/Common.gwt.xml' on your
classpath; could be a typo, or maybe you forgot to include a classpath
entry for source?
 [java][ERROR] Line 17: Unexpected exception while processing
element 'inherits'
 [java] com.google.gwt.core.ext.UnableToCompleteException: (see
previous log entries)

I am using an Ant task to compile the source and the class path that's
used in the task is

  path id=gwt.compile.class.path
pathelement location=../gwt/src/ /
pathelement path=${app.gwt.lib}/gwt-user.jar /
pathelement path=${app.gwt.lib}/gwt-servlet.jar /
pathelement path=${app.gwt.lib}/gwt-dev-windows.jar /
pathelement path=${app.gwt.lib}/gwt-incubator.jar /
  /path

Is there something wrong in what I'm doing? If so any help is
appreciated.

2) Ideally I'd like to have removed the common folder outside the
PackageA. Are the instructions for that any different?

Thanks

Suri
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: same-origin security restriction

2008-11-24 Thread Jason Essington

Actually, allowing Hosted mode to violate SOP would lead to even more  
problems come deployment time...

The idea with hosted mode is that it mirrors an actual browser as  
nearly as possible, so by breaking (not fixing) the SOP behavior,  
developers are likely to run into issues where something works in  
Hosted mode, but doesn't in Web mode. Definitely not desired behavior.

If you have a situation were you need to connect to a serve that is  
not well represented by the embedded tomcat server, then simply use - 
noserver and be done with it.

I have a JEE backend, and even I have to use -noserver. In fact, I  
would be willing to bet anyone that has an application that has  
progressed beyond trivial (trial) client/server communication is using  
Hosted mode with the -noserver switch. It is not a matter of the GWT  
developers trying to screw non-JEE developers, but rather a matter of  
not being able to provide an embedded server that is all things to all  
people.

-jason

On Nov 21, 2008, at 2:23 PM, jpnet wrote:


 This is not a feature! Please fix this.  Allow us developers to
 violate the SOP via the Hosted-Mode browsers.  You are screwing your
 developers that don't use J2EE on the backend.

 -JP

 On Nov 19, 7:33 pm, Sumit Chandel [EMAIL PROTECTED] wrote:
 Hi Danny,

 The issue you ran into is not actually a bug but an improvement in  
 1.5.3 in
 terms of browser security compliance.

 Basically, the remote data you are fetching is indeed violating the  
 single
 origin policy, which is why you are seeing the error message come  
 up in the
 hosted mode console.

 The two ways to enable cross-site communication would be to use - 
 noserver
 with a proxy that could delegate the calls or using the JSONP  
 technique.
 Both are described in a bit more detail on the Groups post linked  
 below:

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

 Hope that helps,
 -Sumit Chandel

 On Thu, Nov 13, 2008 at 5:05 PM, Danny [EMAIL PROTECTED] wrote:

 Just thought I'd post an update...

 I downgraded from 1.5.3 to 1.5.2 and its now working so I guess this
 is a bug with 1.5.3.

 Regards,
 Danny

 On Nov 14, 12:40 am, Danny [EMAIL PROTECTED] wrote:
 Hi All,

 I finally got round to making my app run in 1.5 and all is looking
 good.  However I often use hosted mode with remote data, which  
 helps
 massively when debugging issues.  I am using RequestBuilder.

 I'm getting a weird error in 1.5, if I switch back to 1.4 it works
 perfectly.  I get the following when in hosted mode.

 The URLhttp://x.x.x.x/.zzzisinvalid or violates the same-origin
 security restriction

 I've enabled cross-brower communication in Internet Explorer and  
 added
 the site to my Local Intranet, but still not joy.

 Can anyone shed any light on this?

 Many thanks,
 Danny

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: ANNOUNCE: HtmlUnit 2.3 now supports GWT 1.5

2008-11-24 Thread bmihura

I'd like to know how to use HtmlUnit in GWT. I'm completely new to
GWT, so I'm probably missing something very basic.

I took a guess by downloading the latest htmlunit-2.3.zip, and then
copying all of its .jar files into GWT's root directory where its
other .jar files are. Then I tried the line

import com.gargoylesoftware.htmlunit.WebClient

in one of my existing .java files which otherwise works perfectly. A
little red error flag shows up (in Eclipse) that says The import
com.gargoylesoftware cannot be resolved.

How do I make my .java file link to that HtmlUnit code?

Bruce

On Sep 30, 5:59 am, Ahmed Ashour [EMAIL PROTECTED] wrote:
 Dear all,

 It is a pleasure to announce thatHtmlUnit2.3 is released, and GWT
 support is one of its main points.

 The other additions:
     - Better generics: which eliminates casting for the most commonly
 used 'get' methods.
     - Add Firefox 3 support, and making Internet Explorer 7 the
 default browser.
     - Various bug fixes, the change log resides 
 inhttp://htmlunit.sourceforge.net/changes-report.html#a2.3

 Awaiting your feedback on your live GWT projects.

 Yours,
 Ahmed
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: same-origin security restriction

2008-11-24 Thread Brian

How did I miss this thread?  Is there an issue open already for this,
as per the Nov 21st post? I'll star it.

I'm still using 1.5.2 for dev, as it's the fastest way to iterate on a
non-jsonp app.  Basically you guys spoiled me with this bug/feature in
prior releases and using 1.5.3 and its slowdown to iterations just
sucks. No offense :)

Anyway, no, it doesn't cause more problems when deploying.  You find
out right away when you're running in webmode if you're violating SOP
as the browser complains or ignores the request (depends on the
browser). Violating SOP in hosted mode was a fantastic feature.
Having a console warning in hosted mode that a request is violating
sop should be enough.


On Nov 24, 11:02 am, Jason Essington [EMAIL PROTECTED]
wrote:
 Actually, allowing Hosted mode to violate SOP would lead to even more  
 problems come deployment time...

 The idea with hosted mode is that it mirrors an actual browser as  
 nearly as possible, so by breaking (not fixing) the SOP behavior,  
 developers are likely to run into issues where something works in  
 Hosted mode, but doesn't in Web mode. Definitely not desired behavior.

 If you have a situation were you need to connect to a serve that is  
 not well represented by the embedded tomcat server, then simply use -
 noserver and be done with it.

 I have a JEE backend, and even I have to use -noserver. In fact, I  
 would be willing to bet anyone that has an application that has  
 progressed beyond trivial (trial) client/server communication is using  
 Hosted mode with the -noserver switch. It is not a matter of the GWT  
 developers trying to screw non-JEE developers, but rather a matter of  
 not being able to provide an embedded server that is all things to all  
 people.

 -jason

 On Nov 21, 2008, at 2:23 PM, jpnet wrote:



  This is not a feature! Please fix this.  Allow us developers to
  violate the SOP via the Hosted-Mode browsers.  You are screwing your
  developers that don't use J2EE on the backend.

  -JP

  On Nov 19, 7:33 pm, Sumit Chandel [EMAIL PROTECTED] wrote:
  Hi Danny,

  The issue you ran into is not actually a bug but an improvement in  
  1.5.3 in
  terms of browser security compliance.

  Basically, the remote data you are fetching is indeed violating the  
  single
  origin policy, which is why you are seeing the error message come  
  up in the
  hosted mode console.

  The two ways to enable cross-site communication would be to use -
  noserver
  with a proxy that could delegate the calls or using the JSONP  
  technique.
  Both are described in a bit more detail on the Groups post linked  
  below:

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

  Hope that helps,
  -Sumit Chandel

  On Thu, Nov 13, 2008 at 5:05 PM, Danny [EMAIL PROTECTED] wrote:

  Just thought I'd post an update...

  I downgraded from 1.5.3 to 1.5.2 and its now working so I guess this
  is a bug with 1.5.3.

  Regards,
  Danny

  On Nov 14, 12:40 am, Danny [EMAIL PROTECTED] wrote:
  Hi All,

  I finally got round to making my app run in 1.5 and all is looking
  good.  However I often use hosted mode with remote data, which  
  helps
  massively when debugging issues.  I am using RequestBuilder.

  I'm getting a weird error in 1.5, if I switch back to 1.4 it works
  perfectly.  I get the following when in hosted mode.

  The URLhttp://x.x.x.x/.zzzisinvalidor violates the same-origin
  security restriction

  I've enabled cross-brower communication in Internet Explorer and  
  added
  the site to my Local Intranet, but still not joy.

  Can anyone shed any light on this?

  Many thanks,
  Danny
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Captcha

2008-11-24 Thread Micky

There are a few similar threads posted about this but none recently so
here goes again: has anyone stumbled across a good, clean, secure
Captcha implemenation for GWT on their travels?

Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Problem in GWT 1.5

2008-11-24 Thread jamer

I don't understand you

If i don't use the CSS it is ok?



On 22 nov, 16:32, Arthur Kalmenson [EMAIL PROTECTED] wrote:
 Hijamer,

 You would probably do most of this with CSS

 --
 Arthur Kalmenson

 On Fri, Nov 21, 2008 at 4:39 AM,jamer[EMAIL PROTECTED] wrote:

  Hi Group!

  In GWT 1.5, when I create an HTML to add an image, this appears
  descuadrada me, that is, I do not appear in line with the text.
  If I create a HorizontalPanel with a TextBox and a picture, the
  TextBox and the image does not appear to me square, and if that aligns
  with the options of VerticalPanel, I get a lot of space above and
  below these Widget Why?
  Pd: In GWT 1.4 I did this.

  Thank you!!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Mixing up XMLParser with DOM...

2008-11-24 Thread Cristiano

Thank you,

And do you know if can find a solution which may works even if only
inside a specific browser?
On Firefox the underlaying DOM objects tyep are the same if you use an
XHTML page and correclty handle the namespaces in the XML of the HTTP
response.
I'm able to get what I want with javascript on FF, and by the way my
gwt solution only need to work on this browser: I need gwt for other
purpose than broswser portability.

My question may change the into: do you know how to convert elements
in XML package to elements in DOM package in Firefox by using GWT?

Thnak you again,
Cristiano




Jason Morris wrote:
 This is something you simply can't do cleanly across all the browsers. The 
 elements returned by the
 XMLParser are totally different classes to the HTMLParser. The way to do this 
 is to set the
 innerHTML on an HTML Element object to the value returned from the 
 RequestBuilder. Then you can use
 the normal Element.getChildNodes() to fetch the DOM objects that were 
 returned from the service.

 Cristiano wrote:
  Hello Everyone,
 
  How to 'cast' or 'transform' a com.google.gwt.xml.client.Document to
  a com.google.gwt.dom.client.Document ???
 
  I'm dealing with the requirement of handling DOM elements retrieved by
  a server (as an HTTP xml/text response), parse them with XMLParser
  and them into an existing document:
 
  I handle the DOM of the current page with
  com.google.gwt.dom.client.Document and com.google.gwt.user.client.DOM.
 
  I handle the HTTP request with the RequestBuilder.
 
  I parse them with com.google.gwt.xml.client.XMLParser.
 
  However the com.google.gwt.xml.client.XMLParser do return a
  com.google.gwt.dom.client.Document, and I cannot add it to a
  com.google.gwt.dom.client.Document because appendChild does not
  accept as input a com.google.gwt.xml.client.Element: it wants a
  com.google.gwt.doc.client.Element.
 
  Can you help me in find the right direction resolve this (I'm using
  eclipse)?
 
  Thanks,
  Cristiano
 
  
 
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RadioButton value

2008-11-24 Thread Peter Ondruška

Hello,

I use GWT 1.5.3. I post to CGI backend a form. This form has group of
RadioButtons:

RadioButton yes = new RadioButton(answer, yes)
 RadioButton no = new RadioButton(answer, no)

But the values posted to backed are:

answer=on

No matter what button was checked. I would expect something like:

answer=yes

or

answer=no

Am I doing something wrong or is this a bug?

Regards,

Peter

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Why use GWT?

2008-11-24 Thread adam

Hi Rakesh, Thanks for your response.

 Adam, did you even tryGWT?

As I said earlier in this thread, I've developed applications in GWT.
My most recent one (still in development) is matchomat.com. This
application has some rollover buttons, dialogs, form checking, gwt
rpc, history, and it even uses gwt-coded jsonp to communicate with an
erlang server. All of the js is written in GWT. I described the client-
side architecture in the reply to Adam T earlier in this thread. I've
also made a large pure-GWT-history app before.

 created by jquery itself.gwt'slist you posted is not created by
 google or thegwtteam.

They should really post a list!

 - Generated js is super-super fast and tiny(relatively)! You end up
 writing fast and small apps.  compare it with flex and or any other
 toolkit of your choice. (btw, comparing it with lo level libs like
 prototype.js is wrong)

The javascript for matchomat, which is compiled in obfuscated mode, is
around 160kb. I don't like having to wait at my browser for all this
javascript to load. Take a look at Netflix or Facebook; very ajax-y
and yet they seem to load instantaneously. I believe I could have hand-
coded essentially identical functionality for matchomat with a smaller
javascript file had I been using a js toolkit like jquery.
Furthermore, Flex allows you to dynamically load modules -- I do this
in langolab.com. Although GWT.runAsync is in the trunk, it hasn't been
released yet. I have a friend who is on a team creating a b2b gwt app
where the monolithic javascript file weighs in at over a megabyte.
This is untenable for a public-facing app.

 - Every thing is so modular and object oriented. you can write long
 lasting apps and manage huge application easily.

I respectfully disagree with you. First of all, to run my project in
hosted mode I have to wait about 30 seconds for java-js compilation.
This may not sound like a lot but I feel like it really interrupts my
design-debug-design cycle. With hand-coded javascript, there is no
need for this extra compilation step. In order to test my app on other
browsers with GWT, I need to compile in web mode, which takes about
1-3 minutes on my very very fast machine.

 - Creating reusable widgets is a snap. And that is what you do withgwtmost of 
 the time.

Although creating them is a snap, as we noted earlier in this thread
actually using them in an app where html is generated on the server
(like, for SEO) can be a PITA, at least with all techniques that I
think of. It must especially be a PITA with very large apps that
consist of dozens or even hundreds of distinct pages, like the one I'm
currently starting. I wonder if anyone else has some thoughts about
how to ease the pain of using GWT with apps like these.

 - Some really great features that are unique togwt: locale mgmt,
 history token management, image bundle, exception handling  and rpc
 mechanism

Thank you for reminding me of local mgmt, history, and the image
bundle. You are right, these are really useful features. I think I
might continue with GWT on account of these.

 - Strongly typed java is always better compared to js. You end up
 making less mistakes as 80% errors are resolved by eclipse as you type
 your code.

Thank you for reminding me of this also. This is a huge advantage.

 - Never seen a better way of debugging my code.

Firebug is pretty useful for debugging js.

 - Listeners architecture(if you understand and implement correctly) is
 a great tool to decouple your app widgets/classes and make them more
 reusable. Great way of event handling!

Well, actually I find it more natural to use anonymous functions in
AS3 and Javascript. I find Java's anonymous classes to be a little bit
clunky.

Thanks again for your great reply.

Adam

On Nov 24, 9:05 am, rakesh wagh [EMAIL PROTECTED] wrote:
 Adam, did you even tryGWT?
 Because if you had developed a 3-4 screen application with server
 connectivity you would have already answered your question. I will not
 dogwt-jquery comparison here, but just few cents aboutgwtitself.

 That who is using list is incomplete.
 I can bet you thatgwt'swho is using list(if honestly made) will be
 bigger than any other ajax tech adaption. Jquery's adaption list is
 created by jquery itself.gwt'slist you posted is not created by
 google or thegwtteam. FYI, we have done more than 3(big) projects
 successfully overt the past 2 years and we do not care to be part of
 any such lists.GWTis more than a UI library, it is  a paradigm shift in 
 developing
 web applications. People who have spend there life in struts and other
 similar web based framework will typically take a while to understand
 this paradigm change. If you liked and respected swing and javascript
 for what ever they are, you will probably like and understandgwtmuch
 faster than some one who doesn't. Very fast, here are some basic
 advantages that makegwta toolkit of choice:
 - Google's beta releases are production quality!
 - You get answers to your question 

Why do I get LegacySerializationPolicy with GWT 1.5.3?

2008-11-24 Thread big_blue

Hi,

I get a SerializationException for one of my classes that implements
java.io.Serializable and is in the .gwt.rpc file that is deployed to
tomcat. I got this after having upgraded GWT from 1.4.61 to 1.5.3. I
run the application in tomcat, not hosted mode.

With the new GWT you also get a logfile after compile, wich says:
se.company.project.common.dto.UserDTO
   Serialization status
  Instantiable
   Path
  'se.novatelligence.medipal.common.dto.CoordinatorUserDTO' is
reachable as a subtype of type 'class
se.novatelligence.medipal.common.dto.CoordinatorUserDTO'
  Started from
'se.novatelligence.medipal.common.dto.CoordinatorUserDTO'

The only thing I can think of is that there are classes in the project
that uses the older IsSerializable interface, is this a problem or can
you mix with classes that implement Serializable? (it worked before
with 1.4.61...)

the error is:
Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
'se.company.project.common.dto.UserDTO' was not assignable to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a
custom field serializer.  For security purposes, this type will not be
serialized.
at
com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize
(LegacySerializationPolicy.java:140)


the .gwt.rpc file has the following:
se.company.project.common.dto.UserDTO, true

Lots of thanks to anyone who can help explain this!
/Lukas

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SmartGWT 1.0 Released

2008-11-24 Thread Arthur

Hi Sanjiv,

It's a really great work!
I'm happy to see that you continue to develop GWT frameworks and
you've developed a new great tool. Actually I'm using GWT-Ext. I'll
check a SmartGWT in my new projects.

Best regards,
Arthur


On 24 nov, 09:32, francescoNemesi [EMAIL PROTECTED] wrote:
 Hi Sanjiv,

 thanks for your reply, agree with your comments. Re-reading my post I
 agree it might look like I was, in a way, attaching smartGWT. It was
 not meant to come through that way, nor was my intention to praise
 GXT.

 It was only meant to be a comparison between approaches, JSNI vs Pure
 GWT, and I definetely think that using JSNI as the foundation of any
 GWT framework is not the right thing to do. Smart Client is an amazing
 framework, but it is a JavScript framework. Using JSNI leaves you in
 the cold when you need to debug, as an example, but I am sure you know
 all that.

 I think you have done a great job with smartGWT, it looks really great
 and I am sure it will have the success it deserves.

 Regards,
 Francesco

 On Nov 23, 8:34 pm, Sanjiv Jivan [EMAIL PROTECTED] wrote:

  Hi Fransceso,
  If you found a library that meets your needs, then good for you.
  Compile output size and runtime performance are two separate issues. A third
  party widget written in GWT Java, regardless of how small it compiles down
  to, doesn't magically make it run fast. Nor does it make it magically render
  perfectly on all browsers. As an example a TableGrid written in GWT Java
  could still perform really poorly, and not display consistently on all
  browsers.  There are obviously several aspects to GWT that helps avoid leaks
  and such but this does not mean that any third party code written in GWT is
  100% leak free. The GWT 1.6 event API is really neat and SmartGWT users
  it. Well written code is what will perform well and display consistently
  across various browser.

  On the issue of performance, there are numerous posts made by paying GXT
  users that the performance of GWT-Ext is still better than GXT. You can
  search their forums. This is not to suggest that performance improvements
  cannot be made in SmartGWT. If you can give specifics, it would certainly
  help in resolving them. But without specifics like whether it was the
  initial load time, performance of specific widgets etc it will be difficult
  to act on. Feel free to post on the SmartGWT forums or create an issue on
  the smartgwt google code project.

  On the issue of compile output size :  The SmartClient library is extremely
  stable and developed over the past 8 years.  If you peruse their forums, you
  will find that pretty much all questions are met with an answer explaining
  how the user can accomplish what they're trying to do. Their library is
  virtually bug free. I realize this is a strong statement, but its true. Only
  some 4-5 issues were patched post-release. Compare this to the bugs forum of
  any of your favorite libraries. SmartGWT will inherit these attributes once
  its past the few initial minor releases and issues are flushed out during
  this period.  Due to the high level of stability of SmartClient, it can be
  viewed as the kernel of your web app which should be configured to be
  gzipped with an Expires Never header for a given version. This means that
  the browser will cache the kernel (SmartClient JS files) and the only code
  that gets downloaded is your application code, and not any code related to
  the widget / framework. Future releases of SmartGWT will provide a GWT
  linker that only pulls in the required files so this should cut down the
  total size of the application.

  The SmartGWT showcase has some 250 samples which is 6 times more than the
  GXT showcase so its not quite apples to apples when it comes to initial load
  time.

  Finally please read my blog 
  entryhttp://www.jroller.com/sjivan/entry/smartgwt_1_0_releasedifyou haven't
  already done so. I go over the SmartGWT fundamentals, the concept of a
  DataSource and how it will lead to a cleaner architecture and can cut
  application code significantly. I mention how a master detail page can be
  written in as little as 10 lines using a reusable DataSource definition that
  describes an entity / model class. Plus the reduced number of lines of code
  on the server as well.

  This is the first release of SmartGWT and while it is quite stable and has
  been tested and used by early adopters for the past four weeks, users can
  expect any rough edges / bugs / performance issues / better skins etc to be
  ironed out over the course of the next few minor releases.

  As mentioned earlier, if users have found a library that meets their needs,
  thats great and there's no need to look further. And for the others, feel
  free to evaluate SmartGWT to see if it helps meet your requirements. If you
  feel that there are things that can be improved please post on the SmartGWT
  forum or create an issue on the google code project page.

  Thanks,
  

Re: RadioButton value

2008-11-24 Thread Peter Ondruška

OK, found it as bug
http://code.google.com/p/google-web-toolkit/issues/detail?id=458

On Mon, Nov 24, 2008 at 16:53, Peter Ondruška [EMAIL PROTECTED] wrote:
 Hello,

 I use GWT 1.5.3. I post to CGI backend a form. This form has group of
 RadioButtons:

 RadioButton yes = new RadioButton(answer, yes)
  RadioButton no = new RadioButton(answer, no)

 But the values posted to backed are:

 answer=on

 No matter what button was checked. I would expect something like:

 answer=yes

 or

 answer=no

 Am I doing something wrong or is this a bug?

 Regards,

 Peter


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SWFUpload library for GWT

2008-11-24 Thread rakesh wagh

While I appreciate your efforts:
We recently were faced with a requirement with multiple file upload.
After lot of research and trying out swfupload we concluded that the
best approach(for now) is using gears Desktop api for this purpose.
swfupload had huge problems with flash 10 release. Basically adobe
decided to change the way multiple file upload is handled for
security reasons. In my experience there is no silver bullet as far
as multiple file upload functionality is concerned. Nothing against
swfupload, it is a great library in its own rights. But flash in my
experience is not reliable/credible enough for this specific purpose.
People might vary in opinion and I totally respect it.

Rakesh Wagh

On Nov 24, 6:45 am, Mark  Renouf [EMAIL PROTECTED] wrote:
 Hello,

 I wanted to gauge interest in a GWT interface to using SWFUpload
 (http://www.swfupload.org/).

 While work continues on GWT support for file uploads using Gears, I
 need a more compatible and short term solution to a problem that's
 come up. I also feel that having more than one option is good practice
 to ensure compatibility with the most number of users. I'm currently
 putting this together for my own needs but I wanted to see if anyone
 else in the community would be interested in helping to complete
 this.

 The SWFUpload javascript library is around 30KB and and the associated
 flash control is 11KB. It's also recently had support added to work
 around the new security restrictions in flash player 10 (which is what
 has forced me to scrap my own implementation and move to this one).

 My goal is a nice GWT wrapper to make it very simple to drop into any
 existing GWT app. To my knowledge no such thing exists yet (please
 speak up if you know of one).

 Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Why use GWT?

2008-11-24 Thread rakesh wagh

I will agree on the final thing about listeners and feel that it is
more of personal preference. In my experience we had good luck and
happy results using listeners to decouple our widgets and hence
screens. Basically like any other java based application you need a
lead in your team who will always take care of the over all design and
make sure that listeners are not abused; that parents do not pass
themselves as references to the child for purpose of method
invocation; and many other best practice that come by little practice.
With gwt, client side programming deserves equal or more respect(hence
design and lead resources) compared to its server side counter part.

About the size of generated javascript code. As I said I am not going
to go in comparison with any other lib, because that would be apple vs
bananas(I love both fruits btw). If your app is compiled as 160kb js,
I think it is not huge. It is probably just okay. The best thing I
like about gwt is that it does not include a static gwt.js of its own
(like most other toolkits does, take dojo for instance). Gwt maps your
java code as effeciently as possible to corresponding javascript(again
without including its own static js lib). I agree with you that lazy
loading would be a good idea. Moreover I also agree with you that
hosted mode refresh time sucks as your app size increaseas(and that
happens pretty soon!). We all face this issue, and I think that gwt
team will put a solution in coming months. See my comments in this
thread:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/604aec6b7460c133/950c73ed1d98ae3a?hl=en#950c73ed1d98ae3a


Here are some suggestions:
1. Use modules right from the beginning if possible. If you could
divide your project into distinct modules that do not rely on each
other, do it! A good example is managing administration activities
could be a separate module. This way you take away the load from main
application.
2. Create a separate project for common gwt widgets. If you are
relying on vanilla gwt for widgets(not using gwt-ext etc), you would
most probably end up writing lot of common widgets that you would like
to re use in your project. We created a separate project just for this
purpose. So whenever we write a reusable(1+ times) widget, we go to
this common project, do our development, test it in hosted mode(with a
demo app) and just include the js. This way we shift at least 30% of
our development to this very small project that is easy on hosted mode
refresh, debugging, and over all development. I hope you get my point
here.
3. use lazy initialization of variable where ever possible. This
reduces lot of start up time.
4. At time of development compile only for IE(through a property in
gwt ex
More over we created a entirely different project that would contain
the common widgets that we develop and can be reused. I think

Finally:
- I reiterate, it is futile to compare gwt with any other js
libraries. For us, gwt eliminates the use of many server side layers
and xml configurations etc that we would traditionally do in a struts
like app framework.
- If I am allowed to be philosophical: GWT is a change in paradigm
for web app developments
- It also makes our server side code simple to a level where we have
to just provide the implementation to a bunch of interface methods.
Our server and client teams can work totally independent of each
other.
- Moreover when we float requirement, all we need is a person who is
good in java, and nothing else.(yes there is a learning curve for this
person, but that is true with any thing else).
- Before gwt, javascript was my personal favorite for the flexibility
and ease of that language. However it didn't take me to long to
realize how nasty it would get to debug others code and how difficult
does it get to add new features to a already written js based
application. Frankly it is a nightmare and ppl tend to stay away from
touching pre written js based applications.
- Last year we developed a gwt based application and shipped it
offshore for maintenance and the response from our offshore team was
really good(compared to our earlier experiences). All were new to gwt
but they could go in and do bug fixes and add new features without
much hand holding(and without hating or messing the existing code).
Rakesh Wagh

On Nov 24, 11:20 am, adam [EMAIL PROTECTED] wrote:
 Hi Rakesh, Thanks for your response.

  Adam, did you even tryGWT?

 As I said earlier in this thread, I've developed applications in GWT.
 My most recent one (still in development) is matchomat.com. This
 application has some rollover buttons, dialogs, form checking, gwt
 rpc, history, and it even uses gwt-coded jsonp to communicate with an
 erlang server. All of the js is written in GWT. I described the client-
 side architecture in the reply to Adam T earlier in this thread. I've
 also made a large pure-GWT-history app before.

  created by jquery itself.gwt'slist you posted is not created by
  google 

FileUpload widget isn't working inside DialogBox widget

2008-11-24 Thread Gerry

I've successfully used FormPanel+FileUpload before in a GWT page, but
when the FormPanel and enclosed FileUpload is moved to a DialogBox,
the upload suddenly doesn't work.

The form.submit()  is  successfully being triggered, but the form
itself contains no data.

Here's a sample of a *successful* HTTP POST request when submitted
from the page:

POST http://d5.mail.everyone.net/eonapps/ft/wm/upload/3/Documents HTTP/
1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us)
AppleWebKit/525.26.2 (KHTML, like Gecko)
Content-Type: multipart/form-data; boundary=
WebKitFormBoundary0JTC63t0wmy7ij6z
Content-Length: 594
Referer: http://d5.mail.everyone.net/eonapps/ft/static/p_1_1/test.html
Accept: text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cookie: __qca=1173213741-27039527-45363735; enet_prvw_on=1;
enet_prvw_hght=211.5;
__utmz=134571813.1224875848.17.3.utmcsr=ez.everyone.net|utmccn=
(referral)|utmcmd=referral|utmcct=/eonapps/ft/wm/page/wm;
__utma=134571813.1810776736.1220639036.1225823007.1225826230.23;
EON_PSD_WM=%7B%22a%22%3A262%2C%22f%22%3A%5B%22%2F%22%2C%22%2FDocuments
%22%2C%22%2FDocuments%2Fxxx%22%2C%22%2FDocuments%2Fxxx%2F%22%5D%2C
%22b%22%3A%5B%22%2F%22%5D%7D; http%3A%2F%2Fd5.mail.everyone.net
%2Feonapps%2Fgwt%2Feon.fe.gwt.client.wm.p1.App%2Ftheme=m%3Afile%7Cs
%3Axtheme-gray.css%2Cid%7Cs%3Agray; EONS3=U%268%26I%26249921%26P
%260%26R%260%26H%268d7aa4eb89b824966d71c929c4954684;
Eon_Uinfo=passwdstorelogin; EON_CRV=leyte
%2C2011081628%2C330a9d3905ed858ee6e26e341bf393cf;
JSESSIONID=aGjXez5IxMQbG9UXo3
Pragma: no-cache
Connection: keep-alive
Proxy-Connection: keep-alive
Host: d5.mail.everyone.net

--WebKitFormBoundary0JTC63t0wmy7ij6z
Content-Disposition: form-data; name=xxx; filename=test.html
Content-Type: text/html

html
head
titleUntitled/title

style type=text/css title=text/css
!--
body {

  margin:0;
}

div {
  height:100%;
}

table {
  height:100%;
  width:100%;
  border:1px solid #F00;

}
--
/style
/head
body
  table
  trtd colspan=2sdfdsf/td/tr
  trtdssd/td
tddiv style=border:1px solid #00F
sfdesf
/div
  /td
/tr
  /table
/body
/html

--WebKitFormBoundary0JTC63t0wmy7ij6z--

[END REQUEST]

And now the same file submitted from the same form panel moved to a
dialog box:

POST http://d5.mail.everyone.net/eonapps/ft/wm/upload/8/Documents HTTP/
1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us)
AppleWebKit/525.26.2 (KHTML, like Gecko)
Content-Type: multipart/form-data; boundary=
WebKitFormBoundaryCnW1cH00tJLz6Q8r
Referer: http://d5.mail.everyone.net/eonapps/ft/wm/page/wm
Accept: text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cookie: __qca=1173213741-27039527-45363735; enet_prvw_on=1;
enet_prvw_hght=211.5;
__utmz=134571813.1224875848.17.3.utmcsr=ez.everyone.net|utmccn=
(referral)|utmcmd=referral|utmcct=/eonapps/ft/wm/page/wm;
__utma=134571813.1810776736.1220639036.1225823007.1225826230.23;
EON_PSD_WM=%7B%22a%22%3A262%2C%22f%22%3A%5B%22%2F%22%2C%22%2FDocuments
%22%2C%22%2FDocuments%2Fxxx%22%2C%22%2FDocuments%2Fxxx%2F%22%5D%2C
%22b%22%3A%5B%22%2F%22%5D%7D; http%3A%2F%2Fd5.mail.everyone.net
%2Feonapps%2Fgwt%2Feon.fe.gwt.client.wm.p1.App%2Ftheme=m%3Afile%7Cs
%3Axtheme-gray.css%2Cid%7Cs%3Agray; EONS3=U%268%26I%26249921%26P
%260%26R%260%26H%268d7aa4eb89b824966d71c929c4954684;
Eon_Uinfo=passwdstorelogin; EON_CRV=leyte
%2C542293919%2Ce9127bc1b71777f8d038278f2f13abf6;
JSESSIONID=aBbqldxCprF4a71Yo3
Pragma: no-cache
Content-Length: 44
Connection: keep-alive
Proxy-Connection: keep-alive
Host: d5.mail.everyone.net

--WebKitFormBoundaryCnW1cH00tJLz6Q8r--

[END REQUEST]

This is driving me crazy!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SVG and GWT

2008-11-24 Thread Sam sem
here is example  just implement in your java class


 public static native void testMethod()/*-{
  $wnd.testMethod2 = function() {
return
@com.test.client.TestEntryPoint::testMethod2(Ljava/lang/String;)(null);
}

  }-*/;

  public static void testMethod2(String test){
  Window.alert(Hi there ...);
  }

From your HTML page call testMethod2 function

Thanks
Muhammad Ismail


On Sun, Nov 23, 2008 at 12:17 PM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Hi I am trying to call a GWT function from a hand written SVG script.
 I was just wondering if anyone has already managed this, and could
 provided an example? Thanks.
 


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



Re: Why use GWT?

2008-11-24 Thread adam

Rakesh, This was a totally great response and I'm really thankful that
you took the time to write it.

 divide your project into distinct modules that do not rely on each
 other, do it! A good example is managing administration activities
 could be a separate module. This way you take away the load from main
 application.

I see what you mean, but it's often pretty tough to come up with
modules whose dependency graph is disconnected from the rest of the
project. They do appear from time to time, I suppose.

 this common project, do our development, test it in hosted mode(with a
 demo app) and just include the js. This way we shift at least 30% of
 our development to this very small project that is easy on hosted mode
 refresh, debugging, and over all development. I hope you get my point
 here.

Please let me know if I understand the just include the js part
correctly. You are saying that you keep your UI widget lib in a
separate project, compile it to javascript, and then include that
javascript in the html for your main project? If this is correct, how
do you expose the methods? Do you just add functions to $wnd in JSNI
or are you using Cromwell's GWT Exporter? I use the passive view
pattern, which means it's usually pretty easy for me to try out my
widgets in a harness; I usually keep a second module in my main
Eclipse project for this purpose.

 4. At time of development compile only for IE(through a property ingwtex

I'm sorry, but I didn't catch you here. I think your original message
may have become a bit garbled here.

Thanks again.
Adam

On Nov 24, 12:47 pm, rakesh wagh [EMAIL PROTECTED] wrote:
 I will agree on the final thing about listeners and feel that it is
 more of personal preference. In my experience we had good luck and
 happy results using listeners to decouple our widgets and hence
 screens. Basically like any other java based application you need a
 lead in your team who will always take care of the over all design and
 make sure that listeners are not abused; that parents do not pass
 themselves as references to the child for purpose of method
 invocation; and many other best practice that come by little practice.
 Withgwt, client side programming deserves equal or more respect(hence
 design and lead resources) compared to its server side counter part.

 About the size of generated javascript code. As I said I am not going
 to go in comparison with any other lib, because that would be apple vs
 bananas(I love both fruits btw). If your app is compiled as 160kb js,
 I think it is not huge. It is probably just okay. The best thing I
 like aboutgwtis that it does not include a staticgwt.js of its own
 (like most other toolkits does, take dojo for instance).Gwtmaps your
 java code as effeciently as possible to corresponding javascript(again
 without including its own static js lib). I agree with you that lazy
 loading would be a good idea. Moreover I also agree with you that
 hosted mode refresh time sucks as your app size increaseas(and that
 happens pretty soon!). We all face this issue, and I think thatgwt
 team will put a solution in coming months. See my comments in this
 thread:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

 Here are some suggestions:
 1.Usemodules right from the beginning if possible. If you could
 divide your project into distinct modules that do not rely on each
 other, do it! A good example is managing administration activities
 could be a separate module. This way you take away the load from main
 application.
 2. Create a separate project for commongwtwidgets. If you are
 relying on vanillagwtfor widgets(not usinggwt-ext etc), you would
 most probably end up writing lot of common widgets that you would like
 to reusein your project. We created a separate project just for this
 purpose. So whenever we write a reusable(1+ times) widget, we go to
 this common project, do our development, test it in hosted mode(with a
 demo app) and just include the js. This way we shift at least 30% of
 our development to this very small project that is easy on hosted mode
 refresh, debugging, and over all development. I hope you get my point
 here.
 3.uselazy initialization of variable where ever possible. This
 reduces lot of start up time.
 4. At time of development compile only for IE(through a property ingwtex
 More over we created a entirely different project that would contain
 the common widgets that we develop and can be reused. I think

 Finally:
 - I reiterate, it is futile to comparegwtwith any other js
 libraries. For us,gwteliminates theuseof many server side layers
 and xml configurations etc that we would traditionally do in a struts
 like app framework.
 - If I am allowed to be philosophical: GWTis a change in paradigm
 for web app developments
 - It also makes our server side code simple to a level where we have
 to just provide the implementation to a bunch of interface methods.
 Our server and client teams can work totally 

Re: Your opinion sought: Jetty or Tomcat?

2008-11-24 Thread Sumit Chandel
Hi Alex,

I'm interested to learn more about your use case, as it is possible that
there are things we haven't considered the next move from 1.5 to 1.6.

Specifically, the move to Jetty seems like it's a net win because of the
start up time improvements. Making hosted mode faster will require a
combination of tweaks across the board, from which embedded server it's
using to the way it refreshes and picks up code changes. Every second
counts, and it seems to me like shaving off a good four seconds is well
worth it if all that's required is a switch of the embedded server.

I agree that developers who are using -noserver will not see any benefit by
making the switch, but developers who are still depending on hosted mode's
embedded server or those who are just starting out will get better startup
performance as a result.

About using a customized Tomcat to avoid -noserver hosted mode - I'm not
entirely sure I understand why you would want to hack a custom version of
the embedded Tomcat server rather than use your own customizable Tomcat
server with the -noserver option. The embedded server wasn't really purposed
to be a hackable component and was instead meant to serve as a quick way to
get your application setup for early stage hosted mode debugging. Could you
give more details about how you're using the customized embedded Tomcat and
why it wouldn't be possible and even better to use your own Tomcat with
-noserver?

Finally, about the new WAR directory structure, I agree with you that it
would suck if it forced developers to re-tweak their build scripts if
they've already been written in a way that depends on the current output
directory structure. What I feel would be necessary here would be to pass in
flags that could determine the directory structure style. I believe the
upcoming support for the WAR directory structure itself would be really
useful to developers as they would be able to directly deploy their
application from the generated files and directories directly. What's more,
it could simplify some build scripts that have been tweaking the current
output directory structure to better match the WAR convention. The best
place to continue this discussion would be at the GWT Contributors thread
linked below:

GWT-Contributors:
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/130d3f120ee8671a

The features you mentioned in your final thoughts are all things the team
has thought about, and that some have actively been working on. OOPHM is
still in active development as is the Declarative UI framework, as Reinier
mentioned. There's also been some research into making the compiler faster.
I can't say as much about the Java line from JavaScript exception feature,
but it sounds like it would be a great feature to have (and a great
candidate as a Request For Enhancement on the Issue Tracker).

Issue Tracker:
http://code.google.com/p/google-web-toolkit/issues/list

Cheers,
-Sumit Chandel

On Fri, Nov 21, 2008 at 3:54 PM, Alex Epshteyn [EMAIL PROTECTED]
 wrote:


 Bruce,

 I might be too late in replying to this thread, but I want to phrase
 my objections to what you've proposed.

 A. Regarding Jetty:

 I think this will be a waste of time for everyone.  Switching
 underlying servers is a no value added task (using Six Sigma
 vocabulary).

 1).  Many developers are using -noserver so for them this will make no
 difference.

 2).  Many other developers have customized the embedded Tomcat to suit
 our needs (I spent hours customizing it so that I don't have to run
 with -noserver).   It will take hours to re-adjust again if you switch
 underlying servers.

 3). Why?  What's the benefit of switching to Jetty?  Tomcat startup is
 like 5 seconds tops, which accounts for maybe 10% of the hosted mode
 startup time.  You should speed up the compiler if you want to speed
 up hosted mode.   I don't understand what Jetty has to offer here.
 I'd be happy if you proved me wrong here, though.

 B. Regarding the output directory structure:

 I feel the same way about this as I do about Jetty.  I think this is a
 waste of time - no real value added to GWT.  Most of us will have to
 re-tweak our ant build configs which is always a waste of time.

 C. Final thoughts

 I'm really looking forward to seeing something of substance in the
 roadmap for 1.6, because between what you've written here and what's
 marked with 1_6_RC on the issue tracker, I see nothing of any value
 except minor bug fixes.

 Here are the top 3 features that I think would add real value to GWT:

 1). A way to get meaningful Java line number from Javascript
 exceptions thrown in a deployed production app (compiled with -style
 OBF)

 2). Out-of-process hosted mode (to enable using different browsers in
 hosted mode).

 3). A Declarative UI framework (one was started by Joel W. but seems
 to have been abandoned).

 4). Speed up compilation

 Java 5 support would have been #1 on this list a year ago.  You guys
 did a great 

Re: Strange problem with gwt, tomcat and memcached

2008-11-24 Thread Jeremiah Elliott
Ok, still having issues with this... Has anyone here used memcached with
gwt? I am starting to thing the problem is because the Report object is both
IsSerializable and  java.io.Serializable?  Any kind of pointer would be
good. Thanks
-Jeremiah

On Sat, Nov 22, 2008 at 1:10 PM, Jeremiah Elliott [EMAIL PROTECTED]wrote:

 ok, I am not even 100% sure this is a GWT issue. The more I mess with it
 the more I am convinced that it is somehow gwt related. Anyway I am in the
 process of adding memcache to the application I am working on. In hosted
 mode it worked exactly as expected. Huge speed improvement, and the
 memcached log shows my objects going in and out as expected. The problem is
 that when i publish the application to tomcat the cache doesn't work. I can
 still add items to the cache, but when i pull items out of the cache I get a
 class not found exception.
 Initially I thought that the problem may be because the object being cached
 lives in the client package. (com.sagus.client.Report) I createdd a shared
 package as discribed here

 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/51a8a9bb3f141ab4/c43fcc7dad3f7fde?lnk=gstq=foo.bar.shared#c43fcc7dad3f7fde
 however this didnt' solve the problem. I could still set and get the Report
 object in Hosted Mode but in production on tomcat I got the same message.
 Here is the stacktrace:
 java.lang.ClassNotFoundException: com.sagus.Shared.Report
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
 ..



 Well, clearly it can find com.sagus.Shared.Report because is putting it
 into memcache just fine. In a last act of desperation, i exported the
 contents of src into a jar file using eclipse export feature, and dumped
 that into Tomcat's lib directory. Now I am getting a ClassCastException:

 2008-11-22 12:33:57,425 : ERROR :
 com.sagus.server.DataCache.getWidget(DataCache.java:27) : get widget 18:
 java.lang.ClassCastException: com.sagus.Shared.Report cannot be cast to
 com.sagus.Shared.Report
 at com.sagus.server.DataCache.getWidget(DataCache.java:25)
 at com.sagus.server.SagusDashImpl.getReportById(SagusDashImpl.java:244)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
 at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
 at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
 ..




 This is the class I am using to do the memcache sets and gets:

 package com.sagus.server;

 import java.io.IOException;
 import java.net.InetSocketAddress;
 import net.spy.memcached.MemcachedClient;
 import org.apache.log4j.Logger;
 import com.sagus.Shared.Report;

 public class DataCache {
 private static final Loggerlogger=
 SagusDashImpl.getLogger();
 private static StringWIDGET_PREFIX= PROD_WIDGET_;
 private static MemcachedClientc= null;

 public DataCache() {
 try {
 c = new MemcachedClient(new InetSocketAddress(localhost,
 11211));
 } catch (IOException ioe) {
 logger.error(init DataCache , ioe);
 }
 }

 public Report getWidget(int id) {
 Report r = null;
 try {
 r = (Report) c.get(WIDGET_PREFIX + id);
 } catch (Exception e) {
 logger.error(get widget  + id + : , e);
 }
 return r;
 }

 public void cacheWidget(Report report) {
 try {
 c.set(WIDGET_PREFIX + report.getWidgetId(), 36, report);
 } catch (Exception e) {
 logger.error(cacheWidget , e);
 }
 }


 Here is the object being cached, its just a pojo:

 package com.sagus.Shared;
 import java.util.ArrayList;
 import java.util.Date;
 import com.google.gwt.user.client.rpc.IsSerializable;

 public class Report implements IsSerializable, java.io.Serializable {
 
 }


 On one hand I wonder if its because it is implementing two different
 serializable interfaces, but when i build this same object from the database
 it works just fine.
 At this point I am totally out of ideas. Any pointers would be helpful.

 -Jeremiah




Re: Your opinion sought: Jetty or Tomcat?

2008-11-24 Thread Alex Epshteyn

Hi Sumit,

 Could you
 give more details about how you're using the customized embedded Tomcat and
 why it wouldn't be possible and even better to use your own Tomcat with
 -noserver?

I'm not using -noserver because I figured it would be easier to
run/stop just one process during development than 2.   Bottom line: I
think that it's faster to develop without the -noserver option.  IDEs
don't have perfect support for Tomcat and using GWT's embedded server
just seems easier.

I just have two tweaks in GWT's tomcat directory - one to ROOT.xml, to
provide what my production WAR has in it's context.xml (namely,
cookies=false) and the other to the ROOT/web.xml - to provide my own
servlet/filter definitions.  There's a good chance I will be able to
adapt Jetty this way as well, so I don't want to spoil the party if
everyone thinks Jetty is the way to go :)

 Finally, about the new WAR directory structure.

I agree with your intentions here.  You're right, the need to build a
WAR after GWT compile seems like an unnecessary step right now, and is
certainly a pain point for beginners.  (I was fortunate to find a
really good sample build.xml file on the web when I was just starting
out with GWT two years ago).  If you're going to modify the compiler
to produce a WAR, I hope you will consider making this process
pluggable so that one could add their own build logic to it (for
example, my build.xml creates a gzipped copy of all the .cache.* files
to go into the WAR).  Either way, I completely support having this
step be optional based on flags.

 I can't say as much about the Java line from JavaScript exception feature,
 but it sounds like it would be a great feature to have (and a great
 candidate as a Request For Enhancement on the Issue Tracker).

It's already on the books (I should have included the link in my original post):

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

This is a really important feature for me.  In the interim, I was
thinking of using Soot to instrument my Java code to manually keep
track of the call stack.  This will probably make the resulting JS
really slow and bloated, but might be an interesting experiment.

Glad to hear you guys are still working on the Declarative UI concept and OOPHM!

Thanks,
Alex




On Mon, Nov 24, 2008 at 3:44 PM, Sumit Chandel [EMAIL PROTECTED] wrote:
 Hi Alex,

 I'm interested to learn more about your use case, as it is possible that
 there are things we haven't considered the next move from 1.5 to 1.6.

 Specifically, the move to Jetty seems like it's a net win because of the
 start up time improvements. Making hosted mode faster will require a
 combination of tweaks across the board, from which embedded server it's
 using to the way it refreshes and picks up code changes. Every second
 counts, and it seems to me like shaving off a good four seconds is well
 worth it if all that's required is a switch of the embedded server.

 I agree that developers who are using -noserver will not see any benefit by
 making the switch, but developers who are still depending on hosted mode's
 embedded server or those who are just starting out will get better startup
 performance as a result.

 About using a customized Tomcat to avoid -noserver hosted mode - I'm not
 entirely sure I understand why you would want to hack a custom version of
 the embedded Tomcat server rather than use your own customizable Tomcat
 server with the -noserver option. The embedded server wasn't really purposed
 to be a hackable component and was instead meant to serve as a quick way to
 get your application setup for early stage hosted mode debugging. Could you
 give more details about how you're using the customized embedded Tomcat and
 why it wouldn't be possible and even better to use your own Tomcat with
 -noserver?

 Finally, about the new WAR directory structure, I agree with you that it
 would suck if it forced developers to re-tweak their build scripts if
 they've already been written in a way that depends on the current output
 directory structure. What I feel would be necessary here would be to pass in
 flags that could determine the directory structure style. I believe the
 upcoming support for the WAR directory structure itself would be really
 useful to developers as they would be able to directly deploy their
 application from the generated files and directories directly. What's more,
 it could simplify some build scripts that have been tweaking the current
 output directory structure to better match the WAR convention. The best
 place to continue this discussion would be at the GWT Contributors thread
 linked below:

 GWT-Contributors:
 http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/130d3f120ee8671a

 The features you mentioned in your final thoughts are all things the team
 has thought about, and that some have actively been working on. OOPHM is
 still in active development as is the Declarative UI framework, as Reinier
 

Re: SmartGWT 1.0 Released

2008-11-24 Thread ckendrick

Lest anyone get the wrong idea from francesco, when using SmartGWT you
can debug your GWT *application* code normally within hosted mode.

If you had a need to debug the core SmartClient libraries (normal
users will not have a need to do this), you'd use debugging tools like
Firebug and SmartClient's Developer Console.  Calling this being out
in the cold is bit of hyperbole given that SmartClient's very long
track record of success has always been based on this approach, which
works well, and will work even better with the next crop of browsers,
*all* of which have Firebug clones.

Finally, on performance - the real world performance of enterprise
RIAs is dominated by the number of trips to the server and the
intensity of database load.  In this extremely key aspect - again the
primary determinant of real-world performance - SmartClient/SmartGWT
has a very dominant lead, which is due to it's sophisticated data
binding architecture (particularly adaptive client-side operations and
intelligent data caching).  By comparison, possible code size
differences caused by a different mix of JSNI vs Java code is at best
a 3rd or 4th tier performance concern, and is frequently has literally
zero impact on actual performance of delivered applications.

Using JSNI has distinct advantages - as Sanjiv touched on, we are able
to optimize things at a very low level within the SmartClient runtime,
and we can more easily profile and tune core framework code because
it's not going through a Java-JavaScript translator.  This is very
much like the mix of native C++ and higher level languages like C#
within a .NET CLR - different languages for different tasks.
Personally, for the kinds of applications that SmartGWT is designed
for, I see it as a tremendous architectural advantage.

On Nov 24, 12:32 am, francescoNemesi [EMAIL PROTECTED] wrote:
 Hi Sanjiv,

 thanks for your reply, agree with your comments. Re-reading my post I
 agree it might look like I was, in a way, attachingsmartGWT. It was
 not meant to come through that way, nor was my intention to praise
 GXT.

 It was only meant to be a comparison between approaches, JSNI vs Pure
 GWT, and I definetely think that using JSNI as the foundation of any
 GWT framework is not the right thing to do. Smart Client is an amazing
 framework, but it is a JavScript framework. Using JSNI leaves you in
 the cold when you need to debug, as an example, but I am sure you know
 all that.

 I think you have done a great job withsmartGWT, it looks really great
 and I am sure it will have the success it deserves.

 Regards,
 Francesco

 On Nov 23, 8:34 pm, Sanjiv Jivan [EMAIL PROTECTED] wrote:

  Hi Fransceso,
  If you found a library that meets your needs, then good for you.
  Compile output size and runtime performance are two separate issues. A third
  party widget written in GWT Java, regardless of how small it compiles down
  to, doesn't magically make it run fast. Nor does it make it magically render
  perfectly on all browsers. As an example a TableGrid written in GWT Java
  could still perform really poorly, and not display consistently on all
  browsers.  There are obviously several aspects to GWT that helps avoid leaks
  and such but this does not mean that any third party code written in GWT is
  100% leak free. The GWT 1.6 event API is really neat andSmartGWTusers
  it. Well written code is what will perform well and display consistently
  across various browser.

  On the issue of performance, there are numerous posts made by paying GXT
  users that the performance of GWT-Ext is still better than GXT. You can
  search their forums. This is not to suggest that performance improvements
  cannot be made inSmartGWT. If you can give specifics, it would certainly
  help in resolving them. But without specifics like whether it was the
  initial load time, performance of specific widgets etc it will be difficult
  to act on. Feel free to post on theSmartGWTforums or create an issue on
  thesmartgwtgoogle code project.

  On the issue of compile output size :  The SmartClient library is extremely
  stable and developed over the past 8 years.  If you peruse their forums, you
  will find that pretty much all questions are met with an answer explaining
  how the user can accomplish what they're trying to do. Their library is
  virtually bug free. I realize this is a strong statement, but its true. Only
  some 4-5 issues were patched post-release. Compare this to the bugs forum of
  any of your favorite libraries.SmartGWTwill inherit these attributes once
  its past the few initial minor releases and issues are flushed out during
  this period.  Due to the high level of stability of SmartClient, it can be
  viewed as the kernel of your web app which should be configured to be
  gzipped with an Expires Never header for a given version. This means that
  the browser will cache the kernel (SmartClient JS files) and the only code
  that gets downloaded is your application code, and not any code 

GWT-Ext set panel background image

2008-11-24 Thread Sandile

I am trying to set the background image of a Panel called desktop. I
am a novice and so do not have any experience in this respect. Please
help me solve my problem, it is of the highest urgency, thank you for
your time:

--Sandile
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SWFUpload library for GWT

2008-11-24 Thread Mark Renouf

Hi, I know the issue you are referring to. There is a beta release of
SWFUpload which addresses the problem.

I do agree that Gears is superior. In fact I have contributed to the
Google API library support for uploads/blobs as a GWT library. =D It
will hopefully be available soon (though the schedule is completely
out of my hands).

But in the mean time we need to keep a flash option working...

On Nov 24, 12:56 pm, rakesh wagh [EMAIL PROTECTED] wrote:
 While I appreciate your efforts:
 We recently were faced with a requirement with multiple file upload.
 After lot of research and trying out swfupload we concluded that the
 best approach(for now) is using gears Desktop api for this purpose.
 swfupload had huge problems with flash 10 release. Basically adobe
 decided to change the way multiple file upload is handled for
 security reasons. In my experience there is no silver bullet as far
 as multiple file upload functionality is concerned. Nothing against
 swfupload, it is a great library in its own rights. But flash in my
 experience is not reliable/credible enough for this specific purpose.
 People might vary in opinion and I totally respect it.

 Rakesh Wagh
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SWFUpload library for GWT

2008-11-24 Thread Mark Renouf

Thanks for the tip... but this looks to me to be pretty tightly tied
to GWT-Ext. I'm building a more one-to-one direct mapping of the
SWFUpload library into Java equivelents. You could then use it to make
more sophisticated tools but the idea is that it wouldn't be tied into
any particular widget set.

On Nov 24, 9:16 am, Diyko [EMAIL PROTECTED] wrote:
 http://www.gwt-ext.com:8080/demo-ux/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Managing Widgets that GWT did not generate

2008-11-24 Thread tieTYT

Hello,

For reasons explained in this thread,
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/9a050d74a6cd22bc#
, I need to define some HTML in the HTML document.  The rest of the
page is generated by GWT.  The problem is, I can't figure out a way to
take my formPanel, defined like this, FormPanel formPanel =
FormPanel.wrap(DOM.getElementById(loginForm), true);

And add it to a basePanel that's been defined like this: basePanel =
new VerticalPanel();

I get an exception like this:
java.lang.IllegalStateException: Should only call onAttach when the
widget is detached from the browser's document
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:105)
at com.google.gwt.user.client.ui.FormPanel.onAttach(FormPanel.java:
382)
at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java:
165)
at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:111)
at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:231)
at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:119)
at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:
86)
at com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java:
80)
at silverpop.sandbox.client.Sandbox.onModuleLoad(Sandbox.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:320)
at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace
(BrowserWidget.java:329)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300
(BrowserWidgetIE6.java:37)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
(BrowserWidgetIE6.java:76)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke
(BrowserWidgetIE6.java:139)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6
(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:
90)

So, is there a way to move HTML from the document into GWT generated
panel's?  My alternative is to add the whole layout of the page into
the HTML and put placeholders in it that GWT populates.  I'd like to
avoid that.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add tooltips to images in an ImageBundle!

2008-11-24 Thread ART

thanks Mike.it woked.
Ann.

On Nov 21, 10:17 am, ART [EMAIL PROTECTED] wrote:
 Hi,
 How can I add tooltips to images in an ImageBundle using only GWT.Some
 code snippets please.
 thanks,
 Anitha.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Add tooltips to images in an ImageBundle!

2008-11-24 Thread ART

thanks Mike.It worked.
Ann.

On Nov 22, 2:27 pm, Thomas Broyer [EMAIL PROTECTED] wrote:
 On 22 nov, 13:57, ART [EMAIL PROTECTED] wrote:

  The below code only can set one tooltip t o th imagae ,i have to set
  for each case one tooltip.i hope it is clear.Any way to do this?

 How about the following?

  AbstractPrototpeImage img;

 String title;

  int num=Integer.parseInt(name);

  if (cloType.endsWith(h){
  switch(num)
  {
  case0:
  img =images.h_0();

 title = h_0;

  break;
  case1:
  img =images.h_1();

 title = h_1;

  break;
  case2:
  img =images.h_2();

 title = h_2;

  break;

  case3:
  img =images.h_3();

 title = h_3;

  break;

  case4:
  img =images.h_4();

 title = h_4;

  break;

  default:
  img=images.e_1();

 title = e_1;

  }

  final Image imgh=img.createImage();

 imgh.setTitle(title);



  return imgh;

  }- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Dismissing MenuBar when click in RichTextArea

2008-11-24 Thread DanielC

Hi guys,

I've extended the Rich Text sample that's part of GWT Showcase by
adding a MenuBar on top of the RichTextToolbar. Other than that, it's
pretty much identical to the Showcase sample. Everything works fine,
except that when I open the menu, it doesn't close/dismiss when I
click within the RichTextArea. I can even open the menu, switch to the
RichTextArea and begin typing away, but the menu remains open!  If I
click anywhere else within the page though (e.g. on the buttons, or
the page background, etc) it works as expected and the menu closes.

Any ideas what's going on and how I can change this?

Thanks,
Daniel

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Has anyone worked with the Google Calendar API in GWT.

2008-11-24 Thread acc

Hi Cherian,

Did you include gdata-core-1.0.jar in your project classpath?  This is
the .jar file with the GoogleService class.

Note:  The Java client library for Calendar API will only work in
server code.  If you want to access the Calendar API from the browser,
take a look at the JS client library:

http://code.google.com/apis/calendar/docs/1.0/developers_guide_js.html

-alex

On Nov 20, 11:10 pm, Ryan [EMAIL PROTECTED] wrote:
 Hi ,
 Everybody

 But After adding the necessary jar files required for working with the
 google calendars I am getting some compile time errors.
 I am getting errors like
 The type com.google.gdata.client.GoogleService cannot be resolved.it
 is indirectly referenced from required .class files
 I have added the necessary entries in the java build path.
 I am working on eclipse.
 Does anybody have a clue.

 regards,
 Cherian
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to redirect to another EntryPoint class

2008-11-24 Thread Not Ken Shabby

The following code was 'hand extracted and modified from a project I
am working on. Therefore there maybe typos.
There are also references / usages of classes not shown here, but you
do not need them.

The basic flow is:
1. In your class which implements EntryPoint create an instance of a
Logon panel class (of your own design) --- here mine is called
MyLogonPanel
2. Pass a reference to the Entry Point class (this) to the Logon
Panel class --- so that later you can call back into this class
2. Add the logon panel to the RootPanel
3. In the constructor of the Logon Panel - create the necessary UI
components to display a logon message and places to enter UserId and
password.
4. Call your server code to verify the UserId and Password --- onSucess
() should call back a method in the Entry Point class
--- (here loggedOn() ) which then removes the Logon Panel from
the Root Panel and replaces it with the main application screen.

I hope this helps.

Regards,

Ken.

==
MyEntryPoint.java :

public class MyEntryPoint implements EntryPoint
{
MyMainScreen screen;
MyLogonPanel logon;

public void onModuleLoad()
{
logon = new MyLogonPanel(this);
RootPanel.get().add(logon);
}

public void loggedOn(MyLogonResult result)
{
RootPanel.get().remove(logon);
screen = new MyMainScreen(result);
RootPanel.get().add(screen);
}
}


MyLogonPanel.java:

public final class MyLogonPanel extends VerticalPanel
{
final TextBox userIdTB = new TextBox();
final PasswordTextBox passwordTB = new PasswordTextBox();
final Label message = new Label(Please enter userid and
password);
final MyEntryPoint entryPoint;
final VerticalPanel logonBox;

MyLogonPanel(MyEntryPoint entryPoint)
{
this.entryPoint = entryPoint;
HorizontalPanel hp1 = new HorizontalPanel();
HorizontalPanel hp2 = new HorizontalPanel();

this.add(message);
hp1.add(new Label(UserId:));
hp1.add(userIdTB);

hp2.add(new Label(Password:));
hp2.add(passwordTB);

this.add(hp1);
this.add(hp2);
Button logonB = new Button(Logon);
logonB.addClickListener(new LogonClickListener());
this.add(logonB);
logonBox = this;
}

private class LogonClickListener implements ClickListener
{
public void onClick(Widget sender)
{
message.setText(--trying to logon--);
MyRemoteServiceAsync call = MyRemoteService.App.getInstance
();

UserId userId = new UserId(userIdTB.getText());
PassWord password = new PassWord(passwordTB.getText());
LogonCredentials logonCredentials = new LogonCredentials
(userId, password);
call.logon(logonCredentials, new LogonCallback());
}
}

private class LogonCallback implements AsyncCallback
{
public void onFailure(Throwable caught)
{
logonBox.add(new Label(failure of LOGON callback));
logonBox.add(new Label(caught.toString()));
logonBox.add(new Label(--END--));
}

public void onSuccess(Object obj)
{
System.out.println(LOGON callback - onSuccess);
MyLogonResult result = (MyLogonResult) obj;

if (result.logonFailed())
{
message.setText(result.getResponseString());
return;
}
entryPoint.loggedOn(result);
}

}
}


***



On Nov 24, 4:56 am, rajasekhar [EMAIL PROTECTED] wrote:
 I need to redirect to home page.because the problem without
 redirecting is when I refresh the home page it is going to login page
 again .Please let me know how to handle this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Mixing up XMLParser with DOM...

2008-11-24 Thread Jason Morris

GWT's methods of implementing the DOM objects and the XML objects are totally 
different. The DOM 
implementation extends JavaScriptObject, whereas the XML objects encapsulate 
their JavaScriptObject 
structures. I would advise using the method I suggested, since it'll take a lot 
less of your time 
(and be technically a lot safer) than trying to do hackery with GWT's XML 
package.

String responseFromServer = ...;

Element domElement = Document.get().createDivElement();
domElement.setInnerHtml(responseFromServer);

NodeListNode children = domElement.getChildNodes();

If you need to work with sub-elements of the HTML / XML returned from the 
server, I would suggest 
using RPC, or embedding the HTML inside CDATA sections of the returned XML 
document.

If you really feel the need to work with the HTML / XML by hand, you may need 
to make a copy of the 
GWT xml / xml.impl packages and expose the underlying JavaScriptObjects that 
make up the DOM 
structure (and even then: I'm not sure it'll work).

Cristiano wrote:
 Thank you,
 
 And do you know if can find a solution which may works even if only
 inside a specific browser?
 On Firefox the underlaying DOM objects tyep are the same if you use an
 XHTML page and correclty handle the namespaces in the XML of the HTTP
 response.
 I'm able to get what I want with javascript on FF, and by the way my
 gwt solution only need to work on this browser: I need gwt for other
 purpose than broswser portability.
 
 My question may change the into: do you know how to convert elements
 in XML package to elements in DOM package in Firefox by using GWT?
 
 Thnak you again,
 Cristiano
 
 
 
 
 Jason Morris wrote:
 This is something you simply can't do cleanly across all the browsers. The 
 elements returned by the
 XMLParser are totally different classes to the HTMLParser. The way to do 
 this is to set the
 innerHTML on an HTML Element object to the value returned from the 
 RequestBuilder. Then you can use
 the normal Element.getChildNodes() to fetch the DOM objects that were 
 returned from the service.

 Cristiano wrote:
 Hello Everyone,

 How to 'cast' or 'transform' a com.google.gwt.xml.client.Document to
 a com.google.gwt.dom.client.Document ???

 I'm dealing with the requirement of handling DOM elements retrieved by
 a server (as an HTTP xml/text response), parse them with XMLParser
 and them into an existing document:

 I handle the DOM of the current page with
 com.google.gwt.dom.client.Document and com.google.gwt.user.client.DOM.

 I handle the HTTP request with the RequestBuilder.

 I parse them with com.google.gwt.xml.client.XMLParser.

 However the com.google.gwt.xml.client.XMLParser do return a
 com.google.gwt.dom.client.Document, and I cannot add it to a
 com.google.gwt.dom.client.Document because appendChild does not
 accept as input a com.google.gwt.xml.client.Element: it wants a
 com.google.gwt.doc.client.Element.

 Can you help me in find the right direction resolve this (I'm using
 eclipse)?

 Thanks,
 Cristiano

  
 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Queries in designing web application using gwt, spring hibernate

2008-11-24 Thread Amol

Hi
I am designing a web application using GWT, spring  hibernate. I have
some queries.

1. What is the best way to submit form data? Should I use gwt form
submit or collect parameters and invoke service method by passing in
all form field values?

2. How should I handle security aspect, for example validating each
request and make sure only authorized user invoke services?

3. How does session work with GWT?  Is there any sample web
application developed using gwt, spring and hibernate that can guide
me?

Any help will be highly appreciated
Regards
amol


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Re: [ANN] GWT maven plugin released

2008-11-24 Thread nicolas.deloof

I have lots of respect for Charlie's work on its plugin

I don't miss an archetype for GWT (you only need one plugin config to
get GWT working !), and  only use GWTTests for integration testing
purpose (unit tests are far more quicker). I can't see why the mojo
plugin couldn't run GwtTestSuite - but never tested.
That beeing said, this is just MY way to use gwt and maven together.
For example, googlecode gwt-maven has no support to create eclipse
launch configuration, but runs hosted mode from maven with remote
debugging. It also has (AFAIK) no support to generate Async interfaces
for RPC services.

Yu can also find many other gwt/maven plugins created for custom use
cases (nl.jteam:maven-gwt-plugin, some others attached as contribution
in Mojo Jira ...). This is not a good think if they overlap, but today
mojo vs googlecode gwt-maven-plugin is just about how you like to use
gwt with maven. The run the compiler part is the only common
element.

Maybe some official gwt hosted plugin could support the basic tools
(compiler, i18n) as a maven plugin, and others could then contribute
with other features. As a side effect, a gwt native support for maven
could benefict for better integration with GWTCompiler class, that has
changed many time and required us (maven plugin developpers) to fork a
JVM or other hack.

Nicolas

On 24 nov, 04:03, Arthur Kalmenson [EMAIL PROTECTED] wrote:
 I have to agree with Ray, Charlie Collins has done a fantastic job on
 the gwt-maven plugin and has some very important features that seem to
 be missing from this plugin (an archetype, running GWTTestCases from
 the GWTTestSuite, etc). I too would like to see these two plugins
 merged together.

 --
 Arthur Kalmenson

 On Sun, Nov 23, 2008 at 3:20 AM, nicolas.deloof

 [EMAIL PROTECTED] wrote:

  I understand your point of view,

  I just want to notice Mojo project has been created to avoid such case
  of multiple plugins for same use-cases / technology.

  Anyone can get write acces to Mojo when donating a plugin, and this is
  the primary place where maven user will search for maven a maven
  plugin to support XX technology. It doesn't use the constraining
  Apache fundation release and licensing rules, so Mojo committer are
  free to create and promote nice plugins.

  I was not aware of googlecode gwt-maven plugin when I searched one,
  and found the one in Mojo sandbox that required some improvements. I
  later was pointed to google code, but hopefully I didn't plan same
  features.

  Same issue may occur with android or any other technology. I myself
  planned to study android and to support it as part of Mojo, but your
  comment let me thing there is allready plugins available *somewhere*
  for that ;) It would be better for such project to support own
  plugins, to avoid such ambiguous brother plugins.
  We (Mojo project) could also add links to such 3rd party plugins.

  Cheers,
  Nicolas

  On 23 nov, 08:25, Ray Cromwell [EMAIL PROTECTED] wrote:
  Nicolas,
    I hope you didn't take my comment the wrong way. I just wanted to
  point out that Charlie Collin's plugin has been out a lot longer and
  has many more people using it. It's great that the Mojo version has
  finally been brought up to a similar state, I just lament the fact
  that there are so few people maintaining gwt maven plugins that it
  might serve better to have a unified project. Charlie Collins recently
  did this with his Android Maven pluging, merging it with the Masa
  plugin which had a different featureset.

    I am not involved in either project, I'm just a heavy user of
  gwt-maven plugin from Charlie's project, and long term, I'd like to
  see a sort of defacto standard GWT maven plugin, defacto standard GWT
  repo, etc. Right now, everyone and their brother is putting GWT
  packages into repos, using various packaging schemes.

  -Ray

  On Sat, Nov 22, 2008 at 11:18 PM, nicolas.deloof

  [EMAIL PROTECTED] wrote:

   Mojo.codehaus.org is the place where maven community starts plugins
   ideas or incubates third-party ones. They can get focus from many
   developpers and improve, until they get new releases.

   The gwt-maven mojo has been created as an experiment but failed due to
   GwtCompiler System.exit(). I then came to fix this and add support for
   no installation libs.zip, and other stuff like Asyn code generation.

   Charlie Collins as any other contributor is welcome to join the large
   Mojo community and donate code / help to improve the plugin with any
   new feature.

   I google guys want to maintain themselve a gwt plugin, they could
   either join Mojo, or Mojo could donate the plugin to GWT.

   Nicolas

   On 22 nov, 21:08, Ray Cromwell [EMAIL PROTECTED] wrote:
   I'd like to see this plugin and the one from Charlie Collins (total)
   unified, cause it seems like each have valuable nonoverlapping
   features and a real stable feature rich production quality plugin
   should be blessed by google in much the same way as ide 

[gwt-contrib] TabPanel feature request

2008-11-24 Thread stuckagain

Hi,

I'm having a problem with the TabPanel behaviour.

I've created a widget that uses absolute positioning internally to get
a certain effect. The DIV that surrounds it is sized correctly in the
onLoad method, based on the size of the absolutely positioned element.

All this works fine except in the case where this widget is used in a
TabPanel.

If the widget is not put in the visible tab at the moment of
attachement, then the size calucation fails because I always get 0 as
a response. The widget is attached but not visible ... that makes
sense.

I would like to suggest an alternative approach in the tabpanel, to
postpone calling onLoad until the tab is actually shown the first
time.

The obvious workaround for the moment is ofcourse to add the tab panel
lazily to make sure that the onLoad is only triggered when the tab is
made visible but this is a generaly reusable component and I do not
control the use of the component.

I avoided the problem by showing the widget with display:none on the
RootPanel, the same trick as used in the popup panel, because that was
easier to hide from the calling code... but the calculation can fail
due to different CSS rules being applied when attached to another
parent DOM element.

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



[gwt-contrib] AGTUG: Australian Google Technology Users Group

2008-11-24 Thread gslender

Hi,

Short message to announce AGTUG: the Australian Google Technology
Users Group.

http://agtug.org

Those local Australians amongst you whom wish to be part of our local
community on all things technical and Google-ish, please come by and
say g'day. We'd love you to join us for our inaugural event in Sydney.

Cheers,
Grant
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] gen2 TreeTable demo online

2008-11-24 Thread dflorey

Hi,
I've put together a live demo for the TreeTable stuff in my branch.
You can find the demo link in the wiki page that I've created
containing a minimalistic tutorial:

http://code.google.com/p/google-web-toolkit-incubator/wiki/TreeTable

As you can see from the demo I've simplified the table creation by
adding header information to the column definitions, providing typed
column definitions with proper filtering, sorting and editing.
The tables can now handle implicit data and header table creation, so
creating a TreeTable is now as simple as can be.
I've migrated the ImageBundles to ImmutableResourceBundle, localized
the strings by using i18n Messages and used CssResource for styling.
I've moved all classes required both on client and server side to the
share subpackage and added an ant task to create the gwt-incubator-
servlet.jar containing these classes.

Any feedback is welcome!
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: gen2 TreeTable demo online

2008-11-24 Thread dflorey

BTW: Right now the filters are only applied to the top level elements.
I've tried other approaches but with confusing results for the user.
Any suggestions how to apply the filters to children are welcome!
I had the idea to add a chainsaw icon to the TreeController that will
flatten the tree to a normal ScrollTable. Filtering could be applied
to the flattened result and when switching back to tree view the
selection could be kept. But this is not very intuitive...


On 24 Nov., 13:09, dflorey [EMAIL PROTECTED] wrote:
 Hi,
 I've put together a live demo for the TreeTable stuff in my branch.
 You can find the demo link in the wiki page that I've created
 containing a minimalistic tutorial:

 http://code.google.com/p/google-web-toolkit-incubator/wiki/TreeTable

 As you can see from the demo I've simplified the table creation by
 adding header information to the column definitions, providing typed
 column definitions with proper filtering, sorting and editing.
 The tables can now handle implicit data and header table creation, so
 creating a TreeTable is now as simple as can be.
 I've migrated the ImageBundles to ImmutableResourceBundle, localized
 the strings by using i18n Messages and used CssResource for styling.
 I've moved all classes required both on client and server side to the
 share subpackage and added an ant task to create the gwt-incubator-
 servlet.jar containing these classes.

 Any feedback is welcome!
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r4167 - changes/bobv/soyc-reports-r4166

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 06:54:03 2008
New Revision: 4167

Added:
changes/bobv/soyc-reports-r4166/
   - copied from r4166, /trunk/

Log:
Create post-PermutationWorker branch for SOYC update.


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



[gwt-contrib] [google-web-toolkit commit] r4172 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:15:10 2008
New Revision: 4172

Added:
 
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java

Log:
Class for generating all the HTML files for the SOYC dashboard.  Draws on  
information largely in GlobalInfo.



Added:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
==
--- (empty file)
+++  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java   
 
Mon Nov 24 08:15:10 2008
@@ -0,0 +1,808 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may 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.soyc;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.TreeMap;
+
+public class MakeTopLevelHtmlForPerm {
+
+  public static void makeHTMLShell(HashMapString, CodeCollection  
nameToCodeColl, TreeMapString, LiteralsCollection nameToLitColl) throws  
IOException{
+//this will contain the place holder iframes where the actual  
information is going to go.
+// It will also contain global information about this permutation
+
+String fileName = SoycDashboard-index.html;
+
+final PrintWriter outFile = new PrintWriter(fileName);
+outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\);
+outFile.println(html);
+outFile.println(head);
+outFile.println(titleStory of Your Compile - Top Level Dashboard  
for Permutation/title);
+
+outFile.println(style type=\text/css\);
+outFile.println(body {background-color: #728FCE});
+outFile.println(h2 {background-color: transparent});
+outFile.println(p {background-color: fuchsia});
+outFile.println(/style);
+outFile.println(/head);
+
+
+outFile.println(body);
+outFile.println(center);
+outFile.println(h3Story of Your Compile Dashboard/h3);
+outFile.println(hr);
+outFile.println(bFull code size: span style=\color:maroon\ +  
GlobalInfo.cumSizeAllCode + /span/b);
+outFile.println(/center);
+outFile.println(  div style=\width:50%;  float:left; padding-top:  
10px;\);
+outFile.println(bPackage breakdown/b);
+outFile.println(/div);
+outFile.println(  div style=\width:48%;  float:right; padding-top:  
10px; \);
+outFile.println(bCode type breakdown/b);
+outFile.println(/div);
+
+
+outFile.println(  div style=\width:50%;  float:left; padding-top:  
10px;\);
+outFile.println(div style=\width: 110px; float: left;  
font-size:16px;\Size/div);
+outFile.println(div style=\width: 200px; float: left;  
text-align:left; font-size:16px; \Package Name/div);
+outFile.println(/div);
+
+
+outFile.println(  div style=\width:48%;  float:right; padding-top:  
10px;\);
+outFile.println(div style=\width: 110px; float: left;  
font-size:16px;\Size/div);
+outFile.println(div style=\width: 200px; float: left;  
text-align:left; font-size:16px; \Code Type/div);
+outFile.println(/div);
+
+
+
+outFile.println(div style=\height:35%; width:48%; margin:0 auto;  
background-color:white; float:left;\);
+outFile.println(iframe src=\packageBreakdown.html\ width=100%  
height=100% scrolling=auto/iframe);
+outFile.println(  /div);
+makePackageHtml(packageBreakdown.html);
+
+outFile.println(div style=\height:35%; width:48%; margin:0 auto;  
background-color:white; float:right;\);
+outFile.println(iframe src=\codeTypeBreakdown.html\ width=100%  
height=100% scrolling=auto/iframe);
+outFile.println(  /div);
+makeCodeTypeHtml(codeTypeBreakdown.html, nameToCodeColl);
+
+outFile.println(  div style=\width:50%;  float:left; padding-top:  
10px;\);
+outFile.println(bLiterals breakdown/b);
+outFile.println(/div);
+outFile.println(  div style=\width:48%;  float:right; padding-top:  
10px;  \);
+outFile.println(bString literals breakdown/b);
+outFile.println(/div);
+
+
+outFile.println(  div style=\width:50%;  float:left; padding-top:  
10px;\);
+outFile.println(div style=\width: 110px; float: left;  
font-size:16px;\Size/div);
+outFile.println(div style=\width: 200px; float: left;  
text-align:left; font-size:16px; \Literal Type/div);
+outFile.println(/div);
+
+
+outFile.println(  div style=\width:48%;  float:right; padding-top:  
10px; \);
+outFile.println(div style=\width: 

[gwt-contrib] [google-web-toolkit commit] r4174 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:31:05 2008
New Revision: 4174

Removed:
 
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/StringLiteralsCollection.java

Log:
deleting unnecessary class.



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



[gwt-contrib] [google-web-toolkit commit] r4175 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:32:31 2008
New Revision: 4175

Added:
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/GlobalInformation.java
Modified:
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/CodeCollection.java
 
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java

Log:
Comprehensive overhaul of SOYC visualization.



Modified:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/CodeCollection.java
==
--- changes/kprobst/soyc-vis/src/com/google/gwt/soyc/CodeCollection.java
 
(original)
+++ changes/kprobst/soyc-vis/src/com/google/gwt/soyc/CodeCollection.java
 
Mon Nov 24 08:32:31 2008
@@ -33,7 +33,7 @@
public int getCumSize(){
  cumSize = 0;
  for (String className : classes){
-  cumSize += GlobalInfo.classToSize.get(className);
+  cumSize += GlobalInformation.classToSize.get(className);
  }
  return cumSize;
   }
@@ -42,8 +42,8 @@
  cumSplitSize = 0f;
  for (String className : classes){
//TODO(kprobst): deal with packages with no name that can cause a  
class not to be found.
-  if (GlobalInfo.classToPartialSize.containsKey(className)){
-cumSplitSize += GlobalInfo.classToPartialSize.get(className);
+  if (GlobalInformation.classToPartialSize.containsKey(className)){
+cumSplitSize +=  
GlobalInformation.classToPartialSize.get(className);
}
  }
  return cumSplitSize;

Added:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/GlobalInformation.java
==
--- (empty file)
+++ changes/kprobst/soyc-vis/src/com/google/gwt/soyc/GlobalInformation.java 
 
Mon Nov 24 08:32:31 2008
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may 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.soyc;
+
+import java.util.HashMap;
+import java.util.TreeMap;
+import java.util.HashSet;
+import java.util.TreeSet;
+
+public class GlobalInformation {
+
+  public static HashMapString, HashSetString storiesToCorrClasses =  
new HashMapString, HashSetString();
+  public static HashMapString, HashMapString, Integer  
packageToClassSizes = new HashMapString, HashMapString, Integer();
+  public static HashMapString, HashMapString, Float  
packageToPartialClassSizes = new HashMapString, HashMapString, Float();
+  public static HashMapString, Integer packageToSize = new  
HashMapString, Integer();
+  public static HashMapString, Float packageToPartialSize = new  
HashMapString, Float();
+  public static HashMapString, String classToPackage = new  
HashMapString, String();
+
+
+  public static HashMapString, Integer classToSize = new HashMapString,  
Integer();
+  public static HashMapString, Float classToPartialSize = new  
HashMapString, Float();
+  public static TreeMapString, TreeSetString packageToClasses = new  
TreeMapString, TreeSetString();
+
+
+  public static float cumSizeAllCode  = 0;
+
+  public static void computePackageSizes(){
+for (String packageName : packageToClassSizes.keySet()){
+  for (String className :  
packageToClassSizes.get(packageName).keySet()){
+int newSize = packageToClassSizes.get(packageName).get(className);
+if (packageToSize.containsKey(packageName)){
+  newSize += packageToSize.get(packageName);
+}
+packageToSize.put(packageName, newSize);
+  }
+}
+  }
+
+  public static void computePartialPackageSizes(){
+cumSizeAllCode = 0;
+for (String packageName : packageToPartialClassSizes.keySet()){
+  for (String className :  
packageToPartialClassSizes.get(packageName).keySet()){
+float newSize =  
packageToPartialClassSizes.get(packageName).get(className);
+cumSizeAllCode += newSize;
+if (packageToPartialSize.containsKey(packageName)){
+  newSize += packageToPartialSize.get(packageName);
+}
+packageToPartialSize.put(packageName, newSize);
+  }
+}
+  }
+}

Modified:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
==
---  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java   
 
(original)
+++  

[gwt-contrib] [google-web-toolkit commit] r4173 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:24:38 2008
New Revision: 4173

Added:
 
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/StringLiteralsCollection.java

Log:
deleted GlobalInfo.java

Added:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/StringLiteralsCollection.java
==
--- (empty file)
+++  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/StringLiteralsCollection.java  
 
Mon Nov 24 08:24:38 2008
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may 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.soyc;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.HashSet;
+import java.util.TreeMap;
+
+public class StringLiteralsCollection {
+  public String literalType = ;
+  public MapString, HashSetString literalToLocations = new  
TreeMapString, HashSetString();
+  public MapString, HashSetString  storyToLocations = new  
HashMapString, HashSetString();
+  public MapString, String stringLiteralToType = new HashMapString,  
String();
+  public int cumSize = 0;
+
+  public StringLiteralsCollection(String type){
+literalType = type;
+  }
+
+
+
+  public void createHtmlFileTable(String fileName) throws IOException{
+
+final PrintWriter outFile = new PrintWriter(fileName);
+
+outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\);
+outFile.println(html);
+outFile.println(head);
+outFile.println(script type=\text/javascript\  
src=\http://www.google.com/jsapi\;/script);
+outFile.println(script type=\text/javascript\);
+outFile.println(google.load(\visualization\, \1\,  
{packages:[\table\]}););
+outFile.println(google.setOnLoadCallback(drawTable););
+outFile.println(function drawTable() {);
+outFile.println(var data = new google.visualization.DataTable(););
+outFile.println(data.addColumn('string', 'Literal'););
+outFile.println(data.addColumn('string', 'Origin'););
+
+int numRows = literalToLocations.keySet().size();
+outFile.println(data.addRows( + numRows + ););
+
+int rowCt = 0;
+for (String literal : literalToLocations.keySet()){
+  HashSetString locations = literalToLocations.get(literal);
+
+  if (literal.trim().compareTo() == 0){
+literal = [whitespace only string];
+  }
+  literal = escapeXml(literal);
+
+  int ct = 0;
+  for (String location : locations){
+if (ct == 0){
+  outFile.println(data.setCell( + Integer.toString(rowCt) + ,  
0, \ + literal + \););
+  outFile.println(data.setCell( + Integer.toString(rowCt) + ,  
1, \ + location + \););
+  rowCt++;
+  ct++;
+}
+  }
+}
+
+outFile.println( var table = new  
google.visualization.Table(document.getElementById('table_div')););
+outFile.println( table.draw(data, {showRowNumber: true,  
page: 'enable', pagesize: 20}););
+outFile.println(});
+outFile.println(  /script);
+outFile.println( /head);
+outFile.println(body);
+outFile.println(  div id=\table_div\/div);
+outFile.println( /body);
+outFile.println(/html);
+
+outFile.close();
+
+  }
+
+
+  public void createHtmlFile(String fileName) throws IOException{
+final PrintWriter outFile = new PrintWriter(fileName);
+
+outFile.println(!DOCTYPE HTML PUBLIC \-//IETF//DTD HTML//EN\);
+outFile.println(html head);
+outFile.println(/head);
+outFile.println(body);
+outFile.println(center);
+outFile.println(The following table displays the literals as well as  
the unique locations associated with them in the code.);
+outFile.println(table border=\1px\ width=\100%\);
+outFile.println(tr);
+outFile.println(td);
+outFile.println(bLiteral/b);
+outFile.println(/td);
+outFile.println(td);
+outFile.println(bLocation(s) in GWT application/b);
+outFile.println(/td);
+outFile.println(/tr);
+
+for (String literal : literalToLocations.keySet()){
+  HashSetString locations = literalToLocations.get(literal);
+
+  if (literal.trim().compareTo() == 0){
+literal = [whitespace only string];
+  }
+  literal = escapeXml(literal);
+
+
+  for (String location : locations){
+outFile.println(tr);
+outFile.println(td);
+outFile.println(literal);
+outFile.println(/td);
+outFile.println(td);
+

[gwt-contrib] [google-web-toolkit commit] r4178 - changes/kprobst/soyc-vis/bin/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:42:25 2008
New Revision: 4178

Modified:
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/CodeCollection.class
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/LiteralsCollection.class
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/SoycDashboard$1.class
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/SoycDashboard.class

Log:
new compiled version.



Modified:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/CodeCollection.class
==
Binary files. No diff available.

Modified:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/LiteralsCollection.class
==
Binary files. No diff available.

Modified:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/SoycDashboard$1.class
==
Binary files. No diff available.

Modified:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/SoycDashboard.class
==
Binary files. No diff available.

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



[gwt-contrib] Re: [google-web-toolkit] [EMAIL PROTECTED] commented on revision r4098.

2008-11-24 Thread Lex Spoon

On Thu, Nov 20, 2008 at 1:43 PM, Emily Crutcher [EMAIL PROTECTED] wrote:
 Darn it, I hate when inconvenient facts get in the way of a nice theory! As
 I did the benchmark and  you are right, there is no advantage of | over
 ||.


For branch prediction in particular, note that a true interpreter will
not have a branch in the machine code corresponding to each branch in
the source code.  Instead, the machine-code-level branch will be
somewhere in the implementation of ||, of if, of while, etc.
So, the branch predictor ends up trying to decide whether all of the
ifs of the program go to true or to false.  That's not quite useless,
but it's way less than what C and Java programs enjoy.

For an interpreter with dynamic translation, things should be
different.  Bearing in mind that, like John suggests, it still has to
be a pretty fast interpreter before it matters, eliminating branches
seems worth doing, other things equal.  It would still be worth seeing
a positive benchmark to be sure.

Two other things.  | is one character less than ||, which is
important when we count the bytes.

Second, there are analogous problems for an optimizing compiler.  If
this code used | instead of ||, then it would be an easy
optimization to inline alt, ctrl, meta, and shift, thus
eliminating those from being variables at all.  The compiler could
change it to this:


 Event nativeEvent = getNativeEvent();
 return
nativeEvent.getAltKey() | nativeEvent.getCtrlKey() |
nativeEvent.getMetaKey() | nativeEvent.getShiftKey();


If this code used ||, then the optimization would be much trickier,
all due to the implicit branch.


Lex

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



[gwt-contrib] [google-web-toolkit commit] r4180 - changes/kprobst/soyc-vis/bin/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:43:50 2008
New Revision: 4180

Added:
 
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.class  
  
(contents, props changed)

Log:
compiled.


Added:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.class
==
Binary file. No diff available.

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



[gwt-contrib] Re: RR : Pluggable CompilePerms workers

2008-11-24 Thread Lex Spoon

On Thu, Nov 20, 2008 at 8:58 PM, Scott Blum [EMAIL PROTECTED] wrote:
 - We ended up going with Lex's ThreadPoolExecutor stuff.  Mainly because he
 was physically here, and I think both of the TPE-based implementations suck.


Well, we eliminated TPE itself.  However, we went with message-passing
coordination rather than checking multiple counters and queues and/or
checking the interrupted states.


-Lex

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



[gwt-contrib] [google-web-toolkit commit] r4179 - changes/kprobst/soyc-vis/bin/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:43:28 2008
New Revision: 4179

Added:
 
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/GlobalInformation.class
(contents, props changed)

Log:
compiled.


Added:  
changes/kprobst/soyc-vis/bin/com/google/gwt/soyc/GlobalInformation.class
==
Binary file. No diff available.

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



[gwt-contrib] [google-web-toolkit commit] r4182 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 09:17:39 2008
New Revision: 4182

Modified:
 
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java

Log:
Updated to no longer show empty categories.



Modified:  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
==
---  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java   
 
(original)
+++  
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java   
 
Mon Nov 24 09:17:39 2008
@@ -197,13 +197,16 @@
  //traverse the nameToCodeCollection
  //HashMapString, CodeCollection nameToCodeColl

+//TODO(kprobst): turn this into a multimap?  
com.google.common.collect.TreeMultimap
  for (String codeType : nameToCodeColl.keySet()){
float curSize = nameToCodeColl.get(codeType).getCumSplitSize();
sumSize += curSize;
-  sortedCodeTypes.put(curSize, codeType);

-  if (curSize  maxSize){
-maxSize = curSize;
+  if (curSize != 0f){
+sortedCodeTypes.put(curSize, codeType);
+if (curSize  maxSize){
+  maxSize = curSize;
+}
}
  }

@@ -276,10 +279,13 @@
  for (String literal : nameToLitColl.keySet()){
float curSize = nameToLitColl.get(literal).cumSize;
sumSize += curSize;
-  sortedLitTypes.put(curSize, literal);

-  if (curSize  maxSize){
-maxSize = curSize;
+  if (curSize != 0f){
+sortedLitTypes.put(curSize, literal);
+
+if (curSize  maxSize){
+  maxSize = curSize;
+}
}
  }

@@ -368,10 +374,13 @@
for (String stringLiteral :  
nameToLitColl.get(string).stringTypeToSize.keySet()){
  float curSize =  
nameToLitColl.get(string).stringTypeToSize.get(stringLiteral);
  sumSize += curSize;
-sortedStLitTypes.put(curSize, stringLiteral);

-if (curSize  maxSize){
-  maxSize = curSize;
+if (curSize != 0f){
+  sortedStLitTypes.put(curSize, stringLiteral);
+
+  if (curSize  maxSize){
+maxSize = curSize;
+  }
  }
}

@@ -438,9 +447,15 @@
TreeMapFloat, String sortedClasses = new TreeMapFloat,  
String(Collections.reverseOrder());
float maxSize = 0f;
for (String className :  
GlobalInformation.packageToPartialClassSizes.get(packageName).keySet()){
- 
sortedClasses.put(GlobalInformation.packageToPartialClassSizes.get(packageName).get(className),
  
className);
-if  
(GlobalInformation.packageToPartialClassSizes.get(packageName).get(className)  
 maxSize){
-  maxSize =  
GlobalInformation.packageToPartialClassSizes.get(packageName).get(className);
+
+float curSize =  
GlobalInformation.packageToPartialClassSizes.get(packageName).get(className);
+
+if (curSize != 0f){
+
+  sortedClasses.put(curSize, className);
+  if (curSize  maxSize){
+maxSize = curSize;
+  }
  }
}

@@ -544,9 +559,12 @@
for (String className : nameToCodeColl.get(codeType).classes){
  if (GlobalInformation.classToPartialSize.containsKey(className)){
float curSize =  
GlobalInformation.classToPartialSize.get(className);
-  sortedClasses.put(curSize, className);
-  if (curSize  maxSize){
-maxSize = curSize;
+
+  if (curSize != 0f){
+sortedClasses.put(curSize, className);
+if (curSize  maxSize){
+  maxSize = curSize;
+}
}
  }
}
@@ -694,9 +712,6 @@

String outFileName = literalType + Strings.html;

-
-  // order the literals alphabetically (they should be already, right?)
-
final PrintWriter outFile = new PrintWriter(outFileName);


@@ -746,7 +761,6 @@
for (String literal :  
nameToLitColl.get(string).stringLiteralToType.keySet()){

  if  
(nameToLitColl.get(string).stringLiteralToType.get(literal).compareTo(literalType)
  
== 0){
-//outFile.println(div width:99%; border:1px solid  
black;margin:0 auto; overflow-y:scroll; background-color:white; float:left;  
text-align:left; + literal + /div);

String escliteral = escapeXml(literal);
outFile.println(div class=\rowdiv\);
@@ -765,34 +779,7 @@
   }


-
-   /*
-
-  outFile.println(tr);
-  outFile.println(td);
-  outFile.println(font size=\2\+literal+/font);
-
-  outFile.println(/td);
-
-  outFile.println(td);
-  for (String location :  
nameToLitColl.get(string).literalToLocations.get(literal)){
-outFile.println(table);
-outFile.println(tr);
-outFile.println(font size=\2\+ location+/font);
-outFile.println(/tr);
-outFile.println(/table);
-  }
-
-  outFile.println(/td);
-

[gwt-contrib] [google-web-toolkit commit] r4177 - changes/kprobst/soyc-vis/src/com/google/gwt/soyc

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 08:34:22 2008
New Revision: 4177

Removed:
changes/kprobst/soyc-vis/src/com/google/gwt/soyc/HtmlGenerator.java

Log:
Class no longer needed for this version.



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



[gwt-contrib] review request: Fix up the javadoc and throws declarations for Event

2008-11-24 Thread Alex Rudnick
Hey John :)

Would you take a look at this patch for the 1.6 branch, r4184? It
removes all the throws declarations from the Event.get* methods,
both in the method signatures and the javadoc, because we don't
actually do those assertions anymore.

M  user/src/com/google/gwt/user/client/Event.java

Thanks!

-- 
Alex Rudnick
swe, gwt, atl

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

Index: user/src/com/google/gwt/user/client/Event.java
===
--- user/src/com/google/gwt/user/client/Event.java	(revision 4184)
+++ user/src/com/google/gwt/user/client/Event.java	(working copy)
@@ -283,12 +283,8 @@
* Gets whether the ALT key was depressed when the given event occurred.
* 
* @return codetrue/code if ALT was depressed when the event occurred
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#MOUSEEVENTS}, [EMAIL PROTECTED] Event#ONCLICK},
-   *   [EMAIL PROTECTED] Event#ONDBLCLICK}, [EMAIL PROTECTED] Event#KEYEVENTS}, or
-   *   [EMAIL PROTECTED] Event#ONCONTEXTMENU}
*/
-  public final boolean getAltKey() throws AssertionError {
+  public final boolean getAltKey() {
 return DOM.eventGetAltKey(this);
   }
 
@@ -297,10 +293,8 @@
* 
* @return a bit-field, defined by [EMAIL PROTECTED] Event#BUTTON_LEFT},
* [EMAIL PROTECTED] Event#BUTTON_MIDDLE}, and [EMAIL PROTECTED] Event#BUTTON_RIGHT}
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#ONMOUSEDOWN} or [EMAIL PROTECTED] Event#ONMOUSEUP}
*/
-  public final int getButton() throws AssertionError {
+  public final int getButton() {
 return DOM.eventGetButton(this);
   }
 
@@ -308,12 +302,8 @@
* Gets the mouse x-position within the browser window's client area.
* 
* @return the mouse x-position
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#MOUSEEVENTS}, [EMAIL PROTECTED] Event#ONCLICK},
-   *   [EMAIL PROTECTED] Event#ONDBLCLICK}, [EMAIL PROTECTED] Event#ONMOUSEWHEEL}, or
-   *   [EMAIL PROTECTED] Event#ONCONTEXTMENU}
*/
-  public final int getClientX() throws AssertionError {
+  public final int getClientX() {
 return DOM.eventGetClientX(this);
   }
 
@@ -321,12 +311,8 @@
* Gets the mouse y-position within the browser window's client area.
* 
* @return the mouse y-position
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#MOUSEEVENTS}, [EMAIL PROTECTED] Event#ONCLICK},
-   *   [EMAIL PROTECTED] Event#ONDBLCLICK}, [EMAIL PROTECTED] Event#ONMOUSEWHEEL}, or
-   *   [EMAIL PROTECTED] Event#ONCONTEXTMENU}
*/
-  public final int getClientY() throws AssertionError {
+  public final int getClientY() {
 return DOM.eventGetClientY(this);
   }
 
@@ -334,12 +320,8 @@
* Gets whether the CTRL key was depressed when the given event occurred.
* 
* @return codetrue/code if CTRL was depressed when the event occurred
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#MOUSEEVENTS}, [EMAIL PROTECTED] Event#ONCLICK},
-   *   [EMAIL PROTECTED] Event#ONDBLCLICK}, [EMAIL PROTECTED] Event#KEYEVENTS}, or
-   *   [EMAIL PROTECTED] Event#ONCONTEXTMENU}
*/
-  public final boolean getCtrlKey() throws AssertionError {
+  public final boolean getCtrlKey() {
 return DOM.eventGetCtrlKey(this);
   }
 
@@ -358,10 +340,8 @@
* [EMAIL PROTECTED] Event#ONMOUSEOVER}).
* 
* @return the element from which the mouse pointer was moved
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#ONMOUSEOVER} or [EMAIL PROTECTED] Event#ONMOUSEOUT}
*/
-  public final Element getFromElement() throws AssertionError {
+  public final Element getFromElement() {
 return DOM.eventGetFromElement(this);
   }
 
@@ -375,10 +355,9 @@
* /p
* 
* @return the Unicode character or key code.
-   * @throws AssertionError if event type is not one of [EMAIL PROTECTED] Event#KEYEVENTS}
* @see com.google.gwt.user.client.ui.KeyboardListener
*/
-  public final int getKeyCode() throws AssertionError {
+  public final int getKeyCode() {
 return DOM.eventGetKeyCode(this);
   }
 
@@ -386,12 +365,8 @@
* Gets whether the META key was depressed when the given event occurred.
* 
* @return codetrue/code if META was depressed when the event occurred
-   * @throws AssertionError if event type is not one of
-   *   [EMAIL PROTECTED] Event#MOUSEEVENTS}, [EMAIL PROTECTED] Event#ONCLICK},
-   *   [EMAIL PROTECTED] Event#ONDBLCLICK}, [EMAIL PROTECTED] Event#KEYEVENTS}, or
-   *   [EMAIL PROTECTED] Event#ONCONTEXTMENU}
*/
-  public final boolean 

[gwt-contrib] [google-web-toolkit commit] r4186 - in trunk/user/test/com/google/gwt/i18n: . client

2008-11-24 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Mon Nov 24 14:39:21 2008
New Revision: 4186

Added:
trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java
(contents, props changed)
Modified:
trunk/user/test/com/google/gwt/i18n/I18NSuite.java

Log:
Added more tests for date/time formatting in the en locale.

patch by: shanjian
review by: ajr


Modified: trunk/user/test/com/google/gwt/i18n/I18NSuite.java
==
--- trunk/user/test/com/google/gwt/i18n/I18NSuite.java  (original)
+++ trunk/user/test/com/google/gwt/i18n/I18NSuite.java  Mon Nov 24 14:39:21  
2008
@@ -18,6 +18,7 @@
  import com.google.gwt.i18n.client.AnnotationsTest;
  import com.google.gwt.i18n.client.ArabicPluralsTest;
  import com.google.gwt.i18n.client.DateTimeFormat_de_Test;
+import com.google.gwt.i18n.client.DateTimeFormat_en_Test;
  import com.google.gwt.i18n.client.DateTimeParse_en_Test;
  import com.google.gwt.i18n.client.DateTimeParse_zh_CN_Test;
  import com.google.gwt.i18n.client.I18N2Test;
@@ -50,6 +51,7 @@
  suite.addTestSuite(AnnotationsTest.class);
  suite.addTestSuite(ConstantMapTest.class);
  suite.addTestSuite(DateTimeFormat_de_Test.class);
+suite.addTestSuite(DateTimeFormat_en_Test.class);
  suite.addTestSuite(DateTimeParse_en_Test.class);
  suite.addTestSuite(DateTimeParse_zh_CN_Test.class);
  suite.addTestSuite(I18NTest.class);

Added:  
trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java
==
--- (empty file)
+++ trunk/user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java  
 
Mon Nov 24 14:39:21 2008
@@ -0,0 +1,418 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may 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.i18n.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.i18n.client.constants.TimeZoneConstants;
+import com.google.gwt.junit.client.GWTTestCase;
+
+import java.util.Date;
+
+/**
+ * Tests formatting functionality in [EMAIL PROTECTED] DateTimeFormat} for the 
German
+ * language.
+ */
+public class DateTimeFormat_en_Test extends GWTTestCase {
+
+  public String getModuleName() {
+return com.google.gwt.i18n.I18NTest;
+  }
+
+  public void test_MMMddyy() {
+Date date = new Date(2006 - 1900, 6, 27, 13, 10, 10);
+assertEquals(Thursday,July 27, 2006, DateTimeFormat.getFormat(
+, dd, ).format(date));
+  }
+
+  public void test_EEEMMMddyy() {
+Date date = new Date(2006 - 1900, 6, 27, 13, 10, 10);
+assertEquals(Thu, Jul 27, 06,
+DateTimeFormat.getFormat(EEE, MMM d, yy).format(date));
+  }
+
+  public void test_HHmmss() {
+Date date = new Date(2006 - 1900, 6, 27, 13, 10, 10);
+assertEquals(13:10:10,  
DateTimeFormat.getFormat(HH:mm:ss).format(date));
+  }
+
+  public void test_hhmmssa() {
+Date date = new Date(2006 - 1900, 6, 27, 13, 10, 10);
+assertEquals(1:10:10 PM, DateTimeFormat.getFormat(h:mm:ss  
a).format(
+date));
+  }
+
+  public void test_predefinedFormat() {
+Date date = new Date(2006 - 1900, 7, 4, 13, 49, 24);
+
+TimeZoneConstants timeZoneData = GWT.create(TimeZoneConstants.class);
+String str = timeZoneData.americaLosAngeles();
+TimeZone usPacific =  
TimeZone.createTimeZone(TimeZoneInfo.buildTimeZoneData(str));
+
+String fullDateFormat =  
DateTimeFormat.getFullDateFormat().format(date);
+assertEquals(Friday, August 4, 2006, fullDateFormat);
+
+String longDateFormat =  
DateTimeFormat.getLongDateFormat().format(date);
+assertEquals(August 4, 2006, longDateFormat);
+
+String medDateFormat =  
DateTimeFormat.getMediumDateFormat().format(date);
+assertEquals(Aug 4, 2006, medDateFormat);
+
+String shortDateFormat =  
DateTimeFormat.getShortDateFormat().format(date);
+assertEquals(8/4/06, shortDateFormat);
+
+// When dealing with time zone, better use UTC time.
+// And when UTC time is used, time zone must be given in format.
+date.setTime(Date.UTC(2006 - 1900, 7, 4, 20, 49, 24));
+String fullTimeFormat = DateTimeFormat.getFullTimeFormat().format(date,
+usPacific);
+assertEquals(1:49:24 PM America/Los_Angeles, fullTimeFormat);
+
+String longTimeFormat = DateTimeFormat.getLongTimeFormat().format(date,
+usPacific);
+assertEquals(1:49:24 PM PDT, longTimeFormat);
+
+String