Should i use incubator FastTree or the Tree from the GWT dist.?

2010-08-12 Thread Subhrajyoti Moitra
Hello,
I am trying to use a tree widget to render some items.
Should i use the FastTree widget in incubator project or the main Tree
widget from the GWT dist. ?

Please advice, if you know of other better tree widget implementation.

Thanks,
Subhro.

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



Re: Who knows how to execute native code in server-side

2010-08-12 Thread cokol
to invoke a OS process by Java is a part-of Java and its VM not GWT!

so ensure JDK runtimes are on the classpath (as Yingwei said, uncheck
app engine) and remember, GAE does not support it

On 12 Aug., 04:26, Yingwei HU husi...@gmail.com wrote:
 uncheck the app engine option when creating the project...so simple

 2010/8/6, Yingwei HU husi...@gmail.com:



  Hello, all.
  Who knows how to execute native code in server-side?
  There is  no Runtime class in gwt.
  I either can not use system.load(lib) to recall the outside dll due to
  security control.
  What can I do to solve this problem?
  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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT security

2010-08-12 Thread cokol
its a way it works, like Greg said - a dumb client should not worry,
or better said not be too serious about security, everything what
happens on the client is INSECURE, so the only security concern it
should think about is to make the security look good to its user.

the real security should always reside on the backend, client shall
NEVER get a data from the server for unauthorized user so that client
can make decisions on its own - either to display the data or not.


On 11 Aug., 23:54, Peter Simun si...@seges.sk wrote:
 Hi Greg,

 thanks for the answer. Who casers? Users cares!

 Let's imagine that you will modify all the data you are able to
 modify (as an user of the application) and the the server will
 response you, that you are not allowed to modify them! Are you
 satisfied with that solution? Is that a common approach?

 Isn't that solution that you have client state consistent with your
 server implementation cool? Never wanted this kind of solution?
 Second thing: what about the session handling in your GWT
 applications? What if acris can handle this for you transparently?
 And finally: properly secured server ... what is that? I can say,
 this common approaches are coupled in the acris-security project and
 well tested in the real environment.

 Do you thing this is not enought?

 Peter

 On 11. Aug, 23:31 h., Greg Dougherty dougherty.greg...@mayo.edu
 wrote:



  Hi Peter.

  Not to be rude, but who cares?

  Who cares if the user can see a screen that says Client Data, when
  the user can't actually download any of that client data?

  IOW, what's the point?  If your sever is properly secured, then users
  who aren't allowed to see the client data won't be sent it, and users
  who aren't allowed to modify the data will have their modification
  requests denied.  If it isn't properly secured, then what AcrIS does
  is pointless. no?

  Yes, it's nice from the UI perspective to let the user know why they
  can't see / change the data, but what in the world does that have to
  do with security?

  Greg

  On Aug 11, 9:33 am, Peter Simun si...@seges.sk wrote:

   Hi Stefan,

   of course, client side code could never be secured! AcrIS security
   fully depends also on securing the RPC services (on the server side,
   client side security is an complementary security - some kind of nice
   to have security)
   The goal is: if the user does not have rights to see some parts of the
   screens, it won't be displayed. If the user is not able to modify the
   data, he will see the readonly components.
   Anyway, server side security is also checking if the user is able to
   execute methods or if he is able to modify/see data he are reguesting.

   This coupled approached gives you completly secured solution for GWT
   applications.

   Peter

   On 11. Aug, 16:07 h., Stefan Bachert stefanbach...@yahoo.de wrote:

Hi Peter,

I had just a glance at acris.
Acris is talking about a client side part.

No mechanism which depends on client side code could be secure!

So I would suspect acris to be a misconsception.
At  the moment I do not spend time to exactly find out what is wrong
with acris.

Stefan Bacherthttp://gwtworld.de

On 11 Aug., 15:47, Peter Simun si...@seges.sk wrote:

 Luis, why do you think that there is no security there?

 Please, read the article again and carefully, or go on the wiki 
 pages:http://code.google.com/p/acris/wiki/Security

 Peter

 On 11. Aug, 14:04 h., Luis Daniel Mesa Velasquez

 luisdanielm...@gmail.com wrote:
  I don't see anything about the encryption used in the RPC call to 
  the
  userservice... so it's just a fancy 3rd party RPC call, no security
  there...

  On Aug 10, 3:20 am, Peter Simun si...@seges.sk wrote:

   Hi all,

   I just wanted to share with you the article about security in GWT
   application.http://java.dzone.com/articles/securing-gwt-client-acris

   Serious security implementation is something that was missing 
   almost
   to each GWT developer. I saw many topics here in the forum about 
   the
   security, so maybe it will helps you to implement security in a
   correct way.

   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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
Application bugs when the code is reached, i tried DefferedCommand and
i even tried to launch it with a button...
Debug mode won't give me any explaination.

It's been three days i'm on it and i can't see any sunbeam :)

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



Re: How do you use @sprite's and ui:image in UiBinder ui.xml templates?

2010-08-12 Thread Andrew Hughes
Thanks for all your help Nicolas..

here's a brief summary of anyone looking to for a few hints (NOTE
failWhale.png is located in the same directory as the ui.xml).

!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
xmlns:g=urn:import:com.google.gwt.user.client.ui
ui:data field=failWhaleData src=failWhale.png/
ui:image field=failWhaleImage src=failWhale.png/
ui:style
   @sprite .imageSprite {
  gwt-image: 'failWhaleImage'
   }
/ui:style
g:VerticalPanel ui:field=panel
   g:SimplePanel addStyleNames={style.imageSprite}/
   g:Image resource={failWhaleImage}/
   g:Label text={failWhaleImage.getURL}/
   g:Label text={failWhaleImage.getName}/
/g:VerticalPanel
/ui:UiBinder


On Mon, Aug 9, 2010 at 3:00 PM, Nicolas ANTONIAZZI 
nicolas.antonia...@gmail.com wrote:

 Sorry, I forgot something in my previous mail.

 The correct syntax for the Image tag that reference an image resource is :

 ui:image field=onImage src=on.png/
 g:Image resource=*{*onImage*}* /

 p.s. you said Width/Height will be automatically written in your css
 class, you do not need to do any reference on it. this is probably true for
 an img but what about applying a gwt-image on a Panel (background). I
 would not expect the Panel to have it's size set based on the back ground
 image's size (even if it is what I want) :)


 Yes, that might be a problem in some case. You should be able to override
 the value from css if you wish.
 In some case, you might want to let the css default width.

 In this case, you should use DataRessource instead of ImageRessource. To
 declare this from uiBinder, the correct syntax is :

 *ui:data* field=*myResource* src=on.png

 style

 *...@url myResourceUrl myResource;*


 .myPanel {
   background: *myResourceUrl*;
 }

 /style

 Here, the image will be referenced without forcing width/height.


 2010/8/9 Andrew Hughes ahhug...@gmail.com

 Thanks Nicolas - I think I am very close

 I'm trying this (very simple)...

 ui:image field=onImage src=on.png/

 g:Image resource=onImage/

 But, computer say's no :) or more specifically...  00:31:09.750 [ERROR]
 Cannot parse value: onImage as type ImageResource

 I have both the ui.xml and the png in the same directory, perhaps this is
 wrong?
 ./MyWidget.ui.xml
 ./on.png


 CHEERS :)

 p.s. you said *Width/Height will be automatically written in your css
 class, you do not need to do any reference on it*. this is probably true
 for an img but what about applying a gwt-image on a Panel (background). I
 would not expect the Panel to have it's size set based on the back ground
 image's size (even if it is what I want) :)

 On Fri, Aug 6, 2010 at 5:55 PM, Nicolas ANTONIAZZI 
 nicolas.antonia...@gmail.com wrote:

 Width/Height will be automatically written in your css class, you do not
 need to do any reference on it.

 2010/8/6 Nicolas ANTONIAZZI nicolas.antonia...@gmail.com

 Hi,

 The right syntax is :
 *ui:image field=activeImage src=active.png/*
 * **ui:image field=deactiveImage src=active.png/*

 Then, simply use :

 *...@sprite .active {*
 *gwt-image: 'activeImage';*
 * }*
 *

 @sprite .deactive {
 gwt-image: 'deactiveImage';
  }


 Moreover, If you wish to directly use an image ( img/img) instead of
 a background css image, you can do :

  g:Image resource=activeImage /
  g:Image resource=deactiveImage /



 *
 2010/8/6 Andrew Hughes ahhug...@gmail.com

 Hi Guys,

 I can't find any doco, so help would be great! I want to set some
 background gwt-image's inside my ui.xml's ui:style

 Easiest way to ask my question is to show you what is not working :)

 !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
 xmlns:g=urn:import:com.google.gwt.user.client.ui
  *ui:image field=activeImage resource=active.png/*
 * **ui:image field=deactiveImage resource=active.png/*
 ui:style type=com.acme.Style

 *...@sprite .active {*
 *width: value('activeImage.getWidth','px');*
 *height: value('activeImage.getHeight','px');*
 *gwt-image: 'activeImage';*
 *}*

  *   @sprite .deactive {*
 *width: value('deactiveImage.getWidth','px');*
 *height: value('deactiveImage.getHeight','px');*
 *gwt-image: 'deactiveImage';*
 *}*

 /ui:style
  g:HorizontalPanel
g:HTMLPanel ui:field=active
 addStyleNames={style.deactive}/
 /g:HorizontalPanel
 /ui:UiBinder

 Questions

1. I'm trying to avoid external css files here and do it all in the
ui.xml, perhaps this is not possible
2. How are ui:image resource's defined/referenced? What are the
rules on the resource=
3. How is the ui:image field associated with the @sprite? Do I
have this right
4. How can I get the width/height of the image (as 

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
i would use appropriate API for either maps but control them from
above, from the DOM of the browser, so first I'd create two DIV
containers and bind GMaps or OpenLayers to each, depending on the user
selection you can make the one or another container invisible, BUT you
should not consider to clean or remove the maps widgets from the DOM,
just make them disappear by CSS.

as for loading JS code on demand, I'd rather write this subroutine in
JSNI then callback the GWT part to pass control over, this way you
hide the dirty things from GWT - it will work for sure. So just
write your SCRIPTing tag JS loader but in JavaScript as native method.

On 12 Aug., 09:19, Vincent COROLLEUR vcoroll...@gmail.com wrote:
 Application bugs when the code is reached, i tried DefferedCommand and
 i even tried to launch it with a button...
 Debug mode won't give me any explaination.

 It's been three days i'm on it and i can't see any sunbeam :)

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



Re: Reading a local file

2010-08-12 Thread cokol
actually, its the way you look for, you can also make a classic
FileUpload using just HTML forms and write own servlet to save/parse
the contents and to return the results in old-web manner (full page
reload)

On 11 Aug., 23:22, Greg Dougherty dougherty.greg...@mayo.edu wrote:
 My users want my app to be able to read data from a local file.  So
 far as I can tell, the only way to do this is to have a FileUpload
 Widget in a form, send the contents of the file to the server, and
 then get the contents from the server (i.e. send the form with a
 unique ID attached, then make an RPC call asking for the contents of
 the file with that unique ID).

 Is there another way to do this?  Does there exist sample code on how
 to do this?

 TIA,

 Greg

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



Re: GWT security

2010-08-12 Thread Peter Simun
I'm not talking about the data. Secured data, that user is not allowed
to minupulate with, are not sent to client! This logic is done on the
server side security implementation.
I'm talking about displaying the screens and securing the components:
- like if the user is not able to maintain users, he will not see the
menu item user maintenance on the application menu
- if the user is able to view users, but not modify the fields, he
will see the readonly form (just for view purposes)

Everything just by annotate UI components with @Secured annotation

Peter

On 12. Aug, 09:17 h., cokol eplisc...@googlemail.com wrote:
 its a way it works, like Greg said - a dumb client should not worry,
 or better said not be too serious about security, everything what
 happens on the client is INSECURE, so the only security concern it
 should think about is to make the security look good to its user.

 the real security should always reside on the backend, client shall
 NEVER get a data from the server for unauthorized user so that client
 can make decisions on its own - either to display the data or not.

 On 11 Aug., 23:54, Peter Simun si...@seges.sk wrote:

  Hi Greg,

  thanks for the answer. Who casers? Users cares!

  Let's imagine that you will modify all the data you are able to
  modify (as an user of the application) and the the server will
  response you, that you are not allowed to modify them! Are you
  satisfied with that solution? Is that a common approach?

  Isn't that solution that you have client state consistent with your
  server implementation cool? Never wanted this kind of solution?
  Second thing: what about the session handling in your GWT
  applications? What if acris can handle this for you transparently?
  And finally: properly secured server ... what is that? I can say,
  this common approaches are coupled in the acris-security project and
  well tested in the real environment.

  Do you thing this is not enought?

  Peter

  On 11. Aug, 23:31 h., Greg Dougherty dougherty.greg...@mayo.edu
  wrote:

   Hi Peter.

   Not to be rude, but who cares?

   Who cares if the user can see a screen that says Client Data, when
   the user can't actually download any of that client data?

   IOW, what's the point?  If your sever is properly secured, then users
   who aren't allowed to see the client data won't be sent it, and users
   who aren't allowed to modify the data will have their modification
   requests denied.  If it isn't properly secured, then what AcrIS does
   is pointless. no?

   Yes, it's nice from the UI perspective to let the user know why they
   can't see / change the data, but what in the world does that have to
   do with security?

   Greg

   On Aug 11, 9:33 am, Peter Simun si...@seges.sk wrote:

Hi Stefan,

of course, client side code could never be secured! AcrIS security
fully depends also on securing the RPC services (on the server side,
client side security is an complementary security - some kind of nice
to have security)
The goal is: if the user does not have rights to see some parts of the
screens, it won't be displayed. If the user is not able to modify the
data, he will see the readonly components.
Anyway, server side security is also checking if the user is able to
execute methods or if he is able to modify/see data he are reguesting.

This coupled approached gives you completly secured solution for GWT
applications.

Peter

On 11. Aug, 16:07 h., Stefan Bachert stefanbach...@yahoo.de wrote:

 Hi Peter,

 I had just a glance at acris.
 Acris is talking about a client side part.

 No mechanism which depends on client side code could be secure!

 So I would suspect acris to be a misconsception.
 At  the moment I do not spend time to exactly find out what is wrong
 with acris.

 Stefan Bacherthttp://gwtworld.de

 On 11 Aug., 15:47, Peter Simun si...@seges.sk wrote:

  Luis, why do you think that there is no security there?

  Please, read the article again and carefully, or go on the wiki 
  pages:http://code.google.com/p/acris/wiki/Security

  Peter

  On 11. Aug, 14:04 h., Luis Daniel Mesa Velasquez

  luisdanielm...@gmail.com wrote:
   I don't see anything about the encryption used in the RPC call to 
   the
   userservice... so it's just a fancy 3rd party RPC call, no 
   security
   there...

   On Aug 10, 3:20 am, Peter Simun si...@seges.sk wrote:

Hi all,

I just wanted to share with you the article about security in 
GWT
application.http://java.dzone.com/articles/securing-gwt-client-acris

Serious security implementation is something that was missing 
almost
to each GWT developer. I saw many topics here in the forum 
about the
security, so maybe it will helps you to implement security in a
correct way.

Peter

-- 
You received this message 

Re: Excessive number of property descriptors

2010-08-12 Thread Gard Vaaler
Den 11. aug. 2010 kl. 15.28 skrev Fernando:

 split it into multiple files

This isn't hand-coded -- GWT is writing the setupBeanInfo method. Is there some 
sort of switch or toggle?

-- 
Gard

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



Re: Does Timer class only last one session + images as an attachment in an email

2010-08-12 Thread cokol
you should not read the images from datastore using HTTP but rather
use the API for that, if you really want first to load a stream from a
HTTP connection and then put its contents into a message, then
consider using URL().open() since GAE does not permit to use fileIO

On 12 Aug., 03:41, GKotta guruko...@gmail.com wrote:
 I have one more question:

 I am getting a file access denied when I try to send and image in the
 datastore as an attachment. I there any way around this?
 Code (result.get(i).getAssociatedImage is the url where it is stored
 on the database. In this case, it is http:\127.0.0.1:\image?
 title=t609i1) :
  // second part (the image)
                         messageBodyPart = new MimeBodyPart();
                         DataSource fds = new FileDataSource
                           (result.get(i).getAssociatedImage());
                         messageBodyPart.setDataHandler(new DataHandler(fds));
                         messageBodyPart.setHeader(Content-ID,image);

                         // add it
                         multipart.addBodyPart(messageBodyPart);
 Exception:
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract boolean com.***.emailAssociatedImages()' threw an
 unexpected exception: java.security.AccessControlException: access
 denied (java.io.FilePermission http:\127.0.0.1:\image?title=t609i1
 read)

 Thanks!

 On Aug 11, 1:35 pm, GKotta guruko...@gmail.com wrote:



  Thanks everyone!

  On Aug 9, 10:44 pm, Prakash prakash.masilam...@gmail.com wrote:

   @GKotta.
   If your use case is to delete images (irrespective of user) after two
   months, then cron Or timer job on server (Check Quartz) is the good
   way to go. Remember in this approach you wont have access to user
   session.

   If you need User Session to decide whether to delete or not , then you
   can use SessionListeners on Server side.
   Google for SessionListeners to know more about its use cases.

   For sending mails , use javax.mail as per @mike's reply.
   Hope this helps.

   Regards,
   Prakash M.

   On Aug 10, 3:09 am, André Moraes andr...@gmail.com wrote:

Shaffer,

This approach is a little overhead in the maintainability of the code 
(and
in the methods too, since every server call will make a extra call to 
the
database).

GKotta

To avoid access to images that is in the database but the 2 month time 
has
expired, you can make the check only in the methods that access the 
images
in the database (if using hibernate this can be an interceptor).

This will introduce overhead, but only when images are needed.

If you cannot add a cron job at your server, create an speciall url that
requires a custom login/password and when that url is accessed you run 
the
code that removes the images from the database. If possible use SSL in 
this
part of the site and don't send the username/password in the query 
string,
use the HTTP POST METHOD.

Then you can make a cron job in your computer (home or job) and create a
simple wget script that access that special url. This isn't the best
solution, but works when you don't have admin access to cron jobs in the
production server.

--
André Moraes
Analista de Desenvolvimento de Sistemas
andr...@gmail.comhttp://andredevchannel.blogspot.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Excessive number of property descriptors

2010-08-12 Thread cokol
lol this happens really seldom but is a Java feature maximum
compiled method size is 64k, like Fernando said - you have to split
the method manually or report a BUG to BeanBinder team to make a
split on big methods automatically

On 12 Aug., 09:43, Gard Vaaler g...@dataloy.com wrote:
 Den 11. aug. 2010 kl. 15.28 skrev Fernando:

  split it into multiple files

 This isn't hand-coded -- GWT is writing the setupBeanInfo method. Is there 
 some sort of switch or toggle?

 --
 Gard

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



Re: Excessive number of property descriptors

2010-08-12 Thread Gard Vaaler

Den 12. aug. 2010 kl. 09.49 skrev cokol:

 lol this happens really seldom but is a Java feature maximum
 compiled method size is 64k, like Fernando said - you have to split
 the method manually or report a BUG to BeanBinder team to make a
 split on big methods automatically

Righto. Thanks!

-- 
Gard

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



Re: Should i use incubator FastTree or the Tree from the GWT dist.?

2010-08-12 Thread Thomas Broyer


On 12 août, 08:39, Subhrajyoti Moitra subhrajyo...@gmail.com wrote:
 Hello,
 I am trying to use a tree widget to render some items.
 Should i use the FastTree widget in incubator project or the main Tree
 widget from the GWT dist. ?

 Please advice, if you know of other better tree widget implementation.

If you can, switch to GWT 2.1 (maybe wait for Milestone 3, as some
things have changed since m2, such as ListView being renamed to
HasData) and use the CellTree:
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/CellTree.html

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



Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
Hi,

I always tried with JSNI and it's the same... (Unloading module when
scipt is loading)


On Aug 12, 9:35 am, cokol eplisc...@googlemail.com wrote:
 i would use appropriate API for either maps but control them from
 above, from the DOM of the browser, so first I'd create two DIV
 containers and bind GMaps or OpenLayers to each, depending on the user
 selection you can make the one or another container invisible, BUT you
 should not consider to clean or remove the maps widgets from the DOM,
 just make them disappear by CSS.

 as for loading JS code on demand, I'd rather write this subroutine in
 JSNI then callback the GWT part to pass control over, this way you
 hide the dirty things from GWT - it will work for sure. So just
 write your SCRIPTing tag JS loader but in JavaScript as native method.

 On 12 Aug., 09:19, Vincent COROLLEUR vcoroll...@gmail.com wrote:

  Application bugs when the code is reached, i tried DefferedCommand and
  i even tried to launch it with a button...
  Debug mode won't give me any explaination.

  It's been three days i'm on it and i can't see any sunbeam :)

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



Re: GWT security

2010-08-12 Thread cokol
oh yeah, totally right , this what I mean by make security look good
to the user ;)

On 12 Aug., 09:42, Peter Simun si...@seges.sk wrote:
 I'm not talking about the data. Secured data, that user is not allowed
 to minupulate with, are not sent to client! This logic is done on the
 server side security implementation.
 I'm talking about displaying the screens and securing the components:
 - like if the user is not able to maintain users, he will not see the
 menu item user maintenance on the application menu
 - if the user is able to view users, but not modify the fields, he
 will see the readonly form (just for view purposes)

 Everything just by annotate UI components with @Secured annotation

 Peter

 On 12. Aug, 09:17 h., cokol eplisc...@googlemail.com wrote:



  its a way it works, like Greg said - a dumb client should not worry,
  or better said not be too serious about security, everything what
  happens on the client is INSECURE, so the only security concern it
  should think about is to make the security look good to its user.

  the real security should always reside on the backend, client shall
  NEVER get a data from the server for unauthorized user so that client
  can make decisions on its own - either to display the data or not.

  On 11 Aug., 23:54, Peter Simun si...@seges.sk wrote:

   Hi Greg,

   thanks for the answer. Who casers? Users cares!

   Let's imagine that you will modify all the data you are able to
   modify (as an user of the application) and the the server will
   response you, that you are not allowed to modify them! Are you
   satisfied with that solution? Is that a common approach?

   Isn't that solution that you have client state consistent with your
   server implementation cool? Never wanted this kind of solution?
   Second thing: what about the session handling in your GWT
   applications? What if acris can handle this for you transparently?
   And finally: properly secured server ... what is that? I can say,
   this common approaches are coupled in the acris-security project and
   well tested in the real environment.

   Do you thing this is not enought?

   Peter

   On 11. Aug, 23:31 h., Greg Dougherty dougherty.greg...@mayo.edu
   wrote:

Hi Peter.

Not to be rude, but who cares?

Who cares if the user can see a screen that says Client Data, when
the user can't actually download any of that client data?

IOW, what's the point?  If your sever is properly secured, then users
who aren't allowed to see the client data won't be sent it, and users
who aren't allowed to modify the data will have their modification
requests denied.  If it isn't properly secured, then what AcrIS does
is pointless. no?

Yes, it's nice from the UI perspective to let the user know why they
can't see / change the data, but what in the world does that have to
do with security?

Greg

On Aug 11, 9:33 am, Peter Simun si...@seges.sk wrote:

 Hi Stefan,

 of course, client side code could never be secured! AcrIS security
 fully depends also on securing the RPC services (on the server side,
 client side security is an complementary security - some kind of nice
 to have security)
 The goal is: if the user does not have rights to see some parts of the
 screens, it won't be displayed. If the user is not able to modify the
 data, he will see the readonly components.
 Anyway, server side security is also checking if the user is able to
 execute methods or if he is able to modify/see data he are reguesting.

 This coupled approached gives you completly secured solution for GWT
 applications.

 Peter

 On 11. Aug, 16:07 h., Stefan Bachert stefanbach...@yahoo.de wrote:

  Hi Peter,

  I had just a glance at acris.
  Acris is talking about a client side part.

  No mechanism which depends on client side code could be secure!

  So I would suspect acris to be a misconsception.
  At  the moment I do not spend time to exactly find out what is wrong
  with acris.

  Stefan Bacherthttp://gwtworld.de

  On 11 Aug., 15:47, Peter Simun si...@seges.sk wrote:

   Luis, why do you think that there is no security there?

   Please, read the article again and carefully, or go on the wiki 
   pages:http://code.google.com/p/acris/wiki/Security

   Peter

   On 11. Aug, 14:04 h., Luis Daniel Mesa Velasquez

   luisdanielm...@gmail.com wrote:
I don't see anything about the encryption used in the RPC call 
to the
userservice... so it's just a fancy 3rd party RPC call, no 
security
there...

On Aug 10, 3:20 am, Peter Simun si...@seges.sk wrote:

 Hi all,

 I just wanted to share with you the article about security in 
 GWT
 application.http://java.dzone.com/articles/securing-gwt-client-acris

 Serious security implementation is something that was missing 
 

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
lol, maybe OpenLayer detects and kills Google Maps :-)

On 12 Aug., 09:57, Vincent COROLLEUR vcoroll...@gmail.com wrote:
 Hi,

 I always tried with JSNI and it's the same... (Unloading module when
 scipt is loading)

 On Aug 12, 9:35 am, cokol eplisc...@googlemail.com wrote:



  i would use appropriate API for either maps but control them from
  above, from the DOM of the browser, so first I'd create two DIV
  containers and bind GMaps or OpenLayers to each, depending on the user
  selection you can make the one or another container invisible, BUT you
  should not consider to clean or remove the maps widgets from the DOM,
  just make them disappear by CSS.

  as for loading JS code on demand, I'd rather write this subroutine in
  JSNI then callback the GWT part to pass control over, this way you
  hide the dirty things from GWT - it will work for sure. So just
  write your SCRIPTing tag JS loader but in JavaScript as native method.

  On 12 Aug., 09:19, Vincent COROLLEUR vcoroll...@gmail.com wrote:

   Application bugs when the code is reached, i tried DefferedCommand and
   i even tried to launch it with a button...
   Debug mode won't give me any explaination.

   It's been three days i'm on it and i can't see any sunbeam :)

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



Re: Should i use incubator FastTree or the Tree from the GWT dist.?

2010-08-12 Thread Subhrajyoti Moitra
Thanks a lot Thomas.
1 quick question:
- Can i apply different node images (closed/open) at different levels of the
tree. For example the top node might have a folder icon open/close and the
children can have +/- as its open close?
Is this possible with the CellTree widget?

Thanks,
Subhro.


On Thu, Aug 12, 2010 at 1:24 PM, Thomas Broyer t.bro...@gmail.com wrote:



 On 12 août, 08:39, Subhrajyoti Moitra subhrajyo...@gmail.com wrote:
  Hello,
  I am trying to use a tree widget to render some items.
  Should i use the FastTree widget in incubator project or the main Tree
  widget from the GWT dist. ?
 
  Please advice, if you know of other better tree widget implementation.

 If you can, switch to GWT 2.1 (maybe wait for Milestone 3, as some
 things have changed since m2, such as ListView being renamed to
 HasData) and use the CellTree:

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/CellTree.html

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



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



Re: How to change a default property from a i18n .properties file

2010-08-12 Thread cokol
either to can patch it when loading the resoucebundles in the java OR
you can open the GWT JAR file with some package manager (winzip,
winrar or such), modify the file in there and close it then the
changes gonna stay there forever.

On 11 Aug., 19:19, oyepez003 oyepez...@gmail.com wrote:
 Hello!

 I am using GWT 2.0.3, but the file NumberConstant_es_VE.properties has
 an error

 The error:

 defCurrencyCode = VEB

 and should be:

 defCurrencyCode = VEF

 Somebody know how to change only this property from my project?

 Regards

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



Re: gwt voices problem

2010-08-12 Thread mariyan nenchev
Could someone answer me please?

On Wed, Aug 11, 2010 at 1:15 PM, mariyan nenchev
nenchev.mari...@gmail.comwrote:

 Hi,

 I need to play simple wav file with gwt voices. But i have problem (may be
 with plugins)...

 Here is what i do:

 // construct sound
 final SoundController sc = new SoundController();
 sound = sc.createSound(Sound.MIME_TYPE_AUDIO_BASIC,
 ServiceUtils.getClientResource().cue().getUrl());

 // onClick()
 sound.play();

 I've installed Qucktime (manually) and it works there. But in IE 7/8 it
 does not play the sound. Any ideas? Please help.

 Regards.


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



Re: gwt voices problem

2010-08-12 Thread cokol
maybe IE just worries about security? and it would help if you add
your url to trusted sites or maybe IE doesnt allow XSS so make sure
the wav file reside on same origin host where the HTML code comes from

On 12 Aug., 10:06, mariyan nenchev nenchev.mari...@gmail.com wrote:
 Could someone answer me please?

 On Wed, Aug 11, 2010 at 1:15 PM, mariyan nenchev
 nenchev.mari...@gmail.comwrote:



  Hi,

  I need to play simple wav file with gwt voices. But i have problem (may be
  with plugins)...

  Here is what i do:

  // construct sound
  final SoundController sc = new SoundController();
  sound = sc.createSound(Sound.MIME_TYPE_AUDIO_BASIC,
  ServiceUtils.getClientResource().cue().getUrl());

  // onClick()
  sound.play();

  I've installed Qucktime (manually) and it works there. But in IE 7/8 it
  does not play the sound. Any ideas? Please help.

  Regards.

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



showing all the elements from SuggestOracle in suggestionBox

2010-08-12 Thread Aditya
hi,

I want to show all elements from the suggestoracle whenever
suggestionbox recieves a focus.

I did some search for it and i found something as follows :

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2c7cf04d96a4ba1c/da7d510c07349cfe?lnk=gstq=all+suggestions+from+suggestion+box#da7d510c07349cfe

Now i m able to recieve Response

this.getSuggestOracle().requestSuggestions(request, new Callback() {
@Override
public void onSuggestionsReady(Request request, Response response) {
// here I m getting complete list from suggestoracle
}
});

I am able to get list of suggestions in this response but i dnt knw
what should i do next...?

what should be done with this response how this will help me to
populate suggestions...?

Thank you.

--
Aditya

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



Re: why we probably won't use GWT for a large UI project

2010-08-12 Thread Rob
Hi Marius,

Sorry I can't share the code as it isn't open source, however it isn't
that hard to do - just take a look at the RequestBuilder class.

Rob

On Aug 10, 10:59 am, marius.andreiana marius.andrei...@gmail.com
wrote:
 Hi Rob,

 Would you share a sample project (full source code) using REST APIs
 from plain GWT?

 Thanks all for your feedback.

 On Aug 10, 12:40 pm, Rob rob.a.st...@gmail.com wrote:

  I have developed a large app using GWT-Ext, unfortunately the
  developers of GWT-Ext then dumped it and switched to Smart-GWT. I can
  see their reasons for doing this (Ext-JS library version they used had
  some shortcomings) but it has left me a few problems. As a result of
  this I started evaluating how best to migrate away from GWT-Ext. This
  involved looking at the alternatives.

  My preferred option was to go for a pure GWT approach mainly because
  you no longer have to worry about working around problems in a wrapped
  JavaScript library - debugging these type of issues is not easy.
  Unfortunately the current pure GWT widgets just aren't good enough, so
  I have had to postpone any migration for the moment.

  Anyway to get back to the point I think that although the hybrid
  approach may be tempting in the short term, you will just be storing
  up long term support problems.

  The other option that I haven't fully explored yet is the GXT (Ext-
  GWT) approach, this is a pure GWT version of the Ext-JS library. The
  only issue I have with this approach is that it requires a commercial
  licence.

  As to your REST question, I make extensive use of this now from plain
  GWT and have no issues with it at all - in fact I've now started using
  it instead of GWT-RPC simply because it means that our other clients
  can then easily make use of the various services our server provides.

  Rob

  On Aug 10, 10:03 am, Paul Robinson ukcue...@gmail.com wrote:

   gwt-dnd works very well - you probably shouldn't use the fact that dnd
   is provided by a 3rd party library as an argument not to use GWT. I've
   not used REST, so don't know if the same would apply there, but it may.

   Good reasons for using GWT include:
   - it's in java, so you get all the java tools (good IDEs, debugging,
   refactoring etc)
   - debugging in java in your target browser is worth quite a lot
   - it generates highly optimised javascript

   I believe that with SmartGWT you lose the code splitting ability for the
   javascript parts of their library. I don't know how viable the hybrid
   approach you've mentioned is - check whether their widgets are
   compatible with vanilla gwt widgets.

   Paul

   marius.andreiana wrote:
Hi,

We're working on a large project, which has the back-end is written in
a non-Java technology, with REST APIs. We're looking for a framework
to replace the current UI.

I did a brief analysis of using GWT:
   https://docs.google.com/document/edit?id=16rQknO-r3ZqfMbuIl0R52OnFcWB...

I'm looking to get this group's feedback before I present my findings
to the team. What do you think?

Thanks,
Marius

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



Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
But even if try to load only one map dynamically, it bugs.

It works only by the static way for the moment (script tag in
index.jsp)

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



Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
maybe you make a change to a DOM node what GWT is aware of and
therefore triggers module unload?
try following function (ready to use) define the function inside JSP

script
function loadJS(url){
var loaderNode = document.createElement(script);
loaderNode.setAttribute(id,ffxep);
loaderNode.setAttribute(type,text/javascript);
(document.getElementsByTagName(head)[0]).appendChild(loaderNode);
loaderNode.setAttribute(src,url);
}
/script

and put invoker to your GWT class:

public native void loadJS(String url)/*-{
 $wnd.loadJS(url);
}-*/;

ensure you have the HEAD tag in your html, and give it a try

it has to work...

On 12 Aug., 11:01, Vincent COROLLEUR vcoroll...@gmail.com wrote:
 But even if try to load only one map dynamically, it bugs.

 It works only by the static way for the moment (script tag in
 index.jsp)

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



Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
I just tried this and it doesn't work, same problem.

I had already tried a similar thing but the JSNI was implemented in
GWT code, same problem anyway :)

I tried to put a javaScript file with basic code on tomcat and it
succed. So the problem doesn't come from the way i load the script.

I think the problem comes from the maps' javascript combined with
dynamic load from GWT. From the javaScript i try to load, there is
other call to scripts, maybe it's a problem... I think there's a
mechanism that i'm not aware.

On Aug 12, 11:18 am, cokol eplisc...@googlemail.com wrote:
 maybe you make a change to a DOM node what GWT is aware of and
 therefore triggers module unload?
 try following function (ready to use) define the function inside JSP

 script
 function loadJS(url){
         var loaderNode = document.createElement(script);
         loaderNode.setAttribute(id,ffxep);
         loaderNode.setAttribute(type,text/javascript);
         (document.getElementsByTagName(head)[0]).appendChild(loaderNode);
         loaderNode.setAttribute(src,url);}

 /script

 and put invoker to your GWT class:

 public native void loadJS(String url)/*-{
  $wnd.loadJS(url);

 }-*/;

 ensure you have the HEAD tag in your html, and give it a try

 it has to work...

 On 12 Aug., 11:01, Vincent COROLLEUR vcoroll...@gmail.com wrote:

  But even if try to load only one map dynamically, it bugs.

  It works only by the static way for the moment (script tag in
  index.jsp)

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



Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
this indeed could be the case, never seen that such things refuse to
work - but we're ont done yet, please try to defer loading the script
upon button click - just to be sure browser loaded and initialized, so
create a button and load the script from that onClickHandler()

if still would ont work, then I'd blame maps' script ;)  btw. when
serioously think about loading js on demand I'd suggest to try out
RequireJS rom http://requirejs.org/

reg,

On 12 Aug., 11:38, Vincent COROLLEUR vcoroll...@gmail.com wrote:
 I just tried this and it doesn't work, same problem.

 I had already tried a similar thing but the JSNI was implemented in
 GWT code, same problem anyway :)

 I tried to put a javaScript file with basic code on tomcat and it
 succed. So the problem doesn't come from the way i load the script.

 I think the problem comes from the maps' javascript combined with
 dynamic load from GWT. From the javaScript i try to load, there is
 other call to scripts, maybe it's a problem... I think there's a
 mechanism that i'm not aware.

 On Aug 12, 11:18 am, cokol eplisc...@googlemail.com wrote:



  maybe you make a change to a DOM node what GWT is aware of and
  therefore triggers module unload?
  try following function (ready to use) define the function inside JSP

  script
  function loadJS(url){
          var loaderNode = document.createElement(script);
          loaderNode.setAttribute(id,ffxep);
          loaderNode.setAttribute(type,text/javascript);
          (document.getElementsByTagName(head)[0]).appendChild(loaderNode);
          loaderNode.setAttribute(src,url);}

  /script

  and put invoker to your GWT class:

  public native void loadJS(String url)/*-{
   $wnd.loadJS(url);

  }-*/;

  ensure you have the HEAD tag in your html, and give it a try

  it has to work...

  On 12 Aug., 11:01, Vincent COROLLEUR vcoroll...@gmail.com wrote:

   But even if try to load only one map dynamically, it bugs.

   It works only by the static way for the moment (script tag in
   index.jsp)

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



issue of gwt2.0.3 with internet explorer 7

2010-08-12 Thread saurav
hi All,
We have developed an application on gwt2.0.3. it works fine on google
chrome and on mozilla firefox.
but with ie7 its giving problems. the login is happening and the
screens with the data from the databse is getting displayed
successfully on ie7. But there is a listbox which is not getting
displayed instead a blank line is coming.  The listbox is suppose to
have data fetched from the database table. the Listbox is working
perfectly in chrome and mozilla.
Urgent pointers needed .
Kindly help..

regards
saurav

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



Re: compile report

2010-08-12 Thread ben fenster
thats sounds good how can i do that ?

On 11 אוגוסט, 18:50, Katharina Probst kpro...@google.com wrote:
 It's possible that it's not stuck, but actually building a compile report
 for all your 42 permutations (you can look into your extra directory and see
 if it's happily outputting stuff there).  That could take a while, as it's
 going through all kinds of compilation information and building up a lot of
 html files.

 Unless you are specifically interested in comparing all your 42 compile
 reports (that would be a bit tedious...), you will probably want to restrict
 your compilation with compile reports to some key permutations, e.g., one
 per browser family.

 kathrin

 On Wed, Aug 11, 2010 at 12:16 PM, cokol eplisc...@googlemail.com wrote:
  please post your gwt.xml module descriptor

  On 11 Aug., 18:03, ben fenster fenster@gmail.com wrote:
   ?

   On 11 אוגוסט, 15:21, ben fenster fenster@gmail.com wrote:

can anyone tell me why when i compile without compile report flag the
compilation finishes ok and when i use the flag the compilation gets
stuck at the end after all the permutation is finished here is the
report:
   Compiling 42 permutations
      Compiling permutation 0...
      Compiling permutation 1...
      Compiling permutation 2...
      Compiling permutation 3...
      Compiling permutation 4...
      Compiling permutation 5...
      Compiling permutation 6...
      Compiling permutation 7...
      Compiling permutation 8...
      Compiling permutation 9...
      Compiling permutation 10...
      Compiling permutation 11...
      Compiling permutation 12...
      Compiling permutation 13...
      Compiling permutation 14...
      Compiling permutation 15...
      Compiling permutation 16...
      Compiling permutation 17...
      Compiling permutation 18...
      Compiling permutation 19...
      Compiling permutation 20...
      Compiling permutation 21...
      Compiling permutation 22...
      Compiling permutation 23...
      Compiling permutation 24...
      Compiling permutation 25...
      Compiling permutation 26...
      Compiling permutation 27...
      Compiling permutation 28...
      Compiling permutation 29...
      Compiling permutation 30...
      Compiling permutation 31...
      Compiling permutation 32...
      Compiling permutation 33...
      Compiling permutation 34...
      Compiling permutation 35...
      Compiling permutation 36...
      Compiling permutation 37...
      Compiling permutation 38...
      Compiling permutation 39...
      Compiling permutation 40...
      Compiling permutation 41...
   Compile of permutations succeeded
at this point it is stuck and the java process takes 600mb
pls 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-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: How to build a rules-based form controller for a dyn. form in GWT

2010-08-12 Thread A.Augustini
Dear Sam:

 If you like the Tohu spec (but not the implementation choice) could
 you not use their data model for describing forms? That is probably
 the most time consuming and painful to undo mistakes bit.

Tohu follows a different tech approach (server-side rule eval 
actions exec) compared to my client-side intended approach ... what I
would need is exactly their rule engine-based approach on the client
side, i.e. in JavaScript.
Nevertheless, I guess that their concepts could be taken and ported to
a JS version, basically having 'RuleSets' of 'Rules' (expressed via JS
statements) as data structures plus 'ActionSets' with N 'Action'
objects, each containing one JS function. Finaly 1 big processing
routine (the JS-implemented rules engine) for managing the 'EventBus'
and triggering (a) conditions evaluation and (a) action execution.

 Not sure I full understand the two open aspects you describe. Being an
 old geek bore I'll have a go.
 a) config for a form (probably bad interpretation).
 If lifting Tohu's data model doesn't work (wrong or licence issues)
 then I quite like your idea of starting with HTML. You can then use
 HTML5 syntax to add what you need.
 form
    input type=text name=foo class=assertNotEmpty /
    input type=text name=bar data-hiddenIf=form.foo='blah' /
 /form

Well, your interpretation of the XML syntax extension of (X)HTML5 is
right.
My real problem actually is the JS-events-to-JS-function-call(s)
wirings, a mech basically consisting of (a) condition script pieces
and (b) parameterized action functions both intended to be
*reusable* for difference use cases within one HTML document. The
configuration I meant above should better be replaced by dynamic
widget refs  widget params passing into these reusable condition
eval functions as well as action functions during each use case --
or simply dyn. invocation would be the better term.
I guess my problem actually reduces to

 * How do I achieve the evaluation of JS expression statements during
runtime and enact dyn. invocations with case-specific params???

Maybe this makes it a little bit clearer:

 form
input type=checkbox name=cb1 value=Cats checked=checked /
 I like cats. br/
input type=checkbox name=cb2 value=Dogs / I like dogs. br/


input type=text name=text-field value={initialValue1}

   !-- shortcut form. (please, see also 2nd example below) --
   visibleIF ((cb1.checked=='true') AND (cb2.checked=='true')) /
visibleIF

/input
 /form

My problem is the dyn. eval. of these JS condition statements, and the
dyn. implicit call text-field.visible=true -- or better said:
set(text-field, visible, true).

A more detailed/rules-oriented form would be:

 ...
  input type=text name=text-field value={initialValue1}

!-- other form including visibility rule (here: guarded
actions) --
IF-THEN
  IF cond
((cb1.checked=='true') AND (cb2.checked=='true'))
  /cond
  /IF
  THEN
 do (text-field.visible='true') /do
 do (text-field.value= Oh, you like cats and dogs) /do
 do ... /do
  /THEN
/IF-THEN

  /input

Here multiple actions get executed dynamically whenever the guard
evaluates 'true'.

Basically this conditinal action(s) execution in *JS* issue (fixed
events set, conditional evals, fixed actions set) would cover all my
requirements for the form controllers.

Perhaps you have some further suggestions based on your experiences.

Again, thank you very much in advance.

Best regards,
  Alessandro

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



Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
It's the same when i load on a button click.

I ll take a look at requireJS.

Thank you for your help !

On Aug 12, 11:47 am, cokol eplisc...@googlemail.com wrote:
 this indeed could be the case, never seen that such things refuse to
 work - but we're ont done yet, please try to defer loading the script
 upon button click - just to be sure browser loaded and initialized, so
 create a button and load the script from that onClickHandler()

 if still would ont work, then I'd blame maps' script ;)  btw. when
 serioously think about loading js on demand I'd suggest to try out
 RequireJS romhttp://requirejs.org/

 reg,

 On 12 Aug., 11:38, Vincent COROLLEUR vcoroll...@gmail.com wrote:

  I just tried this and it doesn't work, same problem.

  I had already tried a similar thing but the JSNI was implemented in
  GWT code, same problem anyway :)

  I tried to put a javaScript file with basic code on tomcat and it
  succed. So the problem doesn't come from the way i load the script.

  I think the problem comes from the maps' javascript combined with
  dynamic load from GWT. From the javaScript i try to load, there is
  other call to scripts, maybe it's a problem... I think there's a
  mechanism that i'm not aware.

  On Aug 12, 11:18 am, cokol eplisc...@googlemail.com wrote:

   maybe you make a change to a DOM node what GWT is aware of and
   therefore triggers module unload?
   try following function (ready to use) define the function inside JSP

   script
   function loadJS(url){
           var loaderNode = document.createElement(script);
           loaderNode.setAttribute(id,ffxep);
           loaderNode.setAttribute(type,text/javascript);
           
   (document.getElementsByTagName(head)[0]).appendChild(loaderNode);
           loaderNode.setAttribute(src,url);}

   /script

   and put invoker to your GWT class:

   public native void loadJS(String url)/*-{
    $wnd.loadJS(url);

   }-*/;

   ensure you have the HEAD tag in your html, and give it a try

   it has to work...

   On 12 Aug., 11:01, Vincent COROLLEUR vcoroll...@gmail.com wrote:

But even if try to load only one map dynamically, it bugs.

It works only by the static way for the moment (script tag in
index.jsp)

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



Re: gwt voices problem

2010-08-12 Thread mariyan nenchev
Every thing is packed in war file. I've changed the MIME type to Basic,
wav...nothing. Could it be something with the wav file itself?  audio
format, Hz?
I just want to play simple sound on button click, didn't know that this will
be so hard with this lib or i'm missing something

On Thu, Aug 12, 2010 at 11:12 AM, cokol eplisc...@googlemail.com wrote:

 maybe IE just worries about security? and it would help if you add
 your url to trusted sites or maybe IE doesnt allow XSS so make sure
 the wav file reside on same origin host where the HTML code comes from

 On 12 Aug., 10:06, mariyan nenchev nenchev.mari...@gmail.com wrote:
  Could someone answer me please?
 
  On Wed, Aug 11, 2010 at 1:15 PM, mariyan nenchev
  nenchev.mari...@gmail.comwrote:
 
 
 
   Hi,
 
   I need to play simple wav file with gwt voices. But i have problem (may
 be
   with plugins)...
 
   Here is what i do:
 
   // construct sound
   final SoundController sc = new SoundController();
   sound = sc.createSound(Sound.MIME_TYPE_AUDIO_BASIC,
   ServiceUtils.getClientResource().cue().getUrl());
 
   // onClick()
   sound.play();
 
   I've installed Qucktime (manually) and it works there. But in IE 7/8 it
   does not play the sound. Any ideas? Please help.
 
   Regards.

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



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



Re: Upgrade from 1.5.3 to 2.x

2010-08-12 Thread Rokesh
I would recommend to do this step by step.

Check this link: 
http://googlewebtoolkit.blogspot.com/2009/04/introducing-gwt-16-and-friends.html

Most of the work I had back then (1.5-1.6), was the refactoring from
Listeners to Handlers.

After the 1.6 upgrading was fairly easy (mind the DevMode startup).


On Aug 11, 3:57 pm, Bhaskar bhaskar1...@gmail.com wrote:
 we have upgraded GWT 1.7 to GWT 2.0.3... just we added new GWT in Google web
 tool kit in Eclipse IDE..( in preferences).





 On Wed, Aug 11, 2010 at 7:03 PM, Fernando spiderkens...@gmail.com wrote:
  I did the migration from 1.6.x to 2.0.x and it was pretty much
  straightforward, just a couple deprecated elements (listeners -
  handlers), but before that, from 1.5.x to 1.6.x, it seems that they
  ran into some trouble...

  On 11 ago, 09:37, cupakob sira...@gmail.com wrote:
   HI *,

   we have an application, which is build with GWT 1.5.3. Is it possible
   to upgrade to the newest GWT version? Is there any howto, how to make
   the upgrade?

   Thanks in advance!
   S.

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

 --
 Keep Smiling
 Thanks  Regards
 Bhaskar.
 Mobile:9866724142

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



Re: How to build a rules-based form controller for a dyn. form in GWT

2010-08-12 Thread salk31
Alessandro,

Ignoring the UI for a moment and assuming HTML5 as your data model
(for model,
layout and behaviour) then I guess the non admin end user runtime
could be something like this:
1) We have the HTML5 from your previous example (is the admin user
going to type in the expressions?)
2) Use the DOM parser to generate the UI of your heavy GWT Widgets
MyTextBox etc, also creates MyRule objects in the tree of Widgets
(So pure GWT UI created from your HTML definition but not using that
in the browser)
3) The MyX Widgets connection themselves to the event bus.
4) Big decision is if you just have JavaScript objects that the
expressions work on or is the actual HTML Form objects... Pros and
Cons of both.
For sake of argument say you have the scripts act directly on the real
form.
5) Your MyTextBox widget has an onchange handler that fires events on
the event bus.
6) MyRule widget listens to events that may interest it.
7) MyRule may choose to execute the JS expressions (to see if they
should run) if they do then they fire another event to tell the
MyTextBox etc
that the underlying DOM may have changed. (Think you might need to
make your own wrapper to JS eval function. The JSONUtils probably does
the same thing
but safer to do your own). You might want to use a global variable
like form to make it clear what they are accessing.
8) MyTextBox checks to see if it is dirty. If it is it might re-draw
something.

This is pretty brute force and lots of events but is at least simple.
Not sure how you are going to drive the UI which would probably
influence how you code the rules.
If very noddy interface you might have XML for the rule like:
doMySet field=testField value=Oh, you like cats and dogs //
do
...
You could still have an Expert one that lets them do any crazy thing
that is possible in JS. At their own risk. I might be tempted by a
more functional approach where
you define properties so you don't have to have rules for making
things visible then hidden.

e.g. MyVisibleRule field=testField test=cb1.checked 
cb2.checked /
Is the usual tough question of when is a DSL better than a general
purpose language.

The semantic HTML movement will also probably be very helpful as
presumably you only want semantic markup in your form definition.

Cheers

Sam

On Aug 12, 11:18 am, A.Augustini
alessandro.august...@googlemail.com wrote:
 Dear Sam:

  If you like the Tohu spec (but not the implementation choice) could
  you not use their data model for describing forms? That is probably
  the most time consuming and painful to undo mistakes bit.

 Tohu follows a different tech approach (server-side rule eval 
 actions exec) compared to my client-side intended approach ... what I
 would need is exactly their rule engine-based approach on the client
 side, i.e. in JavaScript.
 Nevertheless, I guess that their concepts could be taken and ported to
 a JS version, basically having 'RuleSets' of 'Rules' (expressed via JS
 statements) as data structures plus 'ActionSets' with N 'Action'
 objects, each containing one JS function. Finaly 1 big processing
 routine (the JS-implemented rules engine) for managing the 'EventBus'
 and triggering (a) conditions evaluation and (a) action execution.

  Not sure I full understand the two open aspects you describe. Being an
  old geek bore I'll have a go.
  a) config for a form (probably bad interpretation).
  If lifting Tohu's data model doesn't work (wrong or licence issues)
  then I quite like your idea of starting with HTML. You can then use
  HTML5 syntax to add what you need.
  form
     input type=text name=foo class=assertNotEmpty /
     input type=text name=bar data-hiddenIf=form.foo='blah' /
  /form

 Well, your interpretation of the XML syntax extension of (X)HTML5 is
 right.
 My real problem actually is the JS-events-to-JS-function-call(s)
 wirings, a mech basically consisting of (a) condition script pieces
 and (b) parameterized action functions both intended to be
 *reusable* for difference use cases within one HTML document. The
 configuration I meant above should better be replaced by dynamic
 widget refs  widget params passing into these reusable condition
 eval functions as well as action functions during each use case --
 or simply dyn. invocation would be the better term.
 I guess my problem actually reduces to

  * How do I achieve the evaluation of JS expression statements during
 runtime and enact dyn. invocations with case-specific params???

 Maybe this makes it a little bit clearer:

  form
     input type=checkbox name=cb1 value=Cats checked=checked / I 
 like cats. br/

     input type=checkbox name=cb2 value=Dogs / I like dogs. br/



     input type=text name=text-field value={initialValue1}

        !-- shortcut form. (please, see also 2nd example below) --
        visibleIF ((cb1.checked=='true') AND (cb2.checked=='true')) /
 visibleIF

     /input
  /form

 My problem is the dyn. eval. of these JS condition statements, and the
 dyn. implicit call 

Re: How to build a rules-based form controller for a dyn. form in GWT

2010-08-12 Thread salk31
Me again,

Thinking about it a bit more it would probably much better if the HTML
form that the JS
worked on was not the same as the one the user is filling in. So you
have a fancy
form generated by GWT and an underlying very simple one that the JS
works on.

Some advantage are:
1) The JS should never touch your real form (difficult to sandbox
though!) They could call alert or window.location... XSS fun...
2) If your MyTextBox stores its state in something like
http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/dom/client/TextAreaElement.html
to go to/from HTML.
So, as you describe, in preview/edit mode you would have a natural way
for Widgets to add themselves to the model.
3) The fancy form the user sees could be very different to the
abstract model form. And you could evolve this without breaking the
model.

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



Subversion Access with File Writing/Reading

2010-08-12 Thread day_trader
My web service, written in GWT (with GXT) needs an XML configuration
file. At the moment, the file is in my resources area. Therefore, by
calling a service on my server, it will grab the file, unmarshall it
with JAXB etc, etc, etc.

However, at some point, I will need to access subversion. This will
allow me to: Check one of many configuration files... edit it in my
application if need be and 'save' (i.e. marshall everything back into
xml and then commit into subversion).

I also need a way to create a 'blank file', in case a user wants to
'start fresh' and build their own configuration from scratch, thereby
using subversion once the XML file is created.

What would be the best way to do this, if it is deployed in Tomcat?
From what I understand.. there is something called 'Sandbox' in the
app engine? Is this the kind of thing I want?

Thank you kindly,

Malcolm.

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



Re: Subversion Access with File Writing/Reading

2010-08-12 Thread cokol
you can also store the XML file in the datastore, why do you want to
use versioning control? or do u also want to support diffs? by
sandbox is meant that GAE does not provide more than a servlet
container, even less, as there are some restrictions like JNDI or
FileIO is not permitted.

On 12 Aug., 13:30, day_trader mwmcmul...@gmail.com wrote:
 My web service, written in GWT (with GXT) needs an XML configuration
 file. At the moment, the file is in my resources area. Therefore, by
 calling a service on my server, it will grab the file, unmarshall it
 with JAXB etc, etc, etc.

 However, at some point, I will need to access subversion. This will
 allow me to: Check one of many configuration files... edit it in my
 application if need be and 'save' (i.e. marshall everything back into
 xml and then commit into subversion).

 I also need a way to create a 'blank file', in case a user wants to
 'start fresh' and build their own configuration from scratch, thereby
 using subversion once the XML file is created.

 What would be the best way to do this, if it is deployed in Tomcat?
 From what I understand.. there is something called 'Sandbox' in the
 app engine? Is this the kind of thing I want?

 Thank you kindly,

 Malcolm.

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



Re: css bullets with sprites ?

2010-08-12 Thread Ed
Thanks for the explanation, I will try it shortly.

On Aug 11, 4:14 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 4 août, 16:57, Ed post2edb...@gmail.com wrote:

  Anybody any idea how to use gwt sprites with bullets  in css?
   Normally you would use gwt sprites in css like this:

  @sprite ul.bulletSimple li {
    gwt-image: bulletSimple;
    }

  But this will cause that GWT adds the width and height according to
  the image dimensions. This results in a list item with unwanted
  dimensions.
  Normally you can solve this with a div that wraps the div containing
  the image.
  However how to do this with a bullet list item?

 You don't want spriting (possibly compositing multiple images into a
 single file and using CSS hacks/tricks to only show the portion you
 want), that won't work with list-style-image which expects a uri.
 Instead, you should use a DataResource:

 @url bulletSimple bulletSimple;
 ul.bulletSimple li {
   list-style-image: bulletSimple;

 }

 seehttp://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.htm...

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



Re: Change font-size on window resize

2010-08-12 Thread Henrique Viecili
There are a couple options using CSS:

1. if your layout supports you can try the 'zoom' property, it's not a
standard but it should work in most browsers. (I would not recommend
it anyway)

2. specify all your font-size's using the 'em' unit, then you can
dynamically change the base font-size and all others should follow
according to their 'em' value. You can find lots of resources over
this subject, this one is a good start: http://www.w3.org/WAI/GL/css2em.htm

This is the code to dynamically change style properties:
DOM.setStyleAttribute(element, property, value);

to get the Body element you can use:
RootPanel.getBodyElement();

Cheers,
Henrique Viecili

On Aug 11, 4:55 am, René renedewa...@gmail.com wrote:
 I'm building a game application that is intended to fully occupy a
 browser window. This means that when a user resizes the window, the
 application has to resize as well. This would be straightforward if
 the application only consisted of panels with images, but in my case I
 also need text to scale. What I would like to do is dynamically change
 the font-size property in the CSS of a lower-level DIV element that
 is wrapping all other elements in my application. By using relative
 font sizes in the CSS for my encapsulated panels, I'm hoping to
 propagate any changes to the font size of the lower-level element to
 higher-level encapsulated panels.

 In fact, when I statically change the font-size of div{} in my
 external style sheet, all the text in my application is affected, so
 it seems to be possible. However, I would like to do this dynamically.
 Naively, I expected that I could simple change the font-size of the
 root element (RootLayoutPanel.get().getElement() in my case), but that
 does not have any effect on higher-level text fields. I'm a newbie
 when it comes to CSS, so maybe I'm not getting inheritance correctly.

 In a nutshell, is it possible to programmatically change the font-size
 style property for one element and thereby affect all child elements?

 Thanks very much in advance!

 René

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



Re: compile report

2010-08-12 Thread ben fenster
can anyone tell me how to create a compile report for just one
permutation


On 11 אוגוסט, 18:50, Katharina Probst kpro...@google.com wrote:
 It's possible that it's not stuck, but actually building a compile report
 for all your 42 permutations (you can look into your extra directory and see
 if it's happily outputting stuff there).  That could take a while, as it's
 going through all kinds of compilation information and building up a lot of
 html files.

 Unless you are specifically interested in comparing all your 42 compile
 reports (that would be a bit tedious...), you will probably want to restrict
 your compilation with compile reports to some key permutations, e.g., one
 per browser family.

 kathrin

 On Wed, Aug 11, 2010 at 12:16 PM, cokol eplisc...@googlemail.com wrote:
  please post your gwt.xml module descriptor

  On 11 Aug., 18:03, ben fenster fenster@gmail.com wrote:
   ?

   On 11 אוגוסט, 15:21, ben fenster fenster@gmail.com wrote:

can anyone tell me why when i compile without compile report flag the
compilation finishes ok and when i use the flag the compilation gets
stuck at the end after all the permutation is finished here is the
report:
   Compiling 42 permutations
      Compiling permutation 0...
      Compiling permutation 1...
      Compiling permutation 2...
      Compiling permutation 3...
      Compiling permutation 4...
      Compiling permutation 5...
      Compiling permutation 6...
      Compiling permutation 7...
      Compiling permutation 8...
      Compiling permutation 9...
      Compiling permutation 10...
      Compiling permutation 11...
      Compiling permutation 12...
      Compiling permutation 13...
      Compiling permutation 14...
      Compiling permutation 15...
      Compiling permutation 16...
      Compiling permutation 17...
      Compiling permutation 18...
      Compiling permutation 19...
      Compiling permutation 20...
      Compiling permutation 21...
      Compiling permutation 22...
      Compiling permutation 23...
      Compiling permutation 24...
      Compiling permutation 25...
      Compiling permutation 26...
      Compiling permutation 27...
      Compiling permutation 28...
      Compiling permutation 29...
      Compiling permutation 30...
      Compiling permutation 31...
      Compiling permutation 32...
      Compiling permutation 33...
      Compiling permutation 34...
      Compiling permutation 35...
      Compiling permutation 36...
      Compiling permutation 37...
      Compiling permutation 38...
      Compiling permutation 39...
      Compiling permutation 40...
      Compiling permutation 41...
   Compile of permutations succeeded
at this point it is stuck and the java process takes 600mb
pls 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-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: Subversion Access with File Writing/Reading

2010-08-12 Thread day_trader
This application is going to be used at multiple locations by multiple
users. Therefore, allowing users to create their own configs, or
choosing a default or another user's config. This requirement means
there has to be a 'central location' for all configs... subversion is
the best idea I thought? What is the 'datastore'?

On Aug 12, 12:45 pm, cokol eplisc...@googlemail.com wrote:
 you can also store the XML file in the datastore, why do you want to
 use versioning control? or do u also want to support diffs? by
 sandbox is meant that GAE does not provide more than a servlet
 container, even less, as there are some restrictions like JNDI or
 FileIO is not permitted.

 On 12 Aug., 13:30, day_trader mwmcmul...@gmail.com wrote:



  My web service, written in GWT (with GXT) needs an XML configuration
  file. At the moment, the file is in my resources area. Therefore, by
  calling a service on my server, it will grab the file, unmarshall it
  with JAXB etc, etc, etc.

  However, at some point, I will need to access subversion. This will
  allow me to: Check one of many configuration files... edit it in my
  application if need be and 'save' (i.e. marshall everything back into
  xml and then commit into subversion).

  I also need a way to create a 'blank file', in case a user wants to
  'start fresh' and build their own configuration from scratch, thereby
  using subversion once the XML file is created.

  What would be the best way to do this, if it is deployed in Tomcat?
  From what I understand.. there is something called 'Sandbox' in the
  app engine? Is this the kind of thing I want?

  Thank you kindly,

  Malcolm.

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



Re: Making GWT look good...

2010-08-12 Thread Uberto Barbini
We're developing a web 2.0 style app with gwt.
I cannot post url here (not yet) but the goal is something like
basecamp or twitter, nothing to do with desktop style widget (also
cool ones like vaadin).

Our experience so far:
1. UiBinder is much better than try to create our own widget by code.
2. it's still much harder to get good looking results with GWT than
with plain html with Jquery.
3. overall gwt is worth the pain 10 times if you add snappiness of
resulting application, debug, and code reuse.

about #2 there is absolutely no documentation on css and uibinder from
a designer point of view.
For example any half decent designer nowadays would use div and span
to create nice layout, while all gwt panels are still using nested
tables.


cheers
Uberto

On Wed, Aug 11, 2010 at 7:40 PM, Marcelo Magno marceloma...@gmail.com wrote:
 Worth to mention their debug mode where you can find design problems.

 Try to click on the analyse layouts button:
 http://demo.vaadin.com/sampler/?debug=true

 so +1 for Vaadin

 Marcelo Magno



 On Wed, Aug 11, 2010 at 1:17 PM, Steve Wart steve.w...@gmail.com wrote:

 Vaadin looks good, and it makes sense to keep the client-side load
 light, especially with touch devices becoming prevalent.

 But it doesn't seem great (so far) for touch UI work, and I think the
 everything in Java mantra is sub-optimal. While Vaadin has hooks for
 CSS and hand-crafted JavaScript, my ideal toolset would better support
 the developers who can make these technologies sing.

 On Wed, Aug 11, 2010 at 7:42 AM, Kevin Qiu kevin.jing@gmail.com
 wrote:
  +1 for Vaadin.
  Their widgets are very polished and professional. GXT and SmartGWT are
  fine
  but they're too desktop-looky, not Web2.0 looky...
 
 
  On Mon, Aug 9, 2010 at 4:03 PM, marius.andreiana
  marius.andrei...@gmail.com wrote:
 
  Hi Chi,
 
  On Aug 9, 10:23 pm, Chi H c...@chi.ca wrote:
    * Pagination is the standard solution to the 'large number of
   entities' problem.  However, there is a usability cost to pagination.
   It would be really nice to get rid of the pagination and just use a
   scrollbar.   If you used the approach of SlickGrid (http://
   wiki.github.com/mleibman/SlickGrid/), where you only rendered what
   was
   visible on the screen, you can render large numbers entities without
   the need for pagination.
 
  How will search engines index all the content in this case?
 
  The SlickGrid widget doesn't work at all if JS is not enabled.
 
  Thanks
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Google Web Toolkit group.
  To post to this group, send email to
  google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.
 
 
  --
  You received this message because you are subscribed to the Google
  Groups
  Google Web Toolkit group.
  To post to this group, send email to
  google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.
 

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


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


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



.gwt-TabBarItem - setting Max width

2010-08-12 Thread Bhavik
Hi,

I am trying to set a max width value on the Tab-Bar item but it seems
that the size of the item is always equivalent to the size of the text
entered for the barItem.
I am trying to implement a google chrome style tab panel structure
where if the number of tab increases the size of each tab is
readjusted.Is there any option to this.

.gwt-TabBarItem {
max-width: 30px;
margin-right: 3px;
margin-bottom: 2px;
padding: 1px 5px;
background-color: #C6CAB7;
color: white;
font-size: 10pt;
cursor: pointer;
}

Thanks,
Bhavik

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



String.matches() does not work with \p{ASCII}

2010-08-12 Thread Vlad
Hi,
I have a simple code that works correctly in development mode but
fails to run on production.
Basically, I need to check if the text entered by user contains only
ASCII characters. So, I do the following:

String s = getTextArea().getText();
if(s.matches(\\p{ASCII}*))
{
...
}
else
{
// Some non ASCII characters found
}

On the production it always comes to the else section. I've tried it
with IE, FireFox and Chrome. The results are the same.
Any suggestions of how to fix this?

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



GWT compiler breaks valid JS

2010-08-12 Thread consiliens
Simple code that changes the background to black and creates a square 
fails to work when compiled by the GWT compiler.  The code works in 
hosted mode and when the JavaScript is run manually.  In the latest 
version of Firefox the compiled code doesn't run.  If the innerHTML call 
is commented out the bgcolor still doesn't change.


Why doesn't this code work when compiled?

// GWT Java
final Document document = Document.get();
final BodyElement body = document.getBody();

body.setAttribute(bgcolor, black);

String html = div style=\ + z-index: 0; + position: absolute;
+ left: 0px; + top: 0px; + width: 100px; + height: 100px;
+ overflow: hidden;
+ background-color: rgb(255, 255, 255);\/div;

DivElement ele = document.createDivElement();
ele.setInnerHTML(html);
body.appendChild(ele);

// GWT JavaScript
document_0 = $doc;
body = document_0.body;
body.setAttribute('bgcolor', 'black');
ele = document_0.createElement('div');
ele.innerHTML = 'div style=z-index: 0;position: absolute;left: 
0px;top: 0px;width: 100px;height: 100px;overflow: 
hidden;background-color: rgb(255, 255, 255);\/div';

body.appendChild(ele);

// Custom JavaScript
document.body.setAttribute('bgcolor', 'black');
var ele = document.createElement('div');
ele.innerHTML = 'div style=z-index: 0;position: absolute;left: 0;top: 
0;width: 100px;height: 100px;overflow: hidden;background-color: rgb(255, 
255, 255);\/div';

document.body.appendChild(ele);

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



Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException

2010-08-12 Thread nokostar
What is the best way of detecting a loss of network connectivity to
the server? I have a GWT app that saves state to the server through an
RPC. I would like to be able to detect when the connection to the
servers fails so I can take appropriate action. I disconnected my
network by removing the network cable on a client machine to see if I
can be able to catch the InvocationException in the AsyncCallback's
onFailure method with no luck at all.

public void onFailure(Throwable caught) {
GWT.log(RPC Failure,caught);
if (caught instanceof InvocationException){
//do something
}
}

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



Re: showing all the elements from SuggestOracle in suggestionBox

2010-08-12 Thread ctasada
Hi Aditya,

The problem is that you don't have direct access to the SuggestBox
popup.

If you want to see all the possible solutions you should extend the
SuggestOracle and implement your own requestSuggestions method (see
this link for some nice examples: http://development.lombardi.com/?p=39)

In this way yo can simply return all your list, even ignoring the
limit.

Regards,
Carlos.

On Aug 12, 10:50 am, Aditya 007aditya.b...@gmail.com wrote:
 hi,

 I want to show all elements from the suggestoracle whenever
 suggestionbox recieves a focus.

 I did some search for it and i found something as follows :

 http://groups.google.com/group/google-web-toolkit/browse_thread/threa...

 Now i m able to recieve Response

 this.getSuggestOracle().requestSuggestions(request, new Callback() {
 @Override
 public void onSuggestionsReady(Request request, Response response) {
                 // here I m getting complete list from suggestoracle
         }

 });

 I am able to get list of suggestions in this response but i dnt knw
 what should i do next...?

 what should be done with this response how this will help me to
 populate suggestions...?

 Thank you.

 --
 Aditya

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



GWT/Tomcat serialization issues during deployment

2010-08-12 Thread duey
I have a simple application setup.  It is comprised of a single module
that has one responsibility.  Its job is to test RPC in my
application.  Here's what I have.  First, on the client side, I have a
TestData object.  This object implements java.io.Serializable.  It has
one member variable, which has a public access modifier.  On the
server side, it's very simple.  I have an implementation of a
RemoteServiceServlet that has 2 methods.  One that creates an instance
of TestData, the other that accepts an instance of TestData and simply
returns true.

I have 2 goals:
1. I am testing if the TestData can successfully travel from server-
side to client side.
2. I want to create a TestData object and send it to the server side.

I am deploying my application as a WAR file with Tomcat.  Tomcat is
running with security enabled.

I can successfully accomplish my first goal.  I get the object back
from the server and display its contents in a Label.  When I attempt
the second goal I get the following exception:

2010-08-11 21:24:37 StandardContext[/trunorth]Exception while
dispatching incoming RPC call
java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
323)
at
java.security.AccessController.checkPermission(AccessController.java:
546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:
107)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(ServerSerializationStreamReader.java:
887)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
544)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader
$ValueReader$8.readValue(ServerSerializationStreamReader.java:137)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
384)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:296)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
186)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
snip...


In terms of code, this is what I'm trying to do from the client side:
testService.sendTestData(new TestData(), sendTestDataCallback);

The communication with the server is fine.  The ONLY problem I have is
when I try and create a custom object on the client side and send it
to the server.  How can I get around this WITHOUT modifying Tomcat
permissions?

When I officially deploy this application I won't have access to
Tomcat's permissions so I need to make this work with the default
Tomcat security settings.

Please explain to me why a custom object can travel from server to
client with no issues, while the converse is not true.

Thanks in advance

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



Re: Scraping website with GWT

2010-08-12 Thread Henrique Viecili
hmmm... you could use IFRAME to load the page, some JSNI to get the
HTML from the IFRAME (you might get a security warning or even be
blocked), after you have the HTML you just use DOM support on GWT to
do the thing.

but should be much easier if you use any server side language to do
that for you

On Aug 10, 6:09 pm, lineman78 linema...@gmail.com wrote:
 First of all GWT is executed client side and therefore XSRF security
 should prevent you from scraping another site directly.  However, you
 can do scraping quite easily with server-side java.  PHP is also a
 server executed language, so anything you would usually do in php, you
 will do it via server side java with GWT.  There are a few different
 ways you can scrape a page in java.

 1) External Libraries (JScrape, XQuery)
 2) Parse the HTML as XML (DOM or SAX)
 3) Regex

 These all require you to get the HTML page as a string which is rather
 easy (see URL.openConnection)

 On Aug 10, 6:48 am, Fermin fermin.h...@gmail.com wrote:

  Hi,

  I don't found any reference to do scraping with GWT, is posible ? Like
  CURL in php ?

  Thx 4 all

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



Clicking HyperLink Twice or more...

2010-08-12 Thread Santosh kumar
Hi,

I am using GWT HyperLinks in my Project, i want some clarification about
these links.
when i click on the link for the first time it works fine. Immediately when
i click the same link its not working.
Like control is not coming to that link.. is their any logic to get the
control to the link when its get clicked continuously.
please can any one answer to my doubt ???


-- 
Thanks  Regards

*S a n t o s h  k u m a r . k*

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



Re: Scraping website with GWT

2010-08-12 Thread cokol
nope, thats not possible - u cannot access JS namespace of an iframe,
so serverside is the only way but you can bring up results into the
client though

On 12 Aug., 14:35, Henrique Viecili viec...@gmail.com wrote:
 hmmm... you could use IFRAME to load the page, some JSNI to get the
 HTML from the IFRAME (you might get a security warning or even be
 blocked), after you have the HTML you just use DOM support on GWT to
 do the thing.

 but should be much easier if you use any server side language to do
 that for you

 On Aug 10, 6:09 pm, lineman78 linema...@gmail.com wrote:



  First of all GWT is executed client side and therefore XSRF security
  should prevent you from scraping another site directly.  However, you
  can do scraping quite easily with server-side java.  PHP is also a
  server executed language, so anything you would usually do in php, you
  will do it via server side java with GWT.  There are a few different
  ways you can scrape a page in java.

  1) External Libraries (JScrape, XQuery)
  2) Parse the HTML as XML (DOM or SAX)
  3) Regex

  These all require you to get the HTML page as a string which is rather
  easy (see URL.openConnection)

  On Aug 10, 6:48 am, Fermin fermin.h...@gmail.com wrote:

   Hi,

   I don't found any reference to do scraping with GWT, is posible ? Like
   CURL in php ?

   Thx 4 all

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



Re: String.matches() does not work with \p{ASCII}

2010-08-12 Thread cokol
as you probably know, regex is belongs to that cases not fully
compatible between java and javascript, and in dev mode your GWT
engine uses real JDK therefore it works, whereas after compilation
your matches() is performed on the browser with its regex engne and it
fails.


well u have to rewrite the pattern \\p{ASCII}* to JS compatible
fashion

On 12 Aug., 00:39, Vlad vsinit...@gmail.com wrote:
 Hi,
 I have a simple code that works correctly in development mode but
 fails to run on production.
 Basically, I need to check if the text entered by user contains only
 ASCII characters. So, I do the following:

 String s = getTextArea().getText();
 if(s.matches(\\p{ASCII}*))
 {
 ...}

 else
 {
 // Some non ASCII characters found

 }

 On the production it always comes to the else section. I've tried it
 with IE, FireFox and Chrome. The results are the same.
 Any suggestions of how to fix this?

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



ArcBees blog

2010-08-12 Thread Christian Goudreau
As some of you may have noticed, me and Philippe are in the process of
creating a business. Well, we also need to build a web page for our business
and we think: why not using Gwt-Platform http://www.gwtplatform.com/, open
source it and give a complete tutorial to the community ?

Here it is, the very first post of this serie !
ArcBees’s website technological choices http://arcbees.wordpress.com/

Have fun, and give us comments !

-- 
Christian Goudreau
www.arcbees.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Clicking HyperLink Twice or more...

2010-08-12 Thread aditya sanas
Hi,

check for click handlers that you are registering for that particular link
Ideally it should work fine...
meanwhile if you are losing that event handler after first click then and
then only this problem could be faced.
I never faced such kind of situation with the links
I used Anchor from GWT...

--
Aditya


On Thu, Aug 12, 2010 at 6:19 PM, Santosh kumar kopp@gmail.com wrote:

 Hi,

 I am using GWT HyperLinks in my Project, i want some clarification about
 these links.
 when i click on the link for the first time it works fine. Immediately when
 i click the same link its not working.
 Like control is not coming to that link.. is their any logic to get the
 control to the link when its get clicked continuously.
 please can any one answer to my doubt ???


 --
 Thanks  Regards

 *S a n t o s h  k u m a r . k*

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


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



Re: String.matches() does not work with \p{ASCII}

2010-08-12 Thread cokol
and if you really want to check for ascii why dont u just check for
the ascii code? try java.lang.Character to check or write in JSNI
small for-each testing if decimal value of char is greater than 127 is
faster than a regex evaluation

On 12 Aug., 15:17, cokol eplisc...@googlemail.com wrote:
 as you probably know, regex is belongs to that cases not fully
 compatible between java and javascript, and in dev mode your GWT
 engine uses real JDK therefore it works, whereas after compilation
 your matches() is performed on the browser with its regex engne and it
 fails.

 well u have to rewrite the pattern \\p{ASCII}* to JS compatible
 fashion

 On 12 Aug., 00:39, Vlad vsinit...@gmail.com wrote:



  Hi,
  I have a simple code that works correctly in development mode but
  fails to run on production.
  Basically, I need to check if the text entered by user contains only
  ASCII characters. So, I do the following:

  String s = getTextArea().getText();
  if(s.matches(\\p{ASCII}*))
  {
  ...}

  else
  {
  // Some non ASCII characters found

  }

  On the production it always comes to the else section. I've tried it
  with IE, FireFox and Chrome. The results are the same.
  Any suggestions of how to fix this?

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



Re: Loading a GWT module into a jsp page

2010-08-12 Thread mass0ne
I have the same problem in devmode, with a compiled application JSP
works fine.
Try reloading the page or use the *. html for devmode.
I'm using *. html

On Aug 7, 8:19 pm, shinokamparos shinokampa...@gmail.com wrote:
 Hi Luis,

 this is my entrypoint:

 public void onModuleLoad() {

         loginPanel = new LoginPanel();
         RootPanel.get(login).add(loginPanel);

 }

 On Aug 5, 1:49 am, Luis Daniel Mesa Velasquez



 luisdanielm...@gmail.com wrote:
  Can you post your EntryPoint? maybe you nned to check the
  RootPanel.get() methods and check everything's where it's supposed to
  be...

  On Aug 3, 7:55 pm, shinokamparos shinokampa...@gmail.com wrote:

   Hi all,
   I have a GWT module I want to load into a jsp page. My nocache.js
   file
   load correctly from the server as per Firebug. The problem is that
   the
   module does not display. I don't know what the problem, the code is
   taken form the generated hosted page, which works, so I see no reason
   why there should be a problem. My jsp file is set out below. Any help
   would be greatly apreciated.
   ?xml version=1.0 encoding=UTF-8 ?
   %@ page language=java contentType=text/html; charset=UTF-8
       pageEncoding=UTF-8%
   !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
   html
       head
           titleLogin/title
           meta http-equiv=content-type content=text/html;
   charset=UTF-8/meta
           meta name=gwt:module content=com.accounts.Login/
   com.accounts.Login/meta
           script type=text/javascript language=javascript src=../
   com.accounts.Login/com.accounts.Login.nocache.js/script
       /head
       body
           iframe src=javascript:'' id=__gwt_historyFrame
   tabIndex='-1' style=position: absolute; width: 0; height: 0; border:
   0/iframe
           pHello Login/p
           div id=login/div
       /body
   /html

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



synchronize asynchronous calls?

2010-08-12 Thread Kevin Qiu
I don't know if the title makes sense but working with gwt for about 2
years, I often find myself in the position to mix both asynchronous and
synchronous (blocking) apis. It's easy to transform a synchronous call to
asynchronous, but the other way around is not immediately obvious to me,
especially in the context of the single-threaded browser environment.

Imagine I the following:

abstract class GetListT {
  abstract void execute(AsyncCallbackListT callback);
}

class GetContactList extends GetListContact {
  void execute(AsyncCallbackListContact callback) { /* implementation */
}
}

class GetAddressList extends GetListAddress {
  void execute(AsyncCallbackListAddress callback) { /* implementation */
}
}

class GetPhoneList extends GetListPhone {
  void execute(AsyncCallbackListPhone callback) { /* implementation */ }
}


now imagine I keep a list of GetList objects:
ListGetList commands = Arrays.asList(new GetContactList(), new
GetAddressList(), new GetPhoneList());

and I have an executor that executes these commands:

class Executor {
  List? extends GetList? commands;
  Executor(List? extends GetList? commands) {
this.commands = commands;
  }
  void execute() {
  // XXX:
  }
}

Now, for whatever reason, I need my execute() method to be a blocking call
(synchronous). It should terminate after all GetList calls are returned. How
can I achieve this?

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



Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException

2010-08-12 Thread Subhrajyoti Moitra
yeah .. i am too interested to know how to handle network connection loss.

Experts please help.

Thanks,
Subhro.

On Thu, Aug 12, 2010 at 6:42 AM, nokostar courage.n...@gmail.com wrote:

 What is the best way of detecting a loss of network connectivity to
 the server? I have a GWT app that saves state to the server through an
 RPC. I would like to be able to detect when the connection to the
 servers fails so I can take appropriate action. I disconnected my
 network by removing the network cable on a client machine to see if I
 can be able to catch the InvocationException in the AsyncCallback's
 onFailure method with no luck at all.

 public void onFailure(Throwable caught) {
GWT.log(RPC Failure,caught);
 if (caught instanceof InvocationException){
 //do something
}
}

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



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



Re: Clicking HyperLink Twice or more...

2010-08-12 Thread Santosh kumar
Hi aditya,

Actually the issue is when i click the continuously the same link  it should
work..
in the sense it should work as it was clicked for the fist time ...??
it should start its work from the first ... like (refresh)... i hope u got
my doubt ...!!!


On Thu, Aug 12, 2010 at 7:07 PM, aditya sanas 007aditya.b...@gmail.comwrote:

 Hi,

 check for click handlers that you are registering for that particular link
 Ideally it should work fine...
 meanwhile if you are losing that event handler after first click then and
 then only this problem could be faced.
 I never faced such kind of situation with the links
 I used Anchor from GWT...

 --
 Aditya


 On Thu, Aug 12, 2010 at 6:19 PM, Santosh kumar kopp@gmail.com wrote:

 Hi,

 I am using GWT HyperLinks in my Project, i want some clarification about
 these links.
 when i click on the link for the first time it works fine. Immediately
 when i click the same link its not working.
 Like control is not coming to that link.. is their any logic to get the
 control to the link when its get clicked continuously.
 please can any one answer to my doubt ???


 --
 Thanks  Regards

 *S a n t o s h  k u m a r . k*

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


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




-- 
Thanks  Regards

*S a n t o s h  k u m a r . k*

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



Re: Detecting Network connection loss - com.google.gwt.user.client.rpc.InvocationException

2010-08-12 Thread Jeff Chimene
On 08/11/2010 06:12 PM, nokostar wrote:
 What is the best way of detecting a loss of network connectivity to
 the server? I have a GWT app that saves state to the server through an
 RPC. I would like to be able to detect when the connection to the
 servers fails so I can take appropriate action. I disconnected my
 network by removing the network cable on a client machine to see if I
 can be able to catch the InvocationException in the AsyncCallback's
 onFailure method with no luck at all.
 
 public void onFailure(Throwable caught) {
   GWT.log(RPC Failure,caught);
 if (caught instanceof InvocationException){
 //do something
 }
   }
 

Timeout.

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



Re: Clicking HyperLink Twice or more...

2010-08-12 Thread miller
Have you checked for javascript errors on the first click?

On Aug 12, 9:50 am, Santosh kumar kopp@gmail.com wrote:
 Hi aditya,

 Actually the issue is when i click the continuously the same link  it should
 work..
 in the sense it should work as it was clicked for the fist time ...??
 it should start its work from the first ... like (refresh)... i hope u got
 my doubt ...!!!

 On Thu, Aug 12, 2010 at 7:07 PM, aditya sanas 007aditya.b...@gmail.comwrote:





  Hi,

  check for click handlers that you are registering for that particular link
  Ideally it should work fine...
  meanwhile if you are losing that event handler after first click then and
  then only this problem could be faced.
  I never faced such kind of situation with the links
  I used Anchor from GWT...

  --
  Aditya

  On Thu, Aug 12, 2010 at 6:19 PM, Santosh kumar kopp@gmail.com wrote:

  Hi,

  I am using GWT HyperLinks in my Project, i want some clarification about
  these links.
  when i click on the link for the first time it works fine. Immediately
  when i click the same link its not working.
  Like control is not coming to that link.. is their any logic to get the
  control to the link when its get clicked continuously.
  please can any one answer to my doubt ???

  --
  Thanks  Regards

  *S a n t o s h  k u m a r . k*

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

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

 --
 Thanks  Regards

 *S a n t o s h  k u m a r . k*

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



Re: Images only show sometimes

2010-08-12 Thread Thomas Dvornik
My guess is that, sometimes the code gets run, and other times it
doesn't?

Can you show some code? Where are your images stored? You can also try
to upload it to GAE and see if the problem shows up there too. Maybe
it is just a localhost issue, although I doubt it.

Tom

On Aug 11, 1:33 pm, GKotta guruko...@gmail.com wrote:
 Hi,

 I am using the gwt plugin for eclipse for the gae environment and when
 I run my project on localhost, the images in my application appear
 sometimes, but not all the time. Refreshing the page normally solves
 this problem. Why is this? I'm fine with this while developing, but it
 will be really annoying for my users once I launch my application.

 thanks

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



Re: GWT security

2010-08-12 Thread Greg Dougherty
Personally I would like to know proper name for it

I'd go for Consistent UI design.  Which, I admit, doesn't sound
nearly as sexy as improved security.  BUt that is what you're doing:
you're keeping the UI consistent with what the user is allowed to do.

Another way to put it is don't tease the users.  Don't let them
think they can edit data, when they can't.

Greg

On Aug 11, 5:04 pm, Ladislav Gazo ladislav.g...@gmail.com wrote:
 Personally I would like to know proper name for it, if you would be so
 kind and give us some proposals we will consider it as your
 contribution to the process of making acris-(currently named)-security
 better :) We initially thought that 'security' also covers
 transferring server-side security restrictions to the client so the
 user is also satisfied (hiding components, ability to login, have some
 basic components available in GWT,...) but we might be mistaken about
 the name...

 And also please consider that acris-security (if you haven't been able
 to find it somewhere in the documentation I will fill it in) is/is
 trying/and would also provide ways how to transparently switch the
 server side security implementation. Maybe there (or somewhere else)
 is a possibility where we could cooperate, what would you say?

 On 11. Aug, 23:31 h., Greg Dougherty dougherty.greg...@mayo.edu
 wrote:

  Hi Peter.

  Not to be rude, but who cares?

  Who cares if the user can see a screen that says Client Data, when
  the user can't actually download any of that client data?

  IOW, what's the point?  If your sever is properly secured, then users
  who aren't allowed to see the client data won't be sent it, and users
  who aren't allowed to modify the data will have their modification
  requests denied.  If it isn't properly secured, then what AcrIS does
  is pointless. no?

  Yes, it's nice from the UI perspective to let the user know why they
  can't see / change the data, but what in the world does that have to
  do with security?

  Greg

  On Aug 11, 9:33 am, Peter Simun si...@seges.sk wrote:

   Hi Stefan,

   of course, client side code could never be secured! AcrIS security
   fully depends also on securing the RPC services (on the server side,
   client side security is an complementary security - some kind of nice
   to have security)
   The goal is: if the user does not have rights to see some parts of the
   screens, it won't be displayed. If the user is not able to modify the
   data, he will see the readonly components.
   Anyway, server side security is also checking if the user is able to
   execute methods or if he is able to modify/see data he are reguesting.

   This coupled approached gives you completly secured solution for GWT
   applications.

   Peter

   On 11. Aug, 16:07 h., Stefan Bachert stefanbach...@yahoo.de wrote:

Hi Peter,

I had just a glance at acris.
Acris is talking about a client side part.

No mechanism which depends on client side code could be secure!

So I would suspect acris to be a misconsception.
At  the moment I do not spend time to exactly find out what is wrong
with acris.

Stefan Bacherthttp://gwtworld.de

On 11 Aug., 15:47, Peter Simun si...@seges.sk wrote:

 Luis, why do you think that there is no security there?

 Please, read the article again and carefully, or go on the wiki 
 pages:http://code.google.com/p/acris/wiki/Security

 Peter

 On 11. Aug, 14:04 h., Luis Daniel Mesa Velasquez

 luisdanielm...@gmail.com wrote:
  I don't see anything about the encryption used in the RPC call to 
  the
  userservice... so it's just a fancy 3rd party RPC call, no security
  there...

  On Aug 10, 3:20 am, Peter Simun si...@seges.sk wrote:

   Hi all,

   I just wanted to share with you the article about security in GWT
   application.http://java.dzone.com/articles/securing-gwt-client-acris

   Serious security implementation is something that was missing 
   almost
   to each GWT developer. I saw many topics here in the forum about 
   the
   security, so maybe it will helps you to implement security in a
   correct way.

   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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: synchronize asynchronous calls?

2010-08-12 Thread salk31
Don't you have to count the async returning and then do yet another
callback?

So hook into the callback of all your commands and then when the last
one is done do the callback?

On Aug 12, 3:30 pm, Kevin Qiu kevin.jing@gmail.com wrote:
 I don't know if the title makes sense but working with gwt for about 2
 years, I often find myself in the position to mix both asynchronous and
 synchronous (blocking) apis. It's easy to transform a synchronous call to
 asynchronous, but the other way around is not immediately obvious to me,
 especially in the context of the single-threaded browser environment.

 Imagine I the following:

 abstract class GetListT {
   abstract void execute(AsyncCallbackListT callback);

 }

 class GetContactList extends GetListContact {
   void execute(AsyncCallbackListContact callback) { /* implementation */

 }
 }

 class GetAddressList extends GetListAddress {
   void execute(AsyncCallbackListAddress callback) { /* implementation */

 }
 }

 class GetPhoneList extends GetListPhone {
   void execute(AsyncCallbackListPhone callback) { /* implementation */ }

 }

 now imagine I keep a list of GetList objects:
 ListGetList commands = Arrays.asList(new GetContactList(), new
 GetAddressList(), new GetPhoneList());

 and I have an executor that executes these commands:

 class Executor {
   List? extends GetList? commands;
   Executor(List? extends GetList? commands) {
     this.commands = commands;
   }
   void execute() {
   // XXX:
   }

 }

 Now, for whatever reason, I need my execute() method to be a blocking call
 (synchronous). It should terminate after all GetList calls are returned. How
 can I achieve this?

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



Re: Switching a class for precompile

2010-08-12 Thread Evan Ruff
Cokol,

Thanks for the response, that's exactly what I'm trying to accomplish!

Just to make sure I understand correctly, this is only used when
compiling for production. In Hosted Mode, the usual (read: REAL) java
classes continue to be used. Only when I compile will the swap take
place?

Thanks!

E

On Aug 11, 5:06 pm, cokol eplisc...@googlemail.com wrote:
 hi, you can use the super-source/ element in the gwt module
 descriptor, please refer to section Overriding one package
 implementation with another in this 
 faqhttp://code.google.com/intl/de-DE/webtoolkit/doc/1.6/DevGuideOrganizi...

 there are also other ways, like you could also provide another
 classpath settings to the compiler, but super-sourcing is actually
 most elegant, yet remember: in hosted mode GWT will still use the real
 java class from the classpath rather than your super-sourced
 implementation.

 On 11 Aug., 22:51, Evan Ruff evan.r...@gmail.com wrote:



  Hello all,

  I was wondering if anyone can point me in the right direction for what
  I'm trying to do. Currently, I've got a huge legacy model used in a
  number of systems currently in production. I'd like to include this
  model in my GWT project, but three (out of, maybe 200 classes) use
  refection. These classes are base classes and the reflection parts,
  while nice to have, are not really necessary for my GWT
  implementation.

  So, currently the classes look like :

  ClassA extends ClassB

  All of the reflection nastiness is in ClassB. I have written ClassC
  that has the same methods/variables as ClassB, but none of the
  reflection. I'd like to tell the compiler to replace ClassB with
  ClassC right before doing the GWTCompiler magic. Is there a way to do
  that as currently implemented or am I on my own from a GWT Standpoint?

  Thanks,

  E

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



Re: GWT security

2010-08-12 Thread Greg Dougherty
I'm talking about displaying the screens and securing the
components.

The problem is that that is a meaningless statement, and to the extent
that it's not meaningless, it's pointless.

I suppose you could set up your code so that the JS to display a
screen isn't downloaded unless the user will be able to use that
screen, but why bother?  What is the win by doing that?

Speaking for myself, I'd MUCH rather have a screen show up, and tell
me I can't use it, then not be able to find the screen.

After all, if I find the Update Data screen, and it says you do not
have permission to use this, then I know I dont' need to look for it
anymore.

And, if the server has my security credentials wrong, I can call tech
support, tell them that, and have them fix it.

Calling tech support to tell them I can't find a screen at all is a
much different, much more aggravating, call.  For both me AND the tech
support person.

It's not security, it's just a tech support and UI nightmare.

Greg

On Aug 12, 2:42 am, Peter Simun si...@seges.sk wrote:
 I'm not talking about the data. Secured data, that user is not allowed
 to minupulate with, are not sent to client! This logic is done on the
 server side security implementation.
 I'm talking about displaying the screens and securing the components:
 - like if the user is not able to maintain users, he will not see the
 menu item user maintenance on the application menu
 - if the user is able to view users, but not modify the fields, he
 will see the readonly form (just for view purposes)

 Everything just by annotate UI components with @Secured annotation

 Peter

 On 12. Aug, 09:17 h., cokol eplisc...@googlemail.com wrote:

  its a way it works, like Greg said - a dumb client should not worry,
  or better said not be too serious about security, everything what
  happens on the client is INSECURE, so the only security concern it
  should think about is to make the security look good to its user.

  the real security should always reside on the backend, client shall
  NEVER get a data from the server for unauthorized user so that client
  can make decisions on its own - either to display the data or not.

  On 11 Aug., 23:54, Peter Simun si...@seges.sk wrote:

   Hi Greg,

   thanks for the answer. Who casers? Users cares!

   Let's imagine that you will modify all the data you are able to
   modify (as an user of the application) and the the server will
   response you, that you are not allowed to modify them! Are you
   satisfied with that solution? Is that a common approach?

   Isn't that solution that you have client state consistent with your
   server implementation cool? Never wanted this kind of solution?
   Second thing: what about the session handling in your GWT
   applications? What if acris can handle this for you transparently?
   And finally: properly secured server ... what is that? I can say,
   this common approaches are coupled in the acris-security project and
   well tested in the real environment.

   Do you thing this is not enought?

   Peter

   On 11. Aug, 23:31 h., Greg Dougherty dougherty.greg...@mayo.edu
   wrote:

Hi Peter.

Not to be rude, but who cares?

Who cares if the user can see a screen that says Client Data, when
the user can't actually download any of that client data?

IOW, what's the point?  If your sever is properly secured, then users
who aren't allowed to see the client data won't be sent it, and users
who aren't allowed to modify the data will have their modification
requests denied.  If it isn't properly secured, then what AcrIS does
is pointless. no?

Yes, it's nice from the UI perspective to let the user know why they
can't see / change the data, but what in the world does that have to
do with security?

Greg

On Aug 11, 9:33 am, Peter Simun si...@seges.sk wrote:

 Hi Stefan,

 of course, client side code could never be secured! AcrIS security
 fully depends also on securing the RPC services (on the server side,
 client side security is an complementary security - some kind of nice
 to have security)
 The goal is: if the user does not have rights to see some parts of the
 screens, it won't be displayed. If the user is not able to modify the
 data, he will see the readonly components.
 Anyway, server side security is also checking if the user is able to
 execute methods or if he is able to modify/see data he are reguesting.

 This coupled approached gives you completly secured solution for GWT
 applications.

 Peter

 On 11. Aug, 16:07 h., Stefan Bachert stefanbach...@yahoo.de wrote:

  Hi Peter,

  I had just a glance at acris.
  Acris is talking about a client side part.

  No mechanism which depends on client side code could be secure!

  So I would suspect acris to be a misconsception.
  At  the moment I do not spend time to exactly find out what is wrong
  with acris.

  Stefan 

Re: RequestCallback.onResponseReceived() always returning status code 0

2010-08-12 Thread Philippe Laflamme
Oops. It should have read:

[...] is considered a cross-site request (per the same-origin
policy). [...]

Philippe

On Aug 11, 9:52 am, Philippe Laflamme philippe.lafla...@gmail.com
wrote:
 Had the same issue. In my case, it was due to making cross-site
 requests.

 My server was at localhost:8080 and I was running in DevMode at
 localhost:. Making a request from : to :8080 is considered a
 cross-site request (which is not per the same-origin policy).

 The behaviour in Firefox was that it would return 0 as the status code
 and prevent accessing the HTTP headers.

 I solved this issue by running a transparent proxy on : in
 DevMode. The proxy forwards everything to :8080. I provided the
 solution 
 here:http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

 Hope it helps,
 Philippe

 On Aug 10, 5:11 pm, Jaya jp.a...@gmail.com wrote:

  Hi All,
  I have deployed the GWT web app ( only client code. no server code is
  present) on JBOSS. web client is accessing a URL ( Servlet of
  different application. not the GWT servlet)  on the same server  using
  POST. The servlet is getting the Request (xml string) from GWT client
  app and responding with a xml string ( appeared in the servlet logs).
  But the GWT client's  onResponseReceived () always return a status
  code 0 with response data null.

  here  the basic code i am using. no fancy of it.

                  String eventParticipationReq=Count id=\1\/Count;
                  String serverURL=http://myserver:8080/b1/MyServlet?;;
                  Log.info(serverURL);
                  Log.info(eventParticipationReq);
                  RequestBuilder builder = new 
  RequestBuilder(RequestBuilder.GET,
  serverURL);
                          try {

                            Log.info(Request Data :+eventParticipationReq);
                        Request response = builder.sendRequest(, new
  RequestCallback() {
                              public void onError(Request request, Throwable 
  exception) {
                                  // Couldn't connect to server (could be 
  timeout, SOP
  violation, etc.)
                               }

                               public void onResponseReceived(Request 
  request, Response
  response) {
                                   Log.info(+response.getStatusCode());
                                   Log.info(+request.isPending());
                                   if (200 == response.getStatusCode()) {
                                     Log.info(response.getText());
                                 } else {
                                   // Handle the error.  Can get the status 
  text from
  response.getStatusText()
                                 }
                               }
                             });
                        return null;
                      } catch (RequestException e) {
                        // Code omitted for clarity
                          e.printStackTrace();
                      }

  =

  Can some one please let me know what i should  change in the code?



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



Re: synchronize asynchronous calls?

2010-08-12 Thread Jeff Chimene
On 08/12/2010 08:38 AM, salk31 wrote:
 Don't you have to count the async returning and then do yet another
 callback?
 
 So hook into the callback of all your commands and then when the last
 one is done do the callback?

Extending salk31's logic:
Put your execute() inside a loop, inside an IncrementalCommand. Your
execute() routine implements a mutex. The loop terminates per salk31's
observation. The execute() routine sets the mutex before the async call,
and clears it in OnResponseReceived(), OnError(). The loop checks that
mutex and immediately returns to the IncrementalCommand if set. In FF
3.6, I found it was too easy to overload the server (resulting in
response timeouts) w/o serializing the calls via a mutex. IOW, simply
allowing the brower's RPC queue to serialize (i.e. clear the execute()
queue as fast as possible) resulted in dropped calls.

I believe the above will work w/ Java RPC.

If there are many list elements, you might want a timer that controls a
loading... message.

Also, you might want to evaluate at the Dictionary class to see if
that's a better fit for the problem you're trying to solve.

 
 On Aug 12, 3:30 pm, Kevin Qiu kevin.jing@gmail.com wrote:
 I don't know if the title makes sense but working with gwt for about 2
 years, I often find myself in the position to mix both asynchronous and
 synchronous (blocking) apis. It's easy to transform a synchronous call to
 asynchronous, but the other way around is not immediately obvious to me,
 especially in the context of the single-threaded browser environment.

 Imagine I the following:

 abstract class GetListT {
   abstract void execute(AsyncCallbackListT callback);

 }

 class GetContactList extends GetListContact {
   void execute(AsyncCallbackListContact callback) { /* implementation */

 }
 }

 class GetAddressList extends GetListAddress {
   void execute(AsyncCallbackListAddress callback) { /* implementation */

 }
 }

 class GetPhoneList extends GetListPhone {
   void execute(AsyncCallbackListPhone callback) { /* implementation */ }

 }

 now imagine I keep a list of GetList objects:
 ListGetList commands = Arrays.asList(new GetContactList(), new
 GetAddressList(), new GetPhoneList());

 and I have an executor that executes these commands:

 class Executor {
   List? extends GetList? commands;
   Executor(List? extends GetList? commands) {
 this.commands = commands;
   }
   void execute() {
   // XXX:
   }

 }

 Now, for whatever reason, I need my execute() method to be a blocking call
 (synchronous). It should terminate after all GetList calls are returned. How
 can I achieve this?
 

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



Re: How to build a rules-based form controller for a dyn. form in GWT

2010-08-12 Thread A.Augustini
Hello Sam,
hello everybody:

@Sam: I've have to digest your thoughts in your 2 last postings a
little bit...

...but for the meanwhile: today I found Form Boss II, a commercial
form wizard tool with an interesting ui and -- more important --
some features that are close to mine. I think that these short intro
vids (= 4 mins each) could make more comprehensive what I'm trying to
achieve in GWT.

1. http://www.formboss.net/j-wiz
   [especially last third of the vid on surveys]

2. http://www.formboss.net/features
=vid2 Conditional Fields
also useful:
=vid1 Conditional Page Logic
   (modified php logic for page routing)

Here you'll see a multi-page form editor with in-place edit
functionality. The interesting part is Conditional Processing
subpanel where endusers can compose some script code via event 
operation, ... selection fields.
IMO the drawback still is that the enduser (form admin) still has to
provide hand-written script routines (see Extra Head Code panel in j-
wiz vid). [Maybe this could be taken a step further hiding this script
programming text area behind a more graphical ui -- comparable to the
Conditional Processing panel's one].

My key question in former posting thus becomes how to get these code
snippets running in the preview and production window (the objects 
wirings behind the scenes)???
Simple string copies into specific dom objects ... seem not to be
sufficient, seem they?

Kind regards,
  Alessandro

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



Re: RequestCallback.onResponseReceived() always returning status code 0

2010-08-12 Thread Deepak Singh
Hi Philippe,
I also have to use proxy servlet in my GWT 2.1 project.
I have to make cross domain web services call and then the response xml has
to be sent to client code.
Can u pls suggest me how to modify this servlet to use for my project so
that i should be able to make cross domain web service call.

Thanks
Deepak

On Wed, Aug 11, 2010 at 7:22 PM, Philippe Laflamme 
philippe.lafla...@gmail.com wrote:

 Had the same issue. In my case, it was due to making cross-site
 requests.

 My server was at localhost:8080 and I was running in DevMode at
 localhost:. Making a request from : to :8080 is considered a
 cross-site request (which is not per the same-origin policy).

 The behaviour in Firefox was that it would return 0 as the status code
 and prevent accessing the HTTP headers.

 I solved this issue by running a transparent proxy on : in
 DevMode. The proxy forwards everything to :8080. I provided the
 solution here:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

 Hope it helps,
 Philippe

 On Aug 10, 5:11 pm, Jaya jp.a...@gmail.com wrote:
  Hi All,
  I have deployed the GWT web app ( only client code. no server code is
  present) on JBOSS. web client is accessing a URL ( Servlet of
  different application. not the GWT servlet)  on the same server  using
  POST. The servlet is getting the Request (xml string) from GWT client
  app and responding with a xml string ( appeared in the servlet logs).
  But the GWT client's  onResponseReceived () always return a status
  code 0 with response data null.
 
  here  the basic code i am using. no fancy of it.
 
  String eventParticipationReq=Count id=\1\/Count;
  String serverURL=http://myserver:8080/b1/MyServlet?;;
  Log.info(serverURL);
  Log.info(eventParticipationReq);
  RequestBuilder builder = new
 RequestBuilder(RequestBuilder.GET,
  serverURL);
  try {
 
Log.info(Request Data
 :+eventParticipationReq);
Request response = builder.sendRequest(, new
  RequestCallback() {
  public void onError(Request request,
 Throwable exception) {
  // Couldn't connect to server (could be
 timeout, SOP
  violation, etc.)
   }
 
   public void onResponseReceived(Request
 request, Response
  response) {
   Log.info(+response.getStatusCode());
   Log.info(+request.isPending());
   if (200 == response.getStatusCode()) {
 Log.info(response.getText());
 } else {
   // Handle the error.  Can get the status
 text from
  response.getStatusText()
 }
   }
 });
return null;
  } catch (RequestException e) {
// Code omitted for clarity
  e.printStackTrace();
  }
 
  =
 
  Can some one please let me know what i should  change in the code?

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



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



Re: .gwt-TabBarItem - setting Max width

2010-08-12 Thread lineman78
You will need 3 things:

white-space: nowrap;
overflow: hidden;
max-width: 30px;

However, max-width is not fully supported in IE.  You can fix this in
a couple ways.

1) Use IE's CSS expression.
2) CssResource has some ways of getting values and acting on them, but
I believe this is only run once.
3) (Best Option) Whenever you add or remove a tab or the window is
resized recalculate whether the max-width is exceeded and set the
width to max-width, if not set it to auto.

On Aug 11, 2:14 pm, Bhavik bhavikr...@gmail.com wrote:
 Hi,

 I am trying to set a max width value on the Tab-Bar item but it seems
 that the size of the item is always equivalent to the size of the text
 entered for the barItem.
 I am trying to implement a google chrome style tab panel structure
 where if the number of tab increases the size of each tab is
 readjusted.Is there any option to this.

 .gwt-TabBarItem {
         max-width: 30px;
         margin-right: 3px;
         margin-bottom: 2px;
         padding: 1px 5px;
         background-color: #C6CAB7;
         color: white;
         font-size: 10pt;
         cursor: pointer;

 }

 Thanks,
 Bhavik

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



Re: RequestCallback.onResponseReceived() always returning status code 0

2010-08-12 Thread Jaya
Thanks Phillippe,

I now noticed after deploying the GWT web app on the same domain like
http://mydomain/u2/Gwt.html, it is not getting the response after
calling the http://mydomain.com/u1/MySerlet. The 'MyServlet' is
getting request from Gwt.html and sending the response to GWT.html.Can
you please suggest any thing i should look into.? I am trying all
possible ways. Interestingly the request has been sent to servlet. I
don't know whether the  request can be sent in the first place  if it
is against the SOP.

On Aug 12, 8:50 am, Philippe Laflamme philippe.lafla...@gmail.com
wrote:
 Oops. It should have read:

 [...] is considered a cross-site request (per the same-origin
 policy). [...]

 Philippe

 On Aug 11, 9:52 am, Philippe Laflamme philippe.lafla...@gmail.com
 wrote:



  Had the same issue. In my case, it was due to making cross-site
  requests.

  My server was at localhost:8080 and I was running in DevMode at
  localhost:. Making a request from : to :8080 is considered a
  cross-site request (which is not per the same-origin policy).

  The behaviour in Firefox was that it would return 0 as the status code
  and prevent accessing the HTTP headers.

  I solved this issue by running a transparent proxy on : in
  DevMode. The proxy forwards everything to :8080. I provided the
  solution 
  here:http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

  Hope it helps,
  Philippe

  On Aug 10, 5:11 pm, Jaya jp.a...@gmail.com wrote:

   Hi All,
   I have deployed the GWT web app ( only client code. no server code is
   present) on JBOSS. web client is accessing a URL ( Servlet of
   different application. not the GWT servlet)  on the same server  using
   POST. The servlet is getting the Request (xml string) from GWT client
   app and responding with a xml string ( appeared in the servlet logs).
   But the GWT client's  onResponseReceived () always return a status
   code 0 with response data null.

   here  the basic code i am using. no fancy of it.

                   String eventParticipationReq=Count id=\1\/Count;
                   String serverURL=http://myserver:8080/b1/MyServlet?;;
                   Log.info(serverURL);
                   Log.info(eventParticipationReq);
                   RequestBuilder builder = new 
   RequestBuilder(RequestBuilder.GET,
   serverURL);
                           try {

                             Log.info(Request Data 
   :+eventParticipationReq);
                         Request response = builder.sendRequest(, new
   RequestCallback() {
                               public void onError(Request request, 
   Throwable exception) {
                                   // Couldn't connect to server (could be 
   timeout, SOP
   violation, etc.)
                                }

                                public void onResponseReceived(Request 
   request, Response
   response) {
                                    Log.info(+response.getStatusCode());
                                    Log.info(+request.isPending());
                                    if (200 == response.getStatusCode()) {
                                      Log.info(response.getText());
                                  } else {
                                    // Handle the error.  Can get the status 
   text from
   response.getStatusText()
                                  }
                                }
                              });
                         return null;
                       } catch (RequestException e) {
                         // Code omitted for clarity
                           e.printStackTrace();
                       }

   =

   Can some one please let me know what i should  change in the code?

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



How do I set the border around elements in a DockLayoutPanel?

2010-08-12 Thread Greg Dougherty
The topic pretty much says it all.  I know how to do this for a
DockPanel.  How do I do it for a DockLayoutPanel?

Yes, I know, use uibinder.  That doesn't work when you're building
things grammatically, which is what I'm doing.

BTW, why don't the Showcase application use ANY *LayoutPanels?  I
thought they were supposed to be the preferred way to do things, no?

Greg

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



Re: Clicking HyperLink Twice or more...

2010-08-12 Thread Thomas Broyer


On 12 août, 14:49, Santosh kumar kopp@gmail.com wrote:
 Hi,

 I am using GWT HyperLinks in my Project, i want some clarification about
 these links.
 when i click on the link for the first time it works fine. Immediately when
 i click the same link its not working.
 Like control is not coming to that link.. is their any logic to get the
 control to the link when its get clicked continuously.
 please can any one answer to my doubt ???

Hyperlink calls History.newItem on clicks, and History.newItem won't
fire a ValueChangeEvent if the target token is the same as the current
one (as, obviously, there would be no change in value).
You might want to use a Label (or maybe Anchor if you want it to
really work like a link, with the ability to open in a new window/tab,
copy link URL, etc.) with a ClickHandler in which you'd call
History.newItem *and* do what you want to do (or: call newItem(token,
false) and then fireCurrentHistoryState if you really want to keep
your logic ValueChangeHandlers)

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



Re: compile report

2010-08-12 Thread Katharina Probst
You can just add this to your .gwt.xml:

set-property name=user.agent value=gecko1_8/ (or whatever user agent
you want).

You can also define a new module for separate compilation with
-compileReport.  This is described
herehttp://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
.

kathrin



On Thu, Aug 12, 2010 at 8:06 AM, ben fenster fenster@gmail.com wrote:

 can anyone tell me how to create a compile report for just one
 permutation


 On 11 אוגוסט, 18:50, Katharina Probst kpro...@google.com wrote:
  It's possible that it's not stuck, but actually building a compile report
  for all your 42 permutations (you can look into your extra directory and
 see
  if it's happily outputting stuff there).  That could take a while, as
 it's
  going through all kinds of compilation information and building up a lot
 of
  html files.
 
  Unless you are specifically interested in comparing all your 42 compile
  reports (that would be a bit tedious...), you will probably want to
 restrict
  your compilation with compile reports to some key permutations, e.g., one
  per browser family.
 
  kathrin
 
  On Wed, Aug 11, 2010 at 12:16 PM, cokol eplisc...@googlemail.com
 wrote:
   please post your gwt.xml module descriptor
 
   On 11 Aug., 18:03, ben fenster fenster@gmail.com wrote:
?
 
On 11 אוגוסט, 15:21, ben fenster fenster@gmail.com wrote:
 
 can anyone tell me why when i compile without compile report flag
 the
 compilation finishes ok and when i use the flag the compilation
 gets
 stuck at the end after all the permutation is finished here is the
 report:
Compiling 42 permutations
   Compiling permutation 0...
   Compiling permutation 1...
   Compiling permutation 2...
   Compiling permutation 3...
   Compiling permutation 4...
   Compiling permutation 5...
   Compiling permutation 6...
   Compiling permutation 7...
   Compiling permutation 8...
   Compiling permutation 9...
   Compiling permutation 10...
   Compiling permutation 11...
   Compiling permutation 12...
   Compiling permutation 13...
   Compiling permutation 14...
   Compiling permutation 15...
   Compiling permutation 16...
   Compiling permutation 17...
   Compiling permutation 18...
   Compiling permutation 19...
   Compiling permutation 20...
   Compiling permutation 21...
   Compiling permutation 22...
   Compiling permutation 23...
   Compiling permutation 24...
   Compiling permutation 25...
   Compiling permutation 26...
   Compiling permutation 27...
   Compiling permutation 28...
   Compiling permutation 29...
   Compiling permutation 30...
   Compiling permutation 31...
   Compiling permutation 32...
   Compiling permutation 33...
   Compiling permutation 34...
   Compiling permutation 35...
   Compiling permutation 36...
   Compiling permutation 37...
   Compiling permutation 38...
   Compiling permutation 39...
   Compiling permutation 40...
   Compiling permutation 41...
Compile of permutations succeeded
 at this point it is stuck and the java process takes 600mb
 pls 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-tool...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

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



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



Re: String.matches() does not work with \p{ASCII}

2010-08-12 Thread Thomas Broyer


On 12 août, 15:40, cokol eplisc...@googlemail.com wrote:
 and if you really want to check for ascii why dont u just check for
 the ascii code?

Such as [\\u-\\u007F]*

 try java.lang.Character to check or write in JSNI
 small for-each testing if decimal value of char is greater than 127 is
 faster than a regex evaluation

Are you sure? given that trimming blanks is faster with regexes
(str.replace(/^\s+/, ).replace(/\s+$/, )), I tend to think that
regexes are really fast.

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



Re: why we probably won't use GWT for a large UI project

2010-08-12 Thread lineman78
I can't help you with the TileGrid other than saying that you could
write something similar yourself with a little effort assuming you are
willing to overlook some of the niceties such as animation.  I have
used SmartGWT in the mast and would warn you to use extreme caution in
making the decision to use it.  It is not a GWT implementation, but a
GWT wrapper around an existing javascript library, so you don't get
all the advantages the GWT compiler gives you such as dead code
elimination and obfuscation.  The SmartClient JS library is modular,
so you can only load the modules you need, but as with any JS library
I would estimate most sites only use 10-20% of the code they download
and load.  Also, SmartClient and ExtJs both use a heavy layout engine,
which I have noticed causes major slowing in IE.

Unfortunately I cannot provide source code, but I can point you to
some resources and explain my approach.  Here is an article by some
GWT contributors on overlay types that should help you get started:

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

I am using what they call the old way in that wiki.  To further
expedite things, which you might consider depending on the size of
your project; I have written an overlay type generator.  All I have to
do is write an interface for the overlay type and have the interface
extend JsonObject and it will generate the overlay type for me:

public interface JsonObject {
public void setJso(JavaScriptObject jso);
public JavaScriptObject getJso();
public void setJson(String json);
public String getJson();
}

public interface Shape extends JsonObject {
public void setArea(double area);
public double getArea();
}

GWT.create(Shape.class); produces:

public class ShapeJso implements Shape {
private JavaScriptObject jso;

...

public void setArea(double area)
{
setAreaImpl(jso, area);
}

private native void setAreaImpl(JavaScriptObject jso, double area)
/*-{
jso.area = area;
}-*/;

...
}

This is very simplified, but I have given you a few hints to some of
the tricks I had to use to get the generator method to work(see:
JsonObject).  Usually you would extend JavaScriptObject, but in order
to get the generator to work right I had to save it as an attribute.
You will want to consider if the generator is the right approach, I
think it took me a good 8-10 hours in the end to make a generator that
works for almost every case.  But you can get one that works for most
cases in 2-4 hours as long as you aren't doing anything too complex.

On Aug 11, 3:01 pm, marius.andreiana marius.andrei...@gmail.com
wrote:
 Hey,

 On Aug 11, 11:00 pm, lineman78 linema...@gmail.com wrote: As far as 
 SmartGWT goes, I will warn you that I think the problems and
  performance hits you will run into are not worth the UI that you
  gain.  

 Thanks for the heads up. A hello world with data bound widgets seemed
 straightforward.

  Plus you must consider the licensing, which is required in
  order to use their data binding.

 Looks like we can use 
 thishttp://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/data/...
 under LGPL, and no Smart* server-side component.

  I commonly use REST and GWT in perfect harmony and it is very easy.
  Assuming you have the ability to output JSON instead of XML you can
  just use overlay types and get very efficient parsing.

 We have control over server APIs, and we have both JSON and XML. Would
 it be possible to share some sample code?

 . I personally
  don't know what TileGrid is,

 Seehttp://www.smartclient.com/smartgwt/showcase/#tiling_filter_sort
 d'n'd to sort. One should be able to change image captions, and have
 the customized data source trigger appropriate PUT requests to update
 the server items. I'd love to see this functionality from GWT.

  out of the box GWT isn't intended to
  be a widget library, but there are plenty of them out there.  Google
  is trying to add a lot more widget support which is evident by the
  data presentation widgets, but their original intent was to create a
  flexible and efficient cross compiler, not make a pretty UI library.

 Point taken.

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



Re: How to use gwt to synchronize outlook to get the appoitments of calendar

2010-08-12 Thread kgeri
Assuming a Java server backend the easiest way is using WebDAV and
connect to the Exchange server itself (unless the WebDAV connector is
disabled), you may get the calendar and mails from there.
See http://msdn.microsoft.com/en-us/library/aa143161(EXCHG.65).aspx
for some specs. But note that this approach will get quite messy,
since it lacks a proper Java library (you may have to write WebDAV
queries by hand). Also don't forget that you still need the user's
password for this to work.

It is not possible to use GWT for client-side interaction with Outlook
on the user's computer if you meant that.

Best regards
Gergely


On Aug 10, 3:16 pm, victor QIN bienvenue...@gmail.com wrote:
 When a user connects to the server, the server can get all the
 appointemnts of the outlook in this user's computer. How can I realize
 that? Thank you very much!!!

 On 8月6日, 下午7时04分, spierce7 spier...@gmail.com wrote:



  Your talking about a client side program that goes into the users
  system and pulls data?

  On Aug 6, 12:52 pm, victor QIN bienvenue...@gmail.com wrote:

   Hello,

  I want to use gwt to connect with outlook and get the appointments
   of outlook. Is there any api for that? Thanks a lot.

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



Re: Making GWT look good...

2010-08-12 Thread Thiago Miranda de Oliveira
We're developing a web 2.0 style app with gwt too, using the
UiBinder to construct our panels and the GQuery API to interact with
them ( that can be learned more about in here http://code.google.com/p/gwtquery/
).

Is there any chance that the GQuery will be included on the GWT core?


On Aug 12, 9:11 am, Uberto Barbini ube...@ubiland.net wrote:
 We're developing a web 2.0 style app with gwt.
 I cannot post url here (not yet) but the goal is something like
 basecamp or twitter, nothing to do with desktop style widget (also
 cool ones like vaadin).

 Our experience so far:
 1. UiBinder is much better than try to create our own widget by code.
 2. it's still much harder to get good looking results with GWT than
 with plain html with Jquery.
 3. overall gwt is worth the pain 10 times if you add snappiness of
 resulting application, debug, and code reuse.

 about #2 there is absolutely no documentation on css and uibinder from
 a designer point of view.
 For example any half decent designer nowadays would use div and span
 to create nice layout, while all gwt panels are still using nested
 tables.

 cheers
 Uberto



 On Wed, Aug 11, 2010 at 7:40 PM, Marcelo Magno marceloma...@gmail.com wrote:
  Worth to mention their debug mode where you can find design problems.

  Try to click on the analyse layouts button:
 http://demo.vaadin.com/sampler/?debug=true

  so +1 for Vaadin

  Marcelo Magno

  On Wed, Aug 11, 2010 at 1:17 PM, Steve Wart steve.w...@gmail.com wrote:

  Vaadin looks good, and it makes sense to keep the client-side load
  light, especially with touch devices becoming prevalent.

  But it doesn't seem great (so far) for touch UI work, and I think the
  everything in Java mantra is sub-optimal. While Vaadin has hooks for
  CSS and hand-crafted JavaScript, my ideal toolset would better support
  the developers who can make these technologies sing.

  On Wed, Aug 11, 2010 at 7:42 AM, Kevin Qiu kevin.jing@gmail.com
  wrote:
   +1 for Vaadin.
   Their widgets are very polished and professional. GXT and SmartGWT are
   fine
   but they're too desktop-looky, not Web2.0 looky...

   On Mon, Aug 9, 2010 at 4:03 PM, marius.andreiana
   marius.andrei...@gmail.com wrote:

   Hi Chi,

   On Aug 9, 10:23 pm, Chi H c...@chi.ca wrote:
 * Pagination is the standard solution to the 'large number of
entities' problem.  However, there is a usability cost to pagination.
It would be really nice to get rid of the pagination and just use a
scrollbar.   If you used the approach of SlickGrid (http://
wiki.github.com/mleibman/SlickGrid/), where you only rendered what
was
visible on the screen, you can render large numbers entities without
the need for pagination.

   How will search engines index all the content in this case?

   The SlickGrid widget doesn't work at all if JS is not enabled.

   Thanks

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

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

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

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

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



Re: why we probably won't use GWT for a large UI project

2010-08-12 Thread Kevin Qiu
Totally agree with lineman78 on the use of SmartGWT. We used SmartGWT to
build a prototype, only to find out that mixing Js library wrapper with
native GWT is bad. It's super easy in SmartGWT if you're building a simple
CRUD application, but anything beyond that which requires customized widgets
in GWT, then good luck, not to mention you can't use all the benefits of the
GWT compiler. We're currently using ExtGWT. It's nicer in that it's (mostly)
natively GWT, so you can always trace down the Java code, but still it's
layout is expensive, and widgets are not 100% compatible with the GWT widget
system. The event system is a mess to work with. We really need a good UI
library, preferrably supported by Google that's built on top of vanilla GWT
widgets.

On Thu, Aug 12, 2010 at 1:22 PM, lineman78 linema...@gmail.com wrote:

 I can't help you with the TileGrid other than saying that you could
 write something similar yourself with a little effort assuming you are
 willing to overlook some of the niceties such as animation.  I have
 used SmartGWT in the mast and would warn you to use extreme caution in
 making the decision to use it.  It is not a GWT implementation, but a
 GWT wrapper around an existing javascript library, so you don't get
 all the advantages the GWT compiler gives you such as dead code
 elimination and obfuscation.  The SmartClient JS library is modular,
 so you can only load the modules you need, but as with any JS library
 I would estimate most sites only use 10-20% of the code they download
 and load.  Also, SmartClient and ExtJs both use a heavy layout engine,
 which I have noticed causes major slowing in IE.

 Unfortunately I cannot provide source code, but I can point you to
 some resources and explain my approach.  Here is an article by some
 GWT contributors on overlay types that should help you get started:

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

 I am using what they call the old way in that wiki.  To further
 expedite things, which you might consider depending on the size of
 your project; I have written an overlay type generator.  All I have to
 do is write an interface for the overlay type and have the interface
 extend JsonObject and it will generate the overlay type for me:

 public interface JsonObject {
public void setJso(JavaScriptObject jso);
public JavaScriptObject getJso();
public void setJson(String json);
public String getJson();
 }

 public interface Shape extends JsonObject {
public void setArea(double area);
public double getArea();
 }

 GWT.create(Shape.class); produces:

 public class ShapeJso implements Shape {
private JavaScriptObject jso;

...

public void setArea(double area)
{
setAreaImpl(jso, area);
}

private native void setAreaImpl(JavaScriptObject jso, double area)
/*-{
jso.area = area;
}-*/;

...
 }

 This is very simplified, but I have given you a few hints to some of
 the tricks I had to use to get the generator method to work(see:
 JsonObject).  Usually you would extend JavaScriptObject, but in order
 to get the generator to work right I had to save it as an attribute.
 You will want to consider if the generator is the right approach, I
 think it took me a good 8-10 hours in the end to make a generator that
 works for almost every case.  But you can get one that works for most
 cases in 2-4 hours as long as you aren't doing anything too complex.

 On Aug 11, 3:01 pm, marius.andreiana marius.andrei...@gmail.com
 wrote:
  Hey,
 
  On Aug 11, 11:00 pm, lineman78 linema...@gmail.com wrote: As far as
 SmartGWT goes, I will warn you that I think the problems and
   performance hits you will run into are not worth the UI that you
   gain.
 
  Thanks for the heads up. A hello world with data bound widgets seemed
  straightforward.
 
   Plus you must consider the licensing, which is required in
   order to use their data binding.
 
  Looks like we can use thishttp://
 www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/data/...
  under LGPL, and no Smart* server-side component.
 
   I commonly use REST and GWT in perfect harmony and it is very easy.
   Assuming you have the ability to output JSON instead of XML you can
   just use overlay types and get very efficient parsing.
 
  We have control over server APIs, and we have both JSON and XML. Would
  it be possible to share some sample code?
 
  . I personally
   don't know what TileGrid is,
 
  Seehttp://www.smartclient.com/smartgwt/showcase/#tiling_filter_sort
  d'n'd to sort. One should be able to change image captions, and have
  the customized data source trigger appropriate PUT requests to update
  the server items. I'd love to see this functionality from GWT.
 
   out of the box GWT isn't intended to
   be a widget library, but there are plenty of them out there.  Google
   is trying to add a lot more widget support which is evident by the
   data presentation widgets, but their original intent was 

Re: How do I set the border around elements in a DockLayoutPanel?

2010-08-12 Thread dane.molotok
How did you do it with a DockPanel? Wouldn't you want to style the
elements you've placed in the panel? So it shouldn't matter if it's a
DockPanel or a DockLayoutPanel.

On Aug 12, 12:09 pm, Greg Dougherty dougherty.greg...@mayo.edu
wrote:
 The topic pretty much says it all.  I know how to do this for a
 DockPanel.  How do I do it for a DockLayoutPanel?

 Yes, I know, use uibinder.  That doesn't work when you're building
 things grammatically, which is what I'm doing.

 BTW, why don't the Showcase application use ANY *LayoutPanels?  I
 thought they were supposed to be the preferred way to do things, no?

 Greg

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



Re: Building two war-files with Maven using different web.xml

2010-08-12 Thread dane.molotok
Have you thought about using the maven-assembly-plugin to generate a
secondary end-state? Just an idea.

On Aug 12, 6:23 am, Stephan T stephan.tern...@gmail.com wrote:
 I need to build two war files with different web.xml files becuase of
 different servlet filter configurations depending on which server it
 will be deployed on.

 It will be deployed on two server simultaneously. I'd rather build two
 war files during one build, because that will always be the scenario.
 Feels a bit quirky to fiddle with profiles etc.

 I have successfully managed to get something similar working when
 building another artifact in the project using executions, but that
 artifact is a jar, and I can't seem to get this to work with the maven
 war plugin.

 This is the error I get now::
 Error assembling WAR: Deployment descriptor: W:\trunk\web\target
 \web-2.2.4-SNAPSHOT\WEB-INF\web.xml does not exist.

 And this is a snippet from my pom.xml which produces the error:
   plugin
         groupIdorg.apache.maven.plugins/groupId
         artifactIdmaven-war-plugin/artifactId
         executions
                 execution
                         idpackage-int/id
                         phasepackage/phase
                         goals
                                 goalwar/goal
                         /goals
                         configuration
                                 warSourceDirectorywar/warSourceDirectory
                                 webXmlwar/WEB-INF/web.xml/webXml
                         /configuration
                 /execution
                 execution
                         idpackage-ext/id
                         phasepackage/phase
                         goals
                                 goalwar/goal
                         /goals
                         configuration
                                 warSourceDirectorywar/warSourceDirectory
                                 webXmlsrc/main/web/ext/web.xml/webXml
                         /configuration
                 /execution
     /executions
   /plugin

 I also realize that this hasn't got anything with GWT to do :) But
 since this mail list is heavy on webapp/java knowledgable people and
 maven is often used to build these kind of products, I guess someone
 might know...

  // S

 On 6 Aug, 19:14, andreas horst.andrea...@googlemail.com wrote:



  I don't think you can do that in one build.

  But you can use profiles to have two different builds. Of course you
  will have to build twice, once for each profile but with that you'll
  have the different builds. I use profiles to run hosted_mode target
  with fake service servlet implementations and web.xml with appropriate
  mapping and no security constraints. The normal build will use the
  deploy web.xml with real servlet mapped and security constraints.

  For me this works pretty good and you will not have to alter files
  (especially pom.xml) for this or that and hence get messy conflicts
  with your version system.

  Regards,

  Andreas

  On 6 Aug., 19:02, dane.molotok dane.molo...@gmail.com wrote:

   I've thought about doing that also, in order to to have a war where
   my .gwt.xml inherits the Debug module, and one that does not, but I'm
   beginning to think it's not even buying me much to find out how to do
   it. I'm assuming you have a similar reason for wanting to do this?

   On Aug 6, 3:57 am, Stephan T stephan.tern...@gmail.com wrote:

I'm using the GWT-plugin forMavento build my application. I want to
build two war-files where the only difference is that I want to use a
different web.xml.

How do I achieve that?

Here's my pom.xml:
?xml version=1.0 encoding=UTF-8?
project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
        
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0...;
        modelVersion4.0.0/modelVersion

        nameWeb Application/name
        groupIdmy.company/groupId
        artifactIdweb/artifactId
        version${web-version}/version
        packagingwar/packaging

        parent
                groupIdmy.company/groupId
                artifactIdbuild/artifactId
                version${version}/version
                relativePath../build/pom.xml/relativePath
        /parent

        build
                outputDirectorywar/WEB-INF/classes/outputDirectory
                plugins
                        plugin
                                groupIdorg.codehaus.mojo/groupId
                                
artifactIdgwt-maven-plugin/artifactId
                                executions
                                        execution
                                                goals
                                                        
goalcompile/goal
                                                        

Re: synchronize asynchronous calls?

2010-08-12 Thread Kevin Qiu
Thanks. That's helpful.

On Thu, Aug 12, 2010 at 12:05 PM, Jeff Chimene jchim...@gmail.com wrote:

 On 08/12/2010 08:38 AM, salk31 wrote:
  Don't you have to count the async returning and then do yet another
  callback?
 
  So hook into the callback of all your commands and then when the last
  one is done do the callback?

 Extending salk31's logic:
 Put your execute() inside a loop, inside an IncrementalCommand. Your
 execute() routine implements a mutex. The loop terminates per salk31's
 observation. The execute() routine sets the mutex before the async call,
 and clears it in OnResponseReceived(), OnError(). The loop checks that
 mutex and immediately returns to the IncrementalCommand if set. In FF
 3.6, I found it was too easy to overload the server (resulting in
 response timeouts) w/o serializing the calls via a mutex. IOW, simply
 allowing the brower's RPC queue to serialize (i.e. clear the execute()
 queue as fast as possible) resulted in dropped calls.

 I believe the above will work w/ Java RPC.

 If there are many list elements, you might want a timer that controls a
 loading... message.

 Also, you might want to evaluate at the Dictionary class to see if
 that's a better fit for the problem you're trying to solve.

 
  On Aug 12, 3:30 pm, Kevin Qiu kevin.jing@gmail.com wrote:
  I don't know if the title makes sense but working with gwt for about 2
  years, I often find myself in the position to mix both asynchronous and
  synchronous (blocking) apis. It's easy to transform a synchronous call
 to
  asynchronous, but the other way around is not immediately obvious to me,
  especially in the context of the single-threaded browser environment.
 
  Imagine I the following:
 
  abstract class GetListT {
abstract void execute(AsyncCallbackListT callback);
 
  }
 
  class GetContactList extends GetListContact {
void execute(AsyncCallbackListContact callback) { /*
 implementation */
 
  }
  }
 
  class GetAddressList extends GetListAddress {
void execute(AsyncCallbackListAddress callback) { /*
 implementation */
 
  }
  }
 
  class GetPhoneList extends GetListPhone {
void execute(AsyncCallbackListPhone callback) { /* implementation
 */ }
 
  }
 
  now imagine I keep a list of GetList objects:
  ListGetList commands = Arrays.asList(new GetContactList(), new
  GetAddressList(), new GetPhoneList());
 
  and I have an executor that executes these commands:
 
  class Executor {
List? extends GetList? commands;
Executor(List? extends GetList? commands) {
  this.commands = commands;
}
void execute() {
// XXX:
}
 
  }
 
  Now, for whatever reason, I need my execute() method to be a blocking
 call
  (synchronous). It should terminate after all GetList calls are returned.
 How
  can I achieve this?
 

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



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



Re: How do I set the border around elements in a DockLayoutPanel?

2010-08-12 Thread Greg Dougherty
With a DockPanel I just create a CSS style, and apply it to the
Panel.  I did that with a DockLayoutPanel, and nothing seemed to
happen.  I searched the archives of this group for CSS and
DockLayoutPanel, and the concolusion I came to is that CSS doesn't
work with DLPs.  If that's not correct, I'd love to hear it, and see
an example of how to do it correctly.

Presumably the people writing GWT actually test the features they put
in it.  Given the paucity of example code, this belief has to remain
merely an assumption. :-(

Greg

On Aug 12, 12:59 pm, dane.molotok dane.molo...@gmail.com wrote:
 How did you do it with a DockPanel? Wouldn't you want to style the
 elements you've placed in the panel? So it shouldn't matter if it's a
 DockPanel or a DockLayoutPanel.

 On Aug 12, 12:09 pm, Greg Dougherty dougherty.greg...@mayo.edu
 wrote:

  The topic pretty much says it all.  I know how to do this for a
  DockPanel.  How do I do it for a DockLayoutPanel?

  Yes, I know, use uibinder.  That doesn't work when you're building
  things grammatically, which is what I'm doing.

  BTW, why don't the Showcase application use ANY *LayoutPanels?  I
  thought they were supposed to be the preferred way to do things, no?

  Greg

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



Re: Caching issue in host mode?

2010-08-12 Thread markM
I believe the issue I was having is because I'm not using the -
noserver option as is explained in Google's FAQ.  However, the odd
thing is that I originally got my GWT Server Library / Spring
integration working briefly under the built in Jetty instance.  Not
sure how this was possible but it worked briefly as I was able to set
a breakpoint in the serverside extends GWTSpringController class
using a Spring DispatcherServlet and the breakpoint was hit.  Haven't
been able to get it to work since then (that is 404 error on the
nochache.js file since it stopped working) and the following FAQ as
well as the GWT Server Library FAQ both say that the only way to go is
to use the -noserver option and an external server such as Tomcat that
supports -server.xml files etc.

http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html

This is a really big ease of use issue with respect to GWT.  Folks
are going to want to use facilities  such as the -server.xml stuff.
I'm going through the nightmare of using the -noserver option and its
a real pain.  I'm going to have to copy files manually to the tomcat
instance, I will now have to run two programs from within Eclipse (one
for client side debugging and another for server side debugging).  In
order to setup the second project I had to figure out how to manually
update my .project files and .settings folder files to bring new
natures and such into use.

If the GWT developers want this tool to gain mass usage well beyond
current usage these sorts of ease of use things need to be looked
into futher.  Can the built in instance be a Tomcat instance for
instance?  Or at least you could have the Eclipse plugin setup
the .project and .settings files so that its ready to run the
additional server side program for debugging serverside.  Galileo
comes with a Tomcat instance already so folks running Eclipse wouldn't
have to worry about installing Tomcat.

GWT is an awesome tool, I really get the whole facilitating 6 million
Java developers to do web development thing and not rebuilding the
wheel with respect to IDE's etc, and I have some nightmare JSF
experience under my belt to compare it with. GWT really blows away any
technology that requires the use of jsp's.  I'm trying to sell GWT
within my company but when folks that are new to the technology have
to spend a bunch of time mucking around with xml files just to get
basic debugging working it becomes a hard sell.  I'll wait it out but
I hope some of the issue above can be addressed within the next couple
of years.

By the way, here's what I needed to do to get the GWT Server Library
portion working (setting aside the -noserver issues).

1) Inherit your RPC class from GWTSpringController instead of
RemoteService
2) Add the following to web.xml
servlet
servlet-namegwtspringcontroller/servlet-name
servlet-class
org.springframework.web.servlet.DispatcherServlet
/servlet-class
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-namegwtspringcontroller/servlet-name
url-pattern/gwtserverlibtest2/*/url-pattern
/servlet-mapping

3) Create the file gwtspringcontroller-server.xml (note that the file
name begins with gwtspringcontroller which is the same name as the
servlet above) and place it in the same directory as web.xml.
4) put the following contents into the gwtspringcontroller-server.xml
file

?xml version=1.0 encoding=UTF-8?
!DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN http://
www.springframework.org/dtd/spring-beans.dtd

beans
bean
class=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
property name=mappings
map
entry key=/greet 
value-ref=GreetingServiceImpl /
/map
/property
/bean

bean id=GreetingServiceImpl
class=com.pfizer.test.server.GreetingServiceImpl/
/beans

5) Additionally you'll need certain spring jar files as well as the
gwt server library jar file gwt-sl-1.1.jar.  I did find that I was
missing a lot of libraries but the errors that showed up in the
Eclipse console from Jetty were explicit as to the classes that were
missing so it was not too difficult to find those jar files.  Here is
a list of jar files in my project (not that you'll need all of them).
antlr-2.7.6.jar
aopalliance-1.0.jar
appengine-api-1.0-sdk-1.3.3.1.jar
appengine-api-labs-1.3.3.1.jar
appengine-jsr107cache-1.3.3.1.jar
aspectjweaver-1.6.2.jar
beanlib-5.0.2beta.jar
beanlib-hibernate-5.0.2beta.jar
cglib-nodep-2.1_3.jar
commons-collections-3.2.jar
commons-dbcp-1.2.2.jar
commons-lang-2.2.jar
commons-logging-1.1.1.jar
commons-pool-1.4.jar
csl-security.jar
csl-util.jar
datanucleus-appengine-1.0.6.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
dom4j-1.6.1.jar
geronimo-jpa_3.0_spec-1.1.1.jar

Re: GWT compiler breaks valid JS

2010-08-12 Thread André Moraes
Running the compiled code and the hand-made code the desired effect happens
(black background with white square).

I tested on Chrome 6 and FF 3.6.6

The only thing to notice is that i placed the code before the body tag, the
html that i used was:

html
  headtitleTeste/title/head
  body
  /body

  script type=text/javascript
$doc = document;
document_0 = $doc;
body = document_0.body;
body.setAttribute('bgcolor', 'black');
ele = document_0.createElement('div');
ele.innerHTML = 'div style=z-index: 0;position: absolute;left:
0px;top: 0px;width: 100px;height: 100px;overflow: hidden;background-color:
rgb(255, 255, 255);\/div';
body.appendChild(ele);
  /script
/html

If I place the code before the body the code don't work, but this is
expected since the browser execute the code when it reads the code, and
placing it before the body, the browser still don't know about the body tag.

Maybe this can help, since it work on hosted mode and only breaks on
compiled mode, this probably is a loading problem.

Hope it helps.

-- 
André Moraes
Analista de Desenvolvimento de Sistemas
andr...@gmail.com
http://andredevchannel.blogspot.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RE: WSDL

2010-08-12 Thread Armishev, Sergey
When you have pretty big WSDL file the problem is how automatically generate 
not only server side stubs but GWT RPC calls and data structures that GWT 
client can use. You don't want to program all those API manually. I used SUN 
jax rpc for that http://java.sun.com/webservices/jaxrpc/overview.html.  Example
WSDL
  complexType name=NmsObject
   sequence
 element name=ObjectType type=xsd:int minOccurs=1 maxOccurs=1/
 element name=Initialized type=xsd:boolean minOccurs=1 
maxOccurs=1/
   /sequence
  /complexType

jaxrpc compiler then generates the following code (see below). For GWT you need 
to change those generated classes (either manually or from script) 
1. make class serializable
public class NmsObject implements java.io.Serializable
2.Change structures that doesn't have support in GWT like bigint or Calendar 


// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.3, build R1)
// Generated source version: 1.1.3

package com.yourcompany.client;


public class NmsObject {
protected int objectType;
protected boolean initialized;

public NmsObject() {
}

public NmsObject(int objectType, boolean initialized) {
this.objectType = objectType;
this.initialized = initialized;
}

public int getObjectType() {
return objectType;
}

public void setObjectType(int objectType) {
this.objectType = objectType;
}

public boolean isInitialized() {
return initialized;
}

public void setInitialized(boolean initialized) {
this.initialized = initialized;
}
}

-Sergey

-Original Message-
From: google-web-toolkit@googlegroups.com 
[mailto:google-web-tool...@googlegroups.com] On Behalf Of mikedshaf...@gmail.com
Sent: Tuesday, August 10, 2010 10:27 AM
To: Google Web Toolkit
Subject: Re: WSDL

To follow up on the other replyyou have to do this on the server,
in Java.  Apache Axis is a great way to do it...  But it won't work on
the client in the emulated JRE (I suspect since I've never tried it,
but I doubt it will)


On Aug 10, 3:27 am, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi All,

 I need to consume several cross-domain wsdl files and get data by calling
 methods from wsdl. I dont know how to do this using GWT.
 Pls suggest. I am using GWT 2.1 m2

 Thanks
 Deepak

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

/PREBRspan 
style='font-size:8.0pt;font-family:Arial,sans-serif;color:#003366'
_BR 
This electronic message and any files transmitted with it containsBR
information from iDirect, which may be privileged, proprietaryBR
and/or confidential. It is intended solely for the use of the individualBR
or entity to whom they are addressed. If you are not the originalBR
recipient or the person responsible for delivering the email to theBR 
intended recipient, be advised that you have received this emailBR
in error, and that any use, dissemination, forwarding, printing, orBR copying 
of this email is strictly prohibited. If you received this emailBR
in error, please delete it and immediately notify the sender.BR
_ 
/SPANPRE

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



Re: GWT compiler breaks valid JS

2010-08-12 Thread consiliens
I'm testing on Firefox 3.6.8 and can consistently reproduce the issue. 
Here's a hosted version of the Java code compiled with the pretty output 
style.

http://69.164.194.47/gwt/Isotile.html

The .java file is here.
http://69.164.194.47/gwt/Isotile.java

If I comment out body.appendChild then the bgcolor of body is properly set.

Is this an issue with GWT?  Is there a better way to write the Java code?

Thanks for your help.

On 08/12/2010 01:07 PM, André Moraes wrote:

Running the compiled code and the hand-made code the desired effect
happens (black background with white square).

I tested on Chrome 6 and FF 3.6.6

The only thing to notice is that i placed the code before the body tag,
the html that i used was:

html
headtitleTeste/title/head
body
/body
script type=text/javascript
 $doc = document;
 document_0 = $doc;
 body = document_0.body;
 body.setAttribute('bgcolor', 'black');
 ele = document_0.createElement('div');
 ele.innerHTML = 'div style=z-index: 0;position: absolute;left:
0px;top: 0px;width: 100px;height: 100px;overflow:
hidden;background-color: rgb(255, 255, 255);\/div';
 body.appendChild(ele);
/script
/html

If I place the code before the body the code don't work, but this is
expected since the browser execute the code when it reads the code, and
placing it before the body, the browser still don't know about the body tag.

Maybe this can help, since it work on hosted mode and only breaks on
compiled mode, this probably is a loading problem.

Hope it helps.

--
André Moraes
Analista de Desenvolvimento de Sistemas
andr...@gmail.com mailto:andr...@gmail.com
http://andredevchannel.blogspot.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


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



Re: synchronize asynchronous calls?

2010-08-12 Thread Kevin Qiu
After some thought, I don't think putting it in IncrementalCommand and
execute with DeferredCommand help much here. Jeff, If I understand you
correctly, my execute method will look like this:

class Executor {
  // declaration of list of commands
  void execute() {
DeferredCommand.addCommand(new IncrementalCommand() {
  boolean executing;
  int currentIdx;

  public boolean execute() {
if (executing) return true;  // executor will keep looping
// it's my turn now
executing = true;
AsyncCommand cmd = commands.get(currentIdx);
cmd.execute(new AsyncCallback() {
  public void onFailure(Throwable e) { onSuccess(null); }
  public void onSuccess(Object o) {
executing = false;
++currentIdx;
  }
  }
  // return point
  }
}

The above method is actually still non-blocking. There's no guarantee that
my incremental command will finish executing before I reach //return point.
Did I miss anything?


On Thu, Aug 12, 2010 at 2:35 PM, Kevin Qiu kevin.jing@gmail.com wrote:

 Thanks. That's helpful.


 On Thu, Aug 12, 2010 at 12:05 PM, Jeff Chimene jchim...@gmail.com wrote:

 On 08/12/2010 08:38 AM, salk31 wrote:
  Don't you have to count the async returning and then do yet another
  callback?
 
  So hook into the callback of all your commands and then when the last
  one is done do the callback?

 Extending salk31's logic:
 Put your execute() inside a loop, inside an IncrementalCommand. Your
 execute() routine implements a mutex. The loop terminates per salk31's
 observation. The execute() routine sets the mutex before the async call,
 and clears it in OnResponseReceived(), OnError(). The loop checks that
 mutex and immediately returns to the IncrementalCommand if set. In FF
 3.6, I found it was too easy to overload the server (resulting in
 response timeouts) w/o serializing the calls via a mutex. IOW, simply
 allowing the brower's RPC queue to serialize (i.e. clear the execute()
 queue as fast as possible) resulted in dropped calls.

 I believe the above will work w/ Java RPC.

 If there are many list elements, you might want a timer that controls a
 loading... message.

 Also, you might want to evaluate at the Dictionary class to see if
 that's a better fit for the problem you're trying to solve.

 
  On Aug 12, 3:30 pm, Kevin Qiu kevin.jing@gmail.com wrote:
  I don't know if the title makes sense but working with gwt for about 2
  years, I often find myself in the position to mix both asynchronous and
  synchronous (blocking) apis. It's easy to transform a synchronous call
 to
  asynchronous, but the other way around is not immediately obvious to
 me,
  especially in the context of the single-threaded browser environment.
 
  Imagine I the following:
 
  abstract class GetListT {
abstract void execute(AsyncCallbackListT callback);
 
  }
 
  class GetContactList extends GetListContact {
void execute(AsyncCallbackListContact callback) { /*
 implementation */
 
  }
  }
 
  class GetAddressList extends GetListAddress {
void execute(AsyncCallbackListAddress callback) { /*
 implementation */
 
  }
  }
 
  class GetPhoneList extends GetListPhone {
void execute(AsyncCallbackListPhone callback) { /* implementation
 */ }
 
  }
 
  now imagine I keep a list of GetList objects:
  ListGetList commands = Arrays.asList(new GetContactList(), new
  GetAddressList(), new GetPhoneList());
 
  and I have an executor that executes these commands:
 
  class Executor {
List? extends GetList? commands;
Executor(List? extends GetList? commands) {
  this.commands = commands;
}
void execute() {
// XXX:
}
 
  }
 
  Now, for whatever reason, I need my execute() method to be a blocking
 call
  (synchronous). It should terminate after all GetList calls are
 returned. How
  can I achieve this?
 

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




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



Re: synchronize asynchronous calls?

2010-08-12 Thread Jeff Chimene
On 08/12/2010 12:50 PM, Kevin Qiu wrote:
 After some thought, I don't think putting it in IncrementalCommand and
 execute with DeferredCommand help much here. Jeff, If I understand you
 correctly, my execute method will look like this:
 
 class Executor {
   // declaration of list of commands
   void execute() {
 DeferredCommand.addCommand(new IncrementalCommand() {
   boolean executing;
   int currentIdx;
 
   public boolean execute() {
 if (executing) return true;  // executor will keep looping
 // it's my turn now
 executing = true;
 AsyncCommand cmd = commands.get(currentIdx);
 cmd.execute(new AsyncCallback() {
   public void onFailure(Throwable e) { onSuccess(null); }
   public void onSuccess(Object o) {
 executing = false;
 ++currentIdx;
   }
   }
   // return point
   }
 }
 
 The above method is actually still non-blocking. There's no guarantee
 that my incremental command will finish executing before I reach
 //return point. Did I miss anything?


Yes. There are two functions:
o function a()  which empties your commands list
o function b() which is the deferred command

The technique works. Give me a few minutes and I'll post a follow-up
message w/ some code.


 
 
 On Thu, Aug 12, 2010 at 2:35 PM, Kevin Qiu kevin.jing@gmail.com
 mailto:kevin.jing@gmail.com wrote:
 
 Thanks. That's helpful.
 
 
 On Thu, Aug 12, 2010 at 12:05 PM, Jeff Chimene jchim...@gmail.com
 mailto:jchim...@gmail.com wrote:
 
 On 08/12/2010 08:38 AM, salk31 wrote:
  Don't you have to count the async returning and then do yet
 another
  callback?
 
  So hook into the callback of all your commands and then when
 the last
  one is done do the callback?
 
 Extending salk31's logic:
 Put your execute() inside a loop, inside an IncrementalCommand. Your
 execute() routine implements a mutex. The loop terminates per
 salk31's
 observation. The execute() routine sets the mutex before the
 async call,
 and clears it in OnResponseReceived(), OnError(). The loop
 checks that
 mutex and immediately returns to the IncrementalCommand if set.
 In FF
 3.6, I found it was too easy to overload the server (resulting in
 response timeouts) w/o serializing the calls via a mutex. IOW,
 simply
 allowing the brower's RPC queue to serialize (i.e. clear the
 execute()
 queue as fast as possible) resulted in dropped calls.
 
 I believe the above will work w/ Java RPC.
 
 If there are many list elements, you might want a timer that
 controls a
 loading... message.
 
 Also, you might want to evaluate at the Dictionary class to see if
 that's a better fit for the problem you're trying to solve.
 
 
  On Aug 12, 3:30 pm, Kevin Qiu kevin.jing@gmail.com
 mailto:kevin.jing@gmail.com wrote:
  I don't know if the title makes sense but working with gwt
 for about 2
  years, I often find myself in the position to mix both
 asynchronous and
  synchronous (blocking) apis. It's easy to transform a
 synchronous call to
  asynchronous, but the other way around is not immediately
 obvious to me,
  especially in the context of the single-threaded browser
 environment.
 
  Imagine I the following:
 
  abstract class GetListT {
abstract void execute(AsyncCallbackListT callback);
 
  }
 
  class GetContactList extends GetListContact {
void execute(AsyncCallbackListContact callback) { /*
 implementation */
 
  }
  }
 
  class GetAddressList extends GetListAddress {
void execute(AsyncCallbackListAddress callback) { /*
 implementation */
 
  }
  }
 
  class GetPhoneList extends GetListPhone {
void execute(AsyncCallbackListPhone callback) { /*
 implementation */ }
 
  }
 
  now imagine I keep a list of GetList objects:
  ListGetList commands = Arrays.asList(new GetContactList(), new
  GetAddressList(), new GetPhoneList());
 
  and I have an executor that executes these commands:
 
  class Executor {
List? extends GetList? commands;
Executor(List? extends GetList? commands) {
  this.commands = commands;
}
void execute() {
// XXX:
}
 
  }
 
  Now, for whatever reason, I need my execute() method to be a
 blocking call
  (synchronous). It should terminate after all GetList calls
 

Re: Making GWT look good...

2010-08-12 Thread Manuel Carrasco Moñino
On Thu, Aug 12, 2010 at 7:49 PM, Thiago Miranda de Oliveira
thiago...@gmail.com wrote:
 We're developing a web 2.0 style app with gwt too, using the
 UiBinder to construct our panels and the GQuery API to interact with
 them ( that can be learned more about in here 
 http://code.google.com/p/gwtquery/
 ).

 Is there any chance that the GQuery will be included on the GWT core?


Someone from the Gwt team said in the contributors mailing list some
time ago, that It depends on the people using gquery and demanding a
css selector (or the entire gquery features) as part of the gwt core.



 On Aug 12, 9:11 am, Uberto Barbini ube...@ubiland.net wrote:
 We're developing a web 2.0 style app with gwt.
 I cannot post url here (not yet) but the goal is something like
 basecamp or twitter, nothing to do with desktop style widget (also
 cool ones like vaadin).

 Our experience so far:
 1. UiBinder is much better than try to create our own widget by code.
 2. it's still much harder to get good looking results with GWT than
 with plain html with Jquery.
 3. overall gwt is worth the pain 10 times if you add snappiness of
 resulting application, debug, and code reuse.

 about #2 there is absolutely no documentation on css and uibinder from
 a designer point of view.
 For example any half decent designer nowadays would use div and span
 to create nice layout, while all gwt panels are still using nested
 tables.

 cheers
 Uberto



 On Wed, Aug 11, 2010 at 7:40 PM, Marcelo Magno marceloma...@gmail.com 
 wrote:
  Worth to mention their debug mode where you can find design problems.

  Try to click on the analyse layouts button:
 http://demo.vaadin.com/sampler/?debug=true

  so +1 for Vaadin

  Marcelo Magno

  On Wed, Aug 11, 2010 at 1:17 PM, Steve Wart steve.w...@gmail.com wrote:

  Vaadin looks good, and it makes sense to keep the client-side load
  light, especially with touch devices becoming prevalent.

  But it doesn't seem great (so far) for touch UI work, and I think the
  everything in Java mantra is sub-optimal. While Vaadin has hooks for
  CSS and hand-crafted JavaScript, my ideal toolset would better support
  the developers who can make these technologies sing.

  On Wed, Aug 11, 2010 at 7:42 AM, Kevin Qiu kevin.jing@gmail.com
  wrote:
   +1 for Vaadin.
   Their widgets are very polished and professional. GXT and SmartGWT are
   fine
   but they're too desktop-looky, not Web2.0 looky...

   On Mon, Aug 9, 2010 at 4:03 PM, marius.andreiana
   marius.andrei...@gmail.com wrote:

   Hi Chi,

   On Aug 9, 10:23 pm, Chi H c...@chi.ca wrote:
 * Pagination is the standard solution to the 'large number of
entities' problem.  However, there is a usability cost to pagination.
It would be really nice to get rid of the pagination and just use a
scrollbar.   If you used the approach of SlickGrid (http://
wiki.github.com/mleibman/SlickGrid/), where you only rendered what
was
visible on the screen, you can render large numbers entities without
the need for pagination.

   How will search engines index all the content in this case?

   The SlickGrid widget doesn't work at all if JS is not enabled.

   Thanks

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

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

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

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

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

Re: How to build a rules-based form controller for a dyn. form in GWT

2010-08-12 Thread salk31
I'm with you that it seems very low level. If your users know enough
to write that much JS then
they would probably be better off with proper developer tools!?

So as you say, same engine but with more complete wizards might be
better.

 My key question in former posting thus becomes how to get these code
 snippets running in the preview and production window (the objects 
 wirings behind the scenes)???
I'm afraid I don't really see the problem here.

 Simple string copies into specific dom objects ... seem not to be
 sufficient, seem they?
In their example you would probably have to do something like reload
the constructed page so
script tags would be processed and old event handlers replaced/
removed.
In the design I was talking about, because the HTML/DOM, is just the
data model/config
you would just have to tell your Widgets to refresh themselves.

If you like Form Boss then you might be better off keeping it simple
(like them) and just working
on a chunk of HTML. Is certainly the most flexible way of doing it.
Quite a few off the shelf
WYSIWYG JS editors that let you write custom editor panels. Not very
GWT though ;)



On Aug 12, 5:18 pm, A.Augustini
alessandro.august...@googlemail.com wrote:
 Hello Sam,
 hello everybody:

 @Sam: I've have to digest your thoughts in your 2 last postings a
 little bit...

 ...but for the meanwhile: today I found Form Boss II, a commercial
 form wizard tool with an interesting ui and -- more important --
 some features that are close to mine. I think that these short intro
 vids (= 4 mins each) could make more comprehensive what I'm trying to
 achieve in GWT.

 1.http://www.formboss.net/j-wiz
    [especially last third of the vid on surveys]

 2.http://www.formboss.net/features
     =vid2 Conditional Fields
     also useful:
     =vid1 Conditional Page Logic
        (modified php logic for page routing)

 Here you'll see a multi-page form editor with in-place edit
 functionality. The interesting part is Conditional Processing
 subpanel where endusers can compose some script code via event 
 operation, ... selection fields.
 IMO the drawback still is that the enduser (form admin) still has to
 provide hand-written script routines (see Extra Head Code panel in j-
 wiz vid). [Maybe this could be taken a step further hiding this script
 programming text area behind a more graphical ui -- comparable to the
 Conditional Processing panel's one].

 My key question in former posting thus becomes how to get these code
 snippets running in the preview and production window (the objects 
 wirings behind the scenes)???
 Simple string copies into specific dom objects ... seem not to be
 sufficient, seem they?

 Kind regards,
   Alessandro

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



Re: RequestCallback.onResponseReceived() always returning status code 0

2010-08-12 Thread Philippe Laflamme
Deepak,

Simply install Jetty's Transparent proxy in your web.xml. Look at my
comment on Issue 3131, I explain how to set things up in DevMode, but
it would be identical in a production environment:

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

Philippe

On Aug 12, 12:19 pm, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi Philippe,
 I also have to use proxy servlet in my GWT 2.1 project.
 I have to make cross domain web services call and then the response xml has
 to be sent to client code.
 Can u pls suggest me how to modify this servlet to use for my project so
 that i should be able to make cross domain web service call.

 Thanks
 Deepak

 On Wed, Aug 11, 2010 at 7:22 PM, Philippe Laflamme 

 philippe.lafla...@gmail.com wrote:
  Had the same issue. In my case, it was due to making cross-site
  requests.

  My server was at localhost:8080 and I was running in DevMode at
  localhost:. Making a request from : to :8080 is considered a
  cross-site request (which is not per the same-origin policy).

  The behaviour in Firefox was that it would return 0 as the status code
  and prevent accessing the HTTP headers.

  I solved this issue by running a transparent proxy on : in
  DevMode. The proxy forwards everything to :8080. I provided the
  solution here:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

  Hope it helps,
  Philippe

  On Aug 10, 5:11 pm, Jaya jp.a...@gmail.com wrote:
   Hi All,
   I have deployed the GWT web app ( only client code. no server code is
   present) on JBOSS. web client is accessing a URL ( Servlet of
   different application. not the GWT servlet)  on the same server  using
   POST. The servlet is getting the Request (xml string) from GWT client
   app and responding with a xml string ( appeared in the servlet logs).
   But the GWT client's  onResponseReceived () always return a status
   code 0 with response data null.

   here  the basic code i am using. no fancy of it.

                   String eventParticipationReq=Count id=\1\/Count;
                   String serverURL=http://myserver:8080/b1/MyServlet?;;
                   Log.info(serverURL);
                   Log.info(eventParticipationReq);
                   RequestBuilder builder = new
  RequestBuilder(RequestBuilder.GET,
   serverURL);
                           try {

                             Log.info(Request Data
  :+eventParticipationReq);
                         Request response = builder.sendRequest(, new
   RequestCallback() {
                               public void onError(Request request,
  Throwable exception) {
                                   // Couldn't connect to server (could be
  timeout, SOP
   violation, etc.)
                                }

                                public void onResponseReceived(Request
  request, Response
   response) {
                                    Log.info(+response.getStatusCode());
                                    Log.info(+request.isPending());
                                    if (200 == response.getStatusCode()) {
                                      Log.info(response.getText());
                                  } else {
                                    // Handle the error.  Can get the status
  text from
   response.getStatusText()
                                  }
                                }
                              });
                         return null;
                       } catch (RequestException e) {
                         // Code omitted for clarity
                           e.printStackTrace();
                       }

   =

   Can some one please let me know what i should  change in the code?

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



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



Re: RequestCallback.onResponseReceived() always returning status code 0

2010-08-12 Thread Philippe Laflamme
Hi Jaya,

It's really hard to say. I guess I would try testing things in pieces,
see if they work independently...

First, try making the request to your servlet without GWT. That is,
use your browser (or some other tool) to make the request your server
expects and then verify that your getting the response you expect.

Once you've verified that the server part of things is okay, you can
move on to looking at your GWT code. At this point I guess you could
try some other JS library (jQuery for example) see if you get
different behaviour as GWT.

Hope it helps,
Philippe

On Aug 12, 1:00 pm, Jaya jp.a...@gmail.com wrote:
 Thanks Phillippe,

 I now noticed after deploying the GWT web app on the same domain 
 likehttp://mydomain/u2/Gwt.html, it is not getting the response after
 calling thehttp://mydomain.com/u1/MySerlet. The 'MyServlet' is
 getting request from Gwt.html and sending the response to GWT.html.Can
 you please suggest any thing i should look into.? I am trying all
 possible ways. Interestingly the request has been sent to servlet. I
 don't know whether the  request can be sent in the first place  if it
 is against the SOP.

 On Aug 12, 8:50 am, Philippe Laflamme philippe.lafla...@gmail.com
 wrote:

  Oops. It should have read:

  [...] is considered a cross-site request (per the same-origin
  policy). [...]

  Philippe

  On Aug 11, 9:52 am, Philippe Laflamme philippe.lafla...@gmail.com
  wrote:

   Had the same issue. In my case, it was due to making cross-site
   requests.

   My server was at localhost:8080 and I was running in DevMode at
   localhost:. Making a request from : to :8080 is considered a
   cross-site request (which is not per the same-origin policy).

   The behaviour in Firefox was that it would return 0 as the status code
   and prevent accessing the HTTP headers.

   I solved this issue by running a transparent proxy on : in
   DevMode. The proxy forwards everything to :8080. I provided the
   solution 
   here:http://code.google.com/p/google-web-toolkit/issues/detail?id=3131#c46

   Hope it helps,
   Philippe

   On Aug 10, 5:11 pm, Jaya jp.a...@gmail.com wrote:

Hi All,
I have deployed the GWT web app ( only client code. no server code is
present) on JBOSS. web client is accessing a URL ( Servlet of
different application. not the GWT servlet)  on the same server  using
POST. The servlet is getting the Request (xml string) from GWT client
app and responding with a xml string ( appeared in the servlet logs).
But the GWT client's  onResponseReceived () always return a status
code 0 with response data null.

here  the basic code i am using. no fancy of it.

                String eventParticipationReq=Count id=\1\/Count;
                String serverURL=http://myserver:8080/b1/MyServlet?;;
                Log.info(serverURL);
                Log.info(eventParticipationReq);
                RequestBuilder builder = new 
RequestBuilder(RequestBuilder.GET,
serverURL);
                        try {

                          Log.info(Request Data 
:+eventParticipationReq);
                      Request response = builder.sendRequest(, new
RequestCallback() {
                            public void onError(Request request, 
Throwable exception) {
                                // Couldn't connect to server (could be 
timeout, SOP
violation, etc.)
                             }

                             public void onResponseReceived(Request 
request, Response
response) {
                                 Log.info(+response.getStatusCode());
                                 Log.info(+request.isPending());
                                 if (200 == response.getStatusCode()) {
                                   Log.info(response.getText());
                               } else {
                                 // Handle the error.  Can get the 
status text from
response.getStatusText()
                               }
                             }
                           });
                      return null;
                    } catch (RequestException e) {
                      // Code omitted for clarity
                        e.printStackTrace();
                    }

=

Can some one please let me know what i should  change in the code?



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



attaching images to an email that are already on your server

2010-08-12 Thread GKotta
I am getting a file access denied when I try to send and image in the
datastore as an attachment. I there any way around this?
Code (result.get(i).getAssociatedImage is the url where it is stored
on the database. In this case, it is http:\127.0.0.1:\image?
title=t609i1) :
 // second part (the image)
messageBodyPart = new MimeBodyPart();
DataSource fds = new FileDataSource
  (result.get(i).getAssociatedImage());
messageBodyPart.setDataHandler(new
DataHandler(fds));
messageBodyPart.setHeader(Content-
ID,image);

// add it
multipart.addBodyPart(messageBodyPart);
Exception:
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract boolean com.***.emailAssociatedImages()' threw an
unexpected exception: java.security.AccessControlException: access
denied (java.io.FilePermission http:\127.0.0.1:\image?title=t609i1
read)

Thanks!

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



Re: synchronize asynchronous calls?

2010-08-12 Thread Jeff Chimene
On 08/12/2010 12:50 PM, Kevin Qiu wrote:
 After some thought, I don't think putting it in IncrementalCommand and
 execute with DeferredCommand help much here. Jeff, If I understand you
 correctly, my execute method will look like this:
 
 class Executor {
   // declaration of list of commands
   void execute() {
 DeferredCommand.addCommand(new IncrementalCommand() {
   boolean executing;
   int currentIdx;
 
   public boolean execute() {
 if (executing) return true;  // executor will keep looping
 // it's my turn now
 executing = true;
 AsyncCommand cmd = commands.get(currentIdx);
 cmd.execute(new AsyncCallback() {
   public void onFailure(Throwable e) { onSuccess(null); }
   public void onSuccess(Object o) {
 executing = false;
 ++currentIdx;
   }
   }
   // return point
   }
 }
 
 The above method is actually still non-blocking. There's no guarantee
 that my incremental command will finish executing before I reach
 //return point. Did I miss anything?

Looking at your code a bit more closely (and while composing an
example), I see that you want something that requires a bit more structure.

You have the IncrementalCommand() correctly implemented. Forget my
previous answer.

Now that I really understand what you're asking (I think)...

I solve the problem using a state machine. Notice how the SM loops on
DICTIONARYREAD until the command queue is empty.

DeferredCommand.addCommand(new IncrementalCommand() {
  @Override
  public boolean execute() {
switch (startupState) {
  case INITIAL:
timer.scheduleRepeating(600);
startupState = StartupState.DICTIONARYREAD;
break;

  case DICTIONARYREAD:
if (dictionaryRequest.getDictionaryPages()) {
   break;
}

startupState = StartupState.FINAL;
break;

  case FINAL:  // Kevin's RETURN POINT?
timer.cancel();
return false; // command is complete
  }
return true;
});

public boolean getDictionaryPages() {
 while (dictionaryRequestList.size()  0) {
if (busy) {
  return true;
}
dictionaryRequestList.pop().execute(); // RPC and BUSY mutex
 }
 return false;
}

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



Re: GWT compiler breaks valid JS

2010-08-12 Thread André Moraes
Things get a little more weird.

In chrome i see a black window, without the white square.
The code loaded in chrome was:

  var body, document_0, ele;
  !!$stats  onModuleStart('com.google.gwt.query.client.css.CSS');
  !!$stats  onModuleStart('com.example.isotile.client.Isotile');
  document_0 = $doc;
  body = document_0.body;
  body.setAttribute('bgcolor', 'black');
  ele = $doc.createElement('div');
  body.appendChild(ele);

Looks like the compiler removed the code where you add the div inside the
div element created by $doc.createElement('div');

In firefox 3.6.6 the code isn't download, only the selection script is
loaded and the code with the logic isn't request by the browser. Maybe it is
a problem with your host page because it don't have the iframe (just a
guess).

Try to use the element.getStyle() to access the sytle properties of the
element instead of setting the HTML directly. for example:

DivElement ele = Document.get().createDivElement();
ele.getStyle().setProperty(background-color,white);
/// ... the other styles
body.appendChild(ele);

Check this link:
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/dom/client/Element.html#getStyle()

Hope it helps,
-- 
André Moraes
Analista de Desenvolvimento de Sistemas
andr...@gmail.com
http://andredevchannel.blogspot.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: why we probably won't use GWT for a large UI project

2010-08-12 Thread lineman78
Not to mention the licensing on GXT is not for commercial use.  My
suggestion is to try to piece together all the UI elements you need
from other libraries or write your own as they will be more efficient
and integrate with one another better.  Also, don't be lazy and pick a
UI library by it's LAF, wonders can be done with CSS if you are
willing to spend a little time.  Don't get me wrong, I think both
options are valid for UI libraries, but I often think their
shortcomings are overlooked due to the eye-candy appeal.  FYI, I have
experimented with both libraries and both applications were eventually
rewritten in pure GWT and the performance increase in IE was drastic
and memory usage eas more than halved.  Also, resource bundles are
your friend when it comes to efficiency, just watch out for the IE
implementation of ImageResource; it can bite you.

On Aug 12, 11:47 am, Kevin Qiu kevin.jing@gmail.com wrote:
 Totally agree with lineman78 on the use of SmartGWT. We used SmartGWT to
 build a prototype, only to find out that mixing Js library wrapper with
 native GWT is bad. It's super easy in SmartGWT if you're building a simple
 CRUD application, but anything beyond that which requires customized widgets
 in GWT, then good luck, not to mention you can't use all the benefits of the
 GWT compiler. We're currently using ExtGWT. It's nicer in that it's (mostly)
 natively GWT, so you can always trace down the Java code, but still it's
 layout is expensive, and widgets are not 100% compatible with the GWT widget
 system. The event system is a mess to work with. We really need a good UI
 library, preferrably supported by Google that's built on top of vanilla GWT
 widgets.

 On Thu, Aug 12, 2010 at 1:22 PM, lineman78 linema...@gmail.com wrote:
  I can't help you with the TileGrid other than saying that you could
  write something similar yourself with a little effort assuming you are
  willing to overlook some of the niceties such as animation.  I have
  used SmartGWT in the mast and would warn you to use extreme caution in
  making the decision to use it.  It is not a GWT implementation, but a
  GWT wrapper around an existing javascript library, so you don't get
  all the advantages the GWT compiler gives you such as dead code
  elimination and obfuscation.  The SmartClient JS library is modular,
  so you can only load the modules you need, but as with any JS library
  I would estimate most sites only use 10-20% of the code they download
  and load.  Also, SmartClient and ExtJs both use a heavy layout engine,
  which I have noticed causes major slowing in IE.

  Unfortunately I cannot provide source code, but I can point you to
  some resources and explain my approach.  Here is an article by some
  GWT contributors on overlay types that should help you get started:

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

  I am using what they call the old way in that wiki.  To further
  expedite things, which you might consider depending on the size of
  your project; I have written an overlay type generator.  All I have to
  do is write an interface for the overlay type and have the interface
  extend JsonObject and it will generate the overlay type for me:

  public interface JsonObject {
     public void setJso(JavaScriptObject jso);
     public JavaScriptObject getJso();
     public void setJson(String json);
     public String getJson();
  }

  public interface Shape extends JsonObject {
     public void setArea(double area);
     public double getArea();
  }

  GWT.create(Shape.class); produces:

  public class ShapeJso implements Shape {
     private JavaScriptObject jso;

     ...

     public void setArea(double area)
     {
         setAreaImpl(jso, area);
     }

     private native void setAreaImpl(JavaScriptObject jso, double area)
     /*-{
         jso.area = area;
     }-*/;

     ...
  }

  This is very simplified, but I have given you a few hints to some of
  the tricks I had to use to get the generator method to work(see:
  JsonObject).  Usually you would extend JavaScriptObject, but in order
  to get the generator to work right I had to save it as an attribute.
  You will want to consider if the generator is the right approach, I
  think it took me a good 8-10 hours in the end to make a generator that
  works for almost every case.  But you can get one that works for most
  cases in 2-4 hours as long as you aren't doing anything too complex.

  On Aug 11, 3:01 pm, marius.andreiana marius.andrei...@gmail.com
  wrote:
   Hey,

   On Aug 11, 11:00 pm, lineman78 linema...@gmail.com wrote: As far as
  SmartGWT goes, I will warn you that I think the problems and
performance hits you will run into are not worth the UI that you
gain.

   Thanks for the heads up. A hello world with data bound widgets seemed
   straightforward.

Plus you must consider the licensing, which is required in
order to use their data binding.

   Looks like we can use thishttp://
 

Re: why we probably won't use GWT for a large UI project

2010-08-12 Thread marius.andreiana
Thanks Lineman and Kevin. Your feedback strengthens my recommendation
for the hybrid approach described in the doc.


On Aug 12, 11:46 pm, lineman78 linema...@gmail.com wrote:
 Not to mention the licensing on GXT is not for commercial use.  My
 suggestion is to try to piece together all the UI elements you need
 from other libraries or write your own as they will be more efficient
 and integrate with one another better.  Also, don't be lazy and pick a
 UI library by it's LAF, wonders can be done with CSS if you are
 willing to spend a little time.  Don't get me wrong, I think both
 options are valid for UI libraries, but I often think their
 shortcomings are overlooked due to the eye-candy appeal.  FYI, I have
 experimented with both libraries and both applications were eventually
 rewritten in pure GWT and the performance increase in IE was drastic
 and memory usage eas more than halved.  Also, resource bundles are
 your friend when it comes to efficiency, just watch out for the IE
 implementation of ImageResource; it can bite you.

 On Aug 12, 11:47 am, Kevin Qiu kevin.jing@gmail.com wrote:



  Totally agree with lineman78 on the use of SmartGWT. We used SmartGWT to
  build a prototype, only to find out that mixing Js library wrapper with
  native GWT is bad. It's super easy in SmartGWT if you're building a simple
  CRUD application, but anything beyond that which requires customized widgets
  in GWT, then good luck, not to mention you can't use all the benefits of the
  GWT compiler. We're currently using ExtGWT. It's nicer in that it's (mostly)
  natively GWT, so you can always trace down the Java code, but still it's
  layout is expensive, and widgets are not 100% compatible with the GWT widget
  system. The event system is a mess to work with. We really need a good UI
  library, preferrably supported by Google that's built on top of vanilla GWT
  widgets.

  On Thu, Aug 12, 2010 at 1:22 PM, lineman78 linema...@gmail.com wrote:
   I can't help you with the TileGrid other than saying that you could
   write something similar yourself with a little effort assuming you are
   willing to overlook some of the niceties such as animation.  I have
   used SmartGWT in the mast and would warn you to use extreme caution in
   making the decision to use it.  It is not a GWT implementation, but a
   GWT wrapper around an existing javascript library, so you don't get
   all the advantages the GWT compiler gives you such as dead code
   elimination and obfuscation.  The SmartClient JS library is modular,
   so you can only load the modules you need, but as with any JS library
   I would estimate most sites only use 10-20% of the code they download
   and load.  Also, SmartClient and ExtJs both use a heavy layout engine,
   which I have noticed causes major slowing in IE.

   Unfortunately I cannot provide source code, but I can point you to
   some resources and explain my approach.  Here is an article by some
   GWT contributors on overlay types that should help you get started:

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

   I am using what they call the old way in that wiki.  To further
   expedite things, which you might consider depending on the size of
   your project; I have written an overlay type generator.  All I have to
   do is write an interface for the overlay type and have the interface
   extend JsonObject and it will generate the overlay type for me:

   public interface JsonObject {
      public void setJso(JavaScriptObject jso);
      public JavaScriptObject getJso();
      public void setJson(String json);
      public String getJson();
   }

   public interface Shape extends JsonObject {
      public void setArea(double area);
      public double getArea();
   }

   GWT.create(Shape.class); produces:

   public class ShapeJso implements Shape {
      private JavaScriptObject jso;

      ...

      public void setArea(double area)
      {
          setAreaImpl(jso, area);
      }

      private native void setAreaImpl(JavaScriptObject jso, double area)
      /*-{
          jso.area = area;
      }-*/;

      ...
   }

   This is very simplified, but I have given you a few hints to some of
   the tricks I had to use to get the generator method to work(see:
   JsonObject).  Usually you would extend JavaScriptObject, but in order
   to get the generator to work right I had to save it as an attribute.
   You will want to consider if the generator is the right approach, I
   think it took me a good 8-10 hours in the end to make a generator that
   works for almost every case.  But you can get one that works for most
   cases in 2-4 hours as long as you aren't doing anything too complex.

   On Aug 11, 3:01 pm, marius.andreiana marius.andrei...@gmail.com
   wrote:
Hey,

On Aug 11, 11:00 pm, lineman78 linema...@gmail.com wrote: As far as
   SmartGWT goes, I will warn you that I think the problems and
 performance hits you will run into are not worth the UI that you

Re: GWT compiler breaks valid JS

2010-08-12 Thread consiliens

On 08/12/2010 02:43 PM, André Moraes wrote:

Looks like the compiler removed the code where you add the div inside
the div element created by $doc.createElement('div');


Should I file a bug?


In firefox 3.6.6 the code isn't download, only the selection script is
loaded and the code with the logic isn't request by the browser. Maybe
it is a problem with your host page because it don't have the iframe
(just a guess).


I'm using the host page generated by the Google Plugin for Eclipse 1.4.0-m2.


Try to use the element.getStyle() to access the sytle properties of the
element instead of setting the HTML directly. for example:


I'm using innerHTML for performance reasons.  This test case came out of 
a larger GWT app where the code failed when compiled.


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



Re: synchronize asynchronous calls?

2010-08-12 Thread Kevin Qiu
Thanks for taking the time. Although it's not clear what action you put in
the timer and what the timer is supposed to do (IncrementalCommand is
executed by DeferredCommand.CommandExecutor and it already has a timer with
timeslice set to 100ms). Also, I suppose you need to reset the busy flag
in the callback of the asynchronous calls.

I'm still a bit incredulous but I'll give it a try. Thanks again :)

Cheers,

On Thu, Aug 12, 2010 at 4:43 PM, Jeff Chimene jchim...@gmail.com wrote:

 On 08/12/2010 12:50 PM, Kevin Qiu wrote:
  After some thought, I don't think putting it in IncrementalCommand and
  execute with DeferredCommand help much here. Jeff, If I understand you
  correctly, my execute method will look like this:
 
  class Executor {
// declaration of list of commands
void execute() {
  DeferredCommand.addCommand(new IncrementalCommand() {
boolean executing;
int currentIdx;
 
public boolean execute() {
  if (executing) return true;  // executor will keep looping
  // it's my turn now
  executing = true;
  AsyncCommand cmd = commands.get(currentIdx);
  cmd.execute(new AsyncCallback() {
public void onFailure(Throwable e) { onSuccess(null); }
public void onSuccess(Object o) {
  executing = false;
  ++currentIdx;
}
}
// return point
}
  }
 
  The above method is actually still non-blocking. There's no guarantee
  that my incremental command will finish executing before I reach
  //return point. Did I miss anything?

 Looking at your code a bit more closely (and while composing an
 example), I see that you want something that requires a bit more structure.

 You have the IncrementalCommand() correctly implemented. Forget my
 previous answer.

 Now that I really understand what you're asking (I think)...

 I solve the problem using a state machine. Notice how the SM loops on
 DICTIONARYREAD until the command queue is empty.

 DeferredCommand.addCommand(new IncrementalCommand() {
  @Override
  public boolean execute() {
switch (startupState) {
  case INITIAL:
timer.scheduleRepeating(600);
startupState = StartupState.DICTIONARYREAD;
break;

  case DICTIONARYREAD:
if (dictionaryRequest.getDictionaryPages()) {
   break;
}

startupState = StartupState.FINAL;
break;

  case FINAL:  // Kevin's RETURN POINT?
timer.cancel();
return false; // command is complete
  }
return true;
 });

 public boolean getDictionaryPages() {
  while (dictionaryRequestList.size()  0) {
if (busy) {
  return true;
}
dictionaryRequestList.pop().execute(); // RPC and BUSY mutex
  }
  return false;
 }

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



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



  1   2   >