time-consuming GWT compile

2009-05-25 Thread Mohammad Anisi

Hi guys,

I'm using ant for compiling a GWT project. Since my GWT project became
big, the GWT compile process take a lot of time in order of 15
minutes!
Is there any compilation trick such as Incremental Compilation for
GWT? or any option for compiling it?

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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT import external jar

2009-05-25 Thread vogella

Hi,

I included a example description for including external jars / Java
projects into GWT projects (client side) in this tutorial:
http://www.vogella.de/articles/GWT/article.html

Best regards, Lars

On 22 Apr., 18:53, Qing zq.zhangq...@gmail.com wrote:
 Oh, i see. Thankyou! It works.

 On Apr 6, 10:06 am, Jason Essington jason.essing...@gmail.com wrote:

  That is correct, ifyourexternal library is only used on the server  
  side (Hibernate, axis, etc) then there is no need to reference it in  
 yourgwt.xmlfile.

  However, ifyoudo need to use it inyourclient code then it must  
  containsource(.java files) as well as have agwt.xmlfile of its  
  own, AND be translatable (not something thatyouraverage java lib is)

  -jason

  On Apr 4, 2009, at 7:18 AM,Qingwrote:

  Youmean I don't need to add inherits name='FinancialFookit'/ to the
   OnlineBanker.gwt.xml?

   On Apr 4, 1:58 am, Vitali Lovich vlov...@gmail.com wrote:
   Wait, ifyouonly have a dependancy inyourserver-side code, why are
  youtrying to integrate the client code?

   On Sat, Apr 4, 2009 at 2:36 AM,Qingzq.zhangq...@gmail.com wrote:

   I added FinancialToolkit.gwt.xmlinto the jar. Doesn't work. do I  
   need
   to put this file to the folder of OnlineBanker as well?

   On Apr 4, 12:16 am, Nicanor Babula nicanor.bab...@gmail.com wrote:
   Hi,
           It looks likeyouhave to add toyourjar file  
   FinancialToolkit.gwt.xml.
   This may 
   help:http://roberthanson.blogspot.com/2006/05/how-to-package-gwt-component
   ..

   On Saturday 04 April 2009 06:49:14Qingwrote:

   Hi,

   I'm now using gwt develop my web application. I create a gwt  
   project
   'OnlineBanker' in command line and import it into eclipse. The  
   server
   side code of OnlineBanker need to use the class in another java
   project 'FinancialToolkit'. I export FinancialTookit as a jar  
   file,
   and import it into OnlineBanker by following away:
   OnlineBanker-Properties-Java build path- libraries - Add  
   external
   Jars
   and I add
   inherits name='FinancialFookit'/into OnlineBanker.gwt.xml
   I run it as OnlineBanker-shell, there's error
   [ERROR]Unabletofind'FinancialTookit.gwt.xml' onyour 
  classpath;
  couldbe atypo, ormaybeyouforgottoincludeaclasspath 
  entryfor
  source?

   Any advice?



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



error

2009-05-25 Thread poonam

hello,

I have developed a validation.jar and used it in my project.
I have created the objects of the classes in the jar in my application
and also imported them.
But when I compile the prog I get the error and the build fails.
I get the error as :

D:\NIMS_Gadgets\TheProjectMyApplication-compile
Analyzing source in module 'com.company.MyApplication'
   [ERROR] Errors in 'D:\NIMS_Gadgets\TheProject\WEB-INF\src\com
\company\client\MyApplication.java'
  [ERROR] Line 73:  The import com.company.validation cannot be
resolved
  [ERROR] Line 114:  RequiredField cannot be resolved to a type
  [ERROR] Line 114:  RequiredField cannot be resolved to a type
  [ERROR] Line 115:  NumericField cannot be resolved to a type
  [ERROR] Line 115:  NumericField cannot be resolved to a type
  [ERROR] Line 118:  ValidationCollector cannot be resolved to a
type
  [ERROR] Line 118:  ValidationCollector cannot be resolved to a
type
  [ERROR] Line 183:  ValidatorUtil cannot be resolved
Finding entry point classes
   [ERROR] Unable to find type 'com.company.client.MyApplication'
  [ERROR] Hint: Previous compiler errors may have made this type
unavailable
  [ERROR] Hint: Check the inheritance chain from your module; it
may not be inheriting a required module or a module
 may not be adding its source path entries properly
[ERROR] Build failed

How can I solve this?

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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: firing a blur event when a button is clicked

2009-05-25 Thread Thomas Broyer



On 25 mai, 04:44, Ian Bambury ianbamb...@gmail.com wrote:
 The visual focus indicator is there for accessibility reasons so people who
 cannot use a mouse know what has focus if they are using a keyboard or voice
 commands or chin-operated joysticks, suck.blow controllers, head-switches
 etc. so they know where they are
 If this isn't a concern, then

         Button b = new Button(Click Me, new ClickHandler()
         {
             @Override
             public void onClick(ClickEvent event)
             {
                 ((Button) event.getSource()).setFocus(false);
             }
         });

Or simply:

