Re: Best image preloading practice?

2009-02-06 Thread Litty Preeth

  You are thinking of loading 20MB of images into the DHTML DOM of you
  application

  Am I? Does the DOM keep them there even when not displayed?
  These images certainly wouldnt be displayed all at once. 1 or 2 at a
  time at most.

 I'm not absolutely sure, but I think if you load an image it is
 basically attached to a document, whether the browser caches it or
 not, and whether it is currently visible of not. You don't control the
 browser cache, I mean I don't think you can tell it to conveniently
 download all your images and store them neatly on disk until you need
 to display them for example.

ah, pig.
I thought that was exactly that prefetch was doing -sigh-
I thought it loaded it to ram first, then the browser keeps a copy in
its cache for reloading if needed.
-sigh-
That does change things indeed then.

AFAIK the prefetch creates an IMG element but its not attached to the DOM.

- Litty


On Fri, Feb 6, 2009 at 1:03 PM, darkflame darkfl...@gmail.com wrote:



 
   You are thinking of loading 20MB of images into the DHTML DOM of you
   application
 
   Am I? Does the DOM keep them there even when not displayed?
   These images certainly wouldnt be displayed all at once. 1 or 2 at a
   time at most.
 
  I'm not absolutely sure, but I think if you load an image it is
  basically attached to a document, whether the browser caches it or
  not, and whether it is currently visible of not. You don't control the
  browser cache, I mean I don't think you can tell it to conveniently
  download all your images and store them neatly on disk until you need
  to display them for example.

 ah, pig.
 I thought that was exactly that prefetch was doing -sigh-
 I thought it loaded it to ram first, then the browser keeps a copy in
 its cache for reloading if needed.
 -sigh-
 That does change things indeed then.


   Again, not at once.
   Surely a staggered download they wouldnt have a problem with?
   Emulating, say, what it would expect from a user browseing DeviantArt?
 
  yeah, the staggered download is basically the idea of the maze - each
  time you move to next location you've only got one locations worth of
  images to fetch. Or if it worked fast enough you could fetch all the
  required images for the adjoining locations so they would be ready to
  go instantly. It depends entirely on no of image bytes per location.
 

 Yes, I looks like I'll be switching to a as-you-go-along-it-loads-the-
 next-rooms approach.
 Allthough...

  Point is doing it this way old images are thrown away and can be
  garbage collected as you go, so you are not accumulating images in
  memory. It's stable. (assuming I'm right about the how this works of
  course).
 

 ...I'm not sure there will be much that can be chucked away in this
 game.
 My engine is able to remove items easily enough, but for this game
 items from the start of the game are still usefull at the end, so
 theres only a few case's when images can be removed never to be
 recalled.


   . The point of
   the composite image strip is to fetch several images in one request
   since they come in a single binary file. 
 
   Yes, I understand the point of them, and I think image bundles are a
   great idea.
   (In fact, online in general, theres probably a lot of wasted bandwidth
   used on little UI elements on webpages..like 5kb gifs etc)
   In this specific case though they arnt approperate.
   Not unless I got the server to dynamically splice the images together
   and the client to cut them up.
   But thats beyond the scope of the projects timeframe.
 
  This is exactly what the GWT ImageBundle does (and what has been best
  practice in web design for years). Annoyingly for you GWT only does
  this once per module because Bruce says they can't think of a single
  use case for needing separate ImageBundles!  My bet is that if you
  just start loading all the images as you are suggesting, you will have
  to attach them to the DOM somewhere, so ultimately what you will be
  doing is building the entire game at the same time as the player is
  trying to play the first locations. So my betting is three to one on
  a) whilst this build is going on the game play will be badly affected
  at precisely the time you least want it to, and b) once you've loaded
  it all it will run like a dog anyway.

 Yes, I think your right there.
 But I think cutting up 30MB of images client side might actualy raise
 the required specs of the game :P

 
  I may well be wrong, but if I'm not, and you looked at the maze idea
  as plan B, then using image strips a la ImageBundle will make the game
  run much faster and smoother, so the effort might well be critical in
  the end. This is after all the heart of your technical challenge. This
  has been done so many times I expect you will find some javascript
  code that cuts them up (or maybe CSS stuff) to crib from somewhere and
  some server side tools to pack the image strips as well.
 

 I may have miss-understoof how image bundles 

Re: Deploying GWT application (WAR)

2009-02-06 Thread Jonathan

Thanks for the answer !
What should I give to the user to allow him to run the WAR locally ?
I mean i would like to embed tomcat in the application to allow the
user to run it locally (without internet) and to deploy it on a server
like you said.

I already made the hierarchy of the war, it's ready to be zipped/
wared, but i don't know how i can reproduce the hosted browser system
to deploy the app.

Thanks again for your support!
Best regards.

On 6 fév, 06:07, Litty Preeth preeth.h...@gmail.com wrote:
 Well for web application you dont give the user a WAR file, but you deploy
 the war file on a server machine (where you have an application server like
 Tomcat installed) and then give the url of the application to the user. User
 will use his browser to open ur URL.

 - litty

 On Fri, Feb 6, 2009 at 4:13 AM, Jonathan jonathan.delf...@gmail.com wrote:

  Hi to all,

  I managed to install properly gwt that runs fine under my linux.
  However, i have some problems to understand the deployment step to
  war.

  I use a servlet to upload a file to server so i would like to deploy
  my project WITH tomcat.

  Is that possible ?
  So that, if i want to install it on a web server, i just have to
  deploy the war file (i don't know how to create it, i just made the
  hierarchy :/)
  And if it's only for local use, the integrated tomcat will be used. As
  the hosted browser do...

  Not sure if i'm clear but to sum up: how to deploy my application with
  tomcat ? This way the user only double click the jar/war and it
  launchs browser with tomcat. I can't offer user to install gwt hosted
  browser ...

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



Re: Script error in IE 7 in web mode

2009-02-06 Thread Danny Goovaerts

Arend,
Thanks for the reply. I've been able to pinpoint the place where the
problem occurs and it is indeed in a class where
I parse the XML reply coming back from the server. It was working fine
previously in all browsers. The difference is that the XML is larger
now. Maybe Internet Explorer has a limit on the size  XML documents
that it can handle. I will investigate further and post my findings.

Danny

On 5 feb, 16:45, Arend van der Veen arend.vanderv...@gmail.com
wrote:
 Hi Danny,

 I had a similar problem when I was parsing an XML document.  In my case, I
 was a little careless about trapping errors and casting classes.  As it
 turned out Safari and Firefox ignored the errors while IE generated an
 error.  I was able to identify the offending lines of code and rewrote them
 and made sure that I caught all the errors.

 Hope this helps,
 Arend

 On Thu, Feb 5, 2009 at 4:57 AM, Danny Goovaerts
 danny.goovae...@gmail.comwrote:





  I have a GWT application that runs OK in hosted mode. When I compile
  it, it gives a script error on Internet Explorer 7. The compile
  version runs correctly in Firfox, Chrome and Safari.
  I've turned on script debugging in IE7 and it gives me the following
  message (translated from Dutch)
  --
  Line : 2
  Character : 23530
  Error : Exception activated but not handled
  Code: 0
  -

  Can anyone point me to some documentation how I can further
  investigate what's wrong. The application is quite big, so it's not so
  easy to isolate the piece of code where it goes wrong.

  Thanks,

  Danny- Tekst uit oorspronkelijk bericht niet weergeven -

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



Re: HorizontalSplitPanel issues in Firefox 3

2009-02-06 Thread vince

Hello, anyone?

On 4 fév, 16:15, vince vincent.kir...@gmail.com wrote:
 Hi,

 I face an annoying issue in Firefox 3.0.6 (that doesn't occur in IE7).

 My application uses aHorizontalSplitPanelas main panel. The left
 side contain a StackPanel.
 There are 2 panels composing the stack panel. One displays a tree, the
 other one is a small search panel displayin a possible result list.

 When the user clicks on either a tree node or a row in the results
 list, the application retrieves a PDF file and displays it in the righ
 side of theHorizontalSplitPanelthrough a Frame. The URL of the frame
 is set by calling a simple (as in non-GWT RPC) servlet.

 Now the issue is that as soon as the PDF is displayed in the right
 part (the default PDF reader plugin is used, in this case it's Adobe
 Reader 9), the splitter acts weird when I try to drag it:

 * If I drag to the left, it resizes OK and everything's fine.
 * If I keep my finger on the left mouse button and try to drag to the
 right, then it becomes all weird. The splitter won't move to the
 right! On the other hand, it still moves to the the left --even if I
 release the mouse button!
 To make this behaviour stop, I have to click a single time on the
 splitter. But I still can't move it to the right if I try to do it
 normally. Instead, the only way to make it move to the right is to
 click the splitter, move the mouse cursor to the top of the current
 Firefox tab, and then go to the right. Note that in this case too I
 can release the mouse button and the splitter will keep moving, and
 again I have to click on the slpitter once to make it stop moving.

 I don't get this behaviour in IE7. I get it in Firefox 3.0.6 and also
 had it in 3.0.5.

 Anyone ever got this? Is there a possible fix? I just hope it's not a
 PDF plugin issue...

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



Re: Deploying GWT application (WAR)

2009-02-06 Thread Litty Preeth
http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.html
http://www.javalobby.org/articles/tomcat2go/

On Fri, Feb 6, 2009 at 1:53 PM, Jonathan jonathan.delf...@gmail.com wrote:


 Thanks for the answer !
 What should I give to the user to allow him to run the WAR locally ?
 I mean i would like to embed tomcat in the application to allow the
 user to run it locally (without internet) and to deploy it on a server
 like you said.

 I already made the hierarchy of the war, it's ready to be zipped/
 wared, but i don't know how i can reproduce the hosted browser system
 to deploy the app.

 Thanks again for your support!
 Best regards.

 On 6 fév, 06:07, Litty Preeth preeth.h...@gmail.com wrote:
  Well for web application you dont give the user a WAR file, but you
 deploy
  the war file on a server machine (where you have an application server
 like
  Tomcat installed) and then give the url of the application to the user.
 User
  will use his browser to open ur URL.
 
  - litty
 
  On Fri, Feb 6, 2009 at 4:13 AM, Jonathan jonathan.delf...@gmail.com
 wrote:
 
   Hi to all,
 
   I managed to install properly gwt that runs fine under my linux.
   However, i have some problems to understand the deployment step to
   war.
 
   I use a servlet to upload a file to server so i would like to deploy
   my project WITH tomcat.
 
   Is that possible ?
   So that, if i want to install it on a web server, i just have to
   deploy the war file (i don't know how to create it, i just made the
   hierarchy :/)
   And if it's only for local use, the integrated tomcat will be used. As
   the hosted browser do...
 
   Not sure if i'm clear but to sum up: how to deploy my application with
   tomcat ? This way the user only double click the jar/war and it
   launchs browser with tomcat. I can't offer user to install gwt hosted
   browser ...
 
   Thanks in advance.
   Best regards.
 


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



Popup panel over the cursor

2009-02-06 Thread ArunDhaJ

Hi,
I've a tree and context menu associated with it. When I right click a
tree item the context menu will pop-up below the cursor. In case the
tree item at bottom of the page. the menu generated extends the page
further. I need to scroll the page to see few of my menu items.. worst
is that, when I click the scroll bar, the menu disappears...

How can I identify whether the cursor is at bottom of the page and
generate menu over the cursor???

plz suggest me...


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



RPC call efficiency

2009-02-06 Thread Rick

Hi

I am using Java as server so I used RPC calls. The thing worrying me
is the efficiency of RPC call. I just write a simple method getValue()
on server which returns a long value. When I called it from client, it
is taking 1 second to go to server and then come back. This 1 second
time is pinching the performance of my application and I can't afford
it. Can any one suggest what improvement should be done so that this
time get reduced.
Any suggestion in this regard will be highly appreciated .

Thanks and reagrds

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



Re: Popup panel over the cursor

2009-02-06 Thread Litty Preeth
int posLeft = event.getScreenX();
if ((posLeft + popupWidth)  (Window.getClientWidth() + Window
.getScrollLeft()))
posLeft = posLeft
- (posLeft + popupWidth - (Window.getClientWidth() +
Window
.getScrollLeft()));

int posTop = event.getScreenY();
if ((posTop + popupHeight)  (Window.getClientHeight() + Window
.getScrollTop()))
posTop = posTop
- (posTop + popupHeight - (Window.getClientHeight() +
Window
.getScrollTop()));
popUpPanel_.setPopupPosition(posLeft, posTop);
popUpPanel_.show();

On Fri, Feb 6, 2009 at 2:13 PM, ArunDhaJ arund...@gmail.com wrote:


 Hi,
 I've a tree and context menu associated with it. When I right click a
 tree item the context menu will pop-up below the cursor. In case the
 tree item at bottom of the page. the menu generated extends the page
 further. I need to scroll the page to see few of my menu items.. worst
 is that, when I click the scroll bar, the menu disappears...

 How can I identify whether the cursor is at bottom of the page and
 generate menu over the cursor???

 plz suggest me...


 Regards,
 ArunDhaJ
 


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



Re: RPC call efficiency

2009-02-06 Thread lowecg2004

Hi Rick,

In my experience RPC is very efficient - I have a 100 or so objects
serialising over the wire in less than 50ms, with simpler structures
taking even less time. Something that returns just a long should
complete in no time at all. Have you tried adding some timing logic to
the server code that produces that long value? What timings do you get
if you just return a hard long value?  Using a HTTP proxy like Charles
(http://www.charlesproxy.com/)  will shed some light on the size of
the RPC calls being made and will provide some more precise timings.

Good luck,

Chris.

On Feb 6, 9:08 am, Rick rick4...@gmail.com wrote:
 Hi

 I am using Java as server so I used RPC calls. The thing worrying me
 is the efficiency of RPC call. I just write a simple method getValue()
 on server which returns a long value. When I called it from client, it
 is taking 1 second to go to server and then come back. This 1 second
 time is pinching the performance of my application and I can't afford
 it. Can any one suggest what improvement should be done so that this
 time get reduced.
 Any suggestion in this regard will be highly appreciated .

 Thanks and reagrds

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



Re: How to clear cache

2009-02-06 Thread Lore

you need to return the correct http response headers depending on the
filename that is requested
I did this using an HttpFilter that returns 'cache-forever' for
*.cache.* (for performance) and 'no-cache' for *.nocache.* files (your
problem)
(google for the correct headers)

this way you your application always checks for a new version and uses
the cache if nothing has changed

see - http://www.infoq.com/articles/gwt-high-ajax

hope this helps

On 6 feb, 07:15, ArunDhaJ arund...@gmail.com wrote:
 Hi,
 I did few changes in GWT application after hosting... One of my client
 cannot able to view the recent changes. He is still viewing the old
 application.

 As, GWT is a javascript, instructed him to clear the temporary files
 through browser. But he still facing the same problem...

 Is GWT caching the javascript files other than temporary internet
 files folder?? else how can I clear the chached files?? its happening
 to only one particular user...

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



Re: Best image preloading practice?

2009-02-06 Thread darkflame

I use Firebug as well as the inbuilt tools of Chrome quite a lot.
I will check out Fiddler2 though, thanks for the recomendation :)

The thumbnails could be prefetched without problem, and even image
bundled most probably.
However, the bigger images they link too I wouldnt want to load on the
fly because some of these could be VERY big, and
the loading too noticeable to be used as a game.
Specificaly if you drag the magnifying glass over items it loads a
bigger image version of them in a clipped box, if the bigger image
isnt already loaded, this dosnt
work very well. (actualy, it just looks like the magnifying glass isnt
working at all).

However, I'll check out fiddler and try to use it with the maze-
techique for preloading stuff to optimise.

On Feb 5, 10:28 pm, Martin Gorostegui martin.goroste...@gmail.com
wrote:
 Hi darkflame,

 I think the best way of (pre)loading images depends on the kind of app you
 have. I visited the url you shared with us and run a
 Fiddler2http://www.fiddler2.com/session through it to discover that
 around 100 requests are fired to get
 icons, textures, buttons, gradient bars, etc which could be loaded all in
 one request using an ImageBundle and doing that will surely improve the
 loading time of the app. Then you have like another 100 requests that fetch
 a combination of thumbnails and bigger images with good quality (ranging
 from 10kb to 1 meg aprox). For what I saw many of these images are displayed
 only when the user clicks on the inventory bag (thumbnails) and then when a
 thumbnail is selected the bigger image is displayed so I think you could
 also use Image.prefetch to, for example, get all the thumbnails when the
 initial screen is loadad (so that when a user clicks on the bag they appear
 quickly) and also prefetch the bigger images when the user clicks on the bag
 so that when a thumbnail is clicked the big image appears quickly also... or
 maybe you could just load a big image when it is needed! I think these are
 the kind of decission you can only make by having the app running and using
 tools like Fiddler2 or Firebug to see loading times, number of requests, use
 of browser cache, etc.

 I hope this helps,

 Martin

 On Thu, Feb 5, 2009 at 5:24 PM, gregor greg.power...@googlemail.com wrote:

   Ah, this sounds quite usefull to hide the loading, allthough I'll have
   to read up.
   I assume this is how, say, GoogleMaps does it?

  I think it's quite common where you want to have control over how
  images are handled yourself - as I say there are plenty of examples
  around of how to do the serlvet.

   You are thinking of loading 20MB of images into the DHTML DOM of you
   application

   Am I? Does the DOM keep them there even when not displayed?
   These images certainly wouldnt be displayed all at once. 1 or 2 at a
   time at most.

  I'm not absolutely sure, but I think if you load an image it is
  basically attached to a document, whether the browser caches it or
  not, and whether it is currently visible of not. You don't control the
  browser cache, I mean I don't think you can tell it to conveniently
  download all your images and store them neatly on disk until you need
  to display them for example. It's also more than likely each browser
  does things differently.

   But the vaste majority of players should happily be able to load
   20-30MB onto their hard disk for the course of the game.

  That's my point: I don't think it works like that, I can see why it
  would be nice for you if it did. The browser probably does store
  images locally in some circumstances, but I believe this would be for
  virtual backing for the document it's loaded/displaying if required
  for memory management purposes. I.e. you've got a document of 20MB
  loaded which it must manipulate. I may be wrong, you'd need to
  investigate to be sure.

   They
   are deliberately designed to make downloading huge chunks of binary
   data difficult, especially transparently, and they are not expecting
   to have to display 20MB worth of images at once. 

   Again, not at once.
   Surely a staggered download they wouldnt have a problem with?
   Emulating, say, what it would expect from a user browseing DeviantArt?

  yeah, the staggered download is basically the idea of the maze - each
  time you move to next location you've only got one locations worth of
  images to fetch. Or if it worked fast enough you could fetch all the
  required images for the adjoining locations so they would be ready to
  go instantly. It depends entirely on no of image bytes per location.

  Point is doing it this way old images are thrown away and can be
  garbage collected as you go, so you are not accumulating images in
  memory. It's stable. (assuming I'm right about the how this works of
  course).

   If you leave it to the browser, it makes one Http call per image and
   you cannot guarantee the order they will be fetched. I

   Yes, I noticed this already. Its interesting, as I expected it 

Re: multiple rpc calls to server

2009-02-06 Thread ytbryan

thank you mon3y . may i know which code snippet should i post? the
Async, sync and impl interface?


On Feb 6, 11:46 am, mon3y darkside...@hotmail.com wrote:
 Hi

 A code snippet would be nice, so we can see where you're going wrong.

 Also put a Window.alert(), in your onFailure and onSuccess of your
 second call to see what you get.

 If it comes into the onFailure of your second call, there must be
 something wrong with the way you're calling the server side or your
 interfaces.

 If it comes in on your onSuccess, it must be a logic error, or
 something else pertaining to your client side code.

 If you make the first call successful and you call the second one the
 same way(logically) then there should be no issues.

 :)

 On Feb 6, 12:39 pm, ytbryan ytbr...@gmail.com wrote:

  Hi all,
  i know gwt don support synchronous call and i read it somwhere that
  there is actually don need to make rpc call synchronous.

  but i created an application with buttons like  save data  and 
  display result that will communicate to server by fetching data or
  saving data.

  when the application starts, it will automatically display the first
  result with its first rpc call. but when i click the display second
  result's button... it doesn't work anymore. any subsequent rpc
  call after the first one don't work.

  what is wrong here? and what am i missing? can someone advice me? the
  usual rpc example online only show how to make one rpc call. is there
  a way to make multiple calls that do different task? thank you for
  your time in viewing this post.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: multiple rpc calls to server

2009-02-06 Thread ytbryan

below is the code where i execute the rpc request. i create getdata()
and getdata1() to get execute different query. i am using two Async
object to make call. i am  not sure is it correct as i got error when
i use one. any help/advice is welcome and appreciated. :D


private void getData() {

  AsyncCallbackObject callback = new AsyncCallbackObject() {
   // fail
   public void onFailure(Throwable ex) {
RootPanel.get().add(new HTML(ex.toString()));
   }
   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
DataContainer[] displayData = (DataContainer[]) result;
   }
  };

  callProvider.getData(callback);
 }
 private void getData1() {
   final int value1 = value;


  AsyncCallbackObject callback1 = new AsyncCallbackObject(){
   // fail

   public void onFailure(Throwable ex) {
RootPanel.get().add(new HTML(ex.toString()));

   }
   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
displayData1 = (DataContainer[]) result;

   }
  };

  // remote procedure call to the server to get the data
  callProvider1.getData1(callback1);

 }

On Feb 6, 11:46 am, mon3y darkside...@hotmail.com wrote:
 Hi

 A code snippet would be nice, so we can see where you're going wrong.

 Also put a Window.alert(), in your onFailure and onSuccess of your
 second call to see what you get.

 If it comes into the onFailure of your second call, there must be
 something wrong with the way you're calling the server side or your
 interfaces.

 If it comes in on your onSuccess, it must be a logic error, or
 something else pertaining to your client side code.

 If you make the first call successful and you call the second one the
 same way(logically) then there should be no issues.

 :)

 On Feb 6, 12:39 pm, ytbryan ytbr...@gmail.com wrote:

  Hi all,
  i know gwt don support synchronous call and i read it somwhere that
  there is actually don need to make rpc call synchronous.

  but i created an application with buttons like  save data  and 
  display result that will communicate to server by fetching data or
  saving data.

  when the application starts, it will automatically display the first
  result with its first rpc call. but when i click the display second
  result's button... it doesn't work anymore. any subsequent rpc
  call after the first one don't work.

  what is wrong here? and what am i missing? can someone advice me? the
  usual rpc example online only show how to make one rpc call. is there
  a way to make multiple calls that do different task? thank you for
  your time in viewing this post.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Anyone configure GWTShell to listen on a network interface?

2009-02-06 Thread Lore

you need to compile (from the shell or command line) with the current
version of GWT

On 6 feb, 03:57, Transplant transplant...@gmail.com wrote:
 Has anyone dug into GWTShell's tomcat configuration to figure out how
 to make it listen on a real network port? I'd like to make it listen
 on a real network interface (instead of loopback) so that I can
 connect and test multiple clients with different OS/version
 combinations.

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



Re: multiple rpc calls to server (can someone advise me!)

2009-02-06 Thread ytbryan

can someone help?

below are my rpc request code.


private void getData() {

  AsyncCallbackObject callback = new AsyncCallbackObject() {
   // fail
   public void onFailure(Throwable ex) {
RootPanel.get().add(new HTML(ex.toString()));
   }
   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
DataContainer[] displayData = (DataContainer[]) result;
   }
  };

  callProvider.getData(callback);
 }
 private void getData1() {
   final int value1 = value;

  AsyncCallbackObject callback1 = new AsyncCallbackObject()
{
   // fail

   public void onFailure(Throwable ex) {
RootPanel.get().add(new HTML(ex.toString()));

   }
   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
displayData1 = (DataContainer[]) result;

   }
  };

  // remote procedure call to the server to get the data
  callProvider1.getData1(callback1);

 }


below is updategrid1 code which calls the getData1() code

private void updateGrid1(GridPanel gridPanel, int cols, int rows) {
 if (store != null) {
 store.removeAll();
 }
 getData1(1);

 Object[][] data = null;

 if(displayData1!= null) {
 data = getCompanyData(displayData1, 1);
 }
 else {
 System.out.println(exception at update1(););
 return;
 }

 RecordDef recordDef = new RecordDef(
 new FieldDef[]{

   new StringFieldDef(date),
   new IntegerFieldDef(opensource),
   new IntegerFieldDef(trial),
   new IntegerFieldDef(sales),
   new StringFieldDef(ostrial),
   new StringFieldDef(trialsale) ,
   new StringFieldDef(ossale)
 }
 );
 ColumnConfig[] columns = new ColumnConfig[]{
 //column ID is company which is later used in
setAutoExpandColumn
 new ColumnConfig(Date, date, 160, true, null,
company),
 new ColumnConfig(Open Source, opensource, 35,true),
 new ColumnConfig(Trial, trial, 45,true),
 new ColumnConfig(Sales, sales, 65,true),
 new ColumnConfig(OS-Trial, ostrial, 65),
 new ColumnConfig(Trial-Sale, trialsale, 60, true),
 new ColumnConfig(OS-Sale, ossale, 60, true)
 };

 ColumnModel columnModel = new ColumnModel(columns);


 MemoryProxy proxy = new MemoryProxy(data);
 ArrayReader reader = new ArrayReader(recordDef);
 store = new Store(proxy, reader);
 store.load();

 gridPanel.reconfigure(store, columnModel);

 }


below is my button code which get trigger when pressed. and it has
listener that will call updategrid1()!!! please ignore those
unnecessary parameter that are unused.

 ToolbarButton generateButton1 = new ToolbarButton(test, new
ButtonListenerAdapter() {
  public void onClick(Button button, EventObject e) {
  updateGrid1(gridPanel, cols.getValue().intValue(),
rows.getValue().intValue());
  }
  });
  generateButton1.setIconCls(database-add-icon);
  bottom.addButton(generateButton1);

}




can someone help!

On Feb 6, 12:14 pm, ytbryan ytbr...@gmail.com wrote:
 I just insert Window.alert() into getdata1(); and i realised that
 the method is called but no window alert appears. i inserted  a
 println after onsuccess and onfailure and something is printed out.

 basically, onsuccess and onfailure are skipped? how is it possible?

 On Feb 6, 11:58 am, ytbryan ytbr...@gmail.com wrote:

  below is the code where i execute the rpc request. i create getdata()
  and getdata1() to get execute different query. i am using two Async
  object to make call. i am  not sure is it correct as i got error when
  i use one. any help/advice is welcome and appreciated. :D

  private void getData() {

    AsyncCallbackObject callback = new AsyncCallbackObject() {
     // fail
     public void onFailure(Throwable ex) {
      RootPanel.get().add(new HTML(ex.toString()));
     }
     // success
     public void onSuccess(Object result) {
      // Cast the result into the object that was sent
      // This casts the random object into DataContainer
      // Since the object is an array we use []
      DataContainer[] displayData = (DataContainer[]) result;
     }
    };

    callProvider.getData(callback);
   }
   private void getData1() {
             final int value1 = value;

            AsyncCallbackObject callback1 = new AsyncCallbackObject(){
             // fail

             public void 

Re: Why can't I use GWT Theme support with a Gadget?

2009-02-06 Thread Eric Ayers

I just wrote the FAQ item yesterday, so I haven't a chance to explore
a lot of different options.

If you want to go the absolute path way, you could also use an
external script that does some text processing (perl, python, sed) to
substitute variables into your css from before deploying it.

Another way to solve this is to use the Stylesheet Injector (currently
in the incubator) and processing the stylesheet text and doing some
substitution with _IG_GetCachedUrl().

I would appreciate feedback on these or other options for making
stylesheets work better with gadgets.  This is a place where GWT could
add a lot of value.


On Fri, Feb 6, 2009 at 1:51 AM, chip ginga.gadg...@gmail.com wrote:

 ;)

 In the FAQ it explains how GWT references a CSS file with relative
 image paths.

 When the GWT app in question is a gadget it is hosted through a proxy
 by the gadget container and all the relative image paths break.

 There are two issues here.

 1) It would be nice if there was a way to indicate where the final
 home of the images would be so that the GWT compiler could build
 absolute paths

 2) It would be even better if the reference to the images were wrapped
 in calls to _IG_GetCachedUrl() - I'm not sure if this is possible with
 an external CSS file, but I know it can be done when the CSS is
 inline.

 Any info on if these issues are being addressed?

 Any thoughts on solutions/hacks in the meantime?

 I guess worst case I can just inline the CSS manually - but hey, I'm
 lazy :)

 thanks for the help/info!

 




-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



Re: FlowPanel

2009-02-06 Thread Arthur Kalmenson

That's the way FlowPanel works. It's just a div tag. If you want
them to stay on the same row you have two options a) use CSS to
position them on the same row, or b) use HorizontalPanel which uses
tables.

--
Arthur Kalmenson



On Thu, Feb 5, 2009 at 9:57 AM, TIGR www.dzgr...@gmail.com wrote:

 I have FlowPanel with some widgets, but I need some different
 behaviour when adding new one.
 In standart mode it adds to the end and if widget do not fits to the
 window it adds to the next row.
 and I need that it added new widget on top of the current row.
 


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



Re: Deploying GWT application (WAR)

2009-02-06 Thread Jonathan

It's exactly what i try to use.
I use the gwt-dev-linux.jar to get the catalina.tomcat package, and
the server runs fine.
But i don't success to deploy my applciation.

I built my war as described in the faq (pretty sure it's ok), moved it
to the webapps folder (the one which is gave by the gwt installation,
i would like to use this tomcat install).
When i launch to localhost:, it says me to enter the module name/
html file, so i enter the name of the war without the .war but it says
me no module named ...)

So i'll investigate a bit more on this and will let you know if i
success or not.
Is there any other way to do it easily ?
I think i messed up the webapps folder and i still don't understand it
good enough.

Anyway, thanks for the help and let me know if you know an easy way to
do it ^^.

Regards.

On 6 fév, 09:32, Litty Preeth preeth.h...@gmail.com wrote:
 http://www.onjava.com/pub/a/onjava/2002/04/03/tomcat.htmlhttp://www.javalobby.org/articles/tomcat2go/

 On Fri, Feb 6, 2009 at 1:53 PM, Jonathan jonathan.delf...@gmail.com wrote:

  Thanks for the answer !
  What should I give to the user to allow him to run the WAR locally ?
  I mean i would like to embed tomcat in the application to allow the
  user to run it locally (without internet) and to deploy it on a server
  like you said.

  I already made the hierarchy of the war, it's ready to be zipped/
  wared, but i don't know how i can reproduce the hosted browser system
  to deploy the app.

  Thanks again for your support!
  Best regards.

  On 6 fév, 06:07, Litty Preeth preeth.h...@gmail.com wrote:
   Well for web application you dont give the user a WAR file, but you
  deploy
   the war file on a server machine (where you have an application server
  like
   Tomcat installed) and then give the url of the application to the user.
  User
   will use his browser to open ur URL.

   - litty

   On Fri, Feb 6, 2009 at 4:13 AM, Jonathan jonathan.delf...@gmail.com
  wrote:

Hi to all,

I managed to install properly gwt that runs fine under my linux.
However, i have some problems to understand the deployment step to
war.

I use a servlet to upload a file to server so i would like to deploy
my project WITH tomcat.

Is that possible ?
So that, if i want to install it on a web server, i just have to
deploy the war file (i don't know how to create it, i just made the
hierarchy :/)
And if it's only for local use, the integrated tomcat will be used. As
the hosted browser do...

Not sure if i'm clear but to sum up: how to deploy my application with
tomcat ? This way the user only double click the jar/war and it
launchs browser with tomcat. I can't offer user to install gwt hosted
browser ...

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



Re: RPC call efficiency

2009-02-06 Thread Damien Picard
Hi,

Could you try a simple Ajax call from your browser with native javascript
instead of GWT ?
This could be help us to determine if the issue is from teh network or from
GWT.

Regards...
Damien P

2009/2/6 Rick rick4...@gmail.com


 Hi

 Thanks for reply.When I deploy application on local machine, RPC call
 get returned in 20 ms but when this application get deployed on Remote
 server, RPC call is taking 1000 ms. I am just returning a hard code
 long value from server.

 Thanks and regards

 Rick

 On Feb 6, 2:46 pm, lowecg2004 chris.lowe...@gmail.com wrote:
  Hi Rick,
 
  In my experience RPC is very efficient - I have a 100 or so objects
  serialising over the wire in less than 50ms, with simpler structures
  taking even less time. Something that returns just a long should
  complete in no time at all. Have you tried adding some timing logic to
  the server code that produces that long value? What timings do you get
  if you just return a hard long value?  Using a HTTP proxy like Charles
  (http://www.charlesproxy.com/)  will shed some light on the size of
  the RPC calls being made and will provide some more precise timings.
 
  Good luck,
 
  Chris.
 
  On Feb 6, 9:08 am, Rick rick4...@gmail.com wrote:
 
   Hi
 
   I am using Java as server so I used RPC calls. The thing worrying me
   is the efficiency of RPC call. I just write a simple method getValue()
   on server which returns a long value. When I called it from client, it
   is taking 1 second to go to server and then come back. This 1 second
   time is pinching the performance of my application and I can't afford
   it. Can any one suggest what improvement should be done so that this
   time get reduced.
   Any suggestion in this regard will be highly appreciated .
 
   Thanks and reagrds
 
   Rick
 


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



Re: ScrollPanel maxWidth or maxHeight?

2009-02-06 Thread gregor



 Is there a real browser-event or should i
 just call a check procedure whenever i add elements?


The latter, no browser event available AFAIK.


  I have looked in vain for a general method to get ScrollPanels to
  resize and generally behave by themselves. I think the reason is that
  individual divs/table cells etc do not generate events when their size
  changes. ScrollPanel is basically a div with an overflow setting. I
  have supposed this is because there can be hundreds if not thousands
  of boxes on a page, so if they all emitted an event every time they
  changed their width/heights the browser's event queue would be brought
  to its knees.

  On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote:

   there is some max-height CSS property. But dont know if it works.

   On Thu, Feb 5, 2009 at 8:59 PM, alex.d 
   alex.dukhov...@googlemail.comwrote:

On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote:
 Hi Alex,

 I think you have to explicitly specify the height of a ScollPanel in
 pixels to get the scroll bars to kick in, and that will set the height
 of the panel from the word go. If what you mean is that you want a
 panel to start at a minimum size, then grow as things are added to it,
 but then to stop growing and go into scroll mode at a certain point,

exactly what i meant.

 I do not think that is realistically possible since there is no event
 you can listen for that would tell you when the panel had grown to a
 given height. You can listen for the browser window changing, but not
 for an individual panel.

 I suppose one approach might be to set up a timer to check the current
 height at intervals and take appropriate action when it hit the limit,
 but this sounds very inefficient.

Indeed it does. I kind of hoped somebody will have a genious idea
about it ;-) Thank you for your input anyway.

 regards
 gregor

 On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote:

  Hi folks,
  I'm trying to impelement a scrollpanel that becomes bigger (height) 
  to
  the certain size (maxHeight) when populating it with data.  After 
  that
  vertical scrollbar should appear and the panel should stop growing.
  Any ideas on how to implement this would be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Managing SerializationPolicy...?

2009-02-06 Thread patnieme...@gmail.com


I described what I'm doing with the serialization in great detail here
in a blog posting, just in case anyone is interested:

http://www.techhui.com/profiles/blog/show?id=1702911%3ABlogPost%3A31619page=1#comment-1702911_Comment_31745

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



Re: Managing SerializationPolicy...?

2009-02-06 Thread patnieme...@gmail.com

I described what I am doing with the serialization in greater detail
in this blog post:

  http://www.techhui.com/profiles/blogs/simpler-and-speedier-gwt-with


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



IE8 RC1 Very very slow

2009-02-06 Thread Si_gee

Anyone else seen this, IE 8 beta was fine. Got the RC1 today, and ever
since it is very slow running anything GWT related - including the GWT
Shell. I also tried compatability mode - but just as bad!

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



Announcing GWT 1.6 Milestone 1

2009-02-06 Thread Scott Blum
Greetings GWT developers,

The GWT team is happy to announce the availability of 1.6 Milestone 1!
Binary distributions are available for download directly from GWT's Google
Code project.

http://code.google.com/p/google-web-toolkit/downloads/list?can=1q=1.6.0

As always, milestone builds like this are use-at-your-own-risk. There are
known bugs, and it definitely isn't ready for production use. Please expect
some trial and error getting everything to work. The javadoc that comes
bundled with the distribution should be up-to-date, but the online Developer
Guide (http://code.google.com/docreader/#p=google-web-toolkit-doc-1-6) is
still very much a work in progress. We will be updating it over the next
several weeks. In lieu of an up-to-date Developer Guide and release notes,
below are the major highlights relative to GWT 1.5.3.

*** New Project Structure in GWT 1.6 ***

One of the biggest changes to GWT 1.6 is a new project structure. The old
output format has been replaced by the standard Java web app expanded war
format, and the actual directory name does default to /war. Note that the
war directory is not only for compiler output; it is also intended to
contain handwritten static resources that you want to be included in your
webapp alongside GWT modules (that is, things you'd want to version
control). Please also note that the GWTShell and GWTCompiler tools will
maintain their legacy behavior, but they have been deprecated in favor of
new HostedMode and Compiler tools which use the new war output. When 1.6
is officially released, we will be encouraging existing projects to update
to the new directory format and to use the new tools to take advantage of
new features and for compatibility with future GWT releases.

The sample projects provided in the GWT distribution provide an example of
correct new project configurations. For more details on the specifics of the
new project format, please see GWT 1.6 WAR design document (
http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6).

A couple of important changes we should highlight here:

- Projects with server-side code (GWT RPC) must configure a web.xml file
at /war/WEB-INF/web.xml. This web.xml file must define and publish any
servlets associated with the web application. See the included DynaTable
sample. Additionally, server-side library dependencies must be copied into
/war/WEB-INF/lib. For example, any GWT RPC servlets must have a copy of
gwt-servlet.jar in this folder.

- HTML host pages will no longer typically be located in a GWT module's
public path. Instead, we'll be recommending that people take advantage of
the natural web app behavior for serving static files by placing host pages
anywhere in the war structure that makes sense. For exmaple, you might want
to load a GWT module from a JSP page located in the root of your web app. To
keep such handwritten static files separate from those produced by the GWT
compiler, the latter will be placed into module-specific subdirectories. Any
page that wishes to include a GWT module can do so via a script tag by
referencing the GWT-produced module.nocache.js script within that
module's subdirectory. As of 1.6, we'll be recommending that only
module-specific resources used directly by GWT code, such as image files
needed by widgets, should remain on the public path. See the included
Showcase sample for some examples of this distinction.

- When you do need to load resources from a module's public path, always
construct an absolute URL by prepending GWT.getModuleBaseURL(). For example,
'GWT.getModuleBaseURL() + dir/file.ext'. This advice has not changed, but
in the past it was easy to be sloppy with this, because the host page and
GWT module typically lived in the same directory, so using a relative URL
would usually do the right thing. Now that GWT modules live in a
subdirectory, you must reference public resources through
GWT.getModuleBaseURL().

*** Hosted Mode Enhancements ***

Although the legacy GWTShell still uses an embedded Tomcat server, the new
HostedMode runs Jetty instead. There is also a new Restart Server button
on the main hosted mode window. Clicking this button restarts the internal
Jetty server, which allows Java code changes to take effect on the server
without having to completely exit and restart hosted mode. This is useful
when making code changes to RPC servlets, or when serializable RPC types are
modified and the server and client are out of sync.

*** New EventHandler System ***

Event handlers have been added to replace the old event listeners used by
Widgets, History, and various other classes. The new system has a few
differences from the old system:

- EventHandler methods always take a single parameter: the GwtEvent that the
Widget fired. For example, ClickHandler has a single method
onClick(ClickEvent).

- Each GwtEvent contains accessors relevant to the event, such as the key
that was pressed on KeyEvents. Native events provide access to the
underlying native event 

Re: Call event after an other

2009-02-06 Thread Neal

Use the queue in DeferredCommand

http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/DeferredCommand.html

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



Re: ScrollPanel maxWidth or maxHeight?

2009-02-06 Thread alex.d

Haven't found one either. But checking height while adding elements is
ok - have it almoust working already. Well, almoust - the problem is
that when height or width properties are set once, you can't take it
back. So, while panel shows the desired behaviour while adding
elements, it remains big when elements are removed. I've already
tried:

scrollPanel.setWidth();
scrollPanel.setWidth(null);

but no luck. I've also tried to set the style-attribute directly with

DOM.setStyleAttribute(scrollPanel.getElement(), width, );

but no luck either.
Sadly, i haven't found a removeStyleAttribute-method.

Any ideas?
Thx

On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote:
  Is there a real browser-event or should i
  just call a check procedure whenever i add elements?

 The latter, no browser event available AFAIK.

   I have looked in vain for a general method to get ScrollPanels to
   resize and generally behave by themselves. I think the reason is that
   individual divs/table cells etc do not generate events when their size
   changes. ScrollPanel is basically a div with an overflow setting. I
   have supposed this is because there can be hundreds if not thousands
   of boxes on a page, so if they all emitted an event every time they
   changed their width/heights the browser's event queue would be brought
   to its knees.

   On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote:

there is some max-height CSS property. But dont know if it works.

On Thu, Feb 5, 2009 at 8:59 PM, alex.d 
alex.dukhov...@googlemail.comwrote:

 On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote:
  Hi Alex,

  I think you have to explicitly specify the height of a ScollPanel in
  pixels to get the scroll bars to kick in, and that will set the 
  height
  of the panel from the word go. If what you mean is that you want a
  panel to start at a minimum size, then grow as things are added to 
  it,
  but then to stop growing and go into scroll mode at a certain point,

 exactly what i meant.

  I do not think that is realistically possible since there is no 
  event
  you can listen for that would tell you when the panel had grown to a
  given height. You can listen for the browser window changing, but 
  not
  for an individual panel.

  I suppose one approach might be to set up a timer to check the 
  current
  height at intervals and take appropriate action when it hit the 
  limit,
  but this sounds very inefficient.

 Indeed it does. I kind of hoped somebody will have a genious idea
 about it ;-) Thank you for your input anyway.

  regards
  gregor

  On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote:

   Hi folks,
   I'm trying to impelement a scrollpanel that becomes bigger 
   (height) to
   the certain size (maxHeight) when populating it with data.  After 
   that
   vertical scrollbar should appear and the panel should stop 
   growing.
   Any ideas on how to implement this would be appreciated.


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



Re: Calling of business method from Client

2009-02-06 Thread Arul

Hi Gregor,
I some how managed GWT component as replacement of my presentation
layer.
currenlty my application will be displaying like tree structure as
menu in the left hand and selecting each link its content is diplayed
in right side in grid with rows and columns. This kind of requirement
suits most of the places.

   In partcular link, the grid in right hand side would be dipslayed
like.
 a)Acct no   Accont Name
 1000ABC ( 2 tests)
  Test1 (2 rule)
Rule1
 Test2( 2 rules)
Rule1
Rule2

2000XYZ ( 1 tests)
  Test1 (5 rules)

Here first only acct no and name woold be displayed , test belongs to
an account would be expaned if user uses kind of arrow on acct name.
then rules belongs to each test expaned on request basis as selecting
the arrow.

Would you please assist me how I can achive this behavior in Grid? or
send me some usefule links if you have.?

Thanks a Lot
Arul




On Jan 2, 7:35 pm, gregor greg.power...@googlemail.com wrote:
  Here in the existing application it is easy for getting session values
  (JSP) and assigned as part of query string.

  Would you please tell me how the same can be acheived in GWT client
  code(JAVA)?
  How I can get those session values so that I can assign in Window.open
  method?.

 Well your existing JSPs are running server side as servlets whereas
 your GWT code is running as javascript client side, so whereas your
 JSPs have automatic access to httpsession your GWT client code
 obviously does not. I think you might have to make a preparatory RPC
 call to get the necessary parameters from the user's session before
 you construct the URL.



  Thanks
  Arul- Hide quoted text -

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



multiple rpc calls to server

2009-02-06 Thread ytbryan

Hi all,
i know gwt don support synchronous call and i read it somwhere that
there is actually don need to make rpc call synchronous.

but i created an application with buttons like  save data  and 
display result that will communicate to server by fetching data or
saving data.

when the application starts, it will automatically display the first
result with its first rpc call. but when i click the display second
result's button... it doesn't work anymore. any subsequent rpc
call after the first one don't work.


what is wrong here? and what am i missing? can someone advice me? the
usual rpc example online only show how to make one rpc call. is there
a way to make multiple calls that do different task? thank you for
your time in viewing this post.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: ScrollPanel maxWidth or maxHeight?

2009-02-06 Thread Davsket

well, at least replace it..

On 6 feb, 10:41, alex.d alex.dukhov...@googlemail.com wrote:
 Haven't found one either. But checking height while adding elements is
 ok - have it almoust working already. Well, almoust - the problem is
 that when height or width properties are set once, you can't take it
 back. So, while panel shows the desired behaviour while adding
 elements, it remains big when elements are removed. I've already
 tried:

 scrollPanel.setWidth();
 scrollPanel.setWidth(null);

 but no luck. I've also tried to set the style-attribute directly with

 DOM.setStyleAttribute(scrollPanel.getElement(), width, );

 but no luck either.
 Sadly, i haven't found a removeStyleAttribute-method.

 Any ideas?
 Thx

 On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote:

   Is there a real browser-event or should i
   just call a check procedure whenever i add elements?

  The latter, no browser event available AFAIK.

I have looked in vain for a general method to get ScrollPanels to
resize and generally behave by themselves. I think the reason is that
individual divs/table cells etc do not generate events when their size
changes. ScrollPanel is basically a div with an overflow setting. I
have supposed this is because there can be hundreds if not thousands
of boxes on a page, so if they all emitted an event every time they
changed their width/heights the browser's event queue would be brought
to its knees.

On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote:

 there is some max-height CSS property. But dont know if it works.

 On Thu, Feb 5, 2009 at 8:59 PM, alex.d 
 alex.dukhov...@googlemail.comwrote:

  On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote:
   Hi Alex,

   I think you have to explicitly specify the height of a ScollPanel 
   in
   pixels to get the scroll bars to kick in, and that will set the 
   height
   of the panel from the word go. If what you mean is that you want a
   panel to start at a minimum size, then grow as things are added 
   to it,
   but then to stop growing and go into scroll mode at a certain 
   point,

  exactly what i meant.

   I do not think that is realistically possible since there is no 
   event
   you can listen for that would tell you when the panel had grown 
   to a
   given height. You can listen for the browser window changing, but 
   not
   for an individual panel.

   I suppose one approach might be to set up a timer to check the 
   current
   height at intervals and take appropriate action when it hit the 
   limit,
   but this sounds very inefficient.

  Indeed it does. I kind of hoped somebody will have a genious idea
  about it ;-) Thank you for your input anyway.

   regards
   gregor

   On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com wrote:

Hi folks,
I'm trying to impelement a scrollpanel that becomes bigger 
(height) to
the certain size (maxHeight) when populating it with data.  
After that
vertical scrollbar should appear and the panel should stop 
growing.
Any ideas on how to implement this would be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Best image preloading practice?

2009-02-06 Thread gregor

@Litty: yes, I think you are right, my ignorance. Image.prefetch()
will causes the image to be loaded into browser cache. You then use
the same URL to instantiate an Image object later in code, and
hopefully the image binary will be already downloaded. This old
Mozzilla doc describes the process:

http://devedge-temp.mozilla.org/viewsource/2003/link-prefetching/index_en.html

The doc suggests the behavior darkflame described in OP, namely,
browser is busy downloading all the prefetches it finds in the page.

@darkflame:


 b) If I do have to load, say, upto 10 images that have to be seperate,
 is it better to just loop over a list of them prefetching and leave it
 upto the browseror should I put a timer and trigger a load every,
 say, 5 seconds ?
 (or dosnt it make much difference).


My reading of the Mozzilla doc is that the browser will notice all the
prefetch tags when it loads the page, and it will then get busy
downloading them. So I have doubts whether where you put the
Image.prefetch(url) in execution logic makes any difference, i.e. you
do not have fine tune programmatic control over prefetch so you can't
code to prefetch first 10, then later trigger prefetching next 10. For
example the Mozzilla doc states The link tag has to be inside the
head tag to make prefetching work etc.







 On Feb 6, 9:14 am, Litty Preeth preeth.h...@gmail.com wrote:

You are thinking of loading 20MB of images into the DHTML DOM of you
application

Am I? Does the DOM keep them there even when not displayed?
These images certainly wouldnt be displayed all at once. 1 or 2 at a
time at most.

   I'm not absolutely sure, but I think if you load an image it is
   basically attached to a document, whether the browser caches it or
   not, and whether it is currently visible of not. You don't control the
   browser cache, I mean I don't think you can tell it to conveniently
   download all your images and store them neatly on disk until you need
   to display them for example.

  ah, pig.
  I thought that was exactly that prefetch was doing -sigh-
  I thought it loaded it to ram first, then the browser keeps a copy in
  its cache for reloading if needed.
  -sigh-
  That does change things indeed then.

  AFAIK the prefetch creates an IMG element but its not attached to the DOM.

  - Litty

  On Fri, Feb 6, 2009 at 1:03 PM, darkflame darkfl...@gmail.com wrote:

 You are thinking of loading 20MB of images into the DHTML DOM of you
 application

 Am I? Does the DOM keep them there even when not displayed?
 These images certainly wouldnt be displayed all at once. 1 or 2 at a
 time at most.

I'm not absolutely sure, but I think if you load an image it is
basically attached to a document, whether the browser caches it or
not, and whether it is currently visible of not. You don't control the
browser cache, I mean I don't think you can tell it to conveniently
download all your images and store them neatly on disk until you need
to display them for example.

   ah, pig.
   I thought that was exactly that prefetch was doing -sigh-
   I thought it loaded it to ram first, then the browser keeps a copy in
   its cache for reloading if needed.
   -sigh-
   That does change things indeed then.

 Again, not at once.
 Surely a staggered download they wouldnt have a problem with?
 Emulating, say, what it would expect from a user browseing DeviantArt?

yeah, the staggered download is basically the idea of the maze - each
time you move to next location you've only got one locations worth of
images to fetch. Or if it worked fast enough you could fetch all the
required images for the adjoining locations so they would be ready to
go instantly. It depends entirely on no of image bytes per location.

   Yes, I looks like I'll be switching to a as-you-go-along-it-loads-the-
   next-rooms approach.
   Allthough...

Point is doing it this way old images are thrown away and can be
garbage collected as you go, so you are not accumulating images in
memory. It's stable. (assuming I'm right about the how this works of
course).

   ...I'm not sure there will be much that can be chucked away in this
   game.
   My engine is able to remove items easily enough, but for this game
   items from the start of the game are still usefull at the end, so
   theres only a few case's when images can be removed never to be
   recalled.

 . The point of
 the composite image strip is to fetch several images in one request
 since they come in a single binary file. 

 Yes, I understand the point of them, and I think image bundles are a
 great idea.
 (In fact, online in general, theres probably a lot of wasted bandwidth
 used on little UI elements on webpages..like 5kb gifs etc)
 In this specific case though they arnt approperate.
 Not unless I got the server to dynamically splice the images together
 and the client to 

Re: multiple rpc calls to server

2009-02-06 Thread mon3y

Hi

A code snippet would be nice, so we can see where you're going wrong.

Also put a Window.alert(), in your onFailure and onSuccess of your
second call to see what you get.

If it comes into the onFailure of your second call, there must be
something wrong with the way you're calling the server side or your
interfaces.

If it comes in on your onSuccess, it must be a logic error, or
something else pertaining to your client side code.

If you make the first call successful and you call the second one the
same way(logically) then there should be no issues.

:)

On Feb 6, 12:39 pm, ytbryan ytbr...@gmail.com wrote:
 Hi all,
 i know gwt don support synchronous call and i read it somwhere that
 there is actually don need to make rpc call synchronous.

 but i created an application with buttons like  save data  and 
 display result that will communicate to server by fetching data or
 saving data.

 when the application starts, it will automatically display the first
 result with its first rpc call. but when i click the display second
 result's button... it doesn't work anymore. any subsequent rpc
 call after the first one don't work.

 what is wrong here? and what am i missing? can someone advice me? the
 usual rpc example online only show how to make one rpc call. is there
 a way to make multiple calls that do different task? thank you for
 your time in viewing this post.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Unicode problem in GWT

2009-02-06 Thread Machine_Head

Hi, i have a problem in gwt application with unicode,
when i fill input fields with unicode font (Cyrillic) and then make
rpc call,
result is shown as 

Have anybody solved this problem?

Thanks

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



Re: multiple rpc calls to server

2009-02-06 Thread ytbryan

I just insert Window.alert() into getdata1(); and i realised that
the method is called but no window alert appears. i inserted  a
println after onsuccess and onfailure and something is printed out.

basically, onsuccess and onfailure are skipped? how is it possible?

On Feb 6, 11:58 am, ytbryan ytbr...@gmail.com wrote:
 below is the code where i execute the rpc request. i create getdata()
 and getdata1() to get execute different query. i am using two Async
 object to make call. i am  not sure is it correct as i got error when
 i use one. any help/advice is welcome and appreciated. :D

 private void getData() {

   AsyncCallbackObject callback = new AsyncCallbackObject() {
    // fail
    public void onFailure(Throwable ex) {
     RootPanel.get().add(new HTML(ex.toString()));
    }
    // success
    public void onSuccess(Object result) {
     // Cast the result into the object that was sent
     // This casts the random object into DataContainer
     // Since the object is an array we use []
     DataContainer[] displayData = (DataContainer[]) result;
    }
   };

   callProvider.getData(callback);
  }
  private void getData1() {
            final int value1 = value;

           AsyncCallbackObject callback1 = new AsyncCallbackObject(){
            // fail

            public void onFailure(Throwable ex) {
             RootPanel.get().add(new HTML(ex.toString()));

            }
            // success
            public void onSuccess(Object result) {
             // Cast the result into the object that was sent
             // This casts the random object into DataContainer
             // Since the object is an array we use []
             displayData1 = (DataContainer[]) result;

            }
           };

           // remote procedure call to the server to get the data
           callProvider1.getData1(callback1);

          }

 On Feb 6, 11:46 am, mon3y darkside...@hotmail.com wrote:

  Hi

  A code snippet would be nice, so we can see where you're going wrong.

  Also put a Window.alert(), in your onFailure and onSuccess of your
  second call to see what you get.

  If it comes into the onFailure of your second call, there must be
  something wrong with the way you're calling the server side or your
  interfaces.

  If it comes in on your onSuccess, it must be a logic error, or
  something else pertaining to your client side code.

  If you make the first call successful and you call the second one the
  same way(logically) then there should be no issues.

  :)

  On Feb 6, 12:39 pm, ytbryan ytbr...@gmail.com wrote:

   Hi all,
   i know gwt don support synchronous call and i read it somwhere that
   there is actually don need to make rpc call synchronous.

   but i created an application with buttons like  save data  and 
   display result that will communicate to server by fetching data or
   saving data.

   when the application starts, it will automatically display the first
   result with its first rpc call. but when i click the display second
   result's button... it doesn't work anymore. any subsequent rpc
   call after the first one don't work.

   what is wrong here? and what am i missing? can someone advice me? the
   usual rpc example online only show how to make one rpc call. is there
   a way to make multiple calls that do different task? thank you for
   your time in viewing this post.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC call efficiency

2009-02-06 Thread Rick

Hi

Thanks for reply.When I deploy application on local machine, RPC call
get returned in 20 ms but when this application get deployed on Remote
server, RPC call is taking 1000 ms. I am just returning a hard code
long value from server.

Thanks and regards

Rick

On Feb 6, 2:46 pm, lowecg2004 chris.lowe...@gmail.com wrote:
 Hi Rick,

 In my experience RPC is very efficient - I have a 100 or so objects
 serialising over the wire in less than 50ms, with simpler structures
 taking even less time. Something that returns just a long should
 complete in no time at all. Have you tried adding some timing logic to
 the server code that produces that long value? What timings do you get
 if you just return a hard long value?  Using a HTTP proxy like Charles
 (http://www.charlesproxy.com/)  will shed some light on the size of
 the RPC calls being made and will provide some more precise timings.

 Good luck,

 Chris.

 On Feb 6, 9:08 am, Rick rick4...@gmail.com wrote:

  Hi

  I am using Java as server so I used RPC calls. The thing worrying me
  is the efficiency of RPC call. I just write a simple method getValue()
  on server which returns a long value. When I called it from client, it
  is taking 1 second to go to server and then come back. This 1 second
  time is pinching the performance of my application and I can't afford
  it. Can any one suggest what improvement should be done so that this
  time get reduced.
  Any suggestion in this regard will be highly appreciated .

  Thanks and reagrds

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



Re: RPC call efficiency

2009-02-06 Thread Jason Essington

Just curious, what happens if you return a string, or an int rather  
than a long?

longs are emulated in GWT and have been pegged as being a bit slow,  
but 1s sure seems like an awful lot.

The other thing to do is pull up FireBug (Firefox), or WebInspector  
(WebKit nightly builds) and check the latency of the RPC call.

What are the ping times to your remote server?

-jason

On Feb 6, 2009, at 3:49 AM, Rick wrote:


 Hi

 Thanks for reply.When I deploy application on local machine, RPC call
 get returned in 20 ms but when this application get deployed on Remote
 server, RPC call is taking 1000 ms. I am just returning a hard code
 long value from server.

 Thanks and regards

 Rick

 On Feb 6, 2:46 pm, lowecg2004 chris.lowe...@gmail.com wrote:
 Hi Rick,

 In my experience RPC is very efficient - I have a 100 or so objects
 serialising over the wire in less than 50ms, with simpler structures
 taking even less time. Something that returns just a long should
 complete in no time at all. Have you tried adding some timing logic  
 to
 the server code that produces that long value? What timings do you  
 get
 if you just return a hard long value?  Using a HTTP proxy like  
 Charles
 (http://www.charlesproxy.com/)  will shed some light on the size of
 the RPC calls being made and will provide some more precise timings.

 Good luck,

 Chris.

 On Feb 6, 9:08 am, Rick rick4...@gmail.com wrote:

 Hi

 I am using Java as server so I used RPC calls. The thing worrying me
 is the efficiency of RPC call. I just write a simple method  
 getValue()
 on server which returns a long value. When I called it from  
 client, it
 is taking 1 second to go to server and then come back. This 1 second
 time is pinching the performance of my application and I can't  
 afford
 it. Can any one suggest what improvement should be done so that this
 time get reduced.
 Any suggestion in this regard will be highly appreciated .

 Thanks and reagrds

 Rick
 


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



Re: multiple rpc calls to server (can someone advise me!)

2009-02-06 Thread Jason Essington

gregor is right, you are trying to perform your update synchronously  
but your request is happening asynchronously.

A full explanation of your exact problem can be found in this post:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/faca1575f306ba0f/3be719c021aa19bd

-jason

On Feb 6, 2009, at 6:10 AM, gregor wrote:


 Your problem looks like it's here:

 private void updateGrid1(GridPanel gridPanel, int cols, int rows) {
 if (store != null) {
 store.removeAll();
 }
 getData1(1);   PROBLEM

 Object[][] data = null;

 if(displayData1!= null) { PRBLEM: displayData not
 yet updated
 data = getCompanyData(displayData1, 1);
 }
 else {
 System.out.println(exception at update1(););
 return;
 }

 caused by:

   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
displayData1 = (DataContainer[]) result;   CAUSE:
 you set variable, you do not call grid update method

   }
  };


 what you need to do is rearrange your logic to call updateGrid1(..)
 from the async callback onSuccess(..) method. What is happening at the
 moment is that the grid update code is running at the same time the
 RPC call is executing over the wire, so ther is no new data in
 displayData1.

 regards
 gregor


 On Feb 6, 12:33 pm, ytbryan ytbr...@gmail.com wrote:
 can someone help?

 below are my rpc request code.

 private void getData() {

   AsyncCallbackObject callback = new AsyncCallbackObject() {
// fail
public void onFailure(Throwable ex) {
 RootPanel.get().add(new HTML(ex.toString()));
}
// success
public void onSuccess(Object result) {
 // Cast the result into the object that was sent
 // This casts the random object into DataContainer
 // Since the object is an array we use []
 DataContainer[] displayData = (DataContainer[]) result;
}
   };

   callProvider.getData(callback);
  }
  private void getData1() {
final int value1 = value;

   AsyncCallbackObject callback1 = new  
 AsyncCallbackObject()
 {
// fail

public void onFailure(Throwable ex) {
 RootPanel.get().add(new HTML(ex.toString()));

}
// success
public void onSuccess(Object result) {
 // Cast the result into the object that was sent
 // This casts the random object into DataContainer
 // Since the object is an array we use []
 displayData1 = (DataContainer[]) result;

}
   };

   // remote procedure call to the server to get the data
   callProvider1.getData1(callback1);

  }

 below is updategrid1 code which calls the getData1() code

 private void updateGrid1(GridPanel gridPanel, int cols, int rows) {
  if (store != null) {
  store.removeAll();
  }
  getData1(1);

  Object[][] data = null;

  if(displayData1!= null) {
  data = getCompanyData(displayData1, 1);
  }
  else {
  System.out.println(exception at update1(););
  return;
  }

  RecordDef recordDef = new RecordDef(
  new FieldDef[]{

new StringFieldDef(date),
new IntegerFieldDef(opensource),
new IntegerFieldDef(trial),
new IntegerFieldDef(sales),
new StringFieldDef(ostrial),
new StringFieldDef(trialsale) ,
new StringFieldDef(ossale)
  }
  );
  ColumnConfig[] columns = new ColumnConfig[]{
  //column ID is company which is later used in
 setAutoExpandColumn
  new ColumnConfig(Date, date, 160, true, null,
 company),
  new ColumnConfig(Open Source, opensource, 35,true),
  new ColumnConfig(Trial, trial, 45,true),
  new ColumnConfig(Sales, sales, 65,true),
  new ColumnConfig(OS-Trial, ostrial, 65),
  new ColumnConfig(Trial-Sale, trialsale, 60, true),
  new ColumnConfig(OS-Sale, ossale, 60, true)
  };

  ColumnModel columnModel = new ColumnModel(columns);

  MemoryProxy proxy = new MemoryProxy(data);
  ArrayReader reader = new ArrayReader(recordDef);
  store = new Store(proxy, reader);
  store.load();

  gridPanel.reconfigure(store, columnModel);

  }

 below is my button code which get trigger when pressed. and it has
 listener that will call updategrid1()!!! please ignore those
 unnecessary parameter that are unused.

  ToolbarButton generateButton1 = new ToolbarButton(test, new
 ButtonListenerAdapter() {
   public void onClick(Button button,  
 EventObject e) {
   

Re: multiple rpc calls to server (can someone advise me!)

2009-02-06 Thread gregor

Your problem looks like it's here:

private void updateGrid1(GridPanel gridPanel, int cols, int rows) {
 if (store != null) {
 store.removeAll();
 }
 getData1(1);   PROBLEM

 Object[][] data = null;

 if(displayData1!= null) { PRBLEM: displayData not
yet updated
 data = getCompanyData(displayData1, 1);
 }
 else {
 System.out.println(exception at update1(););
 return;
 }

caused by:

   // success
   public void onSuccess(Object result) {
// Cast the result into the object that was sent
// This casts the random object into DataContainer
// Since the object is an array we use []
displayData1 = (DataContainer[]) result;   CAUSE:
you set variable, you do not call grid update method

   }
  };


what you need to do is rearrange your logic to call updateGrid1(..)
from the async callback onSuccess(..) method. What is happening at the
moment is that the grid update code is running at the same time the
RPC call is executing over the wire, so ther is no new data in
displayData1.

regards
gregor


On Feb 6, 12:33 pm, ytbryan ytbr...@gmail.com wrote:
 can someone help?

 below are my rpc request code.

 private void getData() {

   AsyncCallbackObject callback = new AsyncCallbackObject() {
    // fail
    public void onFailure(Throwable ex) {
     RootPanel.get().add(new HTML(ex.toString()));
    }
    // success
    public void onSuccess(Object result) {
     // Cast the result into the object that was sent
     // This casts the random object into DataContainer
     // Since the object is an array we use []
     DataContainer[] displayData = (DataContainer[]) result;
    }
   };

   callProvider.getData(callback);
  }
  private void getData1() {
            final int value1 = value;

           AsyncCallbackObject callback1 = new AsyncCallbackObject()
 {
            // fail

            public void onFailure(Throwable ex) {
             RootPanel.get().add(new HTML(ex.toString()));

            }
            // success
            public void onSuccess(Object result) {
             // Cast the result into the object that was sent
             // This casts the random object into DataContainer
             // Since the object is an array we use []
             displayData1 = (DataContainer[]) result;

            }
           };

           // remote procedure call to the server to get the data
           callProvider1.getData1(callback1);

          }

 below is updategrid1 code which calls the getData1() code

 private void updateGrid1(GridPanel gridPanel, int cols, int rows) {
      if (store != null) {
          store.removeAll();
      }
      getData1(1);

      Object[][] data = null;

      if(displayData1!= null) {
          data = getCompanyData(displayData1, 1);
      }
      else {
          System.out.println(exception at update1(););
          return;
      }

      RecordDef recordDef = new RecordDef(
              new FieldDef[]{

                    new StringFieldDef(date),
                    new IntegerFieldDef(opensource),
                    new IntegerFieldDef(trial),
                    new IntegerFieldDef(sales),
                    new StringFieldDef(ostrial),
                    new StringFieldDef(trialsale) ,
                    new StringFieldDef(ossale)
              }
      );
      ColumnConfig[] columns = new ColumnConfig[]{
              //column ID is company which is later used in
 setAutoExpandColumn
              new ColumnConfig(Date, date, 160, true, null,
 company),
              new ColumnConfig(Open Source, opensource, 35,true),
              new ColumnConfig(Trial, trial, 45,true),
              new ColumnConfig(Sales, sales, 65,true),
              new ColumnConfig(OS-Trial, ostrial, 65),
              new ColumnConfig(Trial-Sale, trialsale, 60, true),
              new ColumnConfig(OS-Sale, ossale, 60, true)
      };

      ColumnModel columnModel = new ColumnModel(columns);

      MemoryProxy proxy = new MemoryProxy(data);
      ArrayReader reader = new ArrayReader(recordDef);
      store = new Store(proxy, reader);
      store.load();

      gridPanel.reconfigure(store, columnModel);

  }

 below is my button code which get trigger when pressed. and it has
 listener that will call updategrid1()!!! please ignore those
 unnecessary parameter that are unused.

  ToolbarButton generateButton1 = new ToolbarButton(test, new
 ButtonListenerAdapter() {
                       public void onClick(Button button, EventObject e) {
                           updateGrid1(gridPanel, cols.getValue().intValue(),
 rows.getValue().intValue());
                       }
                   });
                   generateButton1.setIconCls(database-add-icon);
                   bottom.addButton(generateButton1);

 }

 can someone help!

 On Feb 6, 12:14 pm, ytbryan ytbr...@gmail.com wrote:

  I just insert Window.alert() into getdata1(); 

Re: GWT-ext or ext-GWT?

2009-02-06 Thread DaBlick

On Feb 4, 3:57 am, Miles T. dupont.nico...@gmail.com wrote:
 Just a word about documentation. It is true that the documentation is
 far from complete but it is not true that it is non-existent.

Well, it's not true that I said it was non-existent either.  :-)

I said it was more accurate to say it was non-existent than it was to
say that it's poor.

I looked at the recent additions to the Wiki that you pointed me to,
and I still maintain the accuracy of my characterization but...

1)  We ARE using Ext-GWT and we are glad we are using it.
Documentation is a serious complaint but we're happy
 otherwise.   It's just our biggest beef and people considering
using GXT need to be aware of it, which was my point.

2)  ExtJS is VERY responsive to bugs and questions, and the forums are
very helpful.  Not a substitute for
documentation, but they dull the pain considerably.

3) I'm ecstatically happy to see that a book is coming out.   I'm
going to preorder copies for all my colleagues.  This
could eliminate the entire complaint if the book is decent.

4) I'm quite happy that work is being done on the Wiki.   But the fact
remains, that not much is there yet.  As far as
I can tell, the GXT MVC architecture (which IMHO is pretty darn
good) is largely undocumented.   One sentence
descriptions often in the Javadocs even.

 The wiki is in work in progress 
 :http://extjs.com/learn/Learn_About_the_Ext_GWT_Library
 and there is also a small help centerhttp://extjs.com/helpcenter/index.jsp

 On 31 jan, 05:42, DaBlick dabl...@gmail.com wrote:

  We used GWT-Ext and tossed it in favor of Ext-GWT (often referred to
  as GXT).

  I've said this before in this forum so I'll just be brief here as you
  can search the forum for more details.

  - It's been said MANY times so you know it's true:  It wouldn't be
  accurate to say the documentation is poor.  It'd be more accurate to
  say that the documentation is NON-EXISTENT and this is a SERIOUS
  SERIOUS issue you must consider before choosing it.   You are,
  apparently, expected to learn the library by reverse-engineering the
  examples.   This means your project will have a potentially steep ramp-
  up time.

  - It's easy to find bugs in Ext-GWT because it's basically been a one-
  man project for most of its life. However...

  - Reported bugs tend to get fixed VERY quickly and if you are
  licensed, you can pick up the fix from the SVN as soon as they are
  fixed.

  - Ext-GWT has what I consider to be a rather nice MVC architecture
  built into it.   It really goes well beyond, say, Swing's MVC because
  it not only de-couples Ms, Vcs and Cs, but decouples data-models, data
  loaders, etc.   The MVC architecture has some problems with its
  generic implementation, but it's pretty good overall.

  - We think the components look nice, but then... we pretty much have
  customized everything.   Our app is highly stylized.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Unicode problem in GWT

2009-02-06 Thread Sam sem
changing character encoding will help
request.setCharacterEncoding(UTF8);

On Fri, Feb 6, 2009 at 7:56 AM, Machine_Head ikax...@gmail.com wrote:


 Hi, i have a problem in gwt application with unicode,
 when i fill input fields with unicode font (Cyrillic) and then make
 rpc call,
 result is shown as 

 Have anybody solved this problem?

 Thanks

 


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



Re: Calling of business method from Client

2009-02-06 Thread gregor

Hi Arul,

Check out:

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

Personally I find tree tables sometimes look confusing, especially if
there are significant differences in the structure and/or size of the
nodes, but a lot of people like them. They are also complicated
widgets. I would consider as an alternative breaking up the structure
into three widgets, for example:

1. A list of Accounts (Acc No) to pick from left side (a
HorizontalPanel basically).
2. A standard Tree widget representing Account Name nodes at top level
with the rules and tests nested underneath located top right
3. A leaf data panel to show details of a particular test or rule
selected from the Tree, located bottom right.

You could use HorizontalSplitPanel and VerticalSplitPanel to divide up
the display giving much more flexibility to the user's view of the
data, and I think you may find it looks a lot better and is easier to
use. There are other alternatives involving DisclosurePanels etc. This
approach may not only be easier for the user, but you may find it a
lot easier to code as well.

regards
gregor



On Feb 6, 3:48 pm, Arul arulmanikandan.sriniva...@gmail.com wrote:
 Hi Gregor,
     I some how managed GWT component as replacement of my presentation
 layer.
 currenlty my application will be displaying like tree structure as
 menu in the left hand and selecting each link its content is diplayed
 in right side in grid with rows and columns. This kind of requirement
 suits most of the places.

    In partcular link, the grid in right hand side would be dipslayed
 like.
      a)Acct no       Accont Name
          1000            ABC ( 2 tests)
                               Test1 (2 rule)
                             Rule1
                              Test2( 2 rules)
                             Rule1
                             Rule2

         2000            XYZ ( 1 tests)
                               Test1 (5 rules)

 Here first only acct no and name woold be displayed , test belongs to
 an account would be expaned if user uses kind of arrow on acct name.
 then rules belongs to each test expaned on request basis as selecting
 the arrow.

 Would you please assist me how I can achive this behavior in Grid? or
 send me some usefule links if you have.?

 Thanks a Lot
 Arul

 On Jan 2, 7:35 pm, gregor greg.power...@googlemail.com wrote:

   Here in the existing application it is easy for getting session values
   (JSP) and assigned as part of query string.

   Would you please tell me how the same can be acheived in GWT client
   code(JAVA)?
   How I can get those session values so that I can assign in Window.open
   method?.

  Well your existing JSPs are running server side as servlets whereas
  your GWT code is running as javascript client side, so whereas your
  JSPs have automatic access to httpsession your GWT client code
  obviously does not. I think you might have to make a preparatory RPC
  call to get the necessary parameters from the user's session before
  you construct the URL.

   Thanks
   Arul- Hide quoted text -

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



Google API Libraries for GWT: New binaries uploaded

2009-02-06 Thread Eric Ayers

Another round of updates is ready for the Google API Libraries for
Google Web Toolkit (GWT). As just announced on the GWT blog, this
update brings bug fixes and new features to three of the existing
libraries.

  - The Google Visualization API Library for GWT moves from a release
candidate to a public release with a few bug fixes.
  - The Gadgets API Library for GWT now supports GadgetAds , gadget
based internationalization and an important bug fix for Windows
developers using GWT hosted mode.
  - The Google Maps API Library for GWT now includes support for the
GAdsManager and reverse geocoding support.

We are also announcing a major update as a release candidate.  The
Gears API Library for GWT version 1.2.0 supports the Gears 0.4 feature
set, which includes Geolocation, HTTP Request, Desktop and Blob.

This release is exciting to me not just for the new features that have
been added, but also for the number of new contributors to the
libraries from the open source community. Special thanks to Mark
Renouf for contributing Gears 0.4 support, and all those that filed
issues and contributed patches.

You can find the new libraries ready for download on Google Code.

  http://code.google.com/p/gwt-google-apis

-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



Re: ScrollPanel maxWidth or maxHeight?

2009-02-06 Thread gregor

Oh right...

I think you've got to make sure that the whatever the ScrollPanel
contains has actually reduced in size already - if it hasn't the
ScrollPanel will refuse to cooperate (i.e. it won't squash it's
contents by itself). Then you need to reset it to 1px  more than the
height/width of its contents (1px is fine if contents is now 0) in
order to get rid of the scroll bars (0px etc is ignored as I
recall). It won't do that by itself. After that you'll have to try
things out - I've always reset ScrollPanel's to a specific height
after this procedure, so I don't know how to release it from the 1px
instruction without specifying another. I think I would use debugger
to find out exact style properties of ScrollPanel whilst it's in
growing mode to start with, and attempt to replicate that. If it has
nothing in height/width you may have a problem because, as you say,
you may not be allowed to actually remove a style attribute once it's
there, only modify it, in which case the ScrollPanel may stubbornly
refuse to cooperate.

You might be forced to attempt a detach of the items widget, replace
ScollPanel with a new one, and reattach the items widget to it, or
some such...

 or you might consider another way to do this altogether -
ScrollPanel's can be tiresome, uncooperative widgets at times ;-)

On Feb 6, 3:46 pm, Davsket g.ave...@gmail.com wrote:
 well, at least replace it..

 On 6 feb, 10:41, alex.d alex.dukhov...@googlemail.com wrote:

  Haven't found one either. But checking height while adding elements is
  ok - have it almoust working already. Well, almoust - the problem is
  that when height or width properties are set once, you can't take it
  back. So, while panel shows the desired behaviour while adding
  elements, it remains big when elements are removed. I've already
  tried:

  scrollPanel.setWidth();
  scrollPanel.setWidth(null);

  but no luck. I've also tried to set the style-attribute directly with

  DOM.setStyleAttribute(scrollPanel.getElement(), width, );

  but no luck either.
  Sadly, i haven't found a removeStyleAttribute-method.

  Any ideas?
  Thx

  On 6 Feb., 15:23, gregor greg.power...@googlemail.com wrote:

Is there a real browser-event or should i
just call a check procedure whenever i add elements?

   The latter, no browser event available AFAIK.

 I have looked in vain for a general method to get ScrollPanels to
 resize and generally behave by themselves. I think the reason is that
 individual divs/table cells etc do not generate events when their size
 changes. ScrollPanel is basically a div with an overflow setting. I
 have supposed this is because there can be hundreds if not thousands
 of boxes on a page, so if they all emitted an event every time they
 changed their width/heights the browser's event queue would be brought
 to its knees.

 On Feb 5, 4:13 pm, Litty Preeth preeth.h...@gmail.com wrote:

  there is some max-height CSS property. But dont know if it works.

  On Thu, Feb 5, 2009 at 8:59 PM, alex.d 
  alex.dukhov...@googlemail.comwrote:

   On 5 Feb., 16:10, gregor greg.power...@googlemail.com wrote:
Hi Alex,

I think you have to explicitly specify the height of a 
ScollPanel in
pixels to get the scroll bars to kick in, and that will set the 
height
of the panel from the word go. If what you mean is that you 
want a
panel to start at a minimum size, then grow as things are added 
to it,
but then to stop growing and go into scroll mode at a certain 
point,

   exactly what i meant.

I do not think that is realistically possible since there is no 
event
you can listen for that would tell you when the panel had grown 
to a
given height. You can listen for the browser window changing, 
but not
for an individual panel.

I suppose one approach might be to set up a timer to check the 
current
height at intervals and take appropriate action when it hit the 
limit,
but this sounds very inefficient.

   Indeed it does. I kind of hoped somebody will have a genious idea
   about it ;-) Thank you for your input anyway.

regards
gregor

On Feb 5, 9:29 am, alex.d alex.dukhov...@googlemail.com 
wrote:

 Hi folks,
 I'm trying to impelement a scrollpanel that becomes bigger 
 (height) to
 the certain size (maxHeight) when populating it with data.  
 After that
 vertical scrollbar should appear and the panel should stop 
 growing.
 Any ideas on how to implement this would be appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe 

Re: Anyone configure GWTShell to listen on a network interface?

2009-02-06 Thread Transplant



On Feb 6, 3:01 am, Lore laurent.vanderlin...@gmail.com wrote:
 you need to compile (from the shell or command line) with the current
 version of GWT


I'm using GWT 1.5.3 which is the current version? I don't understand
how this relates.

Thanks


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



Overlay invisible in Web mode

2009-02-06 Thread bogdan71

  Hello,

  I'm new with GWT and GWT-Maps. I need to plot polylines over a Map
widget. My problem is that the polyline only shows up in Hosted mode.
When running in Web mode, I can't see it.

  More detailed, there's an addRoutes() function I wrote to plot the
polylines:

  private void addRoutes() {
boolean loadOK;
PolyStyleOptions pso = 
PolyStyleOptions.newInstance(overlayColor,
weight, opacity);

DataLoader loader = new DataLoader();
loadOK = loader.LoadSegments(map, pso);
if(! loadOK)
Window.alert(asyncGet() failed.);
}

 The LoadSegments() method of the DataLoader class tries to access
a segments.txt file, located in the module's root folder. That file
contains a list of GPS coordinates, defining the polylines.

  private static final String segmentsInputPath = segments.txt;

   @SuppressWarnings(deprecation)
public boolean LoadSegments(MapWidget m, PolyStyleOptions options) {
boolean result =
HTTPRequest.asyncGet(GWT.getModuleBaseURL() + segmentsInputPath,
new MapSegmentPlotter(m, options) );
return result;
}

Finally, the MapSegmentPlotter class implements the
ResponseTextHandler interface, by overriding onCompletion(String
responseText) to draw the polylines. I don't give its code here - but
I assume that it does the job - since the polylines show up in Hosted
Mode. However, no trace of them in Web mode. Where do I go wrong ?


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



Re: Overlay invisible in Web mode

2009-02-06 Thread Eric Ayers

I wouldn't assume that because everything worked fine in hosted mode
that web mode will work perfectly.  There can be hiccups every now and
then!

You didn't say which OS/browser you were running, but one of the first
things to try  is to run web mode under firefox/firebug and see if
there are some exceptions that might be short-circuiting your code.

There is a problem in the demo showing and hiding Polygons that I've
never been able to get to the bottom of, but that problem occurs in
both hosted and web mode.


On Fri, Feb 6, 2009 at 11:19 AM, bogdan71 bogdan.pi...@gmail.com wrote:

  Hello,

  I'm new with GWT and GWT-Maps. I need to plot polylines over a Map
 widget. My problem is that the polyline only shows up in Hosted mode.
 When running in Web mode, I can't see it.

  More detailed, there's an addRoutes() function I wrote to plot the
 polylines:

  private void addRoutes() {
boolean loadOK;
PolyStyleOptions pso = 
 PolyStyleOptions.newInstance(overlayColor,
 weight, opacity);

DataLoader loader = new DataLoader();
loadOK = loader.LoadSegments(map, pso);
if(! loadOK)
Window.alert(asyncGet() failed.);
}

 The LoadSegments() method of the DataLoader class tries to access
 a segments.txt file, located in the module's root folder. That file
 contains a list of GPS coordinates, defining the polylines.

  private static final String segmentsInputPath = segments.txt;

   @SuppressWarnings(deprecation)
public boolean LoadSegments(MapWidget m, PolyStyleOptions options) {
boolean result =
HTTPRequest.asyncGet(GWT.getModuleBaseURL() + 
 segmentsInputPath,
new MapSegmentPlotter(m, options) );
return result;
}

Finally, the MapSegmentPlotter class implements the
 ResponseTextHandler interface, by overriding onCompletion(String
 responseText) to draw the polylines. I don't give its code here - but
 I assume that it does the job - since the polylines show up in Hosted
 Mode. However, no trace of them in Web mode. Where do I go wrong ?


 




-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



Parsing http GWT command line

2009-02-06 Thread OffTheWall

I would like my GWT application to parse the url that it was called
with.  Something like this:

http://mymachine.com/myapp?key1=value1

And be able to grab the key values pairs from within my application.
The key may be a fixed value, and the value of course will change with
invocation of my application.  Can anybody help me with this?

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



Servlets and web.xml

2009-02-06 Thread Jonathan

Hi to all,

I'm under linux and I follow this tutorial
http://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-with-jetty/.
I have a simple gwt application that browses for a file and upload it
using a servlet (class FileServlet extends HttpServlet).
In hosted mode (with tomcat) with the hosted browser of gwt, all works
as expected, my servlet runs fine.

I try to deploy application to a Jetty embedded server and i get a
HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml
(under WEB-INF). Also when i run the Jetty server (in console), i get
two exceptions like  Failed startup of context
org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/
home/jon/GWTDeploy/webapps/com.tergwt.Main/}
java.lang.NullPointerException
I don't see the form of the upload.

If i disable the servlet declaration in the xml file, the server runs
without exceptions but it doesnt upload and i get h2HTTP ERROR:
404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
FileServlet/p if i try...

So i guess it has something to do with the web.xml file.
Unfortunately, i don't success with it.
Here is the content of my web.xml file without the web-app marks.
   servlet
servlet-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/servlet-name
url-pattern/files/*/url-pattern
/servlet-mapping

I don't know what else i can do to fix this problem as i'm not an
expert with these things.
My main.java contains the upload form and it uses the FileServlet to
make the doPost().
Here is the full tree of my webapp deployed folder with the embed
Jetty server : http://filebin.ca/cjgvj/tree.txt.

Thanks in advance.
Best regards.
Jonathan

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



Re: Embedding a JavaScript-based widget in GWT?

2009-02-06 Thread Sumit Chandel
Hi Adam,
Try including the script tag referencing the tweetgrid widget in your host
HTML page directly. The reason why this won't work if you insert the
script tag through an HTML widget is because GWT application load up in
their own iframes. This means that references to variables that aren't
properly scoped in a third party library (or in your own handwritten
JavaScript code) might not be properly resolved since the window object
would now refer to the iframe window rather than the main window.

Placing the script tag in your host HTML page should solve this problem.
If you want to interact with the embedded widget from within your GWT code
(through JavaScript Native Interface methods, a.k.a. JSNI), you can do this
by referring to the objects defined on the main window through the $wnd
handle.

You can find more documentation on using JSNI at the link below:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=DevGuideJavaScriptNativeInterface

Hope that helps,
-Sumit Chandel

On Tue, Jan 27, 2009 at 1:32 PM, adambossy adambo...@gmail.com wrote:


 It just occurred to me that this pretty obviously won't work, because
 it is calling the script src=.../script widget tag inside of an
 existing script/script enclosure. How do I call this aside from
 ripping out the widget internals and rewriting them myself?

 Adam


 On Jan 27, 12:02 pm, adambossy adambo...@gmail.com wrote:
  This seems so simple, that I must be overlooking some obvious GWT
  characteristic. I would like to embed a TweetGrid from here:
   http://tweetgrid.com/searchtips
 
  The code is short and simple:
script src=http://tweetgrid.com/widget/widget.js; type=text/
  javascript/script
 
  I wrap this as an HTML element, and add it to the main panel:
HTML widget = new HTML(script src=http://tweetgrid.com/widget/
  widget.js type=text/javascript/script)
 
  It seems as though the widget loads, but the callback to populate the
  widget does not recognize the function it's supposed to call. The
  exact error is as follows (on a brand-new GWT project, no other
  complications):
 
  jtw_searchfunc is not defined, line 1
search.json?callback=jtw_searchfuncq=twitterrpp=20()()
 
  How do I properly add this widget so that this does not occur?
 
  Thanks,
  Adam
 


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



New Time Picker GWT widget (POC)

2009-02-06 Thread David

Here is a modest contribution for GWT widgets : a new time picker like
jquery.TimePickr

http://code.google.com/p/gwt-incubator-lib/

Here is a french presentation of this widget :

http://www.insideit.fr/post/2009/02/06/GWT-Time-Picker-widget

Feel free to give advices or anything you want :-)

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



Error in RPC call in weblogic server, works fine in hosted mode and tomcat server

2009-02-06 Thread Poorna

Hi

I need some help regarding an error I get while deploying GWT in
server side. Below is the error stack trace.

Feb 6, 2009 2:41:19 PM EST Error ServletContext-/AltoCoutts
Poorna AdminServer [ACTIVE] ExecuteThread: '0' for queue:
'weblogic.kernel.Default (self-tuning)' anonymous  
1233949279390 BEA-00 Exception while dispatching incoming RPC
call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract
(ServerSerializationStreamReader.java:610)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt
(ServerSerializationStreamReader.java:427)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead
(AbstractSerializationStreamReader.java:38)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead
(ServerSerializationStreamReader.java:382)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:162)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper
$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:3395)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute
(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute
(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run
(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)


This error comes only when I deploy the war in weblogic server. In
hosted mode, it works fine. Also when I deploy in tomcat it works
fine.

Do you have any clues?


Thanks and Regards
Poorna

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



Re: New Time Picker GWT widget (POC)

2009-02-06 Thread Sumit Chandel
Hi David,
This is great. Thanks for sharing!

In case you're interested, I would like to suggest you let the GWT incubator
team know about this useful widget to see if they can get it into the
incubator. I'm sure other developers out there will find it useful.

If you would like to contribute this to the GWT Incubator project, check out
the doc below for instructions on how to contribute:

http://code.google.com/docreader/#p=google-web-toolkit-incubators=google-web-toolkit-incubatort=MakingIncubatorBetter

Cheers,
-Sumit Chandel

On Fri, Feb 6, 2009 at 12:15 PM, David dmartin@gmail.com wrote:


 Here is a modest contribution for GWT widgets : a new time picker like
 jquery.TimePickr

 http://code.google.com/p/gwt-incubator-lib/

 Here is a french presentation of this widget :

 http://www.insideit.fr/post/2009/02/06/GWT-Time-Picker-widget

 Feel free to give advices or anything you want :-)

 


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



Problem with Generics and Serialization of Primitive Type Array Fields

2009-02-06 Thread jsegal

I've been having some trouble with using arrays of primitive type
where an array of type Serializable is expected.

I have an object similar to:

class MySerializableObjectT extends Serializable implements
Serializable
{
 private Serializable serializableField;

 void MySerializableObject(T value)
 {
   serializableField= value;
 }

 T getField(T value)
 {
   return serializableField;
 }
}

All of these cases can be serialized and deserialized successfully:
- new MySerializableObjectSerializable(new Integer(0));
- new MySerializableObjectSerializable(1);
- new MySerializableObjectSerializable(true);
- new MySerializableObjectSerializable(Test);

These cases case produces an exception when deserialized (Note that
these will *not* cause a class cast exception as seen in
http://code.google.com/p/google-web-toolkit/issues/detail?id=1822,
although an array of non-primitive type will cause it):
- new MySerializableObject(Serializable)((Serializable)new int[0]);
- new MySerializableObjectint[](new int[0]);

The exception's message is:
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
Type '[I' was not included in the set of types which can be
deserialized by this SerializationPolicy or its Class object could not
be loaded. For security purposes, this type will not be deserialized.

The exception goes way if I add this type to my project, even if I
don't actually create an instance of it anywhere:

class MySerializableIntArrayObject extends MySerializableObjectInt[]
{
}

I'm aware that the GWT compiler has to identify sub-types that can be
used with parameterized serializable objects during compilation in
order to build its serialization mechanism for those objects. I'm
guessing this problem means that arrays of primitive types are not
taken into account when it enumerates subtypes of Serializable,
despite the fact that they are effectively subtypes of Serializable.

If I'm correct, what is the proper way to fix this? I suppose it's
possible to create fixed-type objects like
MySerializableIntArrayObject for all primitives, but I'd like to
avoid that (especially since I would end up having to do that for any
other typed serializable objects I add in the future). If I understand
the typeArgs annotation, using it would actually restrict the set of
values I can use with this object, not add to the set (I can enumerate
the primitive array types easily enough, but not all the other types
that may be passed).

If I'm not correct about the cause of the problem, I'd appreciate it
if someone could explain it and suggest an appropriate remedy.

Thanks,
-jsegal



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



Re: Error with i.e. (this.el is null or not is a object)

2009-02-06 Thread Sumit Chandel
Hi Edu,
I'm guessing that the error comes up in the execution of the ClickListener
onClick() code. If that's the case, could you post up that code, including
anything else relevant to how you're creating the button?

Cheers,
-Sumit Chandel

On Wed, Feb 4, 2009 at 3:03 AM, Edu edu_xat...@hotmail.com wrote:


 Please, i need help, in my application to run with Internet Explorer
 displays an error when I press a button, this.el is null or not is a
 object, code 0, the application works fine, but I have to press
 buttons repeatedly until you make the function displays the error
 this.el. ...
 Running the application in host mode with GWT browser works perfectly
 and there is no problem, the error arises when running internet
 explorer, chrome, firefox, etc ...
 How can I 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Old issues in the RichTextEditor

2009-02-06 Thread Sumit Chandel
Hi Vicente,
Thanks for bumping this up. In aggregate, it seems that there are a few
developers that are waiting for these enhancements to RichTextEditor, so
these are definitely important to consider as we roll out future releases.

I particularly bumped up Issue #1433 so the team gets to take a look at
investigating it before a final 1.6 release. It seems like having support
for setting innerHTML would solve the most use cases in one fix.

That said, the reason why some issues go stale for as long as you pointed
out in this thread is due to prioritizing the hardest hitting bugs and new
features first, and dedicating effort to make sure those get shipped on
time. I'm glad that you brought up this thread since it gives the community
a chance to cast votes for RTE issues, a metric that we depend on for
prioritizing bugs/features.

Finally having said that, you know our motto, Patches welcome!. If anyone
who does encounter these issues comes up with a good fix for their own
purposes, it would be great to contribute that back to GWT to get quicker
turnarounds on issues that the team might no have yet had a chance to work
on.

Cheers,
-Sumit Chandel

On Wed, Feb 4, 2009 at 4:12 AM, vruiz.jur...@gmail.com 
vruiz.jur...@gmail.com wrote:


 Hi,

 I write to ask if the dev team can put some attention in the old
 issues of the RichTextEditor (RTE):

 http://code.google.com/p/google-web-toolkit/issues/list?can=2q=RichtextArea
 and also to ask if others can vote/star these issues.

 For instance, we fill this bug in july-2007:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=1433

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

 and without InsertHtml, and without set/getCurPosition like in
 TextAreas:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=1127
 http://code.google.com/p/google-web-toolkit/issues/detail?id=2182

 you can't insert neither a simple #historytoken href:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3318
 in a text you are editing.

 Neither, any html elements. Just simple plain a href and img
 without
 any styling or attribute.

 Other important issues from my point of view related to RTE:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=1052
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3123

 From the outside, seems like the code of the RTE is very stalled these
 years.

 TIA,


 Vicente J. Ruiz Jurado
 


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



Re: A possible critical bug for gwt-fabridge.

2009-02-06 Thread Sumit Chandel
Hi Jihong,
Perhaps a more appropriate place to report this gwt-fabridge bug would be on
the project Issue Tracker. I'm sure the developers behind the project would
be happy to be notified about a potentially critical issue.

http://code.google.com/p/gwt-fabridge/issues/list

Hope that helps,
-Sumit Chandel

On Thu, Feb 5, 2009 at 6:45 AM, Charlie Collins
charlie.coll...@gmail.comwrote:


 You missed my point there. I guess I should have said I don't know OR
 care what gwt-fabridge is, but if you want help with it, you might as
 on a forum that is relevant to it?

 On Feb 4, 1:37 pm, Jihong jihong@satmetrix.com wrote:
  gwt-fabridge is a utility for gwt to access adobe swf file. See the
  following pagehttp://code.google.com/p/gwt-fabridge/
 
  On Feb 4, 5:59 am, Charlie Collins charlie.coll...@gmail.com wrote:
 
   I don't know whatgwt-fabridgeis, but maybe that project has it's own
   support list you can use for issues such as this?  Not sure you will
   get much response here.
 
   On Feb 3, 4:00 pm, Jihong Liu jihong@satmetrix.com wrote:
 
Hi. I have a problem forgwt-fabridge. I think it may be a critical
issue forgwt-fabridge.
 
If a swf widget is added into a panel, and then add the panel into a
container. And then remove the panel from the container, and then add
the panel back into the container. Then the Null pointer error will
occur at onInitialization()caused by the swf widget. I did a test
 using
the FABridgeDemo. In the FABridgeDemo, I added a button for removing
 the
swf widget.
 
When start the program, first click the Add new SWF, and everything
 is
ok. Then click the Remove SWF, then the swf is removed. Then click
 the
Add new SWF again, then an error will happen.
 
I have tried many ways, the only way to make it work is to create the
swf widge again and using a different name if the widget has been
removed. For example:
 
java.util.Date date = new java.util.Date();
 
swfWidget = new
SWFABridgeWidget(app.swf,400,400,example+date.getTime());
 
But it is not good at all. And the behavior is not the same as other
regular gwt widgets. For other widgets, after they are put in a
 panel.
Then you can add/drop this panel into/from a container many times
without re-create the inside widgets.
 
I am really frustrated about this problem. Based on user's selection
 we
will add different panels into a container for display. It is really
painful if we have to create the swf widgets again if the panel has
 been
dropped from the container once.
 
I don't know whether the following code in
pl.rmalinowski.gwt2swf.client.ui.SWFWidge causes problem or not.
 
protected void onUnload() {
 
// GWT.log(onUnload, null);
 
getElement().removeChild(DOM.getFirstChild(getElement()));
 
isSWFInjected = false;
 
super.onUnload();
 
  }
 
The statement:
 getElement().removeChild(DOM.getFirstChild(getElement()))
removes the child from the widget. Thus after a swfwidget is removed
from a panel, and then add the swf back, no child there.
 
Following is the code in com.google.gwt.user.client.ui.ComplexPanel
 
@Override
 
  public boolean remove(Widget w) {
 
// Validate.
 
if (w.getParent() != this) {
 
  return false;
 
}
 
// Orphan.
 
orphan(w);
 
// Physical detach.
 
Element elem = w.getElement();
 
DOM.removeChild(DOM.getParent(elem), elem);
 
// Logical detach.
 
getChildren().remove(w);
 
return true;
 
  }
 
It sounds to me that the different between two programs is that in
ComplexPanel, it removes the widget's element only, but in SWFWidge,
 it
removes the child of the widget's element.
 
Thank you very much!
 
Jihong Liu
 
Following is the source code which causes problem
 
package com.satmetrix.swfTest.client;
 
import org.argunet.gwt.fabridge.client.SWFABridgeWidget;
 
import org.argunet.gwt.fabridge.client.bridge.BridgeObject;
 
import org.argunet.gwt.fabridge.client.bridge.BridgeParameter;
 
import org.argunet.gwt.fabridge.client.bridge.BridgeParameterObject;
 
import
 org.argunet.gwt.fabridge.client.events.IInitializationListener;
 
import org.argunet.gwt.fabridge.client.events.ISWFListener;
 
import org.argunet.gwt.fabridge.client.utils.JSNIUtils;
 
import com.google.gwt.core.client.EntryPoint;
 
import com.google.gwt.core.client.JavaScriptObject;
 
import com.google.gwt.user.client.Window;
 
import com.google.gwt.user.client.ui.Button;
 
import com.google.gwt.user.client.ui.ClickListener;
 
import com.google.gwt.user.client.ui.Label;
 
import com.google.gwt.user.client.ui.RootPanel;
 
import com.google.gwt.user.client.ui.Widget;
 
public class FABridgeDemo implements EntryPoint,
 IInitializationListener
{
 
  private 

Re: IE8 RC1 Very very slow

2009-02-06 Thread Sumit Chandel
Hello everyone,
Which platform are you running on? Windows XP or Windows Vista?

Thanks,
-Sumit Chandel

On Fri, Feb 6, 2009 at 1:11 PM, Erron erron.aus...@gmail.com wrote:


 I'm suffering the same issue.

 On Feb 6, 10:05 am, Si_gee goldsmith.si...@gmail.com wrote:
  Anyone else seen this, IE 8 beta was fine. Got the RC1 today, and ever
  since it is very slow running anything GWT related - including the GWT
  Shell. I also tried compatability mode - but just as bad!

 


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



Re: Code Coverage with EclEmma

2009-02-06 Thread Sumit Chandel
Hi Matt,
Are you building the latest version of GWT from the SVN trunk?

The team has only just recently added better support for Emma, but it is
still under development. The plan is to try and get this ready for either a
coming milestone or final release, but until then you're likely to encounter
issues running code coverage reports. Some improvements have been added even
past the 1.6 milestone, so if you would like to give Emma support another
try to see how it's shaping up, you should build from the latest in trunk
and run with that.

As far as I know, you should still be able to use Ant or Maven or any other
build system along with Emma code coverage in your GWT applications.

Hope that helps,
-Sumit Chandel

On Tue, Feb 3, 2009 at 3:04 PM, Matt Raible mrai...@gmail.com wrote:


 I'm trying to get code coverage support for my GWT project. AFAICT, I
 can't use anything from Maven or Ant, I have to use the EclEmma plugin
 as described in the following issue:

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

 I'm using Eclipse 3.3 with the latest version of EclEmma with the JAR
 from tools/redist/emma in my plugins directory.

 I can run tests from Eclipse and they all pass. However, the coverage
 shows up as if my GWT classes aren't being tested. Furthermore, my
 test classes are showing up with good coverage and I don't believe
 they should be included at all.

 Any advice or howto I can use?

 Thanks,

 Matt
 


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



Re: horizontal scroll bar for ScrollTable

2009-02-06 Thread Tamigg

Hi Kay,
I'm a beginner in GWT.. but for me it worked in similar
situation but I used PaginScrollTable with setting below lines..

pagingScrollTable.setResizePolicy
(ScrollTable.ResizePolicy.FLOW);
paginScrollTable.setWidth(950px);

Thanks..Let me know if already fixed it and if so how?

Thanks
Tamigg

On Jan 9, 1:56 pm, kay kellyx...@gmail.com wrote:
 How to get the horizontal scroll bar to appear for ScrollTable?

 I implemented tables using ScrollTable from GWT Incubator, the table
 is being used by multiple panels.  In one scenario, the table is wide,
 I used ScrollTable.ResizePolicy.FLOW for it, so text doesn't overlap
 when the space is small.

 If I press - or - button on keybroad, the table does scroll left or
 right, how can I get the scrollbar to appear?    I have this set,
 ScrollTable.ScrollPolicy.BOTH.

 One guess is I need to set scroll in CSS? Shouldn't there be some
 default styling for it? when there are many rows, the vertical scroll
 bar does appear.

 Thanks so much for any help.

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



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

Wow, i'm almost happy !
I finally managed to get rid of the HTTP ERROR 503.
I misplaced the bin files (.classes), they need to be under yourapp/
web-inf/classes/...
So i took the time to copy libs here too (in lib folder).

OK this done, i don't success to upload my file.
I browse it correctly, but when i click submit i get : h2HTTP ERROR:
404/h2preNOT_FOUND/pre
pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
as a response of the server.

My web.xml updated :
servlet
servlet-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/servlet-name
url-pattern/fileServlet/url-pattern
/servlet-mapping

My entrypoint if needed:
onModuleLoad() {
 final FormPanel form = new FormPanel();
  form.setAction(GWT.getModuleBaseURL() + /FileServlet);
...
}

If someone could tell me what's wrong, it could be nice :)

Thanks in advance,
Regards.


On 6 fév, 21:05, Jonathan jonathan.delf...@gmail.com wrote:
 Hi to all,

 I'm under linux and I follow this 
 tutorialhttp://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-wit
 I have a simple gwt application that browses for a file and upload it
 using a servlet (class FileServlet extends HttpServlet).
 In hosted mode (with tomcat) with the hosted browser of gwt, all works
 as expected, my servlet runs fine.

 I try to deploy application to a Jetty embedded server and i get a
 HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml
 (under WEB-INF). Also when i run the Jetty server (in console), i get
 two exceptions like  Failed startup of context
 org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/
 home/jon/GWTDeploy/webapps/com.tergwt.Main/}
 java.lang.NullPointerException
 I don't see the form of the upload.

 If i disable the servlet declaration in the xml file, the server runs
 without exceptions but it doesnt upload and i get h2HTTP ERROR:
 404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
 FileServlet/p if i try...

 So i guess it has something to do with the web.xml file.
 Unfortunately, i don't success with it.
 Here is the content of my web.xml file without the web-app marks.
        servlet
                 servlet-namefileServlet/servlet-name
                 servlet-classcom.tergwt.server.FileServlet/servlet-class
         /servlet

         servlet-mapping
                 servlet-namefileServlet/servlet-name
                 url-pattern/files/*/url-pattern
         /servlet-mapping

 I don't know what else i can do to fix this problem as i'm not an
 expert with these things.
 My main.java contains the upload form and it uses the FileServlet to
 make the doPost().
 Here is the full tree of my webapp deployed folder with the embed
 Jetty server :http://filebin.ca/cjgvj/tree.txt.

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



Re: Servlets and web.xml

2009-02-06 Thread Shawn Brown

Well you have to specify a valid url.

You are configuring /fileServlet to go to your servlet and then asking
requesting a url of /FileServlet.

Aren't you?  I am not sure but think capitalization is significant.

Best,

Shawn


On Sat, Feb 7, 2009 at 9:42 AM, Jonathan jonathan.delf...@gmail.com wrote:

 Wow, i'm almost happy !
 I finally managed to get rid of the HTTP ERROR 503.
 I misplaced the bin files (.classes), they need to be under yourapp/
 web-inf/classes/...
 So i took the time to copy libs here too (in lib folder).

 OK this done, i don't success to upload my file.
 I browse it correctly, but when i click submit i get : h2HTTP ERROR:
 404/h2preNOT_FOUND/pre
 pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
 href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
 as a response of the server.

 My web.xml updated :
 servlet
servlet-namefileServlet/servlet-name
servlet-classcom.tergwt.server.FileServlet/servlet-class
/servlet

servlet-mapping
servlet-namefileServlet/servlet-name
url-pattern/fileServlet/url-pattern
/servlet-mapping

 My entrypoint if needed:
 onModuleLoad() {
  final FormPanel form = new FormPanel();
  form.setAction(GWT.getModuleBaseURL() + /FileServlet);
 ...
 }

 If someone could tell me what's wrong, it could be nice :)

 Thanks in advance,
 Regards.


 On 6 fév, 21:05, Jonathan jonathan.delf...@gmail.com wrote:
 Hi to all,

 I'm under linux and I follow this 
 tutorialhttp://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-wit
 I have a simple gwt application that browses for a file and upload it
 using a servlet (class FileServlet extends HttpServlet).
 In hosted mode (with tomcat) with the hosted browser of gwt, all works
 as expected, my servlet runs fine.

 I try to deploy application to a Jetty embedded server and i get a
 HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml
 (under WEB-INF). Also when i run the Jetty server (in console), i get
 two exceptions like  Failed startup of context
 org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/
 home/jon/GWTDeploy/webapps/com.tergwt.Main/}
 java.lang.NullPointerException
 I don't see the form of the upload.

 If i disable the servlet declaration in the xml file, the server runs
 without exceptions but it doesnt upload and i get h2HTTP ERROR:
 404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
 FileServlet/p if i try...

 So i guess it has something to do with the web.xml file.
 Unfortunately, i don't success with it.
 Here is the content of my web.xml file without the web-app marks.
servlet
 servlet-namefileServlet/servlet-name
 servlet-classcom.tergwt.server.FileServlet/servlet-class
 /servlet

 servlet-mapping
 servlet-namefileServlet/servlet-name
 url-pattern/files/*/url-pattern
 /servlet-mapping

 I don't know what else i can do to fix this problem as i'm not an
 expert with these things.
 My main.java contains the upload form and it uses the FileServlet to
 make the doPost().
 Here is the full tree of my webapp deployed folder with the embed
 Jetty server :http://filebin.ca/cjgvj/tree.txt.

 Thanks in advance.
 Best regards.
 Jonathan
 


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



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

Hey i just saw this before your message.
But even with that, it stills not working.
I still get this message 404pRequestURI=/com.tergwt.Main//
FileServlet/ppismall...

And i changed my formAction to form.setAction(/FileServlet); instead
of form.setAction(GWT.getModuleBaseURL() + /FileServlet);
So now, no more idea on my side ...

Cheers

On 7 fév, 01:50, Shawn Brown big.coffee.lo...@gmail.com wrote:
 Well you have to specify a valid url.

 You are configuring /fileServlet to go to your servlet and then asking
 requesting a url of /FileServlet.

 Aren't you?  I am not sure but think capitalization is significant.

 Best,

 Shawn

 On Sat, Feb 7, 2009 at 9:42 AM, Jonathan jonathan.delf...@gmail.com wrote:

  Wow, i'm almost happy !
  I finally managed to get rid of the HTTP ERROR 503.
  I misplaced the bin files (.classes), they need to be under yourapp/
  web-inf/classes/...
  So i took the time to copy libs here too (in lib folder).

  OK this done, i don't success to upload my file.
  I browse it correctly, but when i click submit i get : h2HTTP ERROR:
  404/h2preNOT_FOUND/pre
  pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
  href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr
  as a response of the server.

  My web.xml updated :
  servlet
                 servlet-namefileServlet/servlet-name
                 servlet-classcom.tergwt.server.FileServlet/servlet-class
         /servlet

         servlet-mapping
                 servlet-namefileServlet/servlet-name
                 url-pattern/fileServlet/url-pattern
         /servlet-mapping

  My entrypoint if needed:
  onModuleLoad() {
   final FormPanel form = new FormPanel();
       form.setAction(GWT.getModuleBaseURL() + /FileServlet);
  ...
  }

  If someone could tell me what's wrong, it could be nice :)

  Thanks in advance,
  Regards.

  On 6 fév, 21:05, Jonathan jonathan.delf...@gmail.com wrote:
  Hi to all,

  I'm under linux and I follow this 
  tutorialhttp://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-wit
  I have a simple gwt application that browses for a file and upload it
  using a servlet (class FileServlet extends HttpServlet).
  In hosted mode (with tomcat) with the hosted browser of gwt, all works
  as expected, my servlet runs fine.

  I try to deploy application to a Jetty embedded server and i get a
  HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml
  (under WEB-INF). Also when i run the Jetty server (in console), i get
  two exceptions like  Failed startup of context
  org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/
  home/jon/GWTDeploy/webapps/com.tergwt.Main/}
  java.lang.NullPointerException
  I don't see the form of the upload.

  If i disable the servlet declaration in the xml file, the server runs
  without exceptions but it doesnt upload and i get h2HTTP ERROR:
  404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
  FileServlet/p if i try...

  So i guess it has something to do with the web.xml file.
  Unfortunately, i don't success with it.
  Here is the content of my web.xml file without the web-app marks.
         servlet
                  servlet-namefileServlet/servlet-name
                  
  servlet-classcom.tergwt.server.FileServlet/servlet-class
          /servlet

          servlet-mapping
                  servlet-namefileServlet/servlet-name
                  url-pattern/files/*/url-pattern
          /servlet-mapping

  I don't know what else i can do to fix this problem as i'm not an
  expert with these things.
  My main.java contains the upload form and it uses the FileServlet to
  make the doPost().
  Here is the full tree of my webapp deployed folder with the embed
  Jetty server :http://filebin.ca/cjgvj/tree.txt.

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



Re: Servlets and web.xml

2009-02-06 Thread Jonathan

With form.setAction(/FileServlet); i get h2HTTP ERROR: 404/
h2preNOT_FOUND/pre
pRequestURI=/FileServlet/p

That's strange.
Thanks for the help.
Cheers

On 7 fév, 01:59, Jonathan jonathan.delf...@gmail.com wrote:
 Hey i just saw this before your message.
 But even with that, it stills not working.
 I still get this message 404pRequestURI=/com.tergwt.Main//
 FileServlet/ppismall...

 And i changed my formAction to form.setAction(/FileServlet); instead
 of form.setAction(GWT.getModuleBaseURL() + /FileServlet);
 So now, no more idea on my side ...

 Cheers

 On 7 fév, 01:50, Shawn Brown big.coffee.lo...@gmail.com wrote:

  Well you have to specify a valid url.

  You are configuring /fileServlet to go to your servlet and then asking
  requesting a url of /FileServlet.

  Aren't you?  I am not sure but think capitalization is significant.

  Best,

  Shawn

  On Sat, Feb 7, 2009 at 9:42 AM, Jonathan jonathan.delf...@gmail.com wrote:

   Wow, i'm almost happy !
   I finally managed to get rid of the HTTP ERROR 503.
   I misplaced the bin files (.classes), they need to be under yourapp/
   web-inf/classes/...
   So i took the time to copy libs here too (in lib folder).

   OK this done, i don't success to upload my file.
   I browse it correctly, but when i click submit i get : h2HTTP ERROR:
   404/h2preNOT_FOUND/pre
   pRequestURI=/com.tergwt.Main//FileServlet/ppismalla
   href=http://jetty.mortbay.org/;Powered by 
   Jetty:///a/small/i/pbr
   as a response of the server.

   My web.xml updated :
   servlet
                  servlet-namefileServlet/servlet-name
                  
   servlet-classcom.tergwt.server.FileServlet/servlet-class
          /servlet

          servlet-mapping
                  servlet-namefileServlet/servlet-name
                  url-pattern/fileServlet/url-pattern
          /servlet-mapping

   My entrypoint if needed:
   onModuleLoad() {
    final FormPanel form = new FormPanel();
        form.setAction(GWT.getModuleBaseURL() + /FileServlet);
   ...
   }

   If someone could tell me what's wrong, it could be nice :)

   Thanks in advance,
   Regards.

   On 6 fév, 21:05, Jonathan jonathan.delf...@gmail.com wrote:
   Hi to all,

   I'm under linux and I follow this 
   tutorialhttp://jeff.ourexchange.net/2008/03/01/deploying-gwt-applications-wit
   I have a simple gwt application that browses for a file and upload it
   using a servlet (class FileServlet extends HttpServlet).
   In hosted mode (with tomcat) with the hosted browser of gwt, all works
   as expected, my servlet runs fine.

   I try to deploy application to a Jetty embedded server and i get a
   HTTP ERROR: 503 SERVICE_UNAVAILABLE if i enable my servlet in web.xml
   (under WEB-INF). Also when i run the Jetty server (in console), i get
   two exceptions like  Failed startup of context
   org.mortbay.jetty.webapp.webappcont...@1b9ce4b{/com.tergwt.Main,file:/
   home/jon/GWTDeploy/webapps/com.tergwt.Main/}
   java.lang.NullPointerException
   I don't see the form of the upload.

   If i disable the servlet declaration in the xml file, the server runs
   without exceptions but it doesnt upload and i get h2HTTP ERROR:
   404/h2preNOT_FOUND/prepRequestURI=/com.tergwt.Main//
   FileServlet/p if i try...

   So i guess it has something to do with the web.xml file.
   Unfortunately, i don't success with it.
   Here is the content of my web.xml file without the web-app marks.
          servlet
                   servlet-namefileServlet/servlet-name
                   
   servlet-classcom.tergwt.server.FileServlet/servlet-class
           /servlet

           servlet-mapping
                   servlet-namefileServlet/servlet-name
                   url-pattern/files/*/url-pattern
           /servlet-mapping

   I don't know what else i can do to fix this problem as i'm not an
   expert with these things.
   My main.java contains the upload form and it uses the FileServlet to
   make the doPost().
   Here is the full tree of my webapp deployed folder with the embed
   Jetty server :http://filebin.ca/cjgvj/tree.txt.

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



Re: Problem with Generics and Serialization of Primitive Type Array Fields

2009-02-06 Thread Ben Tilford
Primitives do not extend Object and cannot implement Serializable. You
should use the Object versions of primitives (i.e. use Integer instead of
int)
I don't think the code would even compile if you tried to use a primitive
with generics.

On Fri, Feb 6, 2009 at 4:25 PM, jsegal jason.se...@issinc.com wrote:


 I've been having some trouble with using arrays of primitive type
 where an array of type Serializable is expected.

 I have an object similar to:

 class MySerializableObjectT extends Serializable implements
 Serializable
 {
 private Serializable serializableField;

 void MySerializableObject(T value)
 {
   serializableField= value;
 }

 T getField(T value)
 {
   return serializableField;
 }
 }

 All of these cases can be serialized and deserialized successfully:
 - new MySerializableObjectSerializable(new Integer(0));
 - new MySerializableObjectSerializable(1);
 - new MySerializableObjectSerializable(true);
 - new MySerializableObjectSerializable(Test);

 These cases case produces an exception when deserialized (Note that
 these will *not* cause a class cast exception as seen in
 http://code.google.com/p/google-web-toolkit/issues/detail?id=1822,
 although an array of non-primitive type will cause it):
 - new MySerializableObject(Serializable)((Serializable)new int[0]);
 - new MySerializableObjectint[](new int[0]);

 The exception's message is:
 com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
 Type '[I' was not included in the set of types which can be
 deserialized by this SerializationPolicy or its Class object could not
 be loaded. For security purposes, this type will not be deserialized.

 The exception goes way if I add this type to my project, even if I
 don't actually create an instance of it anywhere:

 class MySerializableIntArrayObject extends MySerializableObjectInt[]
 {
 }

 I'm aware that the GWT compiler has to identify sub-types that can be
 used with parameterized serializable objects during compilation in
 order to build its serialization mechanism for those objects. I'm
 guessing this problem means that arrays of primitive types are not
 taken into account when it enumerates subtypes of Serializable,
 despite the fact that they are effectively subtypes of Serializable.

 If I'm correct, what is the proper way to fix this? I suppose it's
 possible to create fixed-type objects like
 MySerializableIntArrayObject for all primitives, but I'd like to
 avoid that (especially since I would end up having to do that for any
 other typed serializable objects I add in the future). If I understand
 the typeArgs annotation, using it would actually restrict the set of
 values I can use with this object, not add to the set (I can enumerate
 the primitive array types easily enough, but not all the other types
 that may be passed).

 If I'm not correct about the cause of the problem, I'd appreciate it
 if someone could explain it and suggest an appropriate remedy.

 Thanks,
 -jsegal



 


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



Re: -overwrite, -ignore and -addToClassPath

2009-02-06 Thread hezjing
On Mon, Jan 19, 2009 at 2:56 PM, Fred Janon fja...@gmail.com wrote:


 Even better would be to provide a clear explanation with an example in
 the projectcreator and applicationcreator pages, or to get rid of
 these options.


I think there must be a reason the option is there, but I agree with Fred
that it would be very useful if there are examples, and tutorials explaining
these options.



 Anyone can explain what addToClasspath does?


Yes, anyone can help us here? :-)



Hez

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



Google ( App Engine + Web Toolkit )

2009-02-06 Thread Omer Shakil
Hi Guys,
I wanted to know what are the prospects of using Google App Engine with the
Web Toolkit. I did some searches and read up on the documentation, it seems
that the only way is to do JSON data transmission layer in the middle. I am
no expert, just wanted to play with these two technologies, so please
correct me if I am wrong.

What about Django then? I guess I wont be needing that anymore, all I have
to do is make a Google App Engine server to send JSON responses to all the
custom requests the Web Toolkit client sends. Currently, App Engine is only
supported in python, once they support it in Java, will it help in anyway
with the Web Toolkit, I found some details about RPC and transferring actual
Java serializable objects, will that eliminate the JSON layer?

Any help and details in this respect are more than welcome.

Thanks,
Omer

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



Re: Google ( App Engine + Web Toolkit )

2009-02-06 Thread Shawn Brown

 I wanted to know what are the prospects of using Google App Engine with the
 Web Toolkit. I did some searches and read up on the documentation, it seems
 that the only way is to do JSON data transmission layer in the middle.
 What about Django then?

Have you read the docs on using Django to send JSON?

http://docs.djangoproject.com/en/dev/topics/serialization/?from=olddocs#id1

I don't use it myself but do use JSON and find that pretty easy to
work with in GWT.

Best,

Shawn

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



Re: Google ( App Engine + Web Toolkit )

2009-02-06 Thread Omer Shakil
Thanks Shawn. Okay, Django will help me convert python objects to JSON, and
at the GWT end, you can use a standard JSON Parser, but besides that, all of
the rest you will never ever use, correct? Nothing wrong with that, but was
just curious, all this Django capabilities are of no use to you all of a
sudden. I havent looked too much in GWT yet, but I am sure it will cover for
the empty space well.
In general, would you recommend GWT + App Engine for developing something,
although there are many plus points in creating this division between client
and server end, but there are some hurdles too: what about user logins? will
you have to develop it all at client end too? How would you do user
authentication the App Engine way which was really straight forward before?
I would like to explore these hurdles and questions before I jump in. Both
of them are really powerful alone, but together, do they make a good system
or is it just too much hassle?

Thanks in advance for your input and thoughts.

On Fri, Feb 6, 2009 at 7:41 PM, Shawn Brown big.coffee.lo...@gmail.comwrote:


  I wanted to know what are the prospects of using Google App Engine with
 the
  Web Toolkit. I did some searches and read up on the documentation, it
 seems
  that the only way is to do JSON data transmission layer in the middle.
  What about Django then?

 Have you read the docs on using Django to send JSON?

 http://docs.djangoproject.com/en/dev/topics/serialization/?from=olddocs#id1

 I don't use it myself but do use JSON and find that pretty easy to
 work with in GWT.

 Best,

 Shawn

 


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



Re: Google ( App Engine + Web Toolkit )

2009-02-06 Thread Shawn Brown

At this point I really don't know.

GWT + json works fine for me using DWR.

I can throw GWT under appengine at the moment calling my java sevlets
for authentication and data requests.

To convert the servlets to python and run it all under appengine -- I
don't know that would take.  Sorry.

On Sat, Feb 7, 2009 at 1:01 PM, Omer Shakil omer.sha...@gmail.com wrote:
 Thanks Shawn. Okay, Django will help me convert python objects to JSON, and
 at the GWT end, you can use a standard JSON Parser, but besides that, all of
 the rest you will never ever use, correct? Nothing wrong with that, but was
 just curious, all this Django capabilities are of no use to you all of a
 sudden. I havent looked too much in GWT yet, but I am sure it will cover for
 the empty space well.
 In general, would you recommend GWT + App Engine for developing something,
 although there are many plus points in creating this division between client
 and server end, but there are some hurdles too: what about user logins? will
 you have to develop it all at client end too? How would you do user
 authentication the App Engine way which was really straight forward before?
 I would like to explore these hurdles and questions before I jump in. Both
 of them are really powerful alone, but together, do they make a good system
 or is it just too much hassle?
 Thanks in advance for your input and thoughts.
 On Fri, Feb 6, 2009 at 7:41 PM, Shawn Brown big.coffee.lo...@gmail.com
 wrote:

  I wanted to know what are the prospects of using Google App Engine with
  the
  Web Toolkit. I did some searches and read up on the documentation, it
  seems
  that the only way is to do JSON data transmission layer in the middle.
  What about Django then?

 Have you read the docs on using Django to send JSON?


 http://docs.djangoproject.com/en/dev/topics/serialization/?from=olddocs#id1

 I don't use it myself but do use JSON and find that pretty easy to
 work with in GWT.

 Best,

 Shawn




 


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



Accessing a value from a servlet in a gwt Entry point class

2009-02-06 Thread sriram

Hi,

I am doing a sample login application using login jsp, tomcat and gwt.
I would like to pass username from the login servlet after a
successful login to gwt entrypoint class either using a session or
static variable

Code snippet using static variable
Login servlet

pubcli class LoginServlet extends HttpServlet{
  public void doPost(Request, Response){
   // call to database
  String username = request.getParameter(userName) ;
  if(loginSuccess){
 Sample.loginUserId = username ;
}

}
}

Sample EntryPoint class

public class Sample implenents EntryPoint{
  public static String  loginUserId  ;
  public void onModuleLoad(){
   Window.alert(loginUserId) ;
}
}

output: null ;

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



how to set the size of a dialog box with respect to the flex table inside it?

2009-02-06 Thread malen

Hi!

I'm quite new with gwt and I have a simple yet annoying problem. I
want to show a dialog box that contains a flex table that adjusts
according to the columns and rows of data. I tried getting the offset
height and width of flex table but it gives me a value of 0. I also
tried to set the dialog box to auto width and auto height but what
happened is that the dialog box stretched to the maximum possible and
it didn't follow the size of the flex table inside it (which only
filled 30% of the total width of the resulting dialog box).

Is there a way for me to make the dialog box listen or adjust its
size with respect to the widget inside it, in this case, the flex
table?

I would really appreciate your help. Thank you!



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



[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1

2009-02-06 Thread nicolas de loof
Your example works,
The issue is that I don't load the class from a classloader, I'm using BCEL
to read the .class and access the GWT_VERSION_NUM field, so static
initializer is not executed.

I now fallback to reading the About.properties if present, this fix my
version-detection issue

Cheers,
Nicolas


On Thu, Feb 5, 2009 at 8:13 PM, Scott Blum sco...@google.com wrote:

 Nicolas, I can't reproduce the issue you're seeing.  Do you have a weird
 classloader setup?  Or is it possible the code you have that references
 About needs to be recompiled?  Try the following test.. create a Main.java
 in your GWT install directory and run the following commands.
 Main.java:

 import com.google.gwt.dev.About;

 public class Main {
   public static void main(String[] args) {
 System.out.println(About.GWT_NAME);
 System.out.println(About.GWT_SVNREV);
 System.out.println(About.GWT_VERSION);
 System.out.println(About.GWT_VERSION_NUM);
   }
 }

 Command line:

 C:\gwt-windows-1.6.0%JAVA_HOME%\bin\javac.exe -cp gwt-dev-windows.jar
 Main.java

 C:\gwt-windows-1.6.0%JAVA_HOME%\bin\java.exe -cp .;gwt-dev-windows.jar
 Main
 Google Web Toolkit
 1...@4621m
 Google Web Toolkit 1.6.0
 1.6.0

 C:\sandbox\gwt-windows-1.6.0

 This seems correct to me.

 On Thu, Feb 5, 2009 at 3:51 AM, nicolas de loof 
 nicolas.del...@gmail.comwrote:

 I just notice the About class has not the GWT_VERIOSN_NUMBER set.
 Seems the code expects some String replacement for @gwt_vers...@.

 I'm using About.GWT_VERSION_NUM constant in gwt-maven-plugin to detect the
 GWT version used when user provides it's own implementation.

 Cheers,
 Nicolas


 


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



[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1

2009-02-06 Thread Scott Blum
LOL, well that would explain it. :)  To be fair, in previous versions this
would have worked since those fields were (I think wrongly)
compile-time-constants.

On Fri, Feb 6, 2009 at 3:10 AM, nicolas de loof nicolas.del...@gmail.comwrote:

 Your example works,
 The issue is that I don't load the class from a classloader, I'm using BCEL
 to read the .class and access the GWT_VERSION_NUM field, so static
 initializer is not executed.

 I now fallback to reading the About.properties if present, this fix my
 version-detection issue

 Cheers,
 Nicolas


 On Thu, Feb 5, 2009 at 8:13 PM, Scott Blum sco...@google.com wrote:

 Nicolas, I can't reproduce the issue you're seeing.  Do you have a weird
 classloader setup?  Or is it possible the code you have that references
 About needs to be recompiled?  Try the following test.. create a Main.java
 in your GWT install directory and run the following commands.
 Main.java:

 import com.google.gwt.dev.About;

 public class Main {
   public static void main(String[] args) {
 System.out.println(About.GWT_NAME);
 System.out.println(About.GWT_SVNREV);
 System.out.println(About.GWT_VERSION);
 System.out.println(About.GWT_VERSION_NUM);
   }
 }

 Command line:

 C:\gwt-windows-1.6.0%JAVA_HOME%\bin\javac.exe -cp gwt-dev-windows.jar
 Main.java

 C:\gwt-windows-1.6.0%JAVA_HOME%\bin\java.exe -cp .;gwt-dev-windows.jar
 Main
 Google Web Toolkit
 1...@4621m
 Google Web Toolkit 1.6.0
 1.6.0

 C:\sandbox\gwt-windows-1.6.0

 This seems correct to me.

 On Thu, Feb 5, 2009 at 3:51 AM, nicolas de loof nicolas.del...@gmail.com
  wrote:

 I just notice the About class has not the GWT_VERIOSN_NUMBER set.
 Seems the code expects some String replacement for @gwt_vers...@.

 I'm using About.GWT_VERSION_NUM constant in gwt-maven-plugin to detect
 the GWT version used when user provides it's own implementation.

 Cheers,
 Nicolas





 


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



[gwt-contrib] [google-web-toolkit commit] r4639 - in branches/snapshot-2009.01.29/user: src/com/google/gwt/user/client/ui test/com/google/g...

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Thu Feb  5 11:18:14 2009
New Revision: 4639

Modified:
 
branches/snapshot-2009.01.29/user/src/com/google/gwt/user/client/ui/PopupPanel.java
 
branches/snapshot-2009.01.29/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java

Log:
Fixes squirrely case where calling PopupPanel.hide() appears to get into a  
race
condition when it calls onUnload(), which calls hide() again. This is now
cleaned up to only do strictly-necessary cleanup work in onUnload(), and a  
test
added to ensure it works properly in practice.
Patch by: jgw
Review by: rjrjr


Modified:  
branches/snapshot-2009.01.29/user/src/com/google/gwt/user/client/ui/PopupPanel.java
==
---  
branches/snapshot-2009.01.29/user/src/com/google/gwt/user/client/ui/PopupPanel.java
  
(original)
+++  
branches/snapshot-2009.01.29/user/src/com/google/gwt/user/client/ui/PopupPanel.java
  
Thu Feb  5 11:18:14 2009
@@ -462,14 +462,10 @@
 *  {...@link CloseHandler#onClose(CloseEvent)} when the popup is  
closed
 */
public void hide(boolean autoClosed) {
-if (!showing) {
+if (!isShowing()) {
return;
  }
-showing = false;
-if (nativePreviewHandlerRegistration != null) {
-  nativePreviewHandlerRegistration.removeHandler();
-  nativePreviewHandlerRegistration = null;
-}
+cleanup();

  // Hide the popup
  resizeAnimation.setState(false);
@@ -590,7 +586,10 @@

@Override
protected void onUnload() {
-hide();
+// Just to be sure, we perform cleanup when the popup is unloaded (i.e.
+// removed from the DOM). This is normally taken care of in hide(),  
but it
+// can be missed if someone removes the popup directly from the  
RootPanel.
+cleanup();
}

/**
@@ -896,6 +895,16 @@
elt.blur();
  }
}-*/;
+
+  private void cleanup() {
+// Clear the 'showing' flag and make sure that the event preview is  
cleaned
+// up.
+showing = false;
+if (nativePreviewHandlerRegistration != null) {
+  nativePreviewHandlerRegistration.removeHandler();
+  nativePreviewHandlerRegistration = null;
+}
+  }

/**
 * Does the event target one of the partner elements?

Modified:  
branches/snapshot-2009.01.29/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
==
---  
branches/snapshot-2009.01.29/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
  
(original)
+++  
branches/snapshot-2009.01.29/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
  
Thu Feb  5 11:18:14 2009
@@ -15,6 +15,8 @@
   */
  package com.google.gwt.user.client.ui;

+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
  import com.google.gwt.user.client.Command;
  import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.DeferredCommand;
@@ -68,6 +70,20 @@
  assertEquals(text, dialogBox.getText());
  assertTrue(dialogBox.getHTML().equalsIgnoreCase(btext/b));
}
+
+  public void testSimpleCloseButtonOnModalDialog() {
+final DialogBox dialogBox = new DialogBox(false, true);
+Button button = new Button();
+button.addClickHandler(new ClickHandler() {
+  public void onClick(ClickEvent event) {
+dialogBox.hide();
+  }
+});
+dialogBox.add(button);
+dialogBox.show();
+button.click();
+assertFalse(dialogBox.isShowing());
+  }

public void testDebugId() {
  DialogBox dBox = new DialogBox();
@@ -86,7 +102,6 @@
  // Check the header IDs
  DeferredCommand.addCommand(new Command() {
public void execute() {
-String prefix = UIObject.DEBUG_ID_PREFIX;
  UIObjectTest.assertDebugIdContents(myDialogBox-caption,
  test caption);
  finishTest();

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



[gwt-contrib] default GWT version in Maven central repo wrong

2009-02-06 Thread Arthur Kalmenson

Hello everyone,

I'm not sure who rsyncs GWT releases to Maven central, but if you look
at: http://mvnrepository.com/artifact/com.google.gwt/gwt-user you can
see that the default GWT version is 1.5-RC1 and not 1.5.3.

--
Arthur Kalmenson

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



[gwt-contrib] Re: default GWT version in Maven central repo wrong

2009-02-06 Thread nicolas de loof
What make you say ths is the default one ?
Index of /maven2/com/google/gwt/gwt-user/

../
1.4.60/17-Sep-2007 17:57
  -
1.4.62/23-Mar-2008 09:10
  -
1.5-M1/01-Apr-2008 10:29
  -
1.5-M2/13-May-2008 13:20
  -
1.5-RC1/   29-May-2008 10:40
  -
1.5.1/ 11-Aug-2008 08:35
  -
1.5.2/ 01-Sep-2008 11:59
  -
1.5.3/ 20-Oct-2008 14:19
  -

As there is no metadata.xml file, there is no default !


PS : I'm the guy who uploads those artifacts

On Fri, Feb 6, 2009 at 4:40 PM, Arthur Kalmenson arthur.k...@gmail.comwrote:


 Hello everyone,

 I'm not sure who rsyncs GWT releases to Maven central, but if you look
 at: http://mvnrepository.com/artifact/com.google.gwt/gwt-user you can
 see that the default GWT version is 1.5-RC1 and not 1.5.3.

 --
 Arthur Kalmenson

 


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



[gwt-contrib] Work around for gwt issue 3340

2009-02-06 Thread ecc

Reviewers: jgw,

Description:
issue url:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3340

This work around stops a race condition from happening in IE that causes
the image not to be cached correctly if the onLoad event is hooked up to
the image immediately after the image is added to the dom.

For the next release of GWT, we should canonically solve this problem
instead of working around it, so we can get reliable load events on all
browsers.


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

Affected files:
   user/src/com/google/gwt/user/client/ui/Image.java


Index: user/src/com/google/gwt/user/client/ui/Image.java
===
--- user/src/com/google/gwt/user/client/ui/Image.java   (revision 4642)
+++ user/src/com/google/gwt/user/client/ui/Image.java   (working copy)
@@ -42,6 +42,7 @@
  import com.google.gwt.event.dom.client.MouseWheelEvent;
  import com.google.gwt.event.dom.client.MouseWheelHandler;
  import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.Event;
  import com.google.gwt.user.client.ui.impl.ClippedImageImpl;

@@ -64,10 +65,7 @@
   * will be lost.
   * /p
   *
- * h3CSS Style Rules/h3
- * ul class=css
- * li.gwt-Image { }/li
- * /ul
+ * h3CSS Style Rules/h3 ul class=css li.gwt-Image { }/li /ul
   *
   * Tranformations between clipped and unclipped state will result in a  
loss of
   * any style names that were set/added; the only style names that are  
preserved
@@ -225,18 +223,21 @@
private static class UnclippedState extends State {

  UnclippedState(Element element) {
-  // Todo(ecc) This is wrong, we should not be sinking these here on  
such a
-  // common widget.After the branch is stable, this should be fixed.
+  // This case is relatively unusual, in that we swapped a clipped  
image out,
+  // so does not need to be that efficient.
Event.sinkEvents(element, Event.ONCLICK | Event.MOUSEEVENTS
| Event.ONLOAD | Event.ONERROR | Event.ONMOUSEWHEEL);
  }

  UnclippedState(Image image) {
image.replaceElement(Document.get().createImageElement());
-  // Todo(ecc) This is wrong, we should not be sinking these here on  
such a
-  // common widget.After the branch is stable, this should be fixed.
-  image.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONLOAD
-  | Event.ONERROR | Event.ONMOUSEWHEEL);
+  // We are working around an IE race condition that can make the image
+  // incorrectly cache itself if the load event is assigned at the  
same time
+  // as the image is added to the dom.
+  DOM.sinkEvents(image.getElement(), Event.ONLOAD);
+
+  // Todo(ecc) this could be more efficient overall.
+  image.sinkEvents(Event.ONERROR | Event.ONLOAD);
  }

  UnclippedState(Image image, String url) {



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



[gwt-contrib] Re: default GWT version in Maven central repo wrong

2009-02-06 Thread nicolas de loof
AFAIK, mvnrepository latest is based on textual version comparison, so
1.5-RC*  1.5.3

On Fri, Feb 6, 2009 at 4:54 PM, nicolas de loof nicolas.del...@gmail.comwrote:

 What make you say ths is the default one ?
 Index of /maven2/com/google/gwt/gwt-user/

 ../
 1.4.60/17-Sep-2007 17:57
 -
 1.4.62/23-Mar-2008 09:10
 -
 1.5-M1/01-Apr-2008 10:29
 -
 1.5-M2/13-May-2008 13:20
 -
 1.5-RC1/   29-May-2008 10:40
 -
 1.5.1/ 11-Aug-2008 08:35
 -
 1.5.2/ 01-Sep-2008 11:59
 -
 1.5.3/ 20-Oct-2008 14:19
 -

 As there is no metadata.xml file, there is no default !


 PS : I'm the guy who uploads those artifacts

 On Fri, Feb 6, 2009 at 4:40 PM, Arthur Kalmenson arthur.k...@gmail.comwrote:


 Hello everyone,

 I'm not sure who rsyncs GWT releases to Maven central, but if you look
 at: http://mvnrepository.com/artifact/com.google.gwt/gwt-user you can
 see that the default GWT version is 1.5-RC1 and not 1.5.3.

 --
 Arthur Kalmenson

 



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



[gwt-contrib] Re: Tighten up query string parsing for locale value in I18N.gwt.xml

2009-02-06 Thread Scott Blum
You could also check that the preceding character is '?' or ''.  I'm not
sure in this context if it can actually be at pos 0 or not.

On Thu, Feb 5, 2009 at 7:55 PM, zun...@google.com wrote:


 Reviewers: jat,

 Description:
 Tighten up query string parsing for locale value in I18N.gwt.xml.
 Potentially, another string might have the substring locale embedded
 somehow. This is just a minor improvement and doesn't handle every case.

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

 Affected files:
   user/src/com/google/gwt/i18n/I18N.gwt.xml


 Index: user/src/com/google/gwt/i18n/I18N.gwt.xml
 ===
 --- user/src/com/google/gwt/i18n/I18N.gwt.xml   (revision 4644)
 +++ user/src/com/google/gwt/i18n/I18N.gwt.xml   (working copy)
 @@ -27,7 +27,7 @@
// Look for the locale as a url argument
if (locale == null) {
  var args = location.search;
 -var startLang = args.indexOf(locale);
 +var startLang = args.indexOf(locale=);
  if (startLang = 0) {
var language = args.substring(startLang);
var begin = language.indexOf(=) + 1;



 


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



[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1

2009-02-06 Thread Matthew Mastracci
Scott et. al,

Great release!  I spent a few hours migrating our codebase and build  
process without much trouble.

1.  The new expanded WAR format makes life a lot easier for us to run  
with -noserver.  With 1.5, we had to regenerate the hosted.html and  
nocache.js files every time something changed.  Now we're just  
pointing Tomcat at war/ and letting tomcat serve them directly.

2.  The compiler task crashes Java 1.6 on Mac now.  The previous  
versions would run fine with the 64-bit JVM (even though SWT isn't  
compatible).  Would it be possible to lazy load SWT so that we can  
take advantage of the faster 1.6 JVM on OSX?

  [java] Invalid memory access of location  rip=01160767

3.  Our final output codesize grew by ~2-3% (compressed size).   
Scanning the symbol files seems to point towards a bunch of new event  
handling classes that showed up.  I haven't ported all of our widgets  
over to using handlers instead of listeners, so it's likely a result  
of some code duplication as well.

4.  None of our custom linkers required major work to bring it up to  
date, with the exception of some tweaks to add a third parameter to  
window.external.gwtOnload().

5.  One cool thing that was missing from the release notes is new the  
ability to specify multiple modules for the compile task.  Based on  
some wallclock testing, specifying multiple modules shaves off ~30  
seconds off compile time of any modules on top of the first:

Individual times:

  [java]Compilation succeeded -- 51.814s
  [java]Compilation succeeded -- 170.986s
  [java]Compilation succeeded -- 91.488s

All together:

  [java]Compilation succeeded -- 55.121s
  [java]   Compilation succeeded -- 141.052s
  [java]  Compilation succeeded -- 55.492s

Note that each module's log messages are indented one level further,  
indicating the extra speed boost.  ;)

Overall, an awesome release.  Thanks, all.

Matt.

On 4-Feb-09, at 5:34 PM, Scott Blum wrote:

 Greetings GWT developers,

 The GWT team is happy to announce the availability of 1.6 Milestone  
 1! Binary distributions are available for download directly from  
 GWT's Google Code project.

 http://code.google.com/p/google-web-toolkit/downloads/list?can=1q=1.6.0

 As always, milestone builds like this are use-at-your-own-risk.  
 There are known bugs, and it definitely isn't ready for production  
 use. Please expect some trial and error getting everything to work.  
 The javadoc that comes bundled with the distribution should be up-to- 
 date, but the online Developer Guide (http://code.google.com/docreader/#p 
 =google-web-toolkit-doc-1-6) is still very much a work in progress.  
 We will be updating it over the next several weeks. In lieu of an up- 
 to-date Developer Guide and release notes, below are the major  
 highlights relative to GWT 1.5.3.

 *** New Project Structure in GWT 1.6 ***

 One of the biggest changes to GWT 1.6 is a new project structure.  
 The old output format has been replaced by the standard Java web app  
 expanded war format, and the actual directory name does default to  
 /war. Note that the war directory is not only for compiler output;  
 it is also intended to contain handwritten static resources that you  
 want to be included in your webapp alongside GWT modules (that is,  
 things you'd want to version control). Please also note that the  
 GWTShell and GWTCompiler tools will maintain their legacy  
 behavior, but they have been deprecated in favor of new HostedMode  
 and Compiler tools which use the new war output. When 1.6 is  
 officially released, we will be encouraging existing projects to  
 update to the new directory format and to use the new tools to take  
 advantage of new features and for compatibility with future GWT  
 releases.

 The sample projects provided in the GWT distribution provide an  
 example of correct new project configurations. For more details on  
 the specifics of the new project format, please see GWT 1.6 WAR  
 design document 
 (http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6 
 ).

 A couple of important changes we should highlight here:

 - Projects with server-side code (GWT RPC) must configure a  
 web.xml file at /war/WEB-INF/web.xml. This web.xml file must  
 define and publish any servlets associated with the web application.  
 See the included DynaTable sample. Additionally, server-side library  
 dependencies must be copied into /war/WEB-INF/lib. For example,  
 any GWT RPC servlets must have a copy of gwt-servlet.jar in this  
 folder.

 - HTML host pages will no longer typically be located in a GWT  
 module's public path. Instead, we'll be recommending that people  
 take advantage of the natural web app behavior for serving static  
 files by placing host pages anywhere in the war structure that makes  
 sense. For exmaple, you might want to load a GWT module from a JSP  
 page located in the root of your web app. To keep 

[gwt-contrib] [google-web-toolkit commit] r4650 - in changes/bobv/elide_rpc_type_names_r4602: dev/core/src/com/google/gwt/dev dev/core/src/...

2009-02-06 Thread codesite-noreply

Author: b...@google.com
Date: Fri Feb  6 07:43:25 2009
New Revision: 4650

Added:
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/util/arg/ArgHandlerDisableClassMetadata.java

(contents, props changed)
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/util/arg/OptionDisableClassMetadata.java

(contents, props changed)
Modified:
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/HostedModeBase.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/Precompile.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/JJSOptions.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/JJSOptionsImpl.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/ast/JClassLiteral.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java
 
changes/bobv/elide_rpc_type_names_r4602/user/src/com/google/gwt/user/client/rpc/impl/SerializerBase.java
 
changes/bobv/elide_rpc_type_names_r4602/user/super/com/google/gwt/emul/java/lang/Class.java
 
changes/bobv/elide_rpc_type_names_r4602/user/super/com/google/gwt/emul/java/lang/Enum.java
 
changes/bobv/elide_rpc_type_names_r4602/user/test/com/google/gwt/user/client/rpc/ObjectGraphTest.java

Log:
Add an -XdisableClassMetadata flag.
This disables:
   - Class.getName() - returns Class$hashCode()
   - Class.getSuperclass() - returns null
   - Class.toString() - returns Object.toString()
Misc javadoc and comment updates.


Modified:  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/HostedModeBase.java
==
---  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/HostedModeBase.java
  
(original)
+++  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/HostedModeBase.java
  
Fri Feb  6 07:43:25 2009
@@ -31,6 +31,7 @@
  import com.google.gwt.dev.shell.ShellModuleSpaceHost;
  import com.google.gwt.dev.util.Util;
  import com.google.gwt.dev.util.arg.ArgHandlerDisableAggressiveOptimization;
+import com.google.gwt.dev.util.arg.ArgHandlerDisableClassMetadata;
  import com.google.gwt.dev.util.arg.ArgHandlerDraftCompile;
  import com.google.gwt.dev.util.arg.ArgHandlerEnableAssertions;
  import com.google.gwt.dev.util.arg.ArgHandlerGenDir;
@@ -320,6 +321,7 @@
registerHandler(new ArgHandlerScriptStyle(options));
registerHandler(new ArgHandlerEnableAssertions(options));
registerHandler(new  
ArgHandlerDisableAggressiveOptimization(options));
+  registerHandler(new ArgHandlerDisableClassMetadata(options));
registerHandler(new ArgHandlerDraftCompile(options));
  }
}

Modified:  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/Precompile.java
==
---  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/Precompile.java
  
(original)
+++  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/Precompile.java
  
Fri Feb  6 07:43:25 2009
@@ -41,6 +41,7 @@
  import com.google.gwt.dev.util.PerfLogger;
  import com.google.gwt.dev.util.Util;
  import com.google.gwt.dev.util.arg.ArgHandlerDisableAggressiveOptimization;
+import com.google.gwt.dev.util.arg.ArgHandlerDisableClassMetadata;
  import com.google.gwt.dev.util.arg.ArgHandlerDisableRunAsync;
  import com.google.gwt.dev.util.arg.ArgHandlerDraftCompile;
  import com.google.gwt.dev.util.arg.ArgHandlerEnableAssertions;
@@ -77,6 +78,7 @@
registerHandler(new ArgHandlerScriptStyle(options));
registerHandler(new ArgHandlerEnableAssertions(options));
registerHandler(new  
ArgHandlerDisableAggressiveOptimization(options));
+  registerHandler(new ArgHandlerDisableClassMetadata(options));
registerHandler(new ArgHandlerValidateOnlyFlag(options));
registerHandler(new ArgHandlerDisableRunAsync(options));
registerHandler(new ArgHandlerDraftCompile(options));
@@ -123,6 +125,10 @@
return jjsOptions.isAggressivelyOptimize();
  }

+public boolean isClassMetadataDisabled() {
+  return jjsOptions.isClassMetadataDisabled();
+}
+
  public boolean isDraftCompile() {
return jjsOptions.isDraftCompile();
  }
@@ -145,6 +151,10 @@

  public void setAggressivelyOptimize(boolean aggressivelyOptimize) {
jjsOptions.setAggressivelyOptimize(aggressivelyOptimize);
+}
+
+public void setClassMetadataDisabled(boolean disabled) {
+  

[gwt-contrib] [google-web-toolkit commit] r4648 - changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/js

2009-02-06 Thread codesite-noreply

Author: b...@google.com
Date: Fri Feb  6 06:39:06 2009
New Revision: 4648

Modified:
 
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/js/JsInliner.java

Log:
Fix runAsync interaction by not expanding top-level function invocations.


Modified:  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/js/JsInliner.java
==
---  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/js/JsInliner.java

(original)
+++  
changes/bobv/elide_rpc_type_names_r4602/dev/core/src/com/google/gwt/dev/js/JsInliner.java

Fri Feb  6 06:39:06 2009
@@ -15,6 +15,7 @@
   */
  package com.google.gwt.dev.js;

+import com.google.gwt.dev.jjs.HasSourceInfo;
  import com.google.gwt.dev.jjs.InternalCompilerException;
  import com.google.gwt.dev.jjs.SourceInfo;
  import com.google.gwt.dev.js.ast.JsArrayAccess;
@@ -46,6 +47,7 @@
  import com.google.gwt.dev.js.ast.JsPostfixOperation;
  import com.google.gwt.dev.js.ast.JsPrefixOperation;
  import com.google.gwt.dev.js.ast.JsProgram;
+import com.google.gwt.dev.js.ast.JsProgramFragment;
  import com.google.gwt.dev.js.ast.JsRegExp;
  import com.google.gwt.dev.js.ast.JsReturn;
  import com.google.gwt.dev.js.ast.JsScope;
@@ -153,6 +155,12 @@
return op.getOperator().equals(JsBinaryOperator.COMMA) ? op : null;
  }

+private final ListJsName localVariableNames;
+
+public CommaNormalizer(ListJsName localVariableNames) {
+  this.localVariableNames = localVariableNames;
+}
+
  @Override
  public void endVisit(JsBinaryOperation x, JsContextJsExpression ctx)  
{
if (isComma(x) == null) {
@@ -178,6 +186,41 @@
x.setArg1(inner.getArg1());
didChange = true;
  }
+
+/*
+ * Eliminate the pattern (localVar = expr, localVar). This tends to
+ * occur when a method interacted with pruned fields or had  
statements
+ * removed.
+ */
+JsName assignmentRef = null;
+JsExpression expr = null;
+JsName returnRef = null;
+
+if (x.getArg1() instanceof JsBinaryOperation) {
+  JsBinaryOperation op = (JsBinaryOperation) x.getArg1();
+  if (op.getOperator() == JsBinaryOperator.ASG
+   op.getArg1() instanceof JsNameRef) {
+JsNameRef nameRef = (JsNameRef) op.getArg1();
+if (nameRef.getQualifier() == null) {
+  assignmentRef = nameRef.getName();
+  expr = op.getArg2();
+}
+  }
+}
+
+if (x.getArg2() instanceof JsNameRef) {
+  JsNameRef nameRef = (JsNameRef) x.getArg2();
+  if (nameRef.getQualifier() == null) {
+returnRef = nameRef.getName();
+  }
+}
+
+if (assignmentRef != null  assignmentRef.equals(returnRef)
+ localVariableNames.contains(assignmentRef)) {
+  assert expr != null;
+  localVariableNames.remove(assignmentRef);
+  ctx.replaceMe(expr);
+}
  return;
}

@@ -680,10 +723,14 @@
  private final SetJsFunction blacklist = new HashSetJsFunction();
  private final StackJsFunction functionStack = new  
StackJsFunction();
  private final InvocationCountingVisitor invocationCountingVisitor =  
new InvocationCountingVisitor();
-
  private final StackListJsName newLocalVariableStack = new  
StackListJsName();
  private final JsProgram program;

+/**
+ * Not a stack because program fragments aren't nested.
+ */
+private JsFunction programFunction;
+
  public InliningVisitor(JsProgram program) {
this.program = program;
invocationCountingVisitor.accept(program);
@@ -785,33 +832,10 @@
  throw new InternalCompilerException(Unexpected function popped);
}

+  JsBlock body = x.getBody();
ListJsName newLocalVariables = newLocalVariableStack.pop();

-  // Nothing to do
-  if (newLocalVariables.isEmpty()) {
-return;
-  }
-
-  ListJsStatement statements = x.getBody().getStatements();
-
-  // The body can't be empty if we have local variables to create
-  assert !statements.isEmpty();
-
-  // Find or create the JsVars as the first statement
-  SourceInfo sourceInfo = x.getSourceInfo().makeChild(
-  InliningVisitor.class, Synthetic locals);
-  JsVars vars;
-  if (statements.get(0) instanceof JsVars) {
-vars = (JsVars) statements.get(0);
-  } else {
-vars = new JsVars(sourceInfo);
-statements.add(0, vars);
-  }
-
-  // Add all variables
-  for (JsName name : newLocalVariables) {
-vars.add(new JsVar(sourceInfo, name));
-  }
+  addVars(x, body, newLocalVariables);
  }

  @Override
@@ -837,26 +861,22 @@
  return;
}

-  /*
-   * Will see this with certain classes whose clinits are folded into  
the
-   

[gwt-contrib] [google-web-toolkit commit] r4651 - changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 08:56:43 2009
New Revision: 4651

Modified:
 
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
 
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationState.java

Log:
Add TODO about linking source to binary, added getters in preparation for  
TypeOracle work.


Modified:  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
==
---  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
  
(original)
+++  
changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/BinaryCompilationUnitBuilder.java
  
Fri Feb  6 08:56:43 2009
@@ -86,6 +86,69 @@
  }
}

+  /**
+   * @return the access
+   */
+  public int getAccess() {
+return access;
+  }
+
+  /**
+   * @return the annotations
+   */
+  public ListMyAnnotationVisitor getAnnotations() {
+return annotations;
+  }
+
+  /**
+   * @return the argNames
+   */
+  public String[] getArgNames() {
+return argNames;
+  }
+
+  /**
+   * @return the argTypes
+   */
+  public Type[] getArgTypes() {
+return argTypes;
+  }
+
+  /**
+   * @return the desc
+   */
+  public String getDesc() {
+return desc;
+  }
+
+  /**
+   * @return the exceptions
+   */
+  public String[] getExceptions() {
+return exceptions;
+  }
+
+  /**
+   * @return the name
+   */
+  public String getName() {
+return name;
+  }
+
+  /**
+   * @return the signature
+   */
+  public String getSignature() {
+return signature;
+  }
+
+  /**
+   * @return the actualArgNames
+   */
+  public boolean hasActualArgNames() {
+return actualArgNames;
+  }
+
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean  
visible) {
  // TODO Auto-generated method stub
@@ -93,13 +156,7 @@
  annotations.add(av);
  return av;
}
-
-  @Override
-  public void visitEnd() {
-// TODO(jat): do we need to do anything here?
-super.visitEnd();
-  }
-
+
@Override
public void visitLocalVariable(String name, String desc,
String signature, Label start, Label end, int index) {
@@ -122,6 +179,7 @@
  private String[] interfaces;
  private byte[] bytes;
  private Resource classResource;
+private ListMyMethodVisitor methods = new  
ArrayListMyMethodVisitor();

  public BinaryCompiledClassVisitor(Resource classResource, byte[]  
bytes) {
this.classResource = classResource;
@@ -136,6 +194,69 @@
  }

  /**
+ * @return the bytes
+ */
+public byte[] getBytes() {
+  return bytes;
+}
+
+/**
+ * @return the classResource
+ */
+public Resource getClassResource() {
+  return classResource;
+}
+
+/**
+ * @return the innerClasses
+ */
+public ListResource getInnerClasses() {
+  return innerClasses;
+}
+
+/**
+ * @return the interfaces
+ */
+public String[] getInterfaces() {
+  return interfaces;
+}
+
+/**
+ * @return the methods
+ */
+public ListMyMethodVisitor getMethods() {
+  return methods;
+}
+
+/**
+ * @return the name
+ */
+public String getName() {
+  return name;
+}
+
+/**
+ * @return the signature
+ */
+public String getSignature() {
+  return signature;
+}
+
+/**
+ * @return the source
+ */
+public String getSource() {
+  return source;
+}
+
+/**
+ * @return the superName
+ */
+public String getSuperName() {
+  return superName;
+}
+
+/**
   * Called at the beginning of visiting the class.
   *
   * @param version classfile version (ie, Opcodes.V1_5 etc)
@@ -197,7 +318,10 @@
if ((access  Opcodes.ACC_NATIVE) != 0) {
  throw new ClassNotSuitableException(Has native methods);
}
-  return new MyMethodVisitor(access, name, desc, signature,  
exceptions);
+  MyMethodVisitor mv = new MyMethodVisitor(access, name, desc,  
signature,
+  exceptions);
+  methods.add(mv);
+  return mv;
  }

  @Override
@@ -230,6 +354,20 @@
this.desc = desc;
this.visible = visible;
  }
+
+/**
+ * @return the desc
+ */
+public String getDesc() {
+  return desc;
+}
+
+/**
+ * @return the visible
+ */
+public boolean isVisible() {
+  return visible;
+}
}

private final MapString, Resource binaryMap;
@@ -268,9 +406,7 @@
  continue;
}
seen.add(compiledClass);
-  if (compiledClass != null) {
-classes.add(compiledClass);
-  }
+  

[gwt-contrib] [google-web-toolkit commit] r4649 - tags/1.6.0

2009-02-06 Thread codesite-noreply

Author: sco...@google.com
Date: Fri Feb  6 07:31:15 2009
New Revision: 4649

Added:
tags/1.6.0/
   - copied from r4621, /releases/1.6/

Log:
Tagging 1.6 Milestone 1.




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



[gwt-contrib] Re: RR : Declassifying RPC / Removing all type names from compilation

2009-02-06 Thread BobV

On Thu, Feb 5, 2009 at 12:28 AM, BobV b...@google.com wrote:
 http://google-web-toolkit.googlecode.com/svn/changes/bobv/elide_rpc_type_names_r4602
 Future changes:
  - A compiler flag or optional module to neuter Class.getName().

I've added an -XdisableClassMetadata flag to this branch.

This disables:
 - Class.getName() - returns Class$hashCode()
 - Class.getSuperclass() - returns null
 - Class.toString() - returns Object.toString()

You can still use class.getName() as an equality comparison, but not
for anything that requires semantic meaning; the relationships between
the strings will be constant throughout the lifetime of the module.

A.class == A.class != B.class
A.class.getName() == A.class.getName() != B.class.getName()

With this flag enabled, class literal setup for non-enum types is a
simple JS new operation.  It reduces the total amount of code
generated in a showcase compile by 10% based on find war -name
'*.cache.html' -o -name '*.cache.js' | xargs wc.

-- 
Bob Vawter
Google Web Toolkit Team

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



[gwt-contrib] Google API Libraries for GWT: New binaries ready for download

2009-02-06 Thread Eric Ayers

Another round of updates is ready for the Google API Libraries for
Google Web Toolkit (GWT). As just announced on the GWT blog, this
update brings bug fixes and new features to three of the existing
libraries.

  - The Google Visualization API Library for GWT moves from a release
candidate to a public release with a few bug fixes.
  - The Gadgets API Library for GWT now supports GadgetAds , gadget
based internationalization and an important bug fix for Windows
developers using GWT hosted mode.
  - The Google Maps API Library for GWT now includes support for the
GAdsManager and reverse geocoding support.

We are also announcing a major update as a release candidate.  The
Gears API Library for GWT version 1.2.0 supports the Gears 0.4 feature
set, which includes Geolocation, HTTP Request, Desktop and Blob.

This release is exciting to me not just for the new features that have
been added, but also for the number of new contributors to the
libraries from the open source community. Special thanks to Mark
Renouf for contributing Gears 0.4 support, and all those that filed
issues and contributed patches.

You can find the new libraries ready for download on Google Code.

  http://code.google.com/p/gwt-google-apis

-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



[gwt-contrib] [google-web-toolkit commit] r4654 - in releases/1.6/user: src/com/google/gwt/user/client/ui test/com/google/gwt/user/client/ui

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 11:11:50 2009
New Revision: 4654

Modified:
releases/1.6/user/src/com/google/gwt/user/client/ui/PopupPanel.java
releases/1.6/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java

Log:
Merge of c4628, c4639 from branches/snapshot-2009.01.29.


Modified:  
releases/1.6/user/src/com/google/gwt/user/client/ui/PopupPanel.java
==
--- releases/1.6/user/src/com/google/gwt/user/client/ui/PopupPanel.java  
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/PopupPanel.java Fri  
Feb  6 11:11:50 2009
@@ -463,14 +463,10 @@
 *  {...@link CloseHandler#onClose(CloseEvent)} when the popup is  
closed
 */
public void hide(boolean autoClosed) {
-if (!showing) {
+if (!isShowing()) {
return;
  }
-showing = false;
-if (nativePreviewHandlerRegistration != null) {
-  nativePreviewHandlerRegistration.removeHandler();
-  nativePreviewHandlerRegistration = null;
-}
+cleanup();

  // Hide the popup
  resizeAnimation.setState(false);
@@ -589,6 +585,14 @@
  return true;
}

+  @Override
+  protected void onUnload() {
+// Just to be sure, we perform cleanup when the popup is unloaded (i.e.
+// removed from the DOM). This is normally taken care of in hide(),  
but it
+// can be missed if someone removes the popup directly from the  
RootPanel.
+cleanup();
+  }
+
/**
 * Remove an autoHide partner.
 *
@@ -889,6 +893,16 @@
elt.blur();
  }
}-*/;
+
+  private void cleanup() {
+// Clear the 'showing' flag and make sure that the event preview is  
cleaned
+// up.
+showing = false;
+if (nativePreviewHandlerRegistration != null) {
+  nativePreviewHandlerRegistration.removeHandler();
+  nativePreviewHandlerRegistration = null;
+}
+  }

/**
 * Does the event target one of the partner elements?

Modified:  
releases/1.6/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
==
--- releases/1.6/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java 
 
(original)
+++ releases/1.6/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java 
 
Fri Feb  6 11:11:50 2009
@@ -15,6 +15,8 @@
   */
  package com.google.gwt.user.client.ui;

+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
  import com.google.gwt.user.client.Command;
  import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.DeferredCommand;
@@ -68,6 +70,20 @@
  assertEquals(text, dialogBox.getText());
  assertTrue(dialogBox.getHTML().equalsIgnoreCase(btext/b));
}
+
+  public void testSimpleCloseButtonOnModalDialog() {
+final DialogBox dialogBox = new DialogBox(false, true);
+Button button = new Button();
+button.addClickHandler(new ClickHandler() {
+  public void onClick(ClickEvent event) {
+dialogBox.hide();
+  }
+});
+dialogBox.add(button);
+dialogBox.show();
+button.click();
+assertFalse(dialogBox.isShowing());
+  }

public void testDebugId() {
  DialogBox dBox = new DialogBox();
@@ -86,7 +102,6 @@
  // Check the header IDs
  DeferredCommand.addCommand(new Command() {
public void execute() {
-String prefix = UIObject.DEBUG_ID_PREFIX;
  UIObjectTest.assertDebugIdContents(myDialogBox-caption,
  test caption);
  finishTest();

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



[gwt-contrib] [google-web-toolkit commit] r4655 - in releases/1.6/user: src/com/google/gwt/dom/client src/com/google/gwt/user/client/ui tes...

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 11:16:54 2009
New Revision: 4655

Added:
releases/1.6/user/test/com/google/gwt/user/client/ui/ButtonTest.java
   - copied unchanged from r4624,  
/branches/snapshot-2009.01.29/user/test/com/google/gwt/user/client/ui/ButtonTest.java
Modified:
releases/1.6/user/src/com/google/gwt/dom/client/ButtonElement.java
releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java
releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java
releases/1.6/user/src/com/google/gwt/user/client/ui/Button.java
releases/1.6/user/test/com/google/gwt/user/UISuite.java

Log:
Merge of c4624 from branches/snapshot-2009.01.29.


Modified: releases/1.6/user/src/com/google/gwt/dom/client/ButtonElement.java
==
--- releases/1.6/user/src/com/google/gwt/dom/client/ButtonElement.java   
(original)
+++ releases/1.6/user/src/com/google/gwt/dom/client/ButtonElement.java  Fri  
Feb  6 11:16:54 2009
@@ -40,9 +40,9 @@
/**
 * Simulate a mouse-click.
 */
-  public final native void click() /*-{
-this.click();
-  }-*/;
+  public final void click() {
+DOMImpl.impl.buttonClick(this);
+  }

/**
 * A single character access key to give access to the form control.

Modified: releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java
==
--- releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.java
(original)
+++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImpl.javaFri Feb 
 6  
11:16:54 2009
@@ -21,6 +21,10 @@

static final DOMImpl impl = GWT.create(DOMImpl.class);

+  public native void buttonClick(ButtonElement button) /*-{
+button.click();
+  }-*/;
+
public native Element createElement(String tag) /*-{
  return $doc.createElement(tag);
}-*/;

Modified:  
releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java
==
--- releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java  
 
(original)
+++ releases/1.6/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java  
 
Fri Feb  6 11:16:54 2009
@@ -24,6 +24,16 @@
   */
   class DOMImplMozillaOld extends DOMImplMozilla {

+  public native void buttonClick(ButtonElement button) /*-{
+var doc = button.ownerDocument;
+if (doc != null) {
+  var evt = doc.createEvent('MouseEvents');
+  evt.initMouseEvent('click', true, true, null, 0, 0,
+0, 0, 0, false, false, false, false, 0, null);
+  button.dispatchEvent(evt);
+}
+  }-*/;
+
@Override
public native int getAbsoluteLeft(Element elem) /*-{
  var style = $doc.defaultView.getComputedStyle(elem, null);

Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/Button.java
==
--- releases/1.6/user/src/com/google/gwt/user/client/ui/Button.java  
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/Button.java Fri  
Feb  6 11:16:54 2009
@@ -18,6 +18,7 @@
  import com.google.gwt.dom.client.ButtonElement;
  import com.google.gwt.dom.client.Document;
  import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.ButtonElement;
  import com.google.gwt.event.dom.client.ClickHandler;

  /**
@@ -71,10 +72,6 @@
  }
}-*/;

-  static native void click(Element button) /*-{
-button.click();
-  }-*/;
-
/**
 * Creates a button with no caption.
 */
@@ -133,6 +130,11 @@
 * Programmatic equivalent of the user clicking the button.
 */
public void click() {
-click(getElement());
+getButtonElement().click();
+  }
+
+  private ButtonElement getButtonElement() {
+return getElement().cast();
}
  }
+

Modified: releases/1.6/user/test/com/google/gwt/user/UISuite.java
==
--- releases/1.6/user/test/com/google/gwt/user/UISuite.java (original)
+++ releases/1.6/user/test/com/google/gwt/user/UISuite.java Fri Feb  6  
11:16:54 2009
@@ -22,6 +22,7 @@
  import com.google.gwt.user.client.WindowTest;
  import com.google.gwt.user.client.ui.AbsolutePanelTest;
  import com.google.gwt.user.client.ui.AnchorTest;
+import com.google.gwt.user.client.ui.ButtonTest;
  import com.google.gwt.user.client.ui.CaptionPanelTest;
  import com.google.gwt.user.client.ui.CheckBoxTest;
  import com.google.gwt.user.client.ui.CompositeTest;
@@ -94,6 +95,7 @@

  suite.addTestSuite(AbsolutePanelTest.class);
  suite.addTestSuite(AnchorTest.class);
+suite.addTestSuite(ButtonTest.class);
  suite.addTestSuite(CaptionPanelTest.class);
  suite.addTestSuite(CheckBoxTest.class);
  suite.addTestSuite(ClippedImagePrototypeTest.class);

--~--~-~--~~~---~--~~

[gwt-contrib] [google-web-toolkit commit] r4656 - releases/1.6/user/src/com/google/gwt/user/client/ui

2009-02-06 Thread codesite-noreply

Author: e...@google.com
Date: Fri Feb  6 11:20:51 2009
New Revision: 4656

Modified:
releases/1.6/user/src/com/google/gwt/user/client/ui/Image.java

Log:
Fixes issue 3340 by preventing IE race condition from occurring when the on  
load handler is set.
Review by:jlabanca

Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/Image.java
==
--- releases/1.6/user/src/com/google/gwt/user/client/ui/Image.java   
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/Image.java  Fri Feb 
  
6 11:20:51 2009
@@ -64,10 +64,7 @@
   * will be lost.
   * /p
   *
- * h3CSS Style Rules/h3
- * ul class=css
- * li.gwt-Image { }/li
- * /ul
+ * h3CSS Style Rules/h3 ul class=css li.gwt-Image { }/li /ul
   *
   * Tranformations between clipped and unclipped state will result in a  
loss of
   * any style names that were set/added; the only style names that are  
preserved
@@ -225,16 +222,20 @@
private static class UnclippedState extends State {

  UnclippedState(Element element) {
-  // Todo(ecc) This is wrong, we should not be sinking these here on  
such a
-  // common widget.After the branch is stable, this should be fixed.
+  // This case is relatively unusual, in that we swapped a clipped  
image
+  // out, so does not need to be efficient.
Event.sinkEvents(element, Event.ONCLICK | Event.MOUSEEVENTS
| Event.ONLOAD | Event.ONERROR | Event.ONMOUSEWHEEL);
  }

  UnclippedState(Image image) {
image.replaceElement(Document.get().createImageElement());
-  // Todo(ecc) This is wrong, we should not be sinking these here on  
such a
-  // common widget.After the branch is stable, this should be fixed.
+  // We are working around an IE race condition that can make the image
+  // incorrectly cache itself if the load event is assigned at the  
same time
+  // as the image is added to the dom.
+  Event.sinkEvents(image.getElement(), Event.ONLOAD);
+
+  // Todo(ecc) this could be more efficient overall.
image.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONLOAD
| Event.ONERROR | Event.ONMOUSEWHEEL);
  }

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



[gwt-contrib] [google-web-toolkit commit] r4657 - releases/1.6

2009-02-06 Thread codesite-noreply

Author: fabb...@google.com
Date: Fri Feb  6 11:33:34 2009
New Revision: 4657

Modified:
releases/1.6/branch-info.txt

Log:
Typo correction: I backmerged c4*6*03, at 4*6*05, not 450[35]



Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtFri Feb  6 11:33:34 2009
@@ -27,7 +27,7 @@
  /releases/1.6/@r4359:4490 was merged (r4491) into trunk
  /releases/1.6/@c4498 was merged (r4499) into trunk
  /releases/1.6/@r4490:4497,4498:4511 was merged (r4512) into trunk,  
skipping c4498 (cherry picked above)
-/tr...@c4503 was merged (r4505) into /releases/1.6
+/tr...@c4603 was merged (r4605) into /releases/1.6

  The next merge into trunk will be:
-svn merge -r4511:4505,4506:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4511:4605,4606:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

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



[gwt-contrib] [google-web-toolkit commit] r4658 - in releases/1.6: dev/core/src/com/google/gwt/dev/shell user

2009-02-06 Thread codesite-noreply

Author: amitman...@google.com
Date: Fri Feb  6 11:47:58 2009
New Revision: 4658

Modified:
 
releases/1.6/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
releases/1.6/user/build.xml

Log:
Update to the test target for emma hosted mode. Plus, added check to not  
generate class mappings
if the unit is generated.


Patch by: amitmanjhi
Review by: jat (desk review)




Modified:  
releases/1.6/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
==
---  
releases/1.6/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
 
(original)
+++  
releases/1.6/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
 
Fri Feb  6 11:47:58 2009
@@ -386,10 +386,10 @@

/**
 * Checks if the class names is generated. Accepts any classes whose  
names
-   * match .+$\d.* (handling named classes within anonymous classes and
-   * multiple named classes of the same name in a class, but in different
-   * methods). Checks if the class or any of its enclosing classes are  
anonymous
-   * or synthetic.
+   * match .+$\d.* (handling named classes within anonymous classes and  
multiple
+   * named classes of the same name in a class, but in different methods).
+   * Checks if the class or any of its enclosing classes are anonymous or
+   * synthetic.
 * p
 * If new compilers have different conventions for anonymous and  
synthetic
 * classes, this code needs to be updated.
@@ -680,9 +680,9 @@
 */
ListJsniMethod jsniMethods = (unit == null) ? null
: unit.getJsniMethods();
-  if (unit != null  !unit.isSuperSource()   
unit.hasAnonymousClasses()
-   jsniMethods != null  jsniMethods.size()  0
-   !unit.createdClassMapping()) {
+  if (unit != null  !unit.isSuperSource()  !unit.isGenerated()
+   unit.hasAnonymousClasses()  jsniMethods != null
+   jsniMethods.size()  0  !unit.createdClassMapping()) {
  if (!unit.constructAnonymousClassMappings(logger)) {
logger.log(TreeLogger.ERROR,
Our heuristic for mapping anonymous classes between  
compilers 

Modified: releases/1.6/user/build.xml
==
--- releases/1.6/user/build.xml (original)
+++ releases/1.6/user/build.xml Fri Feb  6 11:47:58 2009
@@ -2,6 +2,7 @@
property name=gwt.root location=.. /
property name=project.tail value=user /
property name=test.args value= /
+  property name=gwt.junit.emmatestcase.includes  
value=**/*Suite.class,com/google/gwt/dev/jjs/test/*Test.class/
import file=${gwt.root}/common.ant.xml /

!--
@@ -14,7 +15,7 @@
 includes=**/EmmaClassLoadingTest.class /

fileset id=default.hosted.emma.tests dir=${javac.junit.out}
-  excludes=**/CoverageTest.class includes=**/*Test.class /
+  excludes=**/CoverageTest.class,**/CompilerSuite.class  
includes=${gwt.junit.emmatestcase.includes} /
!-- everything succeeds except CoverageTest.java. It fails due to a  
javac bug in sun/OpenJDK's Java. See the file contents for details --

!--

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



[gwt-contrib] Re: [google-web-toolkit commit] r4657 - releases/1.6

2009-02-06 Thread Scott Blum
BTW: your merge computation was off...

On Fri, Feb 6, 2009 at 2:36 PM, codesite-nore...@google.com wrote:

 -/tr...@c4503 was merged (r4505) into /releases/1.6
 +/tr...@c4603 was merged (r4605) into /releases/1.6


We probably want to say (c4605) to be clear.


  The next merge into trunk will be:
 -svn merge -r4511:4505,4506:
 https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
 +svn merge -r4511:4605,4606:
 https://google-web-toolkit.googlecode.com/svn/releases/1.6 .


If you want you skip c4605, you actually want the ranges
r4511:4604,4605:.  The way it's written, you're actually skipping c4606
rather than c4605.  Joel corrected for this in his merge just now.

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



[gwt-contrib] Re: Announcing GWT 1.6 Milestone 1

2009-02-06 Thread Scott Blum
On Fri, Feb 6, 2009 at 12:30 PM, Matthew Mastracci matt...@mastracci.comwrote:

 2.  The compiler task crashes Java 1.6 on Mac now.  The previous versions
 would run fine with the 64-bit JVM (even though SWT isn't compatible).
  Would it be possible to lazy load SWT so that we can take advantage of the
 faster 1.6 JVM on OSX?

  [java] Invalid memory access of location  rip=01160767


Good point, I can take a look at this.  The compiler should be able to run
without loading SWT.

5.  One cool thing that was missing from the release notes is new the
 ability to specify multiple modules for the compile task.  Based on some
 wallclock testing, specifying multiple modules shaves off ~30 seconds off
 compile time of any modules on top of the first:

 Individual times:

  [java]Compilation succeeded -- 51.814s
  [java]Compilation succeeded -- 170.986s
  [java]Compilation succeeded -- 91.488s

 All together:

  [java]Compilation succeeded -- 55.121s
  [java]   Compilation succeeded -- 141.052s
  [java]  Compilation succeeded -- 55.492s

 Note that each module's log messages are indented one level further,
 indicating the extra speed boost.  ;)


LOL!  I had no idea this actually made any difference in speed, so I guess
it's a bonus easter egg feature. :P

Scott

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



[gwt-contrib] Re: RR : Declassifying RPC / Removing all type names from compilation

2009-02-06 Thread Scott Blum
FYI: this will break some JRE code that depends on inspecting Class names of
array types to do optimized things.

On Fri, Feb 6, 2009 at 1:21 PM, BobV b...@google.com wrote:


 On Thu, Feb 5, 2009 at 12:28 AM, BobV b...@google.com wrote:
 
 http://google-web-toolkit.googlecode.com/svn/changes/bobv/elide_rpc_type_names_r4602
  Future changes:
   - A compiler flag or optional module to neuter Class.getName().

 I've added an -XdisableClassMetadata flag to this branch.

 This disables:
  - Class.getName() - returns Class$hashCode()
  - Class.getSuperclass() - returns null
  - Class.toString() - returns Object.toString()

 You can still use class.getName() as an equality comparison, but not
 for anything that requires semantic meaning; the relationships between
 the strings will be constant throughout the lifetime of the module.

 A.class == A.class != B.class
 A.class.getName() == A.class.getName() != B.class.getName()

 With this flag enabled, class literal setup for non-enum types is a
 simple JS new operation.  It reduces the total amount of code
 generated in a showcase compile by 10% based on find war -name
 '*.cache.html' -o -name '*.cache.js' | xargs wc.

 --
 Bob Vawter
 Google Web Toolkit Team

 


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



[gwt-contrib] Re: [google-web-toolkit commit] r4657 - releases/1.6

2009-02-06 Thread Scott Blum
On Fri, Feb 6, 2009 at 4:19 PM, Freeland Abbott fabb...@google.com wrote:

 Sigh.  Right; everybody else does start to just-before-end, but svn merge
 does just-after-start to end. :-/


Remember, once you have applied c100, you will be at r100. :)

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



[gwt-contrib] Re: code review requested - merge OOPHM hosted.html

2009-02-06 Thread John Tamplin
Updated patch -- I had tested only on my local machine, so I didn't notice
it wasn't picking up gwt.hosted from the URL properly.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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

Index: dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
===
--- dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	(revision 4600)
+++ dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html	(working copy)
@@ -10,31 +10,233 @@
   var moduleName = moduleFunc ? moduleFunc.moduleName : unknown;
   $stats({moduleName:moduleName,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
 }
-/script/head
-body
-font face='arial' size='-1'This html file is for hosted mode support./font
-script!--
-function gwtOnLoad(errFn, modName, modBase){
-  $moduleName = modName;
-  $moduleBase = modBase;
-  if (!external.gwtOnLoad(window, modName, 1.6)) {
-if (errFn) {
-  errFn(modName);
+
+var $hosted = localhost:9997;
+var $legacyHosted = false;
+try {
+  // try/catch perhaps unnecessary, but I recall issues on IE if it isn't
+  // present
+  if (external.gwtOnLoad) {
+$legacyHosted = true;
+  }
+} catch(e) {
+}
+if ($legacyHosted) {
+  function gwtOnLoad(errFn, modName, modBase){
+$moduleName = modName;
+$moduleBase = modBase;
+if (!external.gwtOnLoad(window, modName, 1.6)) {
+  if (errFn) {
+errFn(modName);
+  }
 }
   }
+
+  window.onunload = function() {
+external.gwtOnLoad(window, null, 1.6);
+  };
+} else {
+  // install eval wrapper on FF to avoid EvalError problem
+  if (navigator.userAgent.toLowerCase().indexOf(gecko) != -1) {
+var __eval = window.eval;
+window.eval = function(s) {
+  return __eval(s);
+}
+  }
+
+  // wrapper to call JS methods, which we need both to be able to supply a
+  // different this for method lookup and to get the exception back
+  function __gwt_jsInvoke(thisObj, methodName) {
+try {
+  var args = Array.prototype.slice.call(arguments, 2);
+  return [0, window[methodName].apply(thisObj, args)];
+} catch (e) {
+  return [1, e];
+}
+  }
+
+  var __gwt_javaInvokes = [];
+  function __gwt_makeJavaInvoke(argCount) {
+return __gwt_javaInvokes[argCount] || __gwt_doMakeJavaInvoke(argCount);
+  }
+
+  function __gwt_doMakeJavaInvoke(argCount) {
+// IE6 won't eval() anonymous functions except as r-values
+var argList = ;
+for (var i = 0; i  argCount; i++) {
+  argList += ,p + i;
+}
+var argListNoComma = argList.substring(1);
+
+return eval(
+  __gwt_javaInvokes[ + argCount + ] =\n +
+function(thisObj, dispId + argList + ) {\n +
+  var result = __static(dispId, thisObj + argList + );\n +
+  if (result[0]) {\n +
+throw result[1];\n +
+  } else {\n +
+return result[1];\n +
+  }\n +
+}\n
+); 
+  }
+
+  /*
+   * This is used to create tear-offs of Java methods.  Each function corresponds
+   * to exactly one dispId, and also embeds the argument count.  We get the this
+   * value from the context in which the function is being executed.
+   * Function-object identity is preserved by caching in a sparse array.
+   */
+  var __gwt_tearOffs = [];
+  var __gwt_tearOffGenerators = [];
+  function __gwt_makeTearOff(proxy, dispId, argCount) {
+return __gwt_tearOffs[dispId] || __gwt_doMakeTearOff(dispId, argCount);
+  }
+
+  function __gwt_doMakeTearOff(dispId, argCount) {
+return __gwt_tearOffs[dispId] = 
+(__gwt_tearOffGenerators[argCount] || __gwt_doMakeTearOffGenerator(argCount))(dispId);
+  }
+
+  function __gwt_doMakeTearOffGenerator(argCount) {
+// IE6 won't eval() anonymous functions except as r-values
+var argList = ;
+for (var i = 0; i  argCount; i++) {
+  argList += ,p + i;
+}
+var argListNoComma = argList.substring(1);
+
+return eval(
+  __gwt_tearOffGenerators[ + argCount + ] =\n +
+function(dispId) {\n +
+  return function( + argListNoComma + ) {\n +
+var result = __static(dispId, this + argList + );\n +
+if (result[0]) {\n +
+  throw result[1];\n +
+} else {\n +
+  return result[1];\n +
+}\n +
+  }\n +
+}\n
+); 
+  }
+
+  function __gwt_makeResult(isException, result) {
+return [isException, result];
+  }
+
+  function findPluginObject() {
+try {
+  return document.getElementById('pluginObject');
+} catch (e) {
+  return null;
+}
+  }
+
+  function findPluginEmbed() {
+try {
+  return document.getElementById('pluginEmbed')
+} catch (e) {
+  return null;
+}
+  }
+
+  function findPluginXPCOM() {
+try {
+  return 

[gwt-contrib] [google-web-toolkit commit] r4661 - trunk/dev/oophm/overlay/com/google/gwt/dev

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 13:24:55 2009
New Revision: 4661

Modified:
trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java

Log:
Fix build breakage introduced by 1.6 merge.
Patch by: jgw
Review by: jat (Desk check)


Modified: trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
==
--- trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java(original)
+++ trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.javaFri Feb  6  
13:24:55 2009
@@ -544,14 +544,6 @@
  return Type.INFO;
}

-  /**
-   * Derived classes can override to prevent automatic update checking.
-   */
-  @Override
-  protected boolean doShouldCheckForUpdates() {
-return true;
-  }
-
@Override
protected void doShutDownServer() {
  // Stop the HTTP server.

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



[gwt-contrib] [google-web-toolkit commit] r4664 - in trunk/dev/oophm/overlay/com/google/gwt/dev: . shell

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 14:54:00 2009
New Revision: 4664

Modified:
trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java
trunk/dev/oophm/overlay/com/google/gwt/dev/shell/ShellMainWindow.java

Log:
Fixes OOPHM build breakage.
Patch by: jgw, jat
Review by: jat (Desk check)


Modified: trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java
==
--- trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.java(original)
+++ trunk/dev/oophm/overlay/com/google/gwt/dev/GWTShell.javaFri Feb  6  
14:54:00 2009
@@ -441,6 +441,10 @@
  return false;
}

+  public WebServerRestart hasWebServer() {
+return WebServerRestart.NONE;
+  }
+
/**
 * Launch the arguments as Urls in separate windows.
 */
@@ -491,6 +495,10 @@
  throw new UnableToCompleteException();
}

+  public void restartServer(TreeLogger logger) throws  
UnableToCompleteException {
+// Unimplemented.
+  }
+
@Override
protected void compile(TreeLogger logger) throws  
UnableToCompleteException {
  throw new UnsupportedOperationException();
@@ -612,8 +620,7 @@
  ImageIcon gwtIcon = loadImageIcon(icon24.png);
  frame = new JFrame(GWT Hosted Mode);
  tabs = new JTabbedPane();
-boolean checkForUpdates = doShouldCheckForUpdates();
-mainWnd = new ShellMainWindow(this, checkForUpdates,  
options.getLogLevel());
+mainWnd = new ShellMainWindow(this, options.getLogLevel());
  tabs.addTab(Hosted Mode, gwtIcon, mainWnd, GWT Hosted-mode);
  if (!options.isNoServer()) {
ImageIcon tomcatIcon = loadImageIcon(tomcat24.png);

Modified:  
trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java
==
--- trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java  
 
(original)
+++ trunk/dev/oophm/overlay/com/google/gwt/dev/shell/PlatformSpecific.java  
 
Fri Feb  6 14:54:00 2009
@@ -16,6 +16,16 @@
  package com.google.gwt.dev.shell;

  import java.lang.reflect.Constructor;
+import java.net.URL;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.TreeLogger.HelpInfo;
+import com.google.gwt.dev.shell.CheckForUpdates.UpdateResult;

  /**
   * Performs platform-specific class selection.
@@ -23,31 +33,106 @@
  public class PlatformSpecific {

/**
-   * All of these classes must extend CheckForUpdates.
+   * All of these classes must extend CheckForUpdates. Note that currently  
only
+   * IE has a custom implementation (to handle proxies) and that  
CheckForUpdates
+   * must be the last one in the list.
 */
private static final String[] updaterClassNames = new String[] {
-  // com.google.gwt.dev.shell.ie.CheckForUpdatesIE6,
-  // com.google.gwt.dev.shell.moz.CheckForUpdatesMoz,
-  // com.google.gwt.dev.shell.mac.CheckForUpdatesSaf
-  };
-
-  @SuppressWarnings(unchecked)
-  // Class.forName
-  public static CheckForUpdates createUpdateChecker() {
+  com.google.gwt.dev.shell.ie.CheckForUpdatesIE6,
+  com.google.gwt.dev.shell.CheckForUpdates};
+
+  public static FutureTaskUpdateResult checkForUpdatesInBackgroundThread(
+  final TreeLogger logger, final long minCheckMillis) {
+final String entryPoint = PlatformSpecific.computeEntryPoint();
+FutureTaskUpdateResult task = new FutureTaskUpdateResult(
+new CallableUpdateResult() {
+  public UpdateResult call() throws Exception {
+final CheckForUpdates updateChecker =  
createUpdateChecker(logger,
+entryPoint);
+return updateChecker == null ? null
+: updateChecker.check(minCheckMillis);
+  }
+});
+Thread checkerThread = new Thread(task, GWT Update Checker);
+checkerThread.setDaemon(true);
+checkerThread.start();
+return task;
+  }
+
+  /**
+   * Find the first method named main on the call stack and use its  
class as
+   * the entry point.
+   */
+  public static String computeEntryPoint() {
+Throwable t = new Throwable();
+for (StackTraceElement stackTrace : t.getStackTrace()) {
+  if (stackTrace.getMethodName().equals(main)) {
+// Strip package name from main's class
+String className = stackTrace.getClassName();
+int i = className.lastIndexOf('.');
+if (i = 0) {
+  return className.substring(i + 1);
+}
+return className;
+  }
+}
+return null;
+  }
+
+  public static CheckForUpdates createUpdateChecker(TreeLogger logger) {
+return createUpdateChecker(logger, computeEntryPoint());
+  }
+
+  public static 

[gwt-contrib] [google-web-toolkit commit] r4662 - in trunk: dev/core/src/com/google/gwt/dev/shell user

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 13:29:31 2009
New Revision: 4662

Modified:
trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
trunk/user/build.xml

Log:
Merging releases/1.6 into trunk.
svn merge -r4657:4658  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .


Modified:  
trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
==
--- trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java   
 
(original)
+++ trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java   
 
Fri Feb  6 13:29:31 2009
@@ -390,10 +390,10 @@

/**
 * Checks if the class names is generated. Accepts any classes whose  
names
-   * match .+$\d.* (handling named classes within anonymous classes and
-   * multiple named classes of the same name in a class, but in different
-   * methods). Checks if the class or any of its enclosing classes are  
anonymous
-   * or synthetic.
+   * match .+$\d.* (handling named classes within anonymous classes and  
multiple
+   * named classes of the same name in a class, but in different methods).
+   * Checks if the class or any of its enclosing classes are anonymous or
+   * synthetic.
 * p
 * If new compilers have different conventions for anonymous and  
synthetic
 * classes, this code needs to be updated.
@@ -754,9 +754,9 @@
 */
ListJsniMethod jsniMethods = (unit == null) ? null
: unit.getJsniMethods();
-  if (unit != null  !unit.isSuperSource()   
unit.hasAnonymousClasses()
-   jsniMethods != null  jsniMethods.size()  0
-   !unit.createdClassMapping()) {
+  if (unit != null  !unit.isSuperSource()  !unit.isGenerated()
+   unit.hasAnonymousClasses()  jsniMethods != null
+   jsniMethods.size()  0  !unit.createdClassMapping()) {
  if (!unit.constructAnonymousClassMappings(logger)) {
logger.log(TreeLogger.ERROR,
Our heuristic for mapping anonymous classes between  
compilers 

Modified: trunk/user/build.xml
==
--- trunk/user/build.xml(original)
+++ trunk/user/build.xmlFri Feb  6 13:29:31 2009
@@ -2,6 +2,7 @@
property name=gwt.root location=.. /
property name=project.tail value=user /
property name=test.args value= /
+  property name=gwt.junit.emmatestcase.includes  
value=**/*Suite.class,com/google/gwt/dev/jjs/test/*Test.class/
import file=${gwt.root}/common.ant.xml /

!--
@@ -14,7 +15,7 @@
 includes=**/EmmaClassLoadingTest.class /

fileset id=default.hosted.emma.tests dir=${javac.junit.out}
-  excludes=**/CoverageTest.class includes=**/*Test.class /
+  excludes=**/CoverageTest.class,**/CompilerSuite.class  
includes=${gwt.junit.emmatestcase.includes} /
!-- everything succeeds except CoverageTest.java. It fails due to a  
javac bug in sun/OpenJDK's Java. See the file contents for details --

!--

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



[gwt-contrib] [google-web-toolkit commit] r4660 - releases/1.6

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 13:07:25 2009
New Revision: 4660

Modified:
releases/1.6/branch-info.txt

Log:
Merging releases/1.6 into trunk.


Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtFri Feb  6 13:07:25 2009
@@ -28,6 +28,7 @@
  /releases/1.6/@c4498 was merged (r4499) into trunk
  /releases/1.6/@r4490:4497,4498:4511 was merged (r4512) into trunk,  
skipping c4498 (cherry picked above)
  /tr...@c4603 was merged (r4605) into /releases/1.6
+/releases/1.6/@r4511:4604,4605:4657 was merged (r4659) into trunk,  
skipping c4605 (cherry picked above)

  The next merge into trunk will be:
-svn merge -r4511:4605,4606:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4657:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

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



[gwt-contrib] [google-web-toolkit commit] r4663 - releases/1.6

2009-02-06 Thread codesite-noreply

Author: j...@google.com
Date: Fri Feb  6 13:29:55 2009
New Revision: 4663

Modified:
releases/1.6/branch-info.txt

Log:
Merging releases/1.6 into trunk.


Modified: releases/1.6/branch-info.txt
==
--- releases/1.6/branch-info.txt(original)
+++ releases/1.6/branch-info.txtFri Feb  6 13:29:55 2009
@@ -29,6 +29,7 @@
  /releases/1.6/@r4490:4497,4498:4511 was merged (r4512) into trunk,  
skipping c4498 (cherry picked above)
  /tr...@c4603 was merged (r4605) into /releases/1.6
  /releases/1.6/@r4511:4604,4605:4657 was merged (r4659) into trunk,  
skipping c4605 (cherry picked above)
+/releases/1.6/@r4657:4658 was merged (r4662) into trunk

  The next merge into trunk will be:
-svn merge -r4657:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .
+svn merge -r4658:  
https://google-web-toolkit.googlecode.com/svn/releases/1.6 .

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



  1   2   >