.gwt-Button /* or whichever CSS selector */ {
   outline: none;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: time-consuming GWT compile

2009-05-25 Thread asianCoolz

dude, use eclipse

On May 24, 2:10 pm, Mohammad Anisi mohammad.an...@gmail.com wrote:
 Hi guys,

 I'm using ant for compiling a GWT project. Since my GWT project became
 big, the GWT compile process take a lot of time in order of 15
 minutes!
 Is there any compilation trick such as Incremental Compilation for
 GWT? or any option for compiling it?

 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Need some design related help

2009-05-25 Thread vijay
HI All,I am working on a application using GWT and AppEngine (Java with
datastore) , got stuck in design phase.

The application need to take input from barcode reader and will fill up
some text boxes with information corresponding to the barcode. You can
assume it to be a bookstore selling application which can fill up the book
details like book name and  price from the barcode when preparing the bill.
Now my worries are:

1. As the information can change on server by admin the individual seller
should be in sync with server. but it would be very time taking if for every
barcode readed I send a request to server so I think we should store the
information on client side and keep it in sync with the server as the
changes are not expected to be very often.

2. If I keep all information on client side it is not possible to keep all
barcodes information in memory as they can be in huge numbers may be
millions, is there a effective way to keep all information on client side or
any other way instead of storing it on client side.

3. Also i don't want my user to loose any information if there is any
disruption in internet connectivity.so can i use something like a offline
mode which will store all information locally if internet is not connected
and as soon as connection is there it gets sync with server similar to java
web start.

I am beginner, it would be great if you guys can tell me about any others
issues I should be aware of while developing such application with GWT and
AppEngine.


Thanks,
Vijay

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



Re: IE6 PNG transparency fixes for CSS images

2009-05-25 Thread twdarkflame

Not the ones you mention, but if you use Image-Bundles, I believe GWT
deals with the problem itself.

Aside from that have you tried http://www.twinhelix.com/css/iepngfix/
?
Because thats what I was using before and it worked just fine with
GWT.

On May 22, 5:19 am, mrpantsuit kevin.peter.w...@gmail.com wrote:
 I can't seem to get any of the IE6 PNG transparency fixes
 (SuperSleight, 
 unitpngfix,http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/)
 working in my GWT app.

 (Note that my PNGs are specified in my CSS, so solutions like PNGImage
 won't help.)

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



Re: Need some design related help

2009-05-25 Thread Peter Ondruška

Have a look at Google Gears it should be able to solve all your issues.

2009/5/25, vijay mymail.vi...@gmail.com:
 HI All,I am working on a application using GWT and AppEngine (Java with
 datastore) , got stuck in design phase.

 The application need to take input from barcode reader and will fill up
 some text boxes with information corresponding to the barcode. You can
 assume it to be a bookstore selling application which can fill up the book
 details like book name and  price from the barcode when preparing the bill.
 Now my worries are:

 1. As the information can change on server by admin the individual seller
 should be in sync with server. but it would be very time taking if for every
 barcode readed I send a request to server so I think we should store the
 information on client side and keep it in sync with the server as the
 changes are not expected to be very often.

 2. If I keep all information on client side it is not possible to keep all
 barcodes information in memory as they can be in huge numbers may be
 millions, is there a effective way to keep all information on client side or
 any other way instead of storing it on client side.

 3. Also i don't want my user to loose any information if there is any
 disruption in internet connectivity.so can i use something like a offline
 mode which will store all information locally if internet is not connected
 and as soon as connection is there it gets sync with server similar to java
 web start.

 I am beginner, it would be great if you guys can tell me about any others
 issues I should be aware of while developing such application with GWT and
 AppEngine.


 Thanks,
 Vijay

 


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



Re: time-consuming GWT compile

2009-05-25 Thread David

Disable permutions to only the one you need when testing.

You can do this by for example setting these properties in your .gwt.xml file.

set-property name=user.agent value=ie6/
set-property name=locale value=default /

Are you using 1.6 ? I have seen a big improvement in the compile
times. It used to be 15 minutes as well, but that has trimmed down a
lot to about 1 minute. That change is partly to changes in the GWT
compiler, the fact that I reduce the number of permutations and I
optimized from where the sources are read (it used to be a slow
network drive).

David


On Mon, May 25, 2009 at 11:41 AM, asianCoolz second.co...@gmail.com wrote:

 dude, use eclipse

 On May 24, 2:10 pm, Mohammad Anisi mohammad.an...@gmail.com wrote:
 Hi guys,

 I'm using ant for compiling a GWT project. Since my GWT project became
 big, the GWT compile process take a lot of time in order of 15
 minutes!
 Is there any compilation trick such as Incremental Compilation for
 GWT? or any option for compiling it?

 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: error

2009-05-25 Thread David

Put the sources in your classpath when compiling.

On Mon, May 25, 2009 at 11:09 AM, poonam poonam...@gmail.com wrote:

 hello,

 I have developed a validation.jar and used it in my project.
 I have created the objects of the classes in the jar in my application
 and also imported them.
 But when I compile the prog I get the error and the build fails.
 I get the error as :

 D:\NIMS_Gadgets\TheProjectMyApplication-compile
 Analyzing source in module 'com.company.MyApplication'
   [ERROR] Errors in 'D:\NIMS_Gadgets\TheProject\WEB-INF\src\com
 \company\client\MyApplication.java'
      [ERROR] Line 73:  The import com.company.validation cannot be
 resolved
      [ERROR] Line 114:  RequiredField cannot be resolved to a type
      [ERROR] Line 114:  RequiredField cannot be resolved to a type
      [ERROR] Line 115:  NumericField cannot be resolved to a type
      [ERROR] Line 115:  NumericField cannot be resolved to a type
      [ERROR] Line 118:  ValidationCollector cannot be resolved to a
 type
      [ERROR] Line 118:  ValidationCollector cannot be resolved to a
 type
      [ERROR] Line 183:  ValidatorUtil cannot be resolved
 Finding entry point classes
   [ERROR] Unable to find type 'com.company.client.MyApplication'
      [ERROR] Hint: Previous compiler errors may have made this type
 unavailable
      [ERROR] Hint: Check the inheritance chain from your module; it
 may not be inheriting a required module or a module
  may not be adding its source path entries properly
 [ERROR] Build failed

 How can I solve this?

 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Error while using dependent project.

2009-05-25 Thread Shishir Srivastava

Hi,

I am trying to use a dependent project (for the model layer) in my GWT
project. I am using Jdeveloper as the IDE and have two projects in my
application namely:

1.) GwtProject
2.) Model

I can compile, build and run the GwtProject successfully as long as I
don't set the dependent projects as Model in it. When I set my Model
project as the dependent project for GwtProject I start getting this
error in the hosted mode.


[TRACE] Module location: file:/C:/utilities/code.personal/gwt-
windows-1.6.4/Application1/GwtProject/war/WEB-INF/classes/com/path1/
path2/GwtProject.gwt.xml

[ERROR] Failure while parsing XML
org.xml.sax.SAXNotRecognizedException: 
http://apache.org/xml/features/nonvalidating/load-external-dtd
at oracle.xml.jaxp.JXSAXParserFactory.setFeature
(JXSAXParserFactory.java:128)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse
(ReflectiveParser.java:307)
at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100
(ReflectiveParser.java:48)
at com.google.gwt.dev.util.xml.ReflectiveParser.parse
(ReflectiveParser.java:385)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad
(ModuleDefLoader.java:243)
at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:
155)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule
(ModuleDefLoader.java:269)
at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath
(ModuleDefLoader.java:127)
at com.google.gwt.dev.HostedModeBase.loadModule(HostedModeBase.java:
536)
at com.google.gwt.dev.HostedMode.loadModule(HostedMode.java:426)
at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:351)
at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:585)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)


Adding 'Model' as the dependent project does not make any changes in
my GwtProject.gwt.xml file but still it throws up this error pointing
to the module xml file.

I have been through some of the similar posts in the forum,
recommending making a jar out of the second project and adding it to
the GwtProject, but I don't intend to follow that route, because that
would mean deploying my Model project to jar file everytime I make a
change in the project which is still under development.

Can anyone please point the error in the whole process?

Thanks,
Shishir


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



Re: Bug in Google Plugin for Eclipse? Calling Enum: values() is listed as problem

2009-05-25 Thread Miguel Méndez
This looks like a legitimate JSNI validation bug.  Could you file an issue
in GWT's issue tracker?  http://code.google.com/p/google-web-toolkit/issues

On Sat, May 23, 2009 at 2:51 PM, hartmut.honi...@googlemail.com 
hartmut.honi...@googlemail.com wrote:


 When trying to call the values() method on an enum type inside a
 JSNI method, Eclipse complains about the type not containing that
 method: It lists an error on the problems page, and it produces a
 warning when trying to launch GWT hosted mode. However, when I ignore
 the warning, the code runs fine, and compiling to JavaScript doesn't
 produce an error.

 To reproduce the bug, add this simple enum to your GWT project:

 package com.example.enumTest.client;
 public enum DaysEnum {
  SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
  THURSDAY, FRIDAY, SATURDAY
 }

 and add this simple JSNI method somewhere:

 private native DaysEnum[] getDays() /*-{
return @com.example.enumTest.client.DaysEnum::values()();
  }-*/;

 Eclipse will report DaysEnum does not contain a method named values
 on the problems page and complain about Errors in workspace when
 trying to run the project in debug mode. But after ignoring the
 warning, any code that calls getDays() runs fine, and compiling to
 JavaScript doesn't produce any errors.
 For example, getDays()[0].toString() correctly returns SUNDAY.

 Can anyone confirm this behaviour? Is this a (known) bug? Should I
 file an issue?



 



-- 
Miguel

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



How FocusListener and KeyboardListener can share the same code?

2009-05-25 Thread Suren

Hi All,

I am using a datagrid which has a table listener and when I click on
any cell, I am adding a textbox to that cell by copying the text from
the cell to the textbox. After editing the cell if I press ENTER key
or move the focus from the textbox I am copying the value back to the
cell and invoking the database update.

Here is how my code look like

dataGrid.addTablelistener {
  public void onCellClicked(SourcesTableEvents sender, final int
row,final int cell) {

   //code for copying the cell text to text box
   //having a listener to that textbox

   textBox.addFocusListener(new FocusListenerAdapter() {
   public void onLostFocus(Widget sender) {

  //code for DB update

  }
   });

  textBox.addKeyboardListener(new KeyboardListenerAdapter() {
public void onKeyPress(Widget sender,char keyCode, int modifiers) {

//code for DB update

 }
  });

});



Here my doubt or concern is that...in both onLostFocus and onKeyPress
I am using the same code for Database update.

how can I make that code into a single method and call in both the
places. So that I can avoid redundancy of code in two places.

When I try to do that inside oncellDoubleclicked, the scope is not
read..
When I try to write outside oncellDoubleclicked, then also I am not
getting the method inside these two methods(KeyPress and LostFocus)

Any help or advise would be appreciated

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



FocusListener and KeyboardListener

2009-05-25 Thread Suren

Hi All,

I am using a datagrid which has a table listener and when I click on
any cell, I am adding a textbox to that cell by copying the text from
the cell to the textbox. After editing the cell if I press ENTER key
or move the focus from the textbox I am copying the value back to the
cell and invoking the database update.

Here is how my code look like

dataGrid.addTablelistener {
  public void onCellClicked(SourcesTableEvents sender, final int
row,final int cell) {

   //code for copying the cell text to text box
   //having a listener to that textbox

   textBox.addFocusListener(new FocusListenerAdapter() {
   public void onLostFocus(Widget sender) {

  //code for DB update

  }
   });

  textBox.addKeyboardListener(new KeyboardListenerAdapter() {
public void onKeyPress(Widget sender,char keyCode, int modifiers) {

//code for DB update

 }
  });

});



Here my doubt or concern is that...in both onLostFocus and onKeyPress
I am using the same code for Database update.

how can I make that code into a single method and call in both the
places. So that I can avoid redundancy of code in two places.

When I try to do that inside oncellDoubleclicked, the scope is not
read..
When I try to write outside oncellDoubleclicked, then also I am not
getting the method inside these two methods(KeyPress and LostFocus)

Any help or advise would be appreciated

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



ColumnTree

2009-05-25 Thread Midou

Hello
I want to use a ColumnTree in my GWT project and i would like to
insert into not only text but also images.
Please have you a solution.
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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Geting a stack trace?

2009-05-25 Thread dduck

Hi,

I have implemented a trappable command, that will show a popup in
case of an uncaught exception during its execution. It seems that a
stack trace is not available using the normal Java methods - at least
not when run in a browser. Any suggestions?

Here's the code.


/**
 * Implement the execute method for a command that will have a
reasonable
 * way to handle thrown exceptions.
 */
public abstract class TrappableCommand implements Command {

/**
 * Execute this command, report any exception in a popup panel.
 */
public void execute() {
execute(this);
}

/**
 * Execute the provided command, report any exception in a popup
panel.
 * @param cmd The command to execute.
 */
public static void execute(final TrappableCommand cmd) {
try {
cmd.executeWithCatch();
} catch (final Throwable t) {
final PopupPanel panel = new PopupPanel(true);
panel.setWidget(makeWidget(t));
panel.center();
}
}

/**
 * Make a normal command trappable.
 *
 * @param cmd The command to make trappable.
 * @return A trappable wrapper for cmd.
 */
public static Command makeTrappable(final Command cmd) {
return new TrappableCommand() {

@Override
protected void executeWithCatch() {
cmd.execute();
}};
}

private static Widget makeWidget(final Throwable t) {
final VerticalPanel host = new VerticalPanel();
host.add(LabelFactory.makeNewLabelBiggest(Exception
caught));
addThrowable(t, host);
return host;}

private static void addThrowable(final Throwable t, final
VerticalPanel host) {
host.add(new Label(Class:  + t.getClass().getName()));
host.add(new Label(Message:));
addStringWithLinebreaks(host, t.getMessage());
host.add(new Label(Stacktrace:));
addWithLinebreaks(host, t.getStackTrace());
if (t.getCause() != null) {
host.add(LabelFactory.makeNewLabelBig(Caused by));
addThrowable(t.getCause(), host);
} else {
host.add(new Label(No cause));
}
}

private static void addWithLinebreaks(VerticalPanel host,
StackTraceElement[] stackTrace) {
if (stackTrace.length == 0) {
host.add(new Label(No stacktrace));
} else {
for (StackTraceElement item : stackTrace) {
host.add(new Label(item.toString()));
}
}
}

private static void addStringWithLinebreaks(VerticalPanel host,
String s) {
String strings[] = s.split(\n);
for (String str : strings) {
host.add(new Label(str));
}
}

/**
 * Implement to add behavior.
 */
protected abstract void executeWithCatch() ;

}




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



Re: ColumnTree

2009-05-25 Thread Jamie

As you no doubt know, the Tree does not support multiple columns.
For one project, I also needed a very simple column-tree

As a no-frills tree with support for columns, I simply used a regular
Grid, and in the first column I always added a horizontalpanel.

In this horizontalpanel, I added a 'spacer' Image, followed by my
'tree' icon Image, followed by a Label for the item text.
The spacer image was a transparent 1x1 gif, and I would adjust it's
width depending on the desired indent for that item.

Obviously, this does not support the usual treeitem hierarchy (adding
treeitems to other treeitems), but it worked for my needs at the time,
and it looked pretty good too.
I did not require collapsable treeitems either, but that could be
accomplished using a listener.

Jamie.

---
Search for analog and digital television broadcasts in your area (US 
Canada):
http://www.antennamap.com/

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



Re: GWT 1.6 Jetty Server and Expression Language

2009-05-25 Thread Chris Kentfield

I just ran in to this problem myself and I found this post on Stack
Overflow: 
http://stackoverflow.com/questions/504071/el-in-a-jsp-stopped-evaluating

The solution is to replace these lines in the web.xml file

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

with

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-
app_2_4.xsd
  version=2.4
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Web app classpath problem

2009-05-25 Thread hezjing
This problem is discussed in
http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/446da2497826c290?pli=1
http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/446da2497826c290?pli=1
On Mon, May 25, 2009 at 9:29 PM, hezjing hezj...@gmail.com wrote:

 Hi
 I'm getting the following warning in the hosted mode console:

 [INFO] Starting Jetty on port 8080
 [WARN] Server class 'org.apache.commons.collections.map.CaseInsensitiveMap'
 could not be found in the web app, but was found on the system classpath
 [WARN] Adding classpath entry
 'file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.win32_1.6.4.v200904062334/gwt-windows-1.6.4/gwt-dev-windows.jar'
 to the web app classpath for this session
 More info:
 file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle.win32_1.6.4.v200904062334/gwt-windows-1.6.4/doc/helpInfo/webAppClassPath.html


 I followed the tip described
 in gwt-windows-1.6.4\doc\helpInfo\webAppClassPath.html, and ensure
 that gwt-servlet.jar is already in war\WEB-INF\lib
 but the problem still exist!


 Do you have any idea?


 --

 Hez




-- 

Hez

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



Re: IE6 PNG transparency fixes for CSS images

2009-05-25 Thread Kevin Wong

Thanks.  No, I couldn't seem to get iepngfix to work either.  I
must've been doing something wrong.

ImageBundles are not an option, as the images are specified in the
CSS.

I got a solution working where I use a IE6 specific CSS file that
references GIF versions of my PNGs, and apply it like so:

!--[if lte IE 6]
link rel=stylesheet type=text/css href=stylesheet/lte-
ie6.css /
![endif]--

On May 25, 6:36 am, twdarkflame darkfl...@gmail.com wrote:
 Not the ones you mention, but if you use Image-Bundles, I believe GWT
 deals with the problem itself.

 Aside from that have you triedhttp://www.twinhelix.com/css/iepngfix/
 ?
 Because thats what I was using before and it worked just fine with
 GWT.

 On May 22, 5:19 am, mrpantsuit kevin.peter.w...@gmail.com wrote:

  I can't seem to get any of the IE6 PNG transparency fixes
  (SuperSleight, 
  unitpngfix,http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie/)
  working in my GWT app.

  (Note that my PNGs are specified in my CSS, so solutions like PNGImage
  won't help.)

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



Missing files when enabled Google App Engine SDK after GWT project is created

2009-05-25 Thread hezjing
Hi

Eclipse complaints the appengine-web.xml file does not exist when I enabled
the Google App Engine SDK after created a GWT project.

Here are the steps I performed:

1) File-New-Web Application Project
Check use Google Web Toolkit
Uncheck use Google App Engine
Finish

2) Right click project-Google-App Engine Settings...
Check use Google App Engine
Problem: the appengine-web.xml file does not exist!


This problem can be fixed by selecting the quick fix, and appengine-web.xml
will be created automatically.

Unfortunately when the project is launched, it failed to
locate war\WEB-INF\logging.properties and commons-logging.jar

I'm wondering, if Google plugin should automatically perform the
following when we enabled Google App Engine SDK?
1) Create appengine-web.xml
2) Create logging.properties
3) Add commons-logging.jar into referenced libraries


This problem does not exist if I checked both GWT and Google App Engine
while creating the project in step 1.


-- 

Hez

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



Re: Geting a stack trace?

2009-05-25 Thread Jamie

You will probably need to make use of JSNI.
Check out hit #1 on googling for javascript stack trace,

http://www.google.ca/search?hl=enq=javascript+stack+tracebtnG=Google+Searchmeta=aq=foq=

http://eriwen.com/javascript/js-stack-trace/


Jamie
---
Find television broadcast antennas in your area:
http://www.antennamap.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Cannot iterate HashSet

2009-05-25 Thread Bruce Hatt

The difference is in how your string is created.
I would make a guess that getValue() returns null at some point and
the call to toString() generates a NPE type error in javascript.
Concatenation like in your second snippet, will create a new string
and concatenate the return of getValue(). Null is okay to
concatenate.

To verify, do a check for null or look for null in your output.


On May 24, 8:05 am, Yulia yuli...@gmail.com wrote:
 After all day beating my head against the keybord I found where the
 problem was. I reverted all changes to stable version and statrted to
 add code bit by bit and noticed that after changes in
 AttributeValue.toString() method my program started to fail again.

 This code doesn't work:
     @Override
     public String toString() {
         return getValue().toString();
     }

 But this code works:
     @Override
     public String toString() {
         return +getValue();
     }

 But it should be the same... Maybe I misunderstand something, can
 somebody explain me the difference?

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



Is there size limitation on data passed thru GWT-RPC?

2009-05-25 Thread Zmitro Lapcjonak

Hi.

Our application on server side generates complex data structure which
is
serialized by RPC class into array with lenght near 37K of chars:
responsePayload //OK[0,82  ],0,4]
value   char[37088]
Then the response is successfully sent from server (no errors in log
files).

But on the client side the InvocationException is thrown in class
RequestCallbackAdapter (method onResponseReceived) because
the response.getText() is somehow corrupted: it contains array of 3
chars.

When the response is smaller - near 32K (after serialization) then
the call is successfull and all the data is passed to the client.

So, I wonder if there is any limitation on size of data passed thru
GWT-RPC?

If yes, how I can workaround?

We use GWT 1.5.3.

--
Zmitro Lapcionak

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



Re: Geting a stack trace?

2009-05-25 Thread Magno Machado
Since your production code will probably be obfuscated, I ask: Will this
stack trace be useful?

2009/5/25 Jamie jamiesharbor-sou...@yahoo.com


 You will probably need to make use of JSNI.
 Check out hit #1 on googling for javascript stack trace,


 http://www.google.ca/search?hl=enq=javascript+stack+tracebtnG=Google+Searchmeta=aq=foq=

 http://eriwen.com/javascript/js-stack-trace/


 Jamie
 ---
 Find television broadcast antennas in your area:
 http://www.antennamap.com/
 


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



Re: Geting a stack trace?

2009-05-25 Thread Thomas Broyer



On 25 mai, 15:59, dduck anders.johansen.a...@gmail.com wrote:
 Hi,

 I have implemented a trappable command, that will show a popup in
 case of an uncaught exception during its execution. It seems that a
 stack trace is not available using the normal Java methods - at least
 not when run in a browser. Any suggestions?

Wait a bit for the next GWT; and/or contribute!
See
http://code.google.com/p/google-web-toolkit/wiki/WebModeExceptions
This is a work in progress AFAICT.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How FocusListener and KeyboardListener can share the same code?

2009-05-25 Thread Suren

Thanks Jim,

It works. I tried putting it inside the tableListener earlier. Thats
the reason it didnt work for me :-)

Thanks again
Suren

On May 25, 6:35 pm, Jim jim.p...@gmail.com wrote:
 dataGrid.addTablelistener {
   public void onCellClicked(SourcesTableEvents sender, final int
 row,final int cell) {
    textBox.addFocusListener(new FocusListenerAdapter() {
        public void onLostFocus(Widget sender) {
               callDB(...);//pass whatever you want based on sender
       }
    });

   textBox.addKeyboardListener(new KeyboardListenerAdapter() {
         public void onKeyPress(Widget sender,char keyCode, int
 modifiers) {
                 callDB(...);//pass whatever you want
          }
   });

 });

 private void callDB(...) {//must be outside of
 dataGrid.addTablelistener

 }

 Please see the above code. If you are not satisfied with the above
 code, you can use one class that implements FocusListener and
 KeyboardListener.

 Jim

 http://www.gwtorm.com- GWT ORMhttp://code.google.com/p/dreamsource-orm/

 On May 25, 8:51 am, Suren nsurendi...@gmail.com wrote:



  Hi All,

  I am using a datagrid which has a table listener and when I click on
  any cell, I am adding a textbox to that cell by copying the text from
  the cell to the textbox. After editing the cell if I press ENTER key
  or move the focus from the textbox I am copying the value back to the
  cell and invoking the database update.

  Here is how my code look like

  dataGrid.addTablelistener {
    public void onCellClicked(SourcesTableEvents sender, final int
  row,final int cell) {

     //code for copying the cell text to text box
     //having a listener to that textbox

     textBox.addFocusListener(new FocusListenerAdapter() {
         public void onLostFocus(Widget sender) {

            //code for DB update

        }
     });

    textBox.addKeyboardListener(new KeyboardListenerAdapter() {
          public void onKeyPress(Widget sender,char keyCode, int modifiers) {

                      //code for DB update

           }
    });

  });

  Here my doubt or concern is that...in both onLostFocus and onKeyPress
  I am using the same code for Database update.

  how can I make that code into a single method and call in both the
  places. So that I can avoid redundancy of code in two places.

  When I try to do that inside oncellDoubleclicked, the scope is not
  read..
  When I try to write outside oncellDoubleclicked, then also I am not
  getting the method inside these two methods(KeyPress and LostFocus)

  Any help or advise would be appreciated

  Thanks
  Suren- 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-05-25 Thread Bobby

Eric, what is the svn:externals read-only path for the AjaxLoader
source? I tried the following with no success (probably because the
link is not read-only and i don't have checkout access):

ajaxloader http://gwt-google-apis.googlecode.com/svn/trunk/ajaxloader/src/

Bobby


On May 20, 5:21 pm, Bobby bobbysoa...@gmail.com wrote:
 Thanks for the tips Eric.

 - I noticed that newInstance was used in Google Maps so i'm adopted
 the same convention.

 - I see what you mean about exception handling. I'll make use of your
 ExceptionHelper for Runnables. For the AsyncCallbacks, i'll try to
 mirror your ExceptionHelper implementation.

 - When generating the overloads i plug undefined in place of omitted
 optional parameters. Methods with only one parameter were causing the
 single undefined parameter you pointed out, this will be gone after
 polishing.

 I have another batch of questions/comments coming up - there's one
 class in GData, the base class for all service classes, which requires
 some thought since it has methods that may receive constructors (for
 example GetFeed, which receives the constructor of the feed to be
 returned). How this class is implemented has some implications on the
 classes that extend it. I'll have the auto-generated GWT library up
 sometime next week, this way i'll be able to link to the GWT and JS
 classes and hopefully get some more feedback on the implementation -
 not so much on the JSNI code but on the architecture/structure of the
 library.

 I'm also attempting to auto-generating base Unit tests for each class
 - most classes are data classes, so Unit tests are straightforward
 enough (e.g. call each setter, call the corresponding getter, check
 that the gotten value is the set value). The service classes
 themselves, which retrieve and update data in the various systems are
 more difficult, i don't have a plan for those, there will probably be
 some manual labor but it's not the end of the world if it comes to
 that.

 Bobby

 On May 18, 3:30 pm, Eric Ayers zun...@google.com wrote:



  Hi Bobby,

  Thanks for the update, here is some feedback inline.  Sorry for the
  delay, I was out last week.

  On Mon, May 11, 2009 at 3:17 AM, Bobby bobbysoa...@gmail.com wrote:

   I'm very close, i've just compiled a GData JS example via the GData
   GWT library - which retrieves a Calendar feed - and it worked.

   Here are some of the implementation choices i've made so far:
   - map all namespaces to be under com.google.gwt.gdata.client.*
   - map all Object parameters to JavaScriptObject (some GData functions
   receive generic JS objects for initialization purposes).
   - implement JS classes as Overlay Types
   - implement class constants as JSNI methods, for example:
    public static native String REL_MESSAGE_TO() /*-{ return
   $wnd.google.gdata.Who.REL_MESSAGE_TO; }-*/;
   - implement constructors as JSNI methods (since i'm using Overlay
   Types), for example:
    public static native Who construct() /*-{ return new
   $wnd.google.gdata.Who(undefined); }-*/;

  In the gwt-google-apis, I have been naming these factory methods
  newInstance() or getInstance() for constructing singletons.  This
  comes from convention in the JRE and Joshua Bloch's Effective Java.

   - generate overloads for methods that have optional parameters or
   multi-type parameters in JS, for example:
    public final native void setValueString(String valueString) /*-
   { this.setValueString(valueString); }-*/;
    public final native void setValueString() /*-{ this.setValueString
   (undefined); }-*/;
   - implement continuation callbacks (non success/failure) as Runnable,
   for example:
    public static final native boolean getInfo(Runnable callback) /*-
   { return $wnd.google.accounts.user.getInfo(function()
   { callba...@java.lang.runnable::run()(); }); }-*/;

  This is good, but in order to display exceptions in Hosted mode, a
  more complex pattern is needed.  Essentially, you need to call a
  special handler for exceptions in hosted mode.  A particularly nice
  implementation of this is the Handler class in gwt-visualization which
  uses the ExceptionHelper class in the ajaxloader package.

 http://code.google.com/p/gwt-google-apis/source/browse/releases/visua..

  I usually pull the ajaxloader class into the other gwt-google-api
  projects using an svn:externals property if you haven't done that
  already.

   - implement success/failure callbacks as AsyncCallbackT, for
   example:
    public final native CalendarAclFeed getAclFeed(String uri,
   AsyncCallbackCalendarAclFeed callback) /*-{
         return this.getAclFeed(uri, function(result)
   { @com.google.gwt.gdata.client.impl.Utils::handleSuccessCallback(Lcom/
   google/gwt/user/client/rpc/AsyncCallback;Ljava/lang/Object;)(callback,
   result); }, function(error)
   { @com.google.gwt.gdata.client.impl.Utils::handleFailureCallback(Lcom/
   google/gwt/user/client/rpc/AsyncCallback;Ljava/lang/String;)(callback,
   error); });
   

Re: GWT best Practices - JS Library Wrappers Overlay Types

2009-05-25 Thread Bobby

This is the gwt-gdata project http://code.google.com/p/gwt-gdata/. The
code auto-generated from the JS Docs is available:
http://code.google.com/p/gwt-gdata/source/browse/

I uploaded that code mostly for the sake of pointing to it and getting
feedback, there are corrections to be made - though it does compile
and of the unit tests (1 per class) most succeed (187/239) though
these unit tests aren't that involved. It should be a good starting
point.

I still need to plug the ExceptionHelper and ArrayHelper from the
AjaxLoader (have a few questions on this one) into the code and
extract the parameter and return value comments from the JS Docs.

Currently i'm not handling Arrays properly and this came out in the
unit tests. For example in the RecurrenceExceptionEntry (http://
code.google.com/p/gwt-gdata/source/browse/trunk/gdata/src/com/google/
gwt/gdata/client/RecurrenceExceptionEntry.java), the getWhen,
getWhere, getWho, setWhen, setWhere, setWho have return and receive
Java arrays - needs to use JsArrayT instead (through the
ArrayHelper).

I should probably create a new thread for discussing the GWT-GData
project in specific.

Bobby

On May 25, 11:32 pm, Bobby bobbysoa...@gmail.com wrote:
 Eric, what is the svn:externals read-only path for the AjaxLoader
 source? I tried the following with no success (probably because the
 link is not read-only and i don't have checkout access):

 ajaxloaderhttp://gwt-google-apis.googlecode.com/svn/trunk/ajaxloader/src/

 Bobby

 On May 20, 5:21 pm, Bobby bobbysoa...@gmail.com wrote:



  Thanks for the tips Eric.

  - I noticed that newInstance was used in Google Maps so i'm adopted
  the same convention.

  - I see what you mean about exception handling. I'll make use of your
  ExceptionHelper for Runnables. For the AsyncCallbacks, i'll try to
  mirror your ExceptionHelper implementation.

  - When generating the overloads i plug undefined in place of omitted
  optional parameters. Methods with only one parameter were causing the
  single undefined parameter you pointed out, this will be gone after
  polishing.

  I have another batch of questions/comments coming up - there's one
  class in GData, the base class for all service classes, which requires
  some thought since it has methods that may receive constructors (for
  example GetFeed, which receives the constructor of the feed to be
  returned). How this class is implemented has some implications on the
  classes that extend it. I'll have the auto-generated GWT library up
  sometime next week, this way i'll be able to link to the GWT and JS
  classes and hopefully get some more feedback on the implementation -
  not so much on the JSNI code but on the architecture/structure of the
  library.

  I'm also attempting to auto-generating base Unit tests for each class
  - most classes are data classes, so Unit tests are straightforward
  enough (e.g. call each setter, call the corresponding getter, check
  that the gotten value is the set value). The service classes
  themselves, which retrieve and update data in the various systems are
  more difficult, i don't have a plan for those, there will probably be
  some manual labor but it's not the end of the world if it comes to
  that.

  Bobby

  On May 18, 3:30 pm, Eric Ayers zun...@google.com wrote:

   Hi Bobby,

   Thanks for the update, here is some feedback inline.  Sorry for the
   delay, I was out last week.

   On Mon, May 11, 2009 at 3:17 AM, Bobby bobbysoa...@gmail.com wrote:

I'm very close, i've just compiled a GData JS example via the GData
GWT library - which retrieves a Calendar feed - and it worked.

Here are some of the implementation choices i've made so far:
- map all namespaces to be under com.google.gwt.gdata.client.*
- map all Object parameters to JavaScriptObject (some GData functions
receive generic JS objects for initialization purposes).
- implement JS classes as Overlay Types
- implement class constants as JSNI methods, for example:
 public static native String REL_MESSAGE_TO() /*-{ return
$wnd.google.gdata.Who.REL_MESSAGE_TO; }-*/;
- implement constructors as JSNI methods (since i'm using Overlay
Types), for example:
 public static native Who construct() /*-{ return new
$wnd.google.gdata.Who(undefined); }-*/;

   In the gwt-google-apis, I have been naming these factory methods
   newInstance() or getInstance() for constructing singletons.  This
   comes from convention in the JRE and Joshua Bloch's Effective Java.

- generate overloads for methods that have optional parameters or
multi-type parameters in JS, for example:
 public final native void setValueString(String valueString) /*-
{ this.setValueString(valueString); }-*/;
 public final native void setValueString() /*-{ this.setValueString
(undefined); }-*/;
- implement continuation callbacks (non success/failure) as Runnable,
for example:
 public static final native boolean getInfo(Runnable 

Re: Silly bug or miracle? FormPanel doesn't send request to server.

2009-05-25 Thread Sunny

Hi there, I'm coming across an identical problem I think.

I thought it might have been Firefox caching the request and not
sending it, so I added a hidden field into the form that would contain
a timestamp in the onSubmit event but it didn't work. Could you please
share with me what you found the problem to be?


regards,
Sunny



On Apr 26, 11:05 pm, serega.shey...@gmail.com
serega.shey...@gmail.com wrote:
 My form doesn't want to send request (watching its activity 
 throughFirefoxFirebug)
 This is my client code:

 public class UploadForm extendsFormPanel{
     private HorizontalPanel content = new HorizontalPanel();
     private Label uploadLabel= new Label(Choose file);
     private FileUpload fileUpload = new FileUpload();
     private Button uploadButton = new Button(Upload);

     public UploadForm(){
         super();
         this.setAction(/data/uploadfile);
         this.setEncoding(FormPanel.ENCODING_MULTIPART);
         this.setMethod(FormPanel.METHOD_POST);
         this.setWidget(content);

         fileUpload.setName(fileUpload);

         content.add(uploadLabel);
         content.add(fileUpload);
         content.add(uploadButton);

         uploadButton.addClickHandler(new ClickHandler() {
             public void onClick(ClickEvent event) {
                 UploadForm.this.submit();
             }
         });

         this.addSubmitHandler(new SubmitHandler() {
             public void onSubmit(SubmitEvent event) {
                 Window.alert(onSubmit);
             }
         });

         this.addSubmitCompleteHandler(new SubmitCompleteHandler() {
            public void onSubmitComplete(SubmitCompleteEvent event) {
                 Window.alert(onSubmitComplete);
             }
         });

     }

 }

 So, I see my Form in the HTML code (taken using FireBug):

 form target=FormPanel_1 action=/data/uploadfile
 enctype=multipart/form-data method=post
     table cellspacing=0 cellpadding=0
         tbody
             tr
                 td align=left style=vertical-align: top;
                     div class=gwt-LabelChoose file/div
                 /td
                 td align=left style=vertical-align: top;
                     input type=file class=gwt-FileUpload/
                 /td
                 td align=left style=vertical-align: top;
                     button tabindex=0 type=submit class=gwt-
 ButtonUpload/button
                 /td
             /tr
         /tbody
     /table
 /form

 As you can see it's real form with multipart and method post

 BUT!
 When clicking on the button, I get first Window.alert(onSubmit); and
 then second Window.alert(onSubmitComplete);

 Form doesn' sends request!!!
 I don't see any requests in FireBug (but I have to), My Tomcat server
 keeps silence, but it has to write into log somrthing like: resource
 is not found

 Is it a miracle or stupid mistake?
 Please help me to overcome this difficulty.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT and Java Error .Help Please.

2009-05-25 Thread jeeva

i had encounter an error on gwt . i can't find what it means. please
give some gudielines.
Have look at my error below.
adv thxs friends.



[ERROR] Failure to load module 'com.gwtbook.Gadgets'
java.lang.UnsupportedClassVersionError: Bad version number in .class
file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.google.gwt.dev.javac.JdtCompiler$INameEnvironmentImpl.findType
(JdtCompiler.java:140)
at com.google.gwt.dev.javac.JdtCompiler$INameEnvironmentImpl.findType
(JdtCompiler.java:125)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType
(LookupEnvironment.java:122)
at
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage
(PackageBinding.java:178)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:
2187)
at com.google.gwt.dev.javac.LongFromJSNIChecker
$CheckingVisitor.findClass(LongFromJSNIChecker.java:188)
at com.google.gwt.dev.javac.LongFromJSNIChecker
$CheckingVisitor.getMethod(LongFromJSNIChecker.java:223)
at com.google.gwt.dev.javac.LongFromJSNIChecker
$CheckingVisitor.checkMethodRef(LongFromJSNIChecker.java:100)
at com.google.gwt.dev.javac.LongFromJSNIChecker
$CheckingVisitor.checkRefs(LongFromJSNIChecker.java:140)
at com.google.gwt.dev.javac.LongFromJSNIChecker
$CheckingVisitor.endVisit(LongFromJSNIChecker.java:63)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse
(MethodDeclaration.java:247)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse
(TypeDeclaration.java:1222)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse
(CompilationUnitDeclaration.java:518)
at com.google.gwt.dev.javac.LongFromJSNIChecker.check
(LongFromJSNIChecker.java:307)
at com.google.gwt.dev.javac.LongFromJSNIChecker.check
(LongFromJSNIChecker.java:297)
at
com.google.gwt.dev.javac.CompilationUnitInvalidator.validateCompilationUnits
(CompilationUnitInvalidator.java:138)
at com.google.gwt.dev.javac.CompilationState.compile
(CompilationState.java:123)
at com.google.gwt.dev.cfg.ModuleDef.updateTypeOracle(ModuleDef.java:
477)
at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:324)
at com.google.gwt.dev.GWTShell
$BrowserWidgetHostImpl.createModuleSpaceHost(GWTShell.java:252)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
(BrowserWidgetIE6.java:72)
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)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit

2009-05-25 Thread codesite-noreply

Comment by mark.renouf:

Well, I got things to work... once. Most times my App seems to launch and  
loads the index page and selection script (.nocache.js) but then nothing  
happens. It doesn't seem to connect back to the HostedMode server.

If I reload, I get a JS error (as displayed in firebug):

document.body is null
http://localhost:/UI/UI.nocache.js
Line 186

Which is the line:
 document.body.appendChild(scriptFrame);

 From function fetchCompiledScript() in the selection script.

Any ideas?

I still don't know what I did to get it to work once. But I know it had  
come up with the above JS error and I hit Shift-Reload and I saw a  
connection in the HostedMode app, and my GWT app started up in Firefox and  
worked fine. But it died again when my app tried to open a new window. :-(


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM

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



[gwt-contrib] Comment on UsingOOPHM in google-web-toolkit

2009-05-25 Thread codesite-noreply

Comment by hbrucejohnson:

OOPHM is broken on pre-Safari 4 and at least IE6/IE7 at the moment. We  
suspect r5393 broke it, and a fix is being investigated.


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM

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



[gwt-contrib] Re: GWT-RPC broken in GAE/J

2009-05-25 Thread philip andrew
Hi Brendan,

Just to follow up - I use DTO (Data Transfer Objects) to transfer the data
back and forward.
I use BeanUtils.copyProperties(obj, dto); as the data goes to the client and
comes back to the server.

Also use this key strategy in the JDO class:
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true)
private String encodedKey;
@Extension(vendorName=datanucleus, key=gae.pk-name, value=true)
private String keyName;

I'm using it but it doesn't mean I'm happy about it - don't see what else I
can do.

I've used JBoss SEAM which has a nice way to have conversations and
binding to the UI. Also between FLEX and JBoss SEAM I've used GraniteDS,
these have very advanced bindings between the database and the user
interface.
Someone should consider these when thinking about binding GWT with Google
App Engine, as they have much more advanced and easier binding strategies.

Thanks, Philip


On Tue, Apr 28, 2009 at 8:09 AM, brendan brendanpdohe...@gmail.com wrote:


 It's sounds like Philip is describing me.  I've said GWT and GAE/J
 looks impressive, I want to put them together and make an nice app.

 In my test application i'm creating, I want to have a grid of
 customers that has new, edit and delete buttons.

 A customer has a name and an email.

 I've created a customer class on the server that has name and email as
 strings, with getters/setters.

 I've created an RPC service that has the following methods:
   ListCustomer list()
   Customer create(Customer customer)
   void update(Customer customer)
   void delete(Customer customer)

 Initially list was returning a hard coded list, and I put some
 breakpoints in the other methods to see that objects were successfully
 being passed over RPC.

 Everything seemed to work and I was thinking this GWT+GAE/J stuff is
 pretty awesome.

 Then I tried to add persistence, and things stopped working.
 I added the @PersistenceCapable annotation to my customer class, along
 with an extra id attribute that had an @PrimaryKey annotation.

 When I try to return the results of a query.execute() (casted to
 ListCustomer) I got the following error.

 SEVERE: [1240842247754000] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.client.rpc.SerializationException: Type
 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
 included in the set of types which can be serialized by this
 SerializationPolicy or its Class object could not be loaded. For
 security purposes, this type will not be serialized.

 I fiddled around a bit more and found that if I copied Customers out
 of the list returned by query.execute to a new list (using the
 detachCopy method) and returned that, I could populate my grid.

 However when it comes time to saving/deleting Customers, I tried
 reattaching by calling makePersistant, it wouldn't work I got more
 errors.

 Pretty much, I'm a javascript/c++/c#.net programmer coming to GWT and
 GAE/J, I want to put them together and make an nice app.

 If I want things to work right now, what is best practice for having
 persistent objects on the server, and sending the data back and forth
 from the server to the client.

 Brendan

 On Apr 15, 6:40 pm, philip philip14...@gmail.com wrote:
  Thats fine your debating how best to do it for the longer term, and
  thats great for the longer term. How about now today? how best can I
  do it now?
 
  For the shorter term I am sure there is a bunch of people who look at
  this and think, I've got GWT and Google App Engine, I want to put them
  together and make an nice app, then they come across these
  discussions. Alternatively, they try to serialize the JDO classes and
  find they have problems. Either way, they hit the ugly wall.
  They probably wonder why GWT and App Engine are not such good friends
  such it would make a great programming platform and boost GWT.
 
  ...
 
  Thanks, Philip

 


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