Re: Login Application

2009-07-22 Thread Paulo Coutinho

I use google api to login in my appengine,

http://brfotolog.appspot.com

2009/7/22 sin kang jlc...@gmail.com:
 you can use google account in appengine.

 it's like as long as you have google account you are valid.

 which means google takes care of all those authentication. you just have to
 call the service and hand over the google id and password.

 it's quite simple. this link might helps.

 http://code.google.com/appengine/docs/java/users/overview.html


 Sin-Kang(강신)
 +82-10-6638-7878
 +44-78555-49312


 On Wed, Jul 22, 2009 at 1:39 AM, saurabh saurabhsn...@gmail.com wrote:

 Hello ,

          I am developing Login Application using GWT. My Interface is
 ready but I am thinking about where should values go. How can I check
 the UserName  Password sent by Client or I should use RPC for that.

 if this is so then what role my servlet should play.


 Thanks




 




-- 
Atenciosamente,
Paulo Coutinho.
Blog: www.prsolucoes.com/blog
Site: www.prsolucoes.com
Msn:  pa...@prsolucoes.com

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



Re: Handling Multiple Click Events

2009-07-22 Thread stymie

Thanks I used the third option and it worked fine.

On Jul 21, 6:04 pm, Neha Chachra neha.chac...@gmail.com wrote:
 Oh, sure. Here's one that should work:
               import relevant classes like Button, clickhandler, Window

                 Button[] myButtons = new Button[2];
 myButtons[0] = new Button(clickMeButton);
 myButtons[1] = new Button(clickMe2);

 for(int i=0;i2;i++){
         myButtons[i].addClickHandler(new ClickHandler(){
                 Button sourceButton;

                           @Override
                   public void onClick(ClickEvent event) {
                 sourceButton = (Button)event.getSource();
                  if(sourceButton.getText().equals(clickMeButton))  {
              Window.alert(works);
                  }
                  if(sourceButton.getText().equals(clickMe2)){
                         Window.alert(works2);
                   }
   }

 });

 If you don't want an additional sourceButton, you can also do:
 ((Button)event.getSource()).getText().equals(clickMeButton); though as the
 size of your array increases you'll end up making a lot of unnecessary calls
 to getSource( ) that way.

 Another approach would be to simply implement the ClickHandler in a separate
 class, say if you have a lot of buttons and a long if/else branching. You
 could do:

 public class MyClickHandler implements ClickHander {
         Button sourceButton;

         @Override
           public void onClick(ClickEvent event) {
               sourceButton = (Button)event.getSource();
                  if(sourceButton.getText().equals(clickMeButton))  {
                 Window.alert(works);
                  }
                  if(sourceButton.getText().equals(clickMe2)){
                        Window.alert(works2);
                   }
   }

 }

 MyClickHandler myHandler = new MyClickHandler();
 myButtons[i].addClickHandler(myHandler); // for both your buttons

 To be honest, I haven't done much work with ClickHandlers yet, so there
 might be a better approach to handle such scenarios. In particular, I would
 check if assigning and using DOM ids for the widgets is an option. I am sure
 it must be, I just haven't gotten around to that. :)

 Either way, I hope this helps.

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



Re: GWT 1.7.0 - gwt-dnd 2.6.5 (Drag-and-drop) / gwt-log 2.6.2 (Logging) / gwt-voices 1.6.0 (Sound)

2009-07-22 Thread David

Fred,

Ik woon in Belgie, in het Vlaamse landsgedeelte. Dus inderdaad, mijn
moedertaal is Nederlands.

David

On Tue, Jul 21, 2009 at 6:49 PM, Fred Sauerf...@allen-sauer.com wrote:
 I'm fluent in Dutch actually. I have family in the Netherlands and spent
 about 13 years there.
 Kun jij ook Nederlands spreken?
 Groeten
 Fred
 On Tue, Jul 21, 2009 at 6:19 AM, David david.no...@gmail.com wrote:

 Fred,

 Do you speak Dutch or is it Google translate doing its job ?

 David

 On Tue, Jul 21, 2009 at 1:14 AM, Fred Sauerfre...@google.com wrote:
  Thomas,
  That's pretty cool. Ook leuk om iets in 't Nederlands te zien.
  Have you listed your game in the App Gallery yet?
   http://gwtgallery.appspot.com/
  Thanks for the suggestion for a global function to stop playing sounds.
  That
  seems pretty useful. Would you mind proposing it here?
    http://code.google.com/p/gwt-voices/issues/list
  Thanks
  Fred
 
  On Sat, Jul 18, 2009 at 5:10 AM, twdarkflame darkfl...@gmail.com
  wrote:
 
  Id use these libuarys a lot in a online adventure game engine under
  development (beta version here;
  http://www.cuyperscode.nl/CuypersCode2_betatest/CCIIstart.html
  (an educational game being developed with it, but the engine will be
  used for a lot more).
 
  You can see DnD used for the inventory and sound used all over the
  place.
  These libs are fantastic and have been much help.
  I'll be updateing to 1.7 now :)
 
  As for specific features, theres nothing really else I need.
  I guess a global stop/disable for sounds might be usefull though.
 
  -Thomas Wrobel
 
 
  On Jul 16, 4:08 am, Fred Sauer fre...@google.com wrote:
   Hi
   With GWT 1.7.0 out the door I thought it would be a good time to
   provide
   an
   update for gwt-dnd, gwt-log and gwt-voices. GWT 1.7 adds a new user
   agent
   deferred binding property value 'ie8' which is a breaking change for
   any
   project using user agent based deferred binding. To accommodate the
   new
   value all three libraries have a new version available for download.
   Links
   and additional details for the three projects can be found below.
  
   Before I talk about what's new for each of these projects though I'd
   like to
   take a moment to reach out and thank everyone who reported a bug,
   submitted
   a feature request or contributed a patch. It's really amazing how the
   efforts of individuals can be compounded for the benefit of all the
   developers in the community using these libraries and ultimately all
   the
   users of their apps. Thank you!
  
   While I have your attention, I'd like to express my interest in
   hearing
   more
   about how you are using these libraries in your web applications,
   what
   features you appreciate the most and which ones you think could use
   some
   improvement. In particular, I'm interested in how you might be using
   these
   libraries in team settings or in more complex development scenarios.
   It
   could be that you or one of your colleagues has built a library or
   higher
   level API on top of one of gwt-dnd, gwt-log or gwt-voices. Or that
   you
   collaborate with a group of developers on an enterprise application
   which
   has specific needs and requirements which aren't typically found in
   smaller
   application. Please send me an email. I'd very much like to hear what
   you're
   working on. I'm also interested in hearing about the apps you didn't
   build
   or couldn't convince your co-workers to build. Perhaps you're an avid
   GWT
   developer at nights and on the weekends, but you can't convince the
   rest
   of
   your team at work to take GWT for dry run.
  
   On to release notes:
  
   In each case, be sure to check the Compatibility Matrix (see links
   below) so
   that you're using the correct one wirth your version of GWT.
  
   *gwt-dnd-2.6.5.jar* - Drag-and-drop in the web browser
  
   A notable recent change is the now automatic scrolling into view
   during
   dragging. This should make dragging in the context of scrollbars a
   lot
   easier for your users. More exciting features can be found in trunk.
  
      - Demo site -
  
  
    http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/Drag...
      - Main project page -http://code.google.com/p/gwt-dnd/
      - Release notes
   -http://code.google.com/p/gwt-dnd/wiki/ReleaseNotes
      - Getting Started Guide -
      http://code.google.com/p/gwt-dnd/wiki/GettingStarted(includes
      compatibility matrix)
      - Downloads -http://code.google.com/p/gwt-dnd/downloads/list
      - Building from trunk -
      http://code.google.com/p/gwt-dnd/wiki/UsingSourceWithEclipse
  
   *gwt-log-2.6.2.jar* - Client side logging with a very large number of
   features
  
   Recent changes include a fix for those of you trying to use gwt-log
   inside
   of GWTTestCase. More exciting features can be found in trunk.
  
      - Demo site -
  
  
    http://allen-sauer.com/com.allen_sauer.gwt.log.demo.LogDemo/LogDemo.html
      - Main 

Re: Command Pattern, MVP, EventBus

2009-07-22 Thread Kwhit

A short update on the original posting.

I've now implemented the pattern I suggested in the original post in a
reference application and it's running.

My goals for doing the work were to address two issues:

1/ My GWT/GAE productivity: after a short learning curve it had sped
up but it slowed right down again

2/ I found it easier not to write unit tests (a dangerous state of
affairs) - they made the project messy, infiltrated the code, were
difficult to write and slow to run


The current implementation:

* Adds a generic RPC mechanism (the pipe)

* Doesn't use the command pattern. Instead everything is an event.
Selected events from the event bus are sent over the pipe and
responses are fired back. This makes the pipe invisible - no more
coding service interfaces

* I've added a layer (Stratus) on top of Bigtable-JDO inspired by
Grails create, find, update, delete

* Added a NullPipe and mock implementation of Stratus - I can now run
end-to-end testing: presenters to database - i.e. everything but the
composite itself without deploying to GAE. 7 unit test files run in
around 0.5 seconds and developing is fun again!


Findings so far

* Ray's presentation was really helpful

* Commands as events (aka asychronicity on steroids!): I'm kinda OK
with this. I'm aware of David's posting above so I'm not 100% sure
although still positive about my implementation. You do loose the
procedural feel of the service call and AsyncCallback return although
it is really asynchronous. I expected it to be difficult to test but
it's not. I need more experience with it

* I moved the definition of the Viewer (RR's Display interface) to the
Presentation interface. Sorry Ray, it was in the wrong place

* I dropped the idea of using HasClickHanders, HasValues, ... in favor
of methods like getPassword(), and addSignInClickHandler() in the
Viewer interface. I think it's a very elegant idea but it doesn't sit
well with EasyMock and I prefer tested code to elegant code and don't
think I loose much

* MVP is great, really easy to test and so, to develop

I still need to figure out a position on places / history (see posts
above). My real application makes heavy use of History and I like it a
lot. But I still don't have a comfortable pattern that joins the
viewers and history together yet.

--~--~-~--~~~---~--~~
You received 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: Image Bundle not working in IE

2009-07-22 Thread Thomas Broyer



On 22 juil, 00:47, Sean slough...@gmail.com wrote:
 Yeah, that'd be great. I don't mean to link whore 
 but:http://www.celticlock.com/

 All the images on the left show up in FireFox and Chrome, but not in
 IE. Nor do the +',s and -'s of the tree under GWT Playground, Gallery
 or NFL. If anyone has any insight that'd be great. Thanks again for
 all your help!

Looking at it through Fiddler2 [1] with Chrome 3 (dev) and IE8 shows
that the server sends the images to Chrome but returns a 403
Forbidden response to IE (saying that 193.251.30.44 is forbidden
from viewing this website!).

Now, check with your hosting provider to understand why... (is IE
redirected through an internal proxy?)
--~--~-~--~~~---~--~~
You received 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: Eclipse plugin for Eclipse 3.5 (Galileo)

2009-07-22 Thread Nik

We're now heading towards months, not weeks.
Any progress?


On Jun 25, 10:17 pm, Alex Rudnick a...@google.com wrote:
 If you enjoyed this thread, you may also like 
 these:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

 We're working on it *right now*, rest assured!

 On Thu, Jun 25, 2009 at 4:31 PM, Rob Tannercaspersg...@gmail.com wrote:
  When will a version of the plugin be released for Eclipse 3.5 (or can
  I simply use the version for 3.4).  I would like to use the new
  Eclipse, but GWT has become one of my main tools.

  Thanks,
  Rob

 --
 Alex Rudnick
 swe, gwt, atl

--~--~-~--~~~---~--~~
You received 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: Command Pattern, MVP, EventBus

2009-07-22 Thread Thomas Broyer



On 22 juil, 04:07, Jason A. Beranek jason.bera...@gmail.com wrote:
 I've been looking at the place service as well, but while I don't
 agree with exactly the structure in David Peterson's example, I'm not
 sure if the place service should fire an IssueEditEvent that drives
 some UI change. From the Ray Ryan presentation, my impression is the
 Place Service functions as an abstraction between client code/widgets
 and the History API allowing client code to decouple from the
 specifics of parsing and generating history tokens. The Place Service
 in that model is the sole handler of History events, and possibly one
 of the limited set of interfaces that programmatically set History
 (though you could use HyperLink widgets as the only means to control
 the token, however this complicates the creation of tokens).

Yeah, right, Ray talks about place change events and components that
could listen to those to be informed when they're in use or not and
unregister/re-register their other handlers on the event bus (it's
around 46:20 in the video).
He doesn't talk about how to communicate with the place service to
update the history token though. I'd say that either components have a
dependency on the place service and call its methods directly (and the
place service updates the history and fires a place change event to
notify other components), or they themselves fire place change events
and the place service listens to them.
But those place change events are not that different from the events
I described earlier (picked contact (the one with ID=12345))

 As for the structure of the Place object, one approach is to use a
 simple key/value pair for the location, for example:

 #key
 #key/value

 This seems to be the same approach used in the current Gmail,

Actually, in Gmail, it can also be label/My+Label/message-id, but
it's still simply splittable on slashes to extract sub-parts.

 and
 seems like a good approach for some navigation schemes. Personally,
 I'd avoid more complex representation of Places, as it complicates
 parsing and Place change processing. However, your mileage may vary.

The Google Documentation Reader http://code.google.com/docreader
used to use XPointer-like tokens such as p(project1,project2)s
(project1)t(topic) and now uses query-string-like tokens such as
p=project1,project2s=project1t=topic. They're IMO as easy to parse
as path-like tokens like Gmail uses; it's just a matter of taste
(and how you'd like to model your internal API)
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



(i18n) Retrieving language from Language code

2009-07-22 Thread Neha Chachra
Hello,

Quick question: I want to get the English name of a language using its
language code. Something like,

i18n.getLocalizedLanguageName(de, en) where I expect to get German.

How can I do this in GWT? Unfortunately, I couldn't find an earlier
discussion on this.

Thanks a lot!

-neha
nay-ha

--~--~-~--~~~---~--~~
You received 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: ImageBundle question

2009-07-22 Thread David

Hi Parag,

An com.google.gwt.user.client.ui.ImageBundle would be the best
solution for your problem - as your own title suggests.
The GWT docs contain a good explanation on how to use them

David


On Wed, Jul 22, 2009 at 4:47 AM,
myapplicationquestionsparag.bhag...@cgi.com wrote:

 Hi All,

 I am creating an Org tree which will consist of @500 nodes, for each
 node i want to show an image as well. What is the best way to get all
 these images loaded? I was thinking of adding an http request in the
 src tag of the image but wanted tio know if GWT provides anyway so
 that i can combine all the images as 1 send it to the orgtree and have
 GWT parse teh image to show individual thumbnails?

 any help is appreciated.

 Thanks,
 Parag
 


--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



where jetty home on HostedMode?

2009-07-22 Thread vetal

Hello!
Can any one told where locate Jetty home directory during running in
HostedMode?

Thanks,
vetal
--~--~-~--~~~---~--~~
You received 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: Determining a specific cell in a FlexTable

2009-07-22 Thread David

Your question is not 100% clear to me... but I will answer the
question as I understood it :-)

If you want to know what the coordinates are for a Widget in a table
then you will need to use the DOM API to find the TD and TR and
determine the index of these. There is no API available that gives you
the information, unless if you need the info when an event occurs
inside the table. In that case your can use the getCellForEvent method
(maybe you could use an onFocus/onBlur to lookup the coordinates ?).

I guess you are already using the DOM API, as I do, since you feel
like your are a bit hacking. I think it would make sense to request a
method getCell( Widget widget ) as a public API method since we are
now forced to look at the internals of the table widget - what if it
ever gets implemented differently ? Chances are low, but that just
means that it might just happen faster than you think according to
Muphy's law.

David

On Tue, Jul 21, 2009 at 2:10 PM, Lucasiluizluc...@gmail.com wrote:


 Yes Jeff...
 You can do it adding a clickHandler on the table and map the click
 event

  table.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                final HTMLTable table = (HTMLTable) event.getSource();
                final HTMLTable.Cell cell = table.getCellForEvent
 (event);
                //cell.getCellIndex()   COL
                //cell.getRowIndex()   ROW


 Regards

 Luiz Lucasi

 


--~--~-~--~~~---~--~~
You received 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: InfoWindowContent JavaScript Browsers

2009-07-22 Thread Eric Ayers

I'm sorry to hear you're still having trouble.  I can give you some
general tips.  If you are unable to debug in hosted mode, you might
try using a javascript debugger like Firebug or IE8's developer tools.
When you compile, add the option -style PRETTY to the build and the
javascript output will be (somewhat) human readable.

I just checked biooffice.at in ff3, chrome, ie8 and ie8 compatibility
mode (ie7) and I saw that things worked in FF, but not the others.
The code not being executed is custom javascript, that looks like its
being generated on the fly and injected. Maybe it has to do with the
way your script is being injected?

The whole point of GWT is to reduce the pain of trying to write
JavaScript  - 1) take care of cross platform issues, 2) provide tools
such as hosted mode that make it easier to debug, so I'm going to
suggest that you refactor that code (in Java) so that GWT will handle
the browser dependent baloney.   For example, try using JSNI to wrap
just the function 'topoGetAltitude()', and write all the rest of that
code I see in the maps.log window in GWT.
 - the image tag becomes an 'Image' object
 - Change the altitude div to a label object (or DivElement)
 - The hard part will be wrapping the closure that gets passed to
topoGetAltitude().  There are sample ways to do this of this in the
GWT developer guide.
Then, you can write a dummy function called 'topoGetAltitude()' in
java script to mock the way the real function works.  The mock would
just asynchronously returns a number after a few seconds and test in
an isolated project using hosted mode to iron out this issue.  You
could modify the mock to test your timeout logic too.

If you want some more help writing your app in GWT and getting tips
for debugging strategies, I suggest postng to the Google-Web-Toolkit
group along with short snippets of code you want help with.

If you think you've found a bug in the bindings, please file an issue
(http://code.google.com/p/gwt-google-apis) with a small case that
reproduces the problem that includes a description of the problem,
Java source code and any errors you get from hosted mode or web mode.
Often, the first step is to re-write the case in JavaScript to make
sure the problem is related to the bindings and not the Maps API in
general.

-Eric.
On Wed, Jul 22, 2009 at 1:43 AM, lumolumo2...@gmail.com wrote:
 comilation log is ok (although i still does not know how to change the
 compiler...):

 WARNING: 'com.google.gwt.dev.GWTCompiler' is deprecated and will be removed
 in a future release.
 Use 'com.google.gwt.dev.Compiler' instead.
 (To disable this warning, pass -Dgwt.nowarn.legacy.tools as a JVM arg.)
 Compiling module at.biooffice.gwt.maps.biomap.BioMapModule
    Compiling 6 permutations
   Permutation compile succeeded
    Linking into D:\GOOGLE\workspace\BioMap\build\gwtOutput
   Link succeeded
    Compilation succeeded -- 19,168s

 i did not run it in hosted mode (only in browser, as some of my js run only
 if they are hosted on our webserver(registered service from another webpage)
 )

 you are right i get a nullpointer while creating a marker with point=null

 good and bad news...
 the js-error in ie is gone now, but the js still does not get executed.

 tell me what you need to help find out what it is...
 here is the compiled map:
 http://www.biooffice.at/biomap/test/biomapmodule.html
 when you click on a marker (which YOU created) it starts loading the
 altitude of that point from topocoding and is supposed to update it in the
 infowindow. (while its loading it should show you a loading image - this
 image is put there if altitude==0, the content of the infowindow will be
 logged to maps.log)

 




-- 
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: Generators don't work good with refresh button

2009-07-22 Thread Alen Vrecko

Thanks. Good idea. I could have learned by now that there is usually
user and dev lists... Will repost there.

Cheers
Alen

On Jul 21, 4:11 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 21 juil, 14:30, Alen Vrečko alen_vre...@yahoo.com wrote:



  Hi.

  The generators are without a doubt a remarkable feature of gwt. But if
  you use any reflection on the client classes in the generator you lose
  refresh button support. Furthermore while not that major I do find it
  annoying that refreshing doesn't recompile the generator code. You
  have to stop the hosted mode and start again.

  It all boils down to the fact that client code is loaded in
  ComplingClassLoader and the Generator is loaded in a different
  ClassLoader than that.

  Reflection is not that nice. But sometimes one has perfectly
  legitimate use cases to use reflection. A good example is Google-Gin.
 [...]
  What do you guys think?

 ...that you should have used (or at least cc'd) the GWT-C group ;-)

 http://groups.google.fr/group/Google-Web-Toolkit-Contributors
--~--~-~--~~~---~--~~
You received 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: integrate GWT into existing project

2009-07-22 Thread Tobe

Maybe it seemed to easy for me but I think it's all I need :)

On Jul 1, 1:48 pm, Ian Bambury ianbamb...@gmail.com wrote:
 I can't advise on the plugin as I don't use it, but the way I do GWT/PHP
 development is to set up a lightweight web server (I use Abyss) and point
 the document root at the project's war directory (using different ports you
 can run as many of these setups as you want)
 Then you can run the GWT app from Eclipse with the noserver option and it
 all just works.

 Ian

 http://examples.roughian.com

 2009/7/1 Tobe tobias.jungnic...@googlemail.com





  One other questions refering to the GWT plugin for Eclipse. How can I
  integrate GWT into my existing PHP project (PDT) so that I can run it
  together with GWT like a normal GWT project - e.g. clicking Run to
  start the shell and the page in hosted mode?

  On Jun 27, 11:14 pm, Ian Bambury ianbamb...@gmail.com wrote:
   This isn't *really* what GWT is designed for. Ideally, you have a single
   page and 'ajax-in' everything you need later as and when and if you need
  it.
   You *could* use one GWT project to enhance a number of PHP pages by
  getting
   it to add widgets via an id, or by wrapping existing elements (also via
  an
   id).

   If you GWT app just had a whole load of 'if this id exists do
  such-and-such'
   lines, then you could use the same GWT app to enhance a number of pages
  and
   the app would only have to be downloaded once.

   Alternatively, you could write an app for each page. It depends on what
  your
   curremt PHP setup does, and what you want GWT to do for it.

   Ian

  http://examples.roughian.com

   2009/6/27 Tobe tobias.jungnic...@googlemail.com

Hello,
I have an existing project based on PHP and want to use GWT permit
some JavaScript actions on the page. Is there a documentation how to
integrate GWT, e.g. which files I have to copy and how I can change
the GWT file and directory schema to my personal one of the existing
project?
--~--~-~--~~~---~--~~
You received 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: InfoWindowContent JavaScript Browsers

2009-07-22 Thread lumo
ok, so i try to convert the custom html and js code to gwt code...

note: i already got a way to get the data from topoGetAltitude() instead
from js via a request like a form submit (php-java communication is
already implemented!)
i am courious if this will work in combination with gwt...

ill try and let you know

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Pre-Compress GWT compiler output for web server

2009-07-22 Thread martinhansen

Hello,

I am evaluating some approaches to reduce the amount of data being
transmitted to the client browser. I am using the Apache Tomcat web
server. I successfully managed to enable GZIP output for the Tomcat
server by editing the server config file. It works fine. However, this
way the data is compressed on-the-fly by the web server for every
request which considerably increases server CPU load. Is this
assumption correct?

Is there a way to pre-compress the contents of my GWT app and have
this pre-compressed content delivered by the web server?
--~--~-~--~~~---~--~~
You received 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 using Google Visualization with DockPanel

2009-07-22 Thread Rick

Hi all

I am using GWT 1.6 and Google Visualizations to show graph in my
application. I have to show multiple graphs to user. For this, I am
adding my visualization graphs in a DockPanel with direction. Now If I
add graphs before attaching DockPanel, all graphs are rendered
properly in all browsers. But I have to do my work after attaching
DockPanel. In this case, in Mozilla and Chrome, only last graph added
in dockpanel get rendered where as in IE, all graphs are rendered
properly. Kindly note that this problem occurs only when I am adding
Graphs in DockPanel. In other containers like VerticalPanel 
HorizontalPanel, I can add Graphs after attaching container, it works
well.

Below is a sample code to produce this case. Any help/suggestion will
be highly appriciated.

Code:


package com.example.simpleviz.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.VisualizationUtils;
import
com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
import com.google.gwt.visualization.client.visualizations.BarChart;
import com.google.gwt.visualization.client.visualizations.PieChart;
import
com.google.gwt.visualization.client.visualizations.PieChart.Options;

public class MyClass implements EntryPoint {

public void onModuleLoad() {

VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
Widget bar = createBarChart();
Widget pie = createPieChart();
DockPanel d = new DockPanel();
RootPanel.get().add(d);
d.add(bar, DockPanel.NORTH);
d.add(pie, DockPanel.NORTH);
}

}, new String[] { BarChart.PACKAGE, PieChart.PACKAGE});

}

private Widget createPieChart() {
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, Task);
data.addColumn(ColumnType.NUMBER, Hours per Day);
data.addRows(1);
data.setValue(0, 0, Work);
data.setValue(0, 1, 10);

Options options = Options.create();
options.setWidth(200);
options.setHeight(100);
options.set3D(true);
options.setTitle(My Daily Activities);

PieChart pie = new PieChart(data, options);
return pie;
}

public Widget createBarChart() {
DataTable data = DataTable.create();
data.addColumn(ColumnType.STRING, Year);
data.addColumn(ColumnType.NUMBER, Sales);
data.addColumn(ColumnType.NUMBER, Expenses);
data.addRows(4);
data.setValue(0, 0, 2004);
data.setValue(0, 1, 1000);
data.setValue(0, 2, 400);

BarChart.Options options = BarChart.Options.create();
options.setWidth(200);
options.setHeight(100);
options.set3D(true);
options.setTitle(My Daily Activities);

BarChart barchart = new BarChart(data, options);
return barchart;
}

}

Thanks and regards

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
-~--~~~~--~~--~--~---



Project setup that allows working with both hosted mode and web mode side by side?

2009-07-22 Thread rintcius

Hi,
I am looking for a project setup that allows me to work easily with
both hosted mode and web mode (including RPC).
I am getting the exception below, whenever I start up hosted mode
after I have started it in web mode (i.e. war/myModule directory
contains the compiled code for web mode). If I am starting hosted mode
on a clean war/myModule directory then it works ok.

To workaround it I thought to add a specific module for hosted mode
like this:
module rename-to='myModuleHosted'
  inherits name='my.company.gwt.MyModule'/
  set-property name=user.agent value=gecko /
  set-property name=locale value=default /
/module
And then start up this from the shell (with args: -startupUrl
MyModuleHosted.html
my.company.gwt.MyModuleHosted). This works well as long as I dont do
any RPC calls.

RPC calls however fail since they try to address myModuleHosted/
myServicePath whereas the service is still available under myModule/
myServicePath.

Any ideas to get the service available as myModuleHosted/myServicePath
instead?
Or any other ideas for a setup?

Thanks, Rintcius


[ERROR] Error while executing the JavaScript provider for property
'user.agent'
java.lang.RuntimeException: Failed to invoke native method:
__gwt_getProperty with 1 arguments.
at com.google.gwt.dev.shell.moz.LowLevelMoz.invoke(LowLevelMoz.java:
134)
at com.google.gwt.dev.shell.moz.ModuleSpaceMoz.doInvoke
(ModuleSpaceMoz.java:99)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
453)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
(ModuleSpace.java:231)
at
com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue
(ModuleSpacePropertyOracle.java:108)
at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getPropertyValue
(ModuleSpacePropertyOracle.java:65)
at com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval
(ConditionWhenPropertyIs.java:48)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:37)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:35)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind
(StandardRebindOracle.java:103)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind
(StandardRebindOracle.java:62)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind
(StandardRebindOracle.java:172)
at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind
(ShellModuleSpaceHost.java:114)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:474)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate
(ModuleSpace.java:365)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
39)
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.google.gwt.user.client.DOM.clinit(DOM.java:35)
at com.google.gwt.user.client.ui.SimplePanel.init(SimplePanel.java:
35)

--~--~-~--~~~---~--~~
You received 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: Project setup that allows working with both hosted mode and web mode side by side?

2009-07-22 Thread JonJ27

Hi Rintcius

What IDE are you using and what is your J2EE contianer?

I managed to use the -noserver -startupURL options...
This allowed me to get my back end (services) debuggable on my servlet
container (in this case websphere, which had already been started) and
the front end in hosted mode.

RPC works fine in this set up.

Jonathan

On 22 July, 13:50, rintcius rintc...@gmail.com wrote:
 Hi,
 I am looking for a project setup that allows me to work easily with
 both hosted mode and web mode (including RPC).
 I am getting the exception below, whenever I start up hosted mode
 after I have started it in web mode (i.e. war/myModule directory
 contains the compiled code for web mode). If I am starting hosted mode
 on a clean war/myModule directory then it works ok.

 To workaround it I thought to add a specific module for hosted mode
 like this:
 module rename-to='myModuleHosted'
   inherits name='my.company.gwt.MyModule'/
   set-property name=user.agent value=gecko /
   set-property name=locale value=default /
 /module
 And then start up this from the shell (with args: -startupUrl
 MyModuleHosted.html
 my.company.gwt.MyModuleHosted). This works well as long as I dont do
 any RPC calls.

 RPC calls however fail since they try to address myModuleHosted/
 myServicePath whereas the service is still available under myModule/
 myServicePath.

 Any ideas to get the service available as myModuleHosted/myServicePath
 instead?
 Or any other ideas for a setup?

 Thanks, Rintcius

 [ERROR] Error while executing the JavaScript provider for property
 'user.agent'
 java.lang.RuntimeException: Failed to invoke native method:
 __gwt_getProperty with 1 arguments.
         at com.google.gwt.dev.shell.moz.LowLevelMoz.invoke(LowLevelMoz.java:
 134)
         at com.google.gwt.dev.shell.moz.ModuleSpaceMoz.doInvoke
 (ModuleSpaceMoz.java:99)
         at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
 453)
         at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
 (ModuleSpace.java:231)
         at
 com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue
 (ModuleSpacePropertyOracle.java:108)
         at com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getPropertyValue
 (ModuleSpacePropertyOracle.java:65)
         at com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval
 (ConditionWhenPropertyIs.java:48)
         at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
         at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:37)
         at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
         at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:35)
         at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind
 (StandardRebindOracle.java:103)
         at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind
 (StandardRebindOracle.java:62)
         at com.google.gwt.dev.shell.StandardRebindOracle.rebind
 (StandardRebindOracle.java:172)
         at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind
 (ShellModuleSpaceHost.java:114)
         at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:474)
         at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate
 (ModuleSpace.java:365)
         at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
 39)
         at com.google.gwt.core.client.GWT.create(GWT.java:91)
         at com.google.gwt.user.client.DOM.clinit(DOM.java:35)
         at com.google.gwt.user.client.ui.SimplePanel.init(SimplePanel.java:
 35)
--~--~-~--~~~---~--~~
You received 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: Pre-Compress GWT compiler output for web server

2009-07-22 Thread martinhansen

I've found an interesting tool for Java EE applications and Tomcat
server:

:-) http://www.xucia.com/#Resource%20Accelerate :-)

ResourceAccelerate... it can cache the gzip output of tomcat and
thereby reduces the need to re-compress files for every request.
Great!

What do you think of it?

On 22 Jul., 13:06, martinhansen martin.hanse...@googlemail.com
wrote:
 Hello,

 I am evaluating some approaches to reduce the amount of data being
 transmitted to the client browser. I am using the Apache Tomcat web
 server. I successfully managed to enable GZIP output for the Tomcat
 server by editing the server config file. It works fine. However, this
 way the data is compressed on-the-fly by the web server for every
 request which considerably increases server CPU load. Is this
 assumption correct?

 Is there a way to pre-compress the contents of my GWT app and have
 this pre-compressed content delivered by the web server?
--~--~-~--~~~---~--~~
You received 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: ClassCastException only in Chrome and OBF mode

2009-07-22 Thread mars1412

ok - I think now I tracked it down

first it turned out, that the ClassCastException occured only when I
read a special Enum-Value from the database. which was strange,
because it was an enum with 6 values: 5 worked, one had the
ClassCastException

when looking closer at the enum I noticed, that it uses the generated
GWT-i18n Text-Interface to return a language dependant value  I think
that lead me to the solution:
the problem was, that your build-system used GWT 1.5.0 to generate the
Text-Interfaces but later 1.5.2 to compile the application: I guess
that was the problem

Now I upgraded to GWT 1.5.3: I use GWT1.5.3 to generate the Text-
Interfaces and also 1.5.3 to compile the application  now it works

just for reference:
 * It also worked before in Safari 3.2.2

On Jul 21, 7:20 pm, Paul Robinson ukcue...@gmail.com wrote:
 Do you know which RPC methods trigger it? Is it all RPC methods or just
 some/one? Can you use some log statements to narrow this down? Does this
 suggest the problem exists in GWT code or your own code?

 Can you produce some simpler example code that still shows the problem?

 Has the problem just arisen, and if so, what's changed lately? Can you
 roll back to an earlier version of your code to see if the problem goes
 away? If so, which change made the problem arise?

 You could try it in safari 3.x, but that may not tell you much.

 mars1412 wrote:
  it doesn't occur in hosted mode - my hosted mode browser is IE6 -
  unfortunately we must still use GWT 1.5.2 and there's no OOPHM
  available

  ah - yeah - maybe I should mention some versions:
   * GWT 1.5.2 (I'll try to upgrade to 1.5.3 soon)
   * Chrome 2.0.172.37
   * app does not work in safari  4.0.2 at all (this is due to some java-
  script limitation - GWT fix for this exists in GWT 1.7 AFAIK)

  On 21 Jul., 18:44, Jason Essington jason.essing...@gmail.com wrote:

  Uhm hosted mode is IE, FF, or Safari depending upon the platform ...

  That said, do you also get the error on Safari?

  -jason

  On Jul 21, 2009, at 10:34 AM, Paul Robinson wrote:

  This may be a dumb question, but since you didn't mention hosted
  modehave you tried it under hosted mode as well?

  Martin Trummer wrote:

  I get a ClassCastException on some of my RPC only, when the
  application runs in Chrome and only when it's compiled in (OBF)
  obfuscated mode.

  When I compile it in DETAILED mode, everything works fine.
  The same RPCs in other browsers also work fine (even in OBF mode).

  Now I'm quite stuck, because I have no idea where to start searching:
  * the log files of the backend and the webserver-logs do not show any
  exceptions/errors when this happens: this is what I excepted, because
  the exception only occurs in chrome - so it's a client side issue
  * the only information I have is, what I can see on the Java-Script
  Console of Chrome - thowable.toString() prints:
    java.lang.ClassCastException: null

  so, unfortunaltely the class-cast-exception has no message telling me
  which class it tries to cast or which one is expected

  any ideas where to look / what to do?
--~--~-~--~~~---~--~~
You received 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 configure Source path to use another project (jar) file

2009-07-22 Thread JonJ27

Hi all,

I am very new to GWT and am trying to POC the way forward for new
development. I am really hoping to be able to tell my boss this is the
way we are going to do it from now on.. because GWT looks really neet
even if the EventBus etc looks a little dauting. Anyway.. i digress

I have sucessfully managed to get the StockWatcher app running and got
it using RPC to my websphere appserver.

I had it configured with my GWT classes and my persistence (OpenJPA in
this instance) and entitiy classes  in the same project. Now i want to
split those projects out into 2 seperate ones, i.e. StockWatcher war
and StockWatcherJPA. Essentially i want my entities to reside in the
JPA project.

I believe my project references are setup correctly however when i try
and do a GWT Compile i get errors stating No source code is available
for my Entity class (which resides in my JPA project).

Now i think that i need to configure my source path, or inherit
another module (?? maybe I am wrong) but i cant figure out how to do
this.

I hope that makes sense and hope that someone can push me in the right
direction.

Any help will be greatly appreciated.

Cheers

JJ
--~--~-~--~~~---~--~~
You received 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 test GWT MapWidget?

2009-07-22 Thread Dalla

Help pl :-)

On 21 Juli, 19:17, Dalla dalla_man...@hotmail.com wrote:
 Hi all

 I´m trying my best to implement the MVP pattern to be able to create
 fast unit tests,
 using JUnit4 only instead of using GWTTestCase.

 I´ve trying to create a simple application using the GWTGoogleMaps
 API,
 but i´m having trobles writing tests for my presenter.
 The presenter, somewhat stripped, looks like this:

 public class MapDisplayPresenter {

         HandlerManager eventBus;
         MapDisplayInterface widget;
         MapData data;

         public MapDisplayPresenter(MapDisplayInterface mapDisplayWidget,
 MapData data,
                         HandlerManager eventBus) {
                 this.data = data;
                 this.eventBus = eventBus;
                 this.bindDisplay(mapDisplayWidget);
         }

         private void bindDisplay(final MapDisplayInterface widget) {
                 this.widget = widget;
                 widget.getMap().addMapClickHandler(new MapClickHandler() {

                         public void onClick(MapClickEvent event) {
                                 widget.getMap().addOverlay(new 
 Marker(event.getLatLng()));
                         }

                 });
         }

         interface MapDisplayInterface {
                 HasClickHandlers getButton();
                 MapWidget getMap();
                 HasText getTextBox();
                 ListBox getList();
         }

 }

 Since the MapWidget doesn´t implement alot of interfaces, I couldn´t
 find a good way to access the MapWidget
 without exposing the entire object instance through my
 MapDisplayInterface.

 The problem comes when I try writing tests for this presenter.
 I tried using JUnit, extending it iwth Jmock, further extending it
 using JDaves unfinalizer,
 but sooner or later, the MapWidget or one of it´s subclasses throws an
 exception.

 So are there any good ways of writing tests here without using
 GWTTestCase?
 Are there any better ways of implementing my own interface that doesn
 ´t involve exposing
 the entire MapWidget?
 Would Selenium (which I have never used) be a better idea?

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



Re: extra Labels displaying in Panel

2009-07-22 Thread Josephine

Thomas - Thank you so much!  Initializing ret was the problem!  I
was initializing it, but in the wrong place.
Thank you again - this has been making me crazy!  :)

Josephine

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Modify PHP generated content from database by JavaScript

2009-07-22 Thread Tobe

Hi,
I have a list of notes (data = ID, subject, description, date) which
is generated by PHP from a MySQL database. Now I want the user to
change the notes by using JavaScript.
The user can click on a note to see all the data of it on a single
page. By clicking on one of the data the label shall change to a
textbox to let the user change the data. Is it possible to  merge the
existing PHP code like accessing the database and displaying the data
with the needed JavaScript or do I have to build the HTML code with
labels and textboxes and database accesses again?
--~--~-~--~~~---~--~~
You received 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: Image Bundle not working in IE

2009-07-22 Thread Sean

So, I seemed to have two problems, one my Server is not logging
errors, I should have seen that 403 error, but didn't. But I was able
on your suggestion mess around with IE's Developer's tools. I figured
out how to use the pointer to figure out the call made and I figured
out the problem. The alpha loader doesn't do a load with say,
celticlock/imagebundlestuff.cache.png, it loads http://
www.celticlock.com/celticlock/imagebundlestuff.cache.png. So what
happens is it looked like someone was hot image linking it. So I
checked the setting and image linking was enabled, I disabled it and
*BAM* it worked great!

Thank you everyone for all your help. I learned a ton!

On Jul 22, 3:59 am, Thomas Broyer t.bro...@gmail.com wrote:
 On 22 juil, 00:47, Sean slough...@gmail.com wrote:

  Yeah, that'd be great. I don't mean to link whore 
  but:http://www.celticlock.com/

  All the images on the left show up in FireFox and Chrome, but not in
  IE. Nor do the +',s and -'s of the tree under GWT Playground, Gallery
  or NFL. If anyone has any insight that'd be great. Thanks again for
  all your help!

 Looking at it through Fiddler2 [1] with Chrome 3 (dev) and IE8 shows
 that the server sends the images to Chrome but returns a 403
 Forbidden response to IE (saying that 193.251.30.44 is forbidden
 from viewing this website!).

 Now, check with your hosting provider to understand why... (is IE
 redirected through an internal proxy?)
--~--~-~--~~~---~--~~
You received 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: waiting for DOM to be ready

2009-07-22 Thread mike

Ah, thanks. -Mike

On Jul 22, 12:02 am, Nuno brun...@gmail.com wrote:
 the onModuleLoad method should be invoked only after all the page has been
 loaded.Give a look at the webtoolkit
 pagehttp://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects
  says.

 On Tue, Jul 21, 2009 at 11:48 PM, mike mikebannis...@gmail.com wrote:

  I'm used to using jQuery where you can set a callback to detect DOM
  readiness, what's the GWT equivalent?

  Specifically I need to wait for the entire host page to load so I can
  figure out the width of the page including scroll bars before gwt
  starts it's work.

  Thanks,
  Mike

 --
 Quer aprender a programar? acompanhe:
 Wants to learn GWT? Follow this blog -

 http://tcninja.blogspot.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-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
-~--~~~~--~~--~--~---



Solution to GWT hosted mode not working in debug mode in eclipse

2009-07-22 Thread Ralph


I figured this might be useful to someone. If you are experiencing a
deadlock (not responding) in GWT 1.5 hosted mode specifically in
eclipse debug mode and not in run mode, make sure that you did not set
any method breakpoints (as opposed to a line breakpoint).

Ralph
--~--~-~--~~~---~--~~
You received 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 Compile Error when using JPA managers in another project.

2009-07-22 Thread JonJ27

I have solved my original issue by creating a module.gwt.xml in the
project i wish to reference and then use the inherits name in my
main GWT project which sorts out my own class compile errors.

Howvere there is now another issue.

My other project is a JPA project and now when i do the GWT compile.

I get

Compiling module com.google.gwt.sample.stockwatcher.StockWatcher
   Refreshing module from source
  Validating newly compiled units
 Removing units with errors
[ERROR] Errors in 'file:/C:/Files/IBM/RAD/GoogleWebToolkit/
StockWatcherJPA/src/uk/co/acl/client/entities/controller/
StocksManager.java'
   [ERROR] Line 27: No source code is available for type
javax.persistence.EntityManagerFactory; did you forget to inherit a
required module?
   [ERROR] Line 33: No source code is available for type
javax.persistence.EntityManager; did you forget to inherit a required
module?
   [ERROR] Line 35: No source code is available for type
javax.persistence.Persistence; did you forget to inherit a required
module?
   [ERROR] Line 133: No source code is available for type
javax.persistence.Query; did you forget to inherit a required module?
   Compiling 6 permutations
  Permutation compile succeeded
   Linking into war
  Link succeeded
   Compilation succeeded -- 14.969s

I have tried allsorts to resolve this.

Anybody have any suggestions / ideas.??

Thanks

JJ


On 22 July, 15:02, JonJ27 jon...@gmail.com wrote:
 Hi all,

 I am very new to GWT and am trying to POC the way forward for new
 development. I am really hoping to be able to tell my boss this is the
 way we are going to do it from now on.. because GWT looks really neet
 even if the EventBus etc looks a little dauting. Anyway.. i digress

 I have sucessfully managed to get the StockWatcher app running and got
 it using RPC to my websphere appserver.

 I had it configured with my GWT classes and my persistence (OpenJPA in
 this instance) and entitiy classes  in the same project. Now i want to
 split those projects out into 2 seperate ones, i.e. StockWatcher war
 and StockWatcherJPA. Essentially i want my entities to reside in the
 JPA project.

 I believe my project references are setup correctly however when i try
 and do a GWT Compile i get errors stating No source code is available
 for my Entity class (which resides in my JPA project).

 Now i think that i need to configure my source path, or inherit
 another module (?? maybe I am wrong) but i cant figure out how to do
 this.

 I hope that makes sense and hope that someone can push me in the right
 direction.

 Any help will be greatly appreciated.

 Cheers

 JJ
--~--~-~--~~~---~--~~
You received 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: Eclipse plugin for Eclipse 3.5 (Galileo)

2009-07-22 Thread Rajeev Dayal
Hi,
Yes, this has taken longer than expected, but we're now on the finishing
touches. We should have something out there within the week.


Thanks,
Rajeev

On Tue, Jul 21, 2009 at 10:28 PM, Nik nikcol...@gmail.com wrote:


 We're now heading towards months, not weeks.
 Any progress?


 On Jun 25, 10:17 pm, Alex Rudnick a...@google.com wrote:
  If you enjoyed this thread, you may also like these:
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa.
 ..
 
  We're working on it *right now*, rest assured!
 
  On Thu, Jun 25, 2009 at 4:31 PM, Rob Tannercaspersg...@gmail.com
 wrote:
   When will a version of the plugin be released for Eclipse 3.5 (or can
   I simply use the version for 3.4).  I would like to use the new
   Eclipse, but GWT has become one of my main tools.
 
   Thanks,
   Rob
 
  --
  Alex Rudnick
  swe, gwt, atl

 


--~--~-~--~~~---~--~~
You received 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: Hyperlinks in Dockpanel

2009-07-22 Thread salk31

I think the GWT Showcase (source comes in distribution) has a
hyperlink example and the whole left nav uses them.

On Jul 18, 5:25 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote:
 i did play around a bit with click handler but is there any working examples
 for something similar to wht i am looking for ? ... that will make it simple
 ...because i was not able to make it work as i intended to



 On Fri, Jul 17, 2009 at 6:06 PM, salk31 s...@redspr.com wrote:

  Have you played with adding OnClickHandler? In there you can update
  what is in the other panels.

  btw If you are using a Hyperlink then that is mainly for history
  support (lots of docs about that). If not then a Button might be more
  appropriate although also depends on how you want to style it.

  On Jul 17, 7:42 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote:
   Hi

   I am trying to use hyperlinks in one of my dockpanenls that open on
  another
   when clicked ... is there a way of doing this ...

   basicaly my design has dockpanel which has a east,west and inbetween a
  north
   and center both east and west have several links which when clicked
   should open  in the center panel ... is there a way of doing it plus is
   there any examples that does it ...

   any help or suggestion is welcome

   thanks
   Jeremiah

--~--~-~--~~~---~--~~
You received 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: Gmail this is taking longer than usual message

2009-07-22 Thread Juraj Vitko

How do you plan to implement the timer? I assume it will be external
to the GWT application - so perhaps the app will make a change on a
predefined spot in the host page DOM, and the script with the timer
will check for it?

It's an interesting problem - I definitelly don't want my potential
clients to see an app that doesn't load.


On Jul 21, 4:36 pm, Joe Cole profilercorporat...@gmail.com wrote:
 We have noticed a few cases where we need to clear the browser cache
 as the user cannot view the application. This is *very* rare, but we
 would like to remove any confusion for the user and popup a message
 saying the app hasn't loaded, and how to fix it.

 Before we go and implement a javascript timer that checks whether our
 application has loaded correctly, has anyone else done this for their
 application and used it in production?

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



Using SOYC

2009-07-22 Thread kuvera

Hi,

I have just built GWT from trunk, and I would like to inspect the
component sizes in one of my modules with SOYC, using it for the first
time.
The only specification I found was in the wiki named CodeSplitting, so
I set it up as specified there.
I found that using GWTCompiler class the -aux folder gets created, but
running SoycDashboard fails with Error creating html file. Unexpected
end of ZLIB input stream.
When I use the new Compiler class with the -soyc flag, no metadata is
created at all.

Any tips are welcome.

thanks,
kuvera

--~--~-~--~~~---~--~~
You received 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: Using SOYC

2009-07-22 Thread davidRoe

I believe this was changed to -extra extradir

On Jul 22, 9:23 am, kuvera bors...@gmail.com wrote:
 Hi,

 I have just built GWT from trunk, and I would like to inspect the
 component sizes in one of my modules with SOYC, using it for the first
 time.
 The only specification I found was in the wiki named CodeSplitting, so
 I set it up as specified there.
 I found that using GWTCompiler class the -aux folder gets created, but
 running SoycDashboard fails with Error creating html file. Unexpected
 end of ZLIB input stream.
 When I use the new Compiler class with the -soyc flag, no metadata is
 created at all.

 Any tips are welcome.

 thanks,
 kuvera
--~--~-~--~~~---~--~~
You received 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: Generators don't work good with refresh button

2009-07-22 Thread Juraj Vitko

Hi Alen,
I'm new in GWT, but I successfully use my own source code generation
tools to handle dynamic things on the client in a static way.
I'm not sure how exactly the JTypeOracle stuff works, but I like to be
able to see and/or debug through the generated code, plus there's no
extra ClassLoading involved - the generated stuff is 1st class GWT
objects.
J.

On Jul 22, 12:18 pm, Alen Vrecko alen_vre...@yahoo.com wrote:
 Thanks. Good idea. I could have learned by now that there is usually
 user and dev lists... Will repost there.

 Cheers
 Alen

 On Jul 21, 4:11 pm, Thomas Broyer t.bro...@gmail.com wrote:

  On 21 juil, 14:30, Alen Vrečko alen_vre...@yahoo.com wrote:

   Hi.

   The generators are without a doubt a remarkable feature of gwt. But if
   you use any reflection on the client classes in the generator you lose
   refresh button support. Furthermore while not that major I do find it
   annoying that refreshing doesn't recompile the generator code. You
   have to stop the hosted mode and start again.

   It all boils down to the fact that client code is loaded in
   ComplingClassLoader and the Generator is loaded in a different
   ClassLoader than that.

   Reflection is not that nice. But sometimes one has perfectly
   legitimate use cases to use reflection. A good example is Google-Gin.
  [...]
   What do you guys think?

  ...that you should have used (or at least cc'd) the GWT-C group ;-)

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


--~--~-~--~~~---~--~~
You received 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 version of LibKML

2009-07-22 Thread ben

Is there any thoughts about GWT version of Google's LibKML?  This
would be very handy, so we wouldn't have to maintain our own kml
libraries.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Suggestion: Toggle style name

2009-07-22 Thread Célio

Eventually I find my self doing this:

toggleStyleName = !toggleStyleName;
if (toggleStyleName)
{
widget.addStyleName(SomeStyleName);
}
else
{
widget.removeStyleName(SomeStyleName);
}


So here goes my 2 cents: instead of manually toggling a style name, it
could be simply:

widget.toggleStyleName(SomeStyleName);

jQuery actually has such a method, it's usefull, helps keep my code
clean.
--~--~-~--~~~---~--~~
You received 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: JSNI issues

2009-07-22 Thread wsaleem

Hi, Adam. Thanks a lot for your effort! I found a way to eliminate the
problem, namely by directly compiling for web mode, and not for hosted
mode (I am still on GWT 1.5. I know, it is high time I ported!).

I do not understand it though. When I include raw JS files from the
Google Visualization API, the GWT compiler for hosted mode does not
complain, i.e. no errors/exceptions for
   $wnd.google.visualization
But in the case of Protovis
   $wnd.pv
up pops a com.google.gwt.core.client.JavaScriptException.

Any ideas why?

waqar :)

On Jul 21, 5:39 pm, Adam T adam.t...@gmail.com wrote:
 .perhaps you have the Javascript library in the wrong place and it
 is not being loaded.  I'd still suggest you get hold of a debug tool
 in your browser to see what's loaded etc as you're going to need it
 when you get into trying to access the library and going further, but,
 the following works for me to access the library.

 1.  In my applications .gwt.xml file I have put: script src=protovis-
 r2.6.js/
 2.  I also have defined my module in the .gwt.xml file as follows:
 module rename-to='testAA'
 3.  I'm using GWT1.6, so the protovis-r2.6.js file needs to go in
 within the war file, i.e. it goes in the folder /war/testAA/
 4.  In my application I just create a simple JSNI method

         public native JavaScriptObject getVis()/*-{
                 var vis = new $wnd.pv.Panel().canvas(test);
                 return vis;
         }-*/;

 5.  In my onModuleLoad I simply call the method and alert the fact
 that I have an object

         public void onModuleLoad() {
                 JavaScriptObject v =  getVis();
                 Window.alert(v.toString());
         }

 that tells me I have got a valid JavaScript object and I see no
 exceptions or errors.

 Hope that helps, or at least gives you some hints.

 //Adam

 On 21 Juli, 16:23, wsaleem wsal...@gmail.com wrote:

  I checked the link. Overlay types could surely make my life easier in
  terms of wrapping Protovis but as long as I cannot access $wnd.pv
  through JSNI, I cannot use them.

  On Jul 20, 11:28 pm, wsaleem wsal...@gmail.com wrote:

   2) is the pure JS scenario, which I trying to port to GWT using JSNI.
   I fail, though, as the very first command
         vis = new $wnd.pv.Panel().canvas(PVis);
   fails with the following JavaScript exception
         $wnd.pv has no properties
   I will see if the overlay types help. Thanks for the pointer!

   On Jul 20, 7:48 pm, Adam T adam.t...@gmail.com wrote:

It could still be a similar thing; I'm not 100% clear what you are
trying to do above, but it looks like your steps are:

1) Load an external JavaScript library, e.g. protovis.js
2) Run some other JavaScript which creates something in the DOM, e.g.
the vis = new pv.Panel().canvas(PVis); .vis.render(); part
3) In GWT access the rendered PVis component.

If that's correct, then by moving the protovis.js to the .gwt.xml
part your ensuring that the library loads before your GWT, but it is
still possible that part (2) is executing after your GWT code, and
hence it is not available to your GWT code when it runs.  You could
wrap that code in it's own file and load through the script tag
(though I'm not sure about ordering in the gwt.xl file).

I'd also suggest you use some debugging tools (Firebug for example in
Firefox) to look at what your code is doing, that should show you the
scoping of pv etc.

(though you might be better off writing a wrapper using JavaScript
Overlay types (http://googlewebtoolkit.blogspot.com/2008/08/getting-to-
really-know-gwt-part-2.html) that would let you merge GWT and the
protovis library in a more natural style, than the approach you're
taking just now)

Good luck,

//Adam

On 20 Juli, 17:41, wsaleem wsal...@gmail.com wrote:

 Adam, I added
     script src=protovis.js /
 to the .gwt.xml.

 No change!

 On Jul 20, 4:24 pm, Adam T adam.t...@gmail.com wrote:

  Hi,

  It might be the case that in both cases your GWT code is loaded and
  executing before the browser has loaded your externally referenced
  JavaScript file.  To remove that possiblity, you can place the
  script tag you have in the HTML into your module's .gwt.xml
  definition, i.e.

  module
     inherits name='com.google.gwt.user.User' /
     script type=text/javascript src=protovis.js
  /module

  With this sett up, the GWT boostrap code should ensure the library
  JavaScript is loaded before your GWT code executes.

  //Adam

  On 19 Juli, 18:19, wsaleem wsal...@gmail.com wrote:

   I am not a JS developer and use it pretty much by example, so it 
   might
   be that I am missing something really basic below.

   I have come across problems using JSNI in the following 2 
   scenarios:

   1.
   I use Google Visualization API successfully in JS as follows:
   

Re: Working with xml nodes gives exceptions in google chrome only

2009-07-22 Thread mihai007

The error is:

Uncaught exception in 
http://localhost:/bla/0B85277F02991E2394B9BF24DE3642D0.cache.html:1366
  throw com_google_gwt_xml_client_impl_DOMNodeException_
$DOMNodeException__Lcom_google_gwt_xml_client_impl_DOMNodeException_2SLjava_lang_Throwable_2Lcom_google_gwt_xml_client_impl_DOMItem_2
(new com_google_gwt_xml_client_impl_DOMNodeException(), e, this
$static);

Uncaught [object Object]


root.getOwnerDocument() does not contain adoptNode.
the Node class I am using is com.google.gwt.xml.client.Node;
There is a method on OwnerDocument called importNode but it does not
change anything, the error is the same.

By the way I am using latest gwt 1.7 (older versions would not work
either)
It seems that safari is not working also (could it be due to webkit?
it's the only thing I can think that's relevant and is used by Chrome
and Safari)


On Jul 21, 11:10 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 21 juil, 20:28, mihai007 mihai@gmail.com wrote:

  The following code works as expected in IE7/8, Firefox, Opera, but
  fails on chrome:

  Node root = XMLParser.parse(?xml version='1.0' ?root 
  /).getLastChild();

  Node node = XMLParser.parse(?xml version='1.0' ?node 
  /).getLastChild();

  root.appendChild(node);

  Does anyone have a clue why is it happening and any workarounds? thank
  you.

 Any error showing in the JS console?

 Shouldn't you first adoptNode (root.getOwnerDocument().adoptNode
 (node)) before appending it into another document?
--~--~-~--~~~---~--~~
You received 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: Pre-Compress GWT compiler output for web server

2009-07-22 Thread Bob Rozelle

A solution for the *.cache.html files is to gzip them
to .cache.html.gz files.

If you are using Apache as your web server you can then modify the
mime.conf file (found at /etc/apache2/mods-enabled/mime.conf) by
uncommenting:

AddEncoding x-gzip .gz .tgz

and commenting:

#AddType application/x-gzip .gz .tgz


This means that my apache server will send the .cache.html.gz files in
replacement for the .cache.html files and also send the response
header: content-encoding=gzip

This can also be done in a .htaccess file (RemoveType and AddEncoding)
placed in the cache folder.


On Jul 22, 7:06 am, martinhansen martin.hanse...@googlemail.com
wrote:
 Hello,

 I am evaluating some approaches to reduce the amount of data being
 transmitted to the client browser. I am using the Apache Tomcat web
 server. I successfully managed to enable GZIP output for the Tomcat
 server by editing the server config file. It works fine. However, this
 way the data is compressed on-the-fly by the web server for every
 request which considerably increases server CPU load. Is this
 assumption correct?

 Is there a way to pre-compress the contents of my GWT app and have
 this pre-compressed content delivered by the web server?

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Hosted Mode RPC Throws Error During Compile

2009-07-22 Thread Chris


In hosted mode I am getting an error when compiling the RPC method.
See below for the stack trace.

I am using XP, GWT 1.6.  It appears to be some type of concurrent
access to the same file.  I found an old thread that talked a bit
about this but no solutions.

see the last message in this thread:
http://groups.google.com/group/Google-Web-Toolkit/browse_frm/thread/329f8076fbe73534/55080b6496cf0da4?lnk=gstq=rpc+FileNotFoundException+Unable+to+create+file+#55080b6496cf0da4

Any ideas?

Thanks,
Chris

[ERROR] Unable to create file 'C:\data\source3.4\upgradeToGWT1.6\gwt-
dvd\war\dvd\945DE88343A0FFB4731059276989278B.gwt.rpc'
java.io.FileNotFoundException: gwt-dvd\war\dvd
\945DE88343A0FFB4731059276989278B.gwt.rpc (The system cannot find the
path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.init(FileOutputStream.java:179)
at java.io.FileOutputStream.init(FileOutputStream.java:131)
at com.google.gwt.dev.util.Util.copy(Util.java:176)
at
com.google.gwt.core.ext.linker.impl.StandardLinkerContext.produceOutputDirectory
(StandardLinkerContext.java:453)
at com.google.gwt.dev.HostedMode.relink(HostedMode.java:486)
at com.google.gwt.dev.HostedMode.access$000(HostedMode.java:49)
at com.google.gwt.dev.HostedMode$1.accept(HostedMode.java:304)
at com.google.gwt.dev.shell.ShellModuleSpaceHost$1.accept
(ShellModuleSpaceHost.java:117)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind
(StandardRebindOracle.java:65)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind
(StandardRebindOracle.java:172)
at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind
(ShellModuleSpaceHost.java:114)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:474)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate
(ModuleSpace.java:365)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
39)
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.itsolut.framework.client.payload.service.SRouting.init
(SRouting.java:17)
at com.itsolut.framework.client.payload.service.SRouting.instance
(SRouting.java:24)
at com.itsolut.framework.client.data.ServiceAccessEntity.go
(ServiceAccessEntity.java:46)
at com.itsolut.framework.client.data.ServiceAccessEntity.execute
(ServiceAccessEntity.java:19)
at com.itsolut.framework.client.data.DataManager.executeBeanService
(DataManager.java:78)
at com.itsolut.framework.client.data.DataCacheEntity.execute
(DataCacheEntity.java:82)
at
com.itsolut.dvd.client.service.impl.ProductService.loadProductFromRpc
(ProductService.java:46)
at com.itsolut.dvd.client.service.impl.ProductService.access$3
(ProductService.java:43)
at com.itsolut.dvd.client.service.impl.ProductService$1.onExecuted
(ProductService.java:33)
at com.itsolut.dvd.client.event.bus.AbstractBusEvent.dispatch
(AbstractBusEvent.java:14)
at com.itsolut.dvd.client.event.bus.AbstractBusEvent.dispatch
(AbstractBusEvent.java:1)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1
(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent
(HandlerManager.java:178)
at com.itsolut.dvd.client.event.bus.EventBusHandler.fireEvent
(EventBusHandler.java:46)
at com.itsolut.dvd.client.presenter.PublishButtonViewer.doPublish
(PublishButtonViewer.java:53)
at com.itsolut.dvd.client.presenter.PublishButtonViewer$1.onExecuted
(PublishButtonViewer.java:37)
at com.itsolut.dvd.client.event.GenericPresenterEvent.dispatch
(GenericPresenterEvent.java:30)
at com.itsolut.dvd.client.event.GenericPresenterEvent.dispatch
(GenericPresenterEvent.java:1)
at com.google.gwt.event.shared.HandlerManager
$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1
(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent
(HandlerManager.java:178)
at com.itsolut.dvd.client.event.GenericPresenterHandler.fireEvent
(GenericPresenterHandler.java:40)
at com.itsolut.dvd.client.view.PublishButtonWidget$1.onBrowserEvent
(PublishButtonWidget.java:21)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1320)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:
1299)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
  

Re: Profiling memory usage for large gwt application

2009-07-22 Thread ankur jain
hi joel...do u hav any suggestion regarding this??

On Tue, Jul 21, 2009 at 10:57 PM, ankuur xs4an...@gmail.com wrote:

 hi

 We are using the gwt 2.0 code from gwt trunk.And we hav seen a drastic
 improvement in the page loading especially in case of IE(6 and
 7).Actully breaking the compiled code into the multiple script tag
 did the trick.
 But now we are facing the browser memory problem.Actully our total
 compiled script size(in OBF mode)
 is more than 3 MB.As we use the application the browser memory keeps
 on increasing and sometimes it even reached to the 700MB.

 We tried to profile the application using the javascript tool(like
 firebug) but of no use because the only provides the performance
 metrics and not any memory leaks.

 Now we are trying to profile the gwt in the OOPHM mode while
 debugging.Its helpful and we are able to find some of the problems in
 our code.But actully during debugging time most of the refrences are
 held by gwt code(mainly by JavaDispatchImpl class and by the static
 variable in RootPanel i.e. widgetstoDetach) and also all the asynccall
 backs are held by RequestBuilder.

 We are assuming that these refrences wont be hold in the compiled
 mode,because all the classes we see are the debugger classes.But its
 making that profiling very tedious as we need to search what refrences
 are held by the gwt and where our classes are keeping refrence.

 I dont know we are going through correct approch fpr profiling or is
 there any other way so that we can check all the memory leaks and
 reduce the memory footprint of our application in the browser.

 Any help in this heartly welcomed.And also if we can reduce the objects
 (especially all the RPCs callbacks) then actully we can reduce the
 meomory used during debugging and it might help in mking it faster.

 regards
 ankur


--~--~-~--~~~---~--~~
You received 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: Login Application

2009-07-22 Thread Sean

I don't use the Google App engine, so I built my own login. I have a
database with user name's and passwords.

I take what's in the text boxes, send it via RPC to the server, have
the server select the password from the db for the submitted username
and check it against what was sent. IF either the password doesn't
match, or there was no user by that name I return false. Else I return
true. So far it's worked like a charm.

On Jul 22, 2:24 am, Paulo Coutinho pa...@prsolucoes.com wrote:
 I use google api to login in my appengine,

 http://brfotolog.appspot.com

 2009/7/22 sin kang jlc...@gmail.com:



  you can use google account in appengine.

  it's like as long as you have google account you are valid.

  which means google takes care of all those authentication. you just have to
  call the service and hand over the google id and password.

  it's quite simple. this link might helps.

 http://code.google.com/appengine/docs/java/users/overview.html

  Sin-Kang(강신)
  +82-10-6638-7878
  +44-78555-49312

  On Wed, Jul 22, 2009 at 1:39 AM, saurabh saurabhsn...@gmail.com wrote:

  Hello ,

           I am developing Login Application using GWT. My Interface is
  ready but I am thinking about where should values go. How can I check
  the UserName  Password sent by Client or I should use RPC for that.

  if this is so then what role my servlet should play.

  Thanks

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



Re: not able to deploy to tomcat server

2009-07-22 Thread Sean

Is this a shared tomcat server? Something I experienced and several
other people who've e-mailed me experienced is that some shared TOMCAT
servers require certain prefixes for tomcat to actually handle the
servlet request. For instance, all my RPC calls have to have /servlet
in it or TOMCAT ignores them and web.xml is never used.

Also, let us know what the error is when you try to use your RPC.

On Jul 21, 11:06 pm, Kamal Chandana Mettananda lka...@gmail.com
wrote:
 There's a section on deployment in following tutorial (on using Servlets
 with GWT). It does not create a war file there but deployed as an exploded
 archive.

 http://lkamal.blogspot.com/2008/09/java-gwt-servlets-web-app-tutorial...

 HTH.

 On Tue, Jul 21, 2009 at 8:26 AM, sathya sathyavik...@gmail.com wrote:

  I have developed my whole application in GWT in eclipse. I have tested
  in hosted mode.Evertthing works fine. Now I need to deploy into tomcat
  server on my machine. So using eclipse, I have compiled the whole
  project successfully. WAR directory got generated. I have zipped this
  war file and renamed with extension .war and placed this in webapps
  directory of tomcat server.

  When I use localhost:8080 URL,firstpage opens successfully.(tomcat is
  able to unzip this).However none of RPC calls work. I am stuck with
  this problem from past 1 week. I tried all possible ways posted on web
  but nothing seems to work.

  I tried to compile the starter application shipped with GWT and placed
  on tomcat. Even this is not working with RPC calls.

  I am not sure what settings I need to do on my tomcat. 

  Can you please suggest me detailed steps to deploy starter application
  shipped with GWT on tomcat using eclipse?

  later I can map the same to my application.

  Can anyone help please?
--~--~-~--~~~---~--~~
You received 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: Getting a simple GWT project to gwt-compile in maven2

2009-07-22 Thread Charlie Collins

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

And you might get more/better response on the gwt-maven-plugin mailing
list.

On Jul 21, 3:08 pm, Yaakov yaakov.chai...@gmail.com wrote:
 Hi,

 I am trying to get a very simple GWT project to gwt-compile using the
 codehaus' maven-gwt plugin but I don't seem to be having much
 success...

 The project is nothing more than a regular starter GWT 1.7 (same as
 1.6 plus bug fixes) Eclipse GWT plugin project. All I did after
 creating a new project in Eclipse with the GWT Eclipse plugin was to
 create main/java under the src directory and put that into the class
 path instead of just the default src directory.

 My pom.xml is shown below. When I do 'mvn clean compile', I see that
 GWT compile gets kicked off, but when I go the exploded built WAR and
 double click on the host HTML page, it tells me GWT module
 'szblankweb' needs to be (re)compiled, please run a compile or use the
 Compile/Browse button in hosted mode. Same thing happens if I deploy
 the .war file into a container.

 If I run the app inside Eclipse in hosted mode and then do 'mvn
 package' (without the clean), everything works.

 Any idea of what I am not doing or doing wrong here?

 Here is my pom.xml:
 
 ?xml version=1.0 encoding=UTF-8?
 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
        
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd;
        modelVersion4.0.0/modelVersion
        groupIdtest/groupId
        artifactIdtest/artifactId
        packagingwar/packaging
        version1.0-SNAPSHOT/version
        nametest/name

        properties
                gwt.version1.7.0/gwt.version
                maven.compiler.source1.6/maven.compiler.source
                maven.compiler.target1.6/maven.compiler.target
        /properties

        dependencies
                dependency
                        groupIdcom.google.gwt/groupId
                        artifactIdgwt-servlet/artifactId
                        version${gwt.version}/version
                        scopecompile/scope
                /dependency
                dependency
                        groupIdcom.google.gwt/groupId
                        artifactIdgwt-user/artifactId
                        version${gwt.version}/version
                        scopeprovided/scope
                /dependency
                dependency
                        groupIdjunit/groupId
                        artifactIdjunit/artifactId
                        version4.4/version
                        scopetest/scope
                /dependency
        /dependencies

        build
                outputDirectorywar/WEB-INF/classes/outputDirectory
                testOutputDirectorywar/WEB-INF/classes/
 testOutputDirectory
                plugins
                        plugin
                                groupIdorg.apache.maven.plugins/
 groupId
                                artifactIdmaven-war-plugin/
 artifactId
                                version2.1-beta-1/version
                                configuration
                                        warSourceDirectory/war/
 warSourceDirectory
                                /configuration
                        /plugin
                        plugin
                                groupIdorg.codehaus.mojo/groupId
                                artifactIdgwt-maven-plugin/
 artifactId
                                version1.1/version
                                executions
                                        execution
                                                goals
                                                        goalcompile/
 goal
                                                        goaltest/
 goal
                                                /goals
                                        /execution
                                /executions
                        /plugin
                        plugin
                                groupIdorg.apache.maven.plugins/
 groupId
                                artifactIdmaven-war-plugin/
 artifactId
                                configuration
                                        warSourceDirectorywar/
 warSourceDirectory
                                /configuration
                        /plugin

                        plugin
                                groupIdorg.apache.maven.plugins/
 groupId
                                artifactIdmaven-compiler-plugin/
 artifactId
                                version2.0.2/version
                                configuration
                                        source${maven.compiler.source}
 /source
                                        target${maven.compiler.target}
 /target
                                /configuration
                       

Re: JSNI: window vs $wnd

2009-07-22 Thread mike

Cool, thanks again for the help. I am confused by the last paragraph
but I think it's because you're looking at the code at the first URL
rather than the second one:

http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html

The code at that URL uses 'window' instead of $wnd. So I think this
does pollute the window namespace. No?

-Mike

On Jul 20, 6:41 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 20 juil, 22:26, mike mikebannis...@gmail.com wrote:

  Darth, ...ahh, great thanks.

  I got to $wnd to work for code in the cross-site communication
  tutorial. I think the problem was that I was using document and $wnd
  rather than $doc and $wnd. I haven't completely worked out in my
  head why the former wouldn't work but it seems sensible that you would
  need to make sure it's all either happening on the host page or all in
  the iframe.

 You add your script node to 'document' (which lives in 'window') but
 you define the callback function in $wnd. When the script loads, it
 calls a function called callbackID (where ID is a counter); in
 JavaScript, this is equivalent to calling window.callbackID (because
 'window', and window.window, and window.window.window, and etc. is the
 global object); but as I said before, the function doesn't exist, as
 it has been actually defined in $wnd.

 Incidentally, if you add-linker name=xs / in your gwt.xml, it'll
 work, because in this case $wnd == window and $doc == document.

  Any guess why the tutorial uses window/document rather than $wnd/
  $doc ?

 That way, it doesn't pollute the window name space (only the $wnd
 name space, which is only ever used by your GWT compiled code), as it
 uses window[something] = ... constructs (incidentally, if you add-
 linker name=xs /, it *will* pollute the window namespace).

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



jetty classpath in hosted mode?

2009-07-22 Thread Daniel

how can the classpath for the embedded jetty in hosted mode be
configured? problem is that i need to read and write files from an rpc
server implementation on the server side. as long as these files are
located in the war directory everything is working fine. but i'm not
able to put them into another dir, out of the war dir.

so how can the classpath be configured? passing -cp in the debug
configuration has no effect.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: gwt 1.6 and oophm, how to?

2009-07-22 Thread denis56

Thanks for reply,

I actually did get oophm work with gwt 1.6/1.7.

Wanted to share some feedback.
Building from trunk, I first run into issue #3556 (http://
code.google.com/p/google-web-toolkit/issues/detail?id=3556) which
luckily had a workaround documented.

http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM explains
the procedure (no need to compile oophm from branches/oophm), but
being not well-versed in GWT, I had it tough realizing that BOTH gwt-
oophm.jar and gwt-dev.jar need to be included in my project classpath
above the GWT 1.6/1.7 jars. Can a request be placed to extend
UsingOOPHM or can I submit a explanatory paragraph for review?

After figuring that out the rest worked pretty well. Really really
happy, since in-process hosted mode ceased to work for some reason
after I embedded GWT code in a jsf page, and I now have firebug!!!

Best wishes,
denis

On Jul 21, 11:59 pm, Sumit Chandel sumitchan...@google.com wrote:
 Hi Denis,
 Unfortunately, you'll need to work from trunk for both GWT core and OOPHM as
 the two are under active development, and the OOPHM branch is generally
 staying in sync with changes in trunk. Many GWT developers have been using
 trunk successfully during development, but keep in mind the disclaimer that
 trunk is bleeding edge code and not recommended for production.

 That said, the next major release will include OOPHM, so you can look
 forward to using it in a stable release soon.

 As for using hosted mode in GWT 1.7, could you elaborate a little more on
 what issues you experienced when trying to start up hosted mode?

 Hope that helps,
 -Sumit Chandel

 On Sat, Jul 18, 2009 at 4:01 PM, denis56 denis.ergashb...@gmail.com wrote:

  pardon for asking, but it seems i am stuck and not moving on.

  i had one issue that hosted browser did not run gwt code (while
  firefox did) and thought to try my luck with oophm.

  tried to follow instructions at

 http://allahbaksh.blogspot.com/2009/02/building-gwt-oophm-from-source...
  and

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

  I am using gwt 1.6 on linux. Have checked out
 http://google-web-toolkit.googlecode.com/svn/branches/oophm, build it
  (throws some errors, though), got firefox extension installed,
  replaced my gwt-dev and gwt-user.jar files with the generated ones,
  but getting the error

  ClickHandler cannot be resolved to a type or worse :)

  It is obviously an older compiler not supporting the new features of
  1.6. The question is, whether it is possible to use 1.6 (and now 1.7)
  compiler and simultaneously oophm from trunk?

  thanks a lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-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
-~--~~~~--~~--~--~---



Selection of Widgets

2009-07-22 Thread Ewald Pankratz

Hi
When I create a widget e.g. a HTML widget and go with the mouse over
the widget and press the left mouse button and move the mouse
somewhere else the widget or part of the widget will be selected. How
can I get rid of this selection. I don't want any selection instead I
want to draw a line from the widget to my current mouse pointer. Any
ideas how to do that? I am a newbie.
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
-~--~~~~--~~--~--~---



Open a word document online for view and edit with GWT

2009-07-22 Thread AGharbawi

Hello All,

I'm trying to build a page that can open a word document inside the
browser for editing and viewing. The document will be saved in a
database.
is it possible to use google docs, or zoho to do that. or do u have
any other suggestions ...

Please help...

Alaa G

--~--~-~--~~~---~--~~
You received 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 does sinkevents works by default?

2009-07-22 Thread Kriptonis Azullis

Hello, I'm developing an application using gwt . I never used events
before so I am still learning how they work in GWT.

The sinkEvents() as I understand it is used if you want your widget to
react to events. But what does it do to events if it doesn't handle
them?
Does it bubble them up so that other widget can try to handle them? Or
if I do sinkEvents() on a widget it keeps all events from passing?

When I fire a event does it propagate along the widgets until
something handles it?

For example, if I have a image inside a vertical panel, and that panel
is inside a Absolute panel. When the image fires a clickevent, if the
vertical panel does nothing to it, will it propagate to the Absolute
panel?


Thanks in advance, and I'm sorry if I was too confusing. I tried not
to be.

--~--~-~--~~~---~--~~
You received 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 Maps, user could add their markers.

2009-07-22 Thread pennfoli0

Hi,

can this be possible that users could also add their own marker, for
example in this site

http://gmaps-samples.googlecode.com/svn/trunk/manymarkers/markerhash.html

they could also insert their own marker and also insert their details.

What approach should I use? How will be their data be save.

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
-~--~~~~--~~--~--~---



GWT compiler doesn't ignore (java.xml) annotations

2009-07-22 Thread Pauli

Hello,

I was under the impression that GWT compiler ignores unrecognized
annotations. Well, I have a simple test class with some java.xml
annotations on it. The source for those annotations is not on the
classpath. I read that if I put the source there, I should have no
problems, but for this example I didn't want to do that. My class:

@XmlType(name = point)
public class Point {

  @XmlAttribute public double x;
  @XmlAttribute public double y;

  public Point() {
  }
}

If I remove the annotations the compilations finishes without
problems.

My question is: does gwt ignore the unrecognized annotations or not? .
I remember reading that it does since version 1.5. I am using version
1.7. Have I misunderstood something important about the compilation?

On the client side I have no need for some annotations, but on the
server side I do. I would like not to rely on a facade/dto solution to
have my classes compile properly nor would I like to be forced to
include a source on my classpath unnecessarily.

Thank yall

Pauli Savolainen

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Programmatically resize browser window

2009-07-22 Thread Pandaman

For the GWT app I'm developing, I need to programmatically change the
height of the browser window. Is there a way to do this in GWT? I've
tried the following:

public static native void setWindowHeight(final int height) /*-{
$wnd.resizeTo($wnd.outerWidth, height);
}-*/;

But this does not just change the height, it also messes with the
width. Moreover, I would like to keep this resizing functionality
within GWT Java code (this uses JSNI).

--~--~-~--~~~---~--~~
You received 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: Image Bundle not working in IE

2009-07-22 Thread Thomas Broyer



On 22 juil, 16:57, Sean slough...@gmail.com wrote:
 So, I seemed to have two problems, one my Server is not logging
 errors, I should have seen that 403 error, but didn't. But I was able
 on your suggestion mess around with IE's Developer's tools. I figured
 out how to use the pointer to figure out the call made and I figured
 out the problem. The alpha loader doesn't do a load with say,
 celticlock/imagebundlestuff.cache.png, it loads 
 http://www.celticlock.com/celticlock/imagebundlestuff.cache.png;. So what
 happens is it looked like someone was hot image linking it.

The URL isn't in cause here, it's the use of AlphaImageLoader which
causes this, because it is a ActiveX that runs outside the HTML
page, it doesn't have access (or just does not use, which is more
probable) to the HTML URL to use it in a Referer HTTP header.

 So I
 checked the setting and image linking was enabled, I disabled it and
 *BAM* it worked great!

Great! Glad you solved the issue that easily!

--~--~-~--~~~---~--~~
You received 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: JSNI: window vs $wnd

2009-07-22 Thread Thomas Broyer



On 22 juil, 20:28, mike mikebannis...@gmail.com wrote:
 Cool, thanks again for the help. I am confused by the last paragraph
 but I think it's because you're looking at the code at the first URL
 rather than the second one:

 http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html

 The code at that URL uses 'window' instead of $wnd. So I think this
 does pollute the window namespace. No?

...if you use the std linker (IFrameLinker), which loads the GWT
code within an IFrame (hence a different 'window' object).
The 'xs' linker loads the code within the HTML host page context
(within a closure to avoid polluting the window namespace), so $wnd ==
window, so whichever variable you use, you'll pollute the window
namespace of the HTML host page.
--~--~-~--~~~---~--~~
You received 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: Programmatically resize browser window

2009-07-22 Thread Pandaman

Edit: this actually does not interfere with the width of most browsers
- it resizes to the previous width and new height. It does mess up
the width in my Google hosted mode browser though for some reason.

I actually would prefer something that would resize the client area of
the browser (i.e. excluding the browser's toolbars and scrollbars
etc.) instead of the window itself.

For example, com.google.gwt.user.client.Window has the following
methods: getClientWidth() and getClientHeight(). I would like
something that would be equivalent to setClientWidth(int width) and
setClientHeight(int height).

On Jul 22, 5:46 pm, Pandaman p4nda...@gmail.com wrote:
 For the GWT app I'm developing, I need to programmatically change the
 height of the browser window. Is there a way to do this in GWT? I've
 tried the following:

 public static native void setWindowHeight(final int height) /*-{
     $wnd.resizeTo($wnd.outerWidth, height);

 }-*/;

 But this does not just change the height, it also messes with the
 width. Moreover, I would like to keep this resizing functionality
 within GWT Java code (this uses JSNI).
--~--~-~--~~~---~--~~
You received 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 does sinkevents works by default?

2009-07-22 Thread Thomas Broyer



On 22 juil, 21:07, Kriptonis Azullis kripto...@gmail.com wrote:
 Hello, I'm developing an application using gwt . I never used events
 before so I am still learning how they work in GWT.

 The sinkEvents() as I understand it is used if you want your widget to
 react to events.

First, starting with GWT 1.6, you don't have to deal with sinkEvents
in your code, just use addDomHandler vs. addHandler.

addDomHandler calls sinkEvents in addition to calling addHandler.
sinkEvents registers handlers for the appropriate events on the DOM
element used by the Widget (see Widget#getElement()). When such an
event is fired (on the DOM, generally by the browser), it's handled
by Widget#onBrowserEvent which just delegates it to the handlers you
registered. The only exception is mouseover/mouseout events, which are
only ever delegated to the handlers if they actually go in and out of
the Widget#getElement() (i.e. not from a child element to another
child element).

If you know how DOM events work (bubbling, capture, cancelable, etc.),
GWT doesn't change that.

 But what does it do to events if it doesn't handle
 them?

Nothing special.

 Does it bubble them up so that other widget can try to handle them? Or
 if I do sinkEvents() on a widget it keeps all events from passing?

If the event bubbles, it does so at the DOM level, so it'll be
dispatched to parent widgets too, if they listen to them (i.e. they
called sinkEvents too for those event types)

 When I fire a event does it propagate along the widgets until
 something handles it?

If you do fire it at the DOM level, it'll bubble the DOM tree.

 For example, if I have a image inside a vertical panel, and that panel
 is inside a Absolute panel. When the image fires a clickevent, if the
 vertical panel does nothing to it, will it propagate to the Absolute
 panel?

Yes, but neither VerticalPanel or AbsolutePanel give you the
opportunity to register a ClickHandler, so you won't be able to handle
the event at this higher level in the widget tree.

--~--~-~--~~~---~--~~
You received 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: JSNI: window vs $wnd

2009-07-22 Thread mike

Got ya. Thank you for the hand holding. Much appreciated. -Mike

On Jul 22, 6:01 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 22 juil, 20:28, mike mikebannis...@gmail.com wrote:

  Cool, thanks again for the help. I am confused by the last paragraph
  but I think it's because you're looking at the code at the first URL
  rather than the second one:

 http://code.google.com/webtoolkit/tutorials/1.6/Xsite.html

  The code at that URL uses 'window' instead of $wnd. So I think this
  does pollute the window namespace. No?

 ...if you use the std linker (IFrameLinker), which loads the GWT
 code within an IFrame (hence a different 'window' object).
 The 'xs' linker loads the code within the HTML host page context
 (within a closure to avoid polluting the window namespace), so $wnd ==
 window, so whichever variable you use, you'll pollute the window
 namespace of the HTML host page.
--~--~-~--~~~---~--~~
You received 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 hijacked javamail?

2009-07-22 Thread jimbolaya

I want to send smtp from server side?  wtf
-jim

--~--~-~--~~~---~--~~
You received 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 host mode fail ...

2009-07-22 Thread elpato

any idea?

--~--~-~--~~~---~--~~
You received 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 1.7 Now Available

2009-07-22 Thread Bruce Johnson
Hi everyone,

(Most people are probably already quite aware of the new GWT 1.7 release,
but we wanted to send out an official announcement we could pin to the top
of the message list.)

GWT 1.7 is a minor update that adds better support for Internet Explorer 8,
Firefox 3.5, and Safari 4. Each of these new browser versions introduced at
least one change that negatively impacted compiled GWT modules, so we
recommend that you do update to GWT 1.7 and recompile your existing
applications to ensure that they work with the latest versions of browsers.
No source code changes on your part should be required.

Normally, a minor update such as this would have been named 1.6.5 (the
previous latest version of GWT was 1.6.4), but we did add the value ie8 to
the user.agent deferred binding property, which could impact projects
using custom deferred binding rules that are sensitive to that property.
Thus, we went withGWT 1.7 rather than GWT 1.6.5, to indicate that you may
need to pay attention to that change. Details are in the release notes.

In every other respect, this is just a bugfix release, so in the vast
majority of cases, the update-recompile process should be nearly effortless.

Download here:
http://code.google.com/p/google-web-toolkit/downloads/list?can=1q=GWT+1.7.0

Cheers,
Bruce, on behalf of your friendly GWT Team

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



History -- invalidating a page

2009-07-22 Thread John Ivens
I hope that this is an easy question for all of you.  I apologize if this
has been answered before.

I have set up security with LDAP and ACEGI, using jsp pages that are called
when requests are intercepted via ACEGI.  It works great.  Upon successful
login and determining that the user has the appropriate role, the gwt
application is entered.

There are two problems I have, and I think that they are related.

1.) When you press the back button, you are left with the original state of
the page you first came to.  So, tab pages have default values and all of
that.  How do you keep that information when you go back in the browser?

2.) Once I logout the user, it is still possible to visit the old page and
do work on it, even though in reality the session has been invalidated.  If
I were to branch to another page from the original one, I would be
redirected to the login page, but not upon orginally hitting the back
button. How do I tell the browser that the old page is now invalidated?

--~--~-~--~~~---~--~~
You received 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: Interface not RPC serializable

2009-07-22 Thread Nathan Wells

I don't think so, as I believe that is how it's supposed to work. From
the docs (http://code.google.com/webtoolkit/doc/1.6/
DevGuideServerCommunication.html#DevGuideSerializableTypes):

A type is serializable and can be used in a service interface if one
of the following is true:
The type is primitive, such as char, byte, short, int, long, boolean,
float, or double.
The type an instance of the String, Date, or a primitive wrapper such
as Character, Byte, Short, Integer, Long, Boolean, Float, or Double.
The type is an enumeration. Enumeration constants are serialized as a
name only; none of the field values are serialized.
The type is an array of serializable types (including other
serializable arrays).
The type is a serializable user-defined class.
The type has at least one serializable subclass.

... and ...

A user-defined class is serializable if all of the following apply:
 1. It is assignable to IsSerializable or Serializable, either because
it directly implements one of these interfaces or because it derives
from a superclass that does
 2. All non-final, non-transient instance fields are themselves
serializable, and
 3. Prior to GWT 1.5, it must have a public default (zero argument)
constructor or no constructor at all.
 4. As of GWT 1.5, it must have a default (zero argument) constructor
(with any access modifier) or no constructor at all.

On Jul 21, 1:56 pm, Juraj Vitko juraj.vi...@gmail.com wrote:
 Yeah I've left that out in the example, it of course is marked with
 IsSerializable.

 However! - I've found a solution (just needed to recall that I've had
 similar problem with Interfaces+Classes already):

 A Class (or Enum) type extending the said non-serializable interface
 (MyIface in the above example) needs to be defined in the same package
 as the interface. The compiler warning is then not produced.

 I've scanned GWT-Issues (and GWT docs) for this, haven't exactly found
 it - should I fill this as an Issue?

 On Jul 21, 9:49 pm, Nuno brun...@gmail.com wrote:



  Don't you also need to do:

  class POJO extends Serializable ?

  I got many alerts about this in my classes.

  On Tue, Jul 21, 2009 at 3:51 PM, Juraj Vitko juraj.vi...@gmail.com wrote:

   I'm trying to RPC-send an interface member in a POJO - all types
   implementing this interface are Enums (see the example below please).

   Now, the application works 100% in both hosted and web modes, but the
   Java to JavaScript compiler complains about the POJO object, that the
   MyIFace is not RPC-serializable. (was not serializable and has no
   concrete serializable subtypes)

   Any ideas how to get rid of that compiler warning? I'm using GWT 1.6
   for the time being.

   class POJO {  //this object is sent via the RPC
    MyIface iface;
   }

   interface MyIface extends IsSerializable {
    MyIface[] getVals(String param);
   }

   enum MyEnum implements MyIface {
     one(1),
     two(2);

     private MyEnum(String s) { this.s = s; }
     private MyEnum() { }

     private String s;

     MyIface[] getVals(String param) {
        return MyEnum.values();
     }
   }

  --
  Quer aprender a programar? acompanhe:
  Wants to learn GWT? Follow this blog -

 http://tcninja.blogspot.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-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: Pre-Compress GWT compiler output for web server

2009-07-22 Thread hazy1

It is dead simple to create a simple in-memory cache in your web
application for gzipped data.  Gzip the web page in memory the first
time it is created and then use this for subsequent requests to that
resource.

On Jul 22, 7:06 am, martinhansen martin.hanse...@googlemail.com
wrote:
 Hello,

 I am evaluating some approaches to reduce the amount of data being
 transmitted to the client browser. I am using the Apache Tomcat web
 server. I successfully managed to enable GZIP output for the Tomcat
 server by editing the server config file. It works fine. However, this
 way the data is compressed on-the-fly by the web server for every
 request which considerably increases server CPU load. Is this
 assumption correct?

 Is there a way to pre-compress the contents of my GWT app and have
 this pre-compressed content delivered by the web server?
--~--~-~--~~~---~--~~
You received 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: Command Pattern, MVP, EventBus

2009-07-22 Thread Jason A. Beranek

On Jul 22, 3:51 am, Thomas Broyer t.bro...@gmail.com wrote:
 They're IMO as easy to parse
 as path-like tokens like Gmail uses; it's just a matter of taste
 (and how you'd like to model your internal API)

Agree that the implementation depends on the model for an applications
internal API. Part of me thinks that most of the design patterns Ray
presented may not be generalizable into a Presenter, Place, EventBus,
or Command Pattern API library that would work for everyone. For
everyone who likes a simple key/value structure to place objects
(where any large paths are aspects of parsing a value token in an
application dependant way), there is someone who likes query-string
like tokens. For everyone who thinks an application wide event bus is
useful, there's someone that wants to partition an event bus into
specific components. And for everyone that wants a series of core
classes that represent all Presenter and View interfaces/objects,
there are individuals that will prefer to implement M-V-P in their own
classes without providing interfaces and abstractions.

You bring up a good point regarding preference, and I think its
relevant to this thread in considering that there isn't a clear cut
approach to the design patterns presented that is right or wrong for
any given application. Each developer must pick their poison, so to
speak, and make trade off's based on their concerns.

Respectfully,

Jason
--~--~-~--~~~---~--~~
You received 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: Command Pattern, MVP, EventBus

2009-07-22 Thread Jason A. Beranek

On Jul 22, 6:59 am, Daniel Wellman etl...@gmail.com wrote:
 So it seems it's a tradeoff in how much test coverage you need --
 expose the low-level HasXyz interfaces in your view if you need more
 automated test code coverage, or use a gateway interface to the view
 which exposes higher-level methods like getPassword().  Using this
 gateway means you lose test coverage of which specific widgets are
 wired to a given Presenter callback, but you may be able to live with
 that risk (a quick manual exploratory test might give you that
 confidence).

If you think about it, there is more a spectrum than a clear
separation between HasXyz as a low-level interface and a gateway
interface to the view. Based on Ray's talk, the Display interface for
each presenter is in effect the Gateway interface for the View and the
HasClickHandler or HasValue interface components expose the expect
interaction with that object.  While these appear to be low-level, it
all depends on how the View itself is implemented. For example, I
could have a display interface for a UI that displays a list of
contacts having a function like this:

interface Display {
...
HasSelectionHandlersInteger getSelectionButton(){}
..
}

The Display Gateway object specifies that the SelectionButton is
responsible for producing selection events that return the index of
the list item selected. However, from a UI perspective this could be
implemented as a selection on a ComboBox, an HTML List, response to
clicking on a FlexTable row, clicking on a Radio button, or even
clicking a CheckBox next to the list item and then clicking on a Make
Selection button object. The level of granularity depends, like you
said, on how much interaction you want testable using JUnit tests
rather than GWTTestCases, but it is not an either/or choice.  I do see
value in having HasXyzHandlers interfaces returned in the View Gateway
interface as a way of testing asynchronous interaction is correct,
since asynchronous interaction cannot be statically verified at
compile time.

-Jason
--~--~-~--~~~---~--~~
You received 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 Maps, user could add their markers.

2009-07-22 Thread lumo
create a new mar

2009/7/22 pennfoli0 pennfo...@gmail.com


 Hi,

 can this be possible that users could also add their own marker, for
 example in this site

 http://gmaps-samples.googlecode.com/svn/trunk/manymarkers/markerhash.html

 they could also insert their own marker and also insert their details.

 What approach should I use? How will be their data be save.

 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: Login Application

2009-07-22 Thread Shane

Do you send over HTTPS?

On Jul 23, 4:03 am, Sean slough...@gmail.com wrote:
 I don't use the Google App engine, so I built my own login. I have a
 database with user name's and passwords.

 I take what's in the text boxes, send it via RPC to the server, have
 the server select the password from the db for the submitted username
 and check it against what was sent. IF either the password doesn't
 match, or there was no user by that name I return false. Else I return
 true. So far it's worked like a charm.

 On Jul 22, 2:24 am, Paulo Coutinho pa...@prsolucoes.com wrote:



  I use google api to login in my appengine,

 http://brfotolog.appspot.com

  2009/7/22 sin kang jlc...@gmail.com:

   you can use google account in appengine.

   it's like as long as you have google account you are valid.

   which means google takes care of all those authentication. you just have 
   to
   call the service and hand over the google id and password.

   it's quite simple. this link might helps.

  http://code.google.com/appengine/docs/java/users/overview.html

   Sin-Kang(강신)
   +82-10-6638-7878
   +44-78555-49312

   On Wed, Jul 22, 2009 at 1:39 AM, saurabh saurabhsn...@gmail.com wrote:

   Hello ,

            I am developing Login Application using GWT. My Interface is
   ready but I am thinking about where should values go. How can I check
   the UserName  Password sent by Client or I should use RPC for that.

   if this is so then what role my servlet should play.

   Thanks

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



Re: Google Maps, user could add their markers.

2009-07-22 Thread lumo
(i love it when my browser gets crazy...)
create a new marker when the onclick-event is fired and add some textboxes
so the user cann fill data? or create a form where users cam specify their
informations and use this form to create a new marker...

2009/7/23 lumo lumo2...@gmail.com

 create a new mar

 2009/7/22 pennfoli0 pennfo...@gmail.com


 Hi,

 can this be possible that users could also add their own marker, for
 example in this site

 http://gmaps-samples.googlecode.com/svn/trunk/manymarkers/markerhash.html

 they could also insert their own marker and also insert their details.

 What approach should I use? How will be their data be save.

 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: Selection of Widgets

2009-07-22 Thread Adam T

Hi Ewald,

Sounds like you want to prevent the default event handling of the
browser.  You'll need to add some event handlers to your HTML widget
and the call the preventDefault() method in them.  For example:

HTML widget = new HTML();
widget.addMouseDownHandler(new MouseDownHandler(){
public void onMouseDown(MouseDownEvent event) {
event.preventDefault();
}
});

(you might get away with just handling the mouse down event, you might
have to also handle mouse move - I can't remember without building a
full example myself, but you get the point, hopefully).

Regards,

Adam

On 22 Juli, 22:37, Ewald Pankratz ewald.pankr...@gmail.com wrote:
 Hi
 When I create a widget e.g. a HTML widget and go with the mouse over
 the widget and press the left mouse button and move the mouse
 somewhere else the widget or part of the widget will be selected. How
 can I get rid of this selection. I don't want any selection instead I
 want to draw a line from the widget to my current mouse pointer. Any
 ideas how to do that? I am a newbie.
 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
-~--~~~~--~~--~--~---



[gwt-contrib] Problems after upgrading to trunk

2009-07-22 Thread dflorey

After upgrading to trunk my app stopped working. In hosted mode in
don't get any error msg, but the hosted mode browser stays empty. When
compiling I get this error:

[ERROR] Unexpected
java.lang.NoSuchFieldError:
reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
(JdtCompiler.java:208)
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
(JdtCompiler.java:94)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
253)
at com.google.gwt.dev.javac.CompilationState.compile
(CompilationState.java:338)
at com.google.gwt.dev.javac.CompilationState.refresh
(CompilationState.java:247)
at com.google.gwt.dev.javac.CompilationState.init
(CompilationState.java:116)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
(ModuleDef.java:285)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
at com.google.gwt.dev.Compiler.run(Compiler.java:193)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:151)

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



[gwt-contrib] Re: Proposal for improving JDO/JPA RPC support

2009-07-22 Thread Sami Jaber
Hi Dan,

That sounds to be a really good step in the right direction.
This mecanisms seems to cover all the nominal use cases that we would face
regarding the different o/r mapping impl.
I would just make a few remarks :

1) When you call all the setXX() methods when the object is sent back to the
server, the o/r mapper will assume that those fields have been modified and
the dirty state tracking (which is activated before the setXX() call if I
well understand) will raise an update operation for all the fields. I
think you have to compare bean n-1 field values and bean n field values to
call only the setXX() for the modified values. What about collection ?
Hibernate provides a PersistentSet that ensure the object state tracking,
will you call setXX() for all items of client data ?

2) If you analyze an enhanced entity in the Hibernate land you will see that
it contains many coarse-grained information, like a SessionImplementor (it
depends on the dynamic proxy factory and impl you have used) -
https://www.hibernate.org/hib_docs/v3/api/org/hibernate/proxy/ProxyFactory.html.
Serializing those data in a String based representation could be potentially
harmful in term of bandwith and payload. Why not providing a way to store
this client data info in the HttpSession ?

Sami


On Mon, Jul 20, 2009 at 8:06 PM, Daniel Rice (דניאל רייס)
r...@google.comwrote:

 Hi all -
   I've been working on a patch to improve support for RPC of
 persistence-enhanced objects that would replace the one I recently submitted
 as trunk revision 5672.  I'd like to give those of you who are interested in
 the interaction between RPC and persistence a chance to help me validate the
 design before moving forward.

  The idea is to be able to deal with different persistence mechanisms in a
 way that does not depend too much on the details of their implementations.
 We assume that the persistence mechanism provides a way for instances to be
 detached from the object store, serialized, deserialized, and reattached in
 a well-defined way. Our strategy leverages this capability as follows:

 1) User code on the server detaches the object and places it into a state
 such that serialization is valid
 2) GWT detects whether any instance fields are present on the object that
 were not known to client code
 3) GWT performs hybrid serialization:
   a) GWT uses its regular RPC mechanism for the client-visible fields
   b) GWT uses Java serialization for any additional server-only instance
 fields
   c) GWT encodes the results of step (b) as a String
   d) GWT prepends the encoded String to the regular RPC data and transmits
 to the client
 4) Client code treats the object in the normal way and does not interact
 with the data from step (3b)
 5) When the object is sent back to the server, the normal RPC mechanism is
 altered as follows
   a) the encoded server data is decoded and deserialized into the new
 object instance
   b) the client data is populated using setXXX() method invocations rather
 than by directly setting field values

 All this is done only for classes that can be send bidirectionally, and
 which are determined to be (potentially) enhanced.
 The potential for enhancement is signaled in one of three ways:

 o The user adds the fully-qualified class name to a 'gwt.enhancedClasses'
 configuration property
 o The class is determined to have the JDO @PersistenceCapable annotation
 with detachable=true
 o The class is determined to have the JPA @Entity annotation

 If a class is determined to be potentially enhanced, the list of fields
 known to the client is added to the '.gwt.rpc' file that contains the RPC
 whitelist.  This list is used by step 2 of the RPC process which compares
 the set of client- and server-visible fields.

   Step (5b) is necessary to accommodate mechanisms like that of JDO, where
 the setter methods are enhanced to provide object state tracking (dirty
 bits).  If we were to set the fields directly, the object detached state
 would not be updated properly.

   My hope is that this mechanism would be general enough to support a
 variety of persistence mechanisms without the need to add a lot of
 special-case code.  I'm looking forward to any comments that you have as to
 whether this will work with your favorite persistence API, or any other
 thoughts that you have.  Thanks,

 Dan


 


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



[gwt-contrib] Generators and hosted mode refresh

2009-07-22 Thread Alen Vrecko

Hi,

continuing from 
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
. Sorry for the added garbage could have known better to post it here
in the first place.

I see generators as en extension to client code therefore I expect
them to behave a bit like client code namely refresh recompiles the
generator and client class code changes are visible to the generator.

As recompiling the generator feature goes maybe it is a bit like
fairytale i.e. not really needed. Will just write the unit tests for
generators in any case before running the hosted mode and not play
with the generator on the fly with change code shutdown-start hosted
mode repeat.

But seeing the latest class files inside generator is needed for
refresh to work in some cases. Sure you can do much with TypeOracle
but you can't instantiate the JType. Afaik there is no bridge between
a JType and Class type.

What do you think?

Cheers
Alen

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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread Scott Blum
This is after ant clean?

On Wed, Jul 22, 2009 at 5:14 AM, dflorey daniel.flo...@gmail.com wrote:


 After upgrading to trunk my app stopped working. In hosted mode in
 don't get any error msg, but the hosted mode browser stays empty. When
 compiling I get this error:

 [ERROR] Unexpected
 java.lang.NoSuchFieldError:
 reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
 (JdtCompiler.java:208)
at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
 (JdtCompiler.java:94)
at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
 253)
at com.google.gwt.dev.javac.CompilationState.compile
 (CompilationState.java:338)
at com.google.gwt.dev.javac.CompilationState.refresh
 (CompilationState.java:247)
at com.google.gwt.dev.javac.CompilationState.init
 (CompilationState.java:116)
at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
 (ModuleDef.java:285)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
at com.google.gwt.dev.Compiler.run(Compiler.java:193)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
at
 com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
 88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
 (CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:151)

 Any ideas?
 


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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Brian Stoler
Hi Scott,
Gin uses reflection because it reuses the heavy lifting from Guice, which is
not GWT-aware.

Seems like both issues could be resolved if generators were loaded in the
client code ClassLoader. Is there a technical or philosophical problem with
doing so? I can understand it might not be at the top of the priority list
right now, but wanted to know if it would be a bad thing if someone were to
propose a patch.

-brian

On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum sco...@google.com wrote:

 Generally speaking, you do not want to use reflection inside a generator to
 try to view the client code.  That's what TypeOracle is for, that's the
 supported way of viewing client code.
 As for the separate issue of modifying and recompiling a generator itself
 while running, you're right in that we don't explicitly support it.  Using
 unit tests during generator development as you suggest sounds like a good
 strategy to me.  In some cases, you might also get your IDE to do a
 hot-replace if you modify the code while debugging, but this can be flaky.

 On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko alen_vre...@yahoo.comwrote:


 Hi,

 continuing from
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
 . Sorry for the added garbage could have known better to post it here
 in the first place.

 I see generators as en extension to client code therefore I expect
 them to behave a bit like client code namely refresh recompiles the
 generator and client class code changes are visible to the generator.

 As recompiling the generator feature goes maybe it is a bit like
 fairytale i.e. not really needed. Will just write the unit tests for
 generators in any case before running the hosted mode and not play
 with the generator on the fly with change code shutdown-start hosted
 mode repeat.

 But seeing the latest class files inside generator is needed for
 refresh to work in some cases. Sure you can do much with TypeOracle
 but you can't instantiate the JType. Afaik there is no bridge between
 a JType and Class type.

 What do you think?

 Cheers
 Alen

 



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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Bruce Johnson
@Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
didn't we conclude that loading classes at least for annotations would make
the most sense?
I think now that we have enhanced the CCL, for deRPC, to delegate to grey
area classes that aren't strictly in the client space, maybe we actually
could run generators in the CCL.

On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler bsto...@google.com wrote:

 Hi Scott,
 Gin uses reflection because it reuses the heavy lifting from Guice, which
 is not GWT-aware.

 Seems like both issues could be resolved if generators were loaded in the
 client code ClassLoader. Is there a technical or philosophical problem with
 doing so? I can understand it might not be at the top of the priority list
 right now, but wanted to know if it would be a bad thing if someone were to
 propose a patch.

 -brian


 On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum sco...@google.com wrote:

 Generally speaking, you do not want to use reflection inside a generator
 to try to view the client code.  That's what TypeOracle is for, that's the
 supported way of viewing client code.
 As for the separate issue of modifying and recompiling a generator itself
 while running, you're right in that we don't explicitly support it.  Using
 unit tests during generator development as you suggest sounds like a good
 strategy to me.  In some cases, you might also get your IDE to do a
 hot-replace if you modify the code while debugging, but this can be flaky.

 On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko alen_vre...@yahoo.comwrote:


 Hi,

 continuing from
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
 . Sorry for the added garbage could have known better to post it here
 in the first place.

 I see generators as en extension to client code therefore I expect
 them to behave a bit like client code namely refresh recompiles the
 generator and client class code changes are visible to the generator.

 As recompiling the generator feature goes maybe it is a bit like
 fairytale i.e. not really needed. Will just write the unit tests for
 generators in any case before running the hosted mode and not play
 with the generator on the fly with change code shutdown-start hosted
 mode repeat.

 But seeing the latest class files inside generator is needed for
 refresh to work in some cases. Sure you can do much with TypeOracle
 but you can't instantiate the JType. Afaik there is no bridge between
 a JType and Class type.

 What do you think?

 Cheers
 Alen





 


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



[gwt-contrib] Re: Trouble building GWT 2.0 from svn

2009-07-22 Thread mescali...@gmail.com
John Tamplin wrote:
 On Tue, Jul 21, 2009 at 9:51 AM, mescali...@gmail.com
 mailto:mescali...@gmail.com mescali...@gmail.com
 mailto:mescali...@gmail.com wrote:

 so I did I.
 I repeated the above steps today.
 ant (1.7.1) run up to some point, then I get this error:

 [gwt.javac] Compiling 725 source files to
 /home/federico/gwt-trunk/trunk/build/out/dev/core/bin
 [gwt.javac]
 
 /home/federico/gwt-trunk/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java:32:
 package org.eclipse.jdt.core.compiler does not exist
 [gwt.javac] import org.eclipse.jdt.core.compiler.CategorizedProblem;
 [gwt.javac] ^
 [gwt.javac]
 
 /home/federico/gwt-trunk/trunk/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java:33:
 cannot find symbol


 Can you svn up in the tools directory?  It sounds like perhaps you are
 missing the more recent JDT.


feder...@gentoo64 ~/gwt-trunk/tools $ svn up
At revision 5768.


my guess is that's not finding JDT (or anytinhg else).

that's why I had to put all (latest version of) jars I found in toolls
directory to CLASSPATH.
when doing so, compile goes well for a while, but stop later -for the
error reported in original message-


-- 




signature.asc
Description: OpenPGP digital signature


[gwt-contrib] Re: Trouble building GWT 2.0 from svn

2009-07-22 Thread mescali...@gmail.com
John Tamplin wrote:
 Can you svn up in the tools directory?  It sounds like perhaps you are
 missing the more recent JDT.


btw,
feder...@gentoo64 ~/gwt-trunk/tools $ ls -1 lib/eclipse/jdt*
lib/eclipse/jdt-3.1.1.jar
lib/eclipse/jdt-3.1.1-src.zip
lib/eclipse/jdt-3.3.1.jar
lib/eclipse/jdt-3.3.1-src.zip
lib/eclipse/jdt-3.4.2.jar
lib/eclipse/jdt-3.4.2-src.zip

when declaring the classpath (first try - original message) I was
referring to latest available (3.4.2) version




signature.asc
Description: OpenPGP digital signature


[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Scott Blum
But there is no CCL when running the compiler.  We never go through the
trouble of constructing a client class loader environment for generators
to access, they just run in the system class loader.  Supposing we did build
a client classloader and run the generators there, how would generators then
access stuff outside the client space?  IE, how would the Gin generator
access Guice since it wouldn't be in client space?

On Wed, Jul 22, 2009 at 10:30 AM, Bruce Johnson br...@google.com wrote:

 @Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
 didn't we conclude that loading classes at least for annotations would make
 the most sense?
 I think now that we have enhanced the CCL, for deRPC, to delegate to grey
 area classes that aren't strictly in the client space, maybe we actually
 could run generators in the CCL.

 On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler bsto...@google.com wrote:

 Hi Scott,
 Gin uses reflection because it reuses the heavy lifting from Guice, which
 is not GWT-aware.

 Seems like both issues could be resolved if generators were loaded in the
 client code ClassLoader. Is there a technical or philosophical problem with
 doing so? I can understand it might not be at the top of the priority list
 right now, but wanted to know if it would be a bad thing if someone were to
 propose a patch.

 -brian


 On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum sco...@google.com wrote:

 Generally speaking, you do not want to use reflection inside a generator
 to try to view the client code.  That's what TypeOracle is for, that's the
 supported way of viewing client code.
 As for the separate issue of modifying and recompiling a generator itself
 while running, you're right in that we don't explicitly support it.  Using
 unit tests during generator development as you suggest sounds like a good
 strategy to me.  In some cases, you might also get your IDE to do a
 hot-replace if you modify the code while debugging, but this can be flaky.

 On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko alen_vre...@yahoo.comwrote:


 Hi,

 continuing from
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c65457fa4df351c1
 . Sorry for the added garbage could have known better to post it here
 in the first place.

 I see generators as en extension to client code therefore I expect
 them to behave a bit like client code namely refresh recompiles the
 generator and client class code changes are visible to the generator.

 As recompiling the generator feature goes maybe it is a bit like
 fairytale i.e. not really needed. Will just write the unit tests for
 generators in any case before running the hosted mode and not play
 with the generator on the fly with change code shutdown-start hosted
 mode repeat.

 But seeing the latest class files inside generator is needed for
 refresh to work in some cases. Sure you can do much with TypeOracle
 but you can't instantiate the JType. Afaik there is no bridge between
 a JType and Class type.

 What do you think?

 Cheers
 Alen





 



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



[gwt-contrib] Re: GWT emulation of HTML5/CSS3 features

2009-07-22 Thread Arthur Kalmenson

This would definitely be a killer feature.

A common API for something like Web Workers and App Cache (maybe
wrapper for http://code.google.com/p/webstorageportabilitylayer/) that
can seamlessly switch talk to Gears or native HTML 5 implementation
would be very nice. I think it's a lot easier to convince a company to
install Gears then installing and using a completely new browser, so
at least for enterprise settings some common API would be very useful.

Regards,
--
Arthur Kalmenson



On Mon, Jun 29, 2009 at 10:24 AM, dfloreydaniel.flo...@gmail.com wrote:

 Hi,
 I've been wondering how GWT should deal with upcoming new features in
 HTML5/CSS3.
 There are several areas where functionality that has been implemented
 in GWT is now also available in the upcoming rendering engines.

 GWT is creating highly optimized JavaScript and the JavaScript-engines
 are getting better and better... but: My guess is that for example
 animations will be smoother when using CSS3 animations instead of
 JavaScript based animations.
 Same about rounded corners/shadows and stuff alike. In GWT you'll
 typically use DecoratedPanel to implement rounded corners with
 shadows. But Firefox3.5 and the latest Safari and Chrome releases also
 support css-based rounded borders and shadows.

 So my proposal would be to use deferred binding to emulate these
 features on browsers that do not support the latest features (IE8...)
 and to use a lightweight css based impl on WebKit/Firefox 3.5.

 In my example of DecoratedPanel the 9x9 approach should be kept for IE
 and a null impl with css based rounded corners should be available for
 Firefox (css have to match the given theme).
 Animations that come with the standard widgets should also be able to
 fallback to css based animations when available.

 I've been also reading some posts about the new datagrid html
 extension and thought it might be clever to have a look at the spec
 when moving the tables from incubator to trunk to see how far the
 concepts match. Would be very cool to have a native table
 implementation on WebKit browsers while other fallback to gwt impls.

 What do you think?
 


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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon

This patch took me hours to absorb.  It sounds simple to modify the
compiler to emulate stacks, but understanding precisely where the stack
updates need to happen is difficult!

The implementation is very clean.  There are just two nits in the
comments.

The line number recording looks like it should have a couple of
exceptions where it includes a line-number updating statement just to be
safe.

Most significantly, it looks to me like one thing is missing from the
finally block handling, and a great deal of the try-finally handling in
there could safely be omitted.  Please check out the comments on this
and see if you agree.



http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode132
Line 132: // $stack[$stackDepth = stackIndex] = currentFunction
This is safe, but why is it necessary?  I would have thought that
$stackDepth = stackIndex is enough.  Shouldn't $stack[stackIndex] be the
same until this function decrements stackIndex and returns?

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode174
Line 174: *   exitingEarly  $stackDepeth = stackIndex - 1;
There is no way to know for sure!  It could depend on whether the try
block throws an exception or simply fell off its end.  Further, the
throw might not be apparent in the code; it could have been thrown by
some other function that the try block calls.

Maybe this pop code is not needed.  See my next comment.
Is it even necessary to bother?  See my next comment.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
This is a clever approach, and would seem to mean that it's not
necessary at the *throw* site to update the emulated stack.  Instead, it
gets updated as soon as user code (as opposed to JSVM code or browser
API code) starts running again.

The only places user code can restart after an exception are catch
blocks and finally blocks.  Here you describe updating catch blocks.
Wouldn't finally blocks need the same treatment?

Going on from there, since catch and finally blocks reset the stack at
their entry, is it necessary any longer to bother popping in finally
blocks?  That looks like a vestige from an earlier approach where
exception throws did cause immediate stack updates.  The newer approach
appears to be that pushes happen at function entry, pops happen at
function exit, and just-in-case stack resets happen at the top of
finally and catch blocks.

As an added bonus, the code should be simpler, because exitBlock and
earlyExitName variables are no longer needed.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
It's not an arbitrary point.  If I understand correctly, it is if an
exception occurs at the currently visited location?  This variable then
gets updated by visit() methods so that it stays accurate.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode360
Line 360: earlyExitNames.remove(exitBlock);
This statement looks strange.  Is it supposed to happen before the
previous one?

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode400
Line 400: // Don't need a pop after a throw or break statement
There are other cases where a function might not fall off the end.  For
example, there might be an if statement, and both branches might end
with a return or a throw.

I think an extra pop would be fine, because JavaScript is looser than
Java about unreachable code.  However, it is worth at least commenting
that the point here is not to catch all cases, but to remove the excess
pops in the most common cases.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode604
Line 604: private String baseName(String x) {
The convention seems to be that x is an AST node.  This variable holds
a fileName or the like.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode620
Line 620: // Same location; ignore
This can give wrong line numbers for looping statements, because the
visitor order is a subset of the possible control-flow paths.  Here's an
example:

for (int i = 0; i  someFunction(); i++) {
   doStuff(i);
}

Suppose someFunction() throws an exception on its *second* invocation
but not its first:  The line numbers are then incorrect.  To correct
this, a simple way would be to add paranoid extra line-number updaters
for for loops and while statements.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode663
Line 663: private boolean recordLineNumbers =
Boolean.getBoolean(gwt.dev.stack.recordLineNumbers);
There is now a module CompilerParameters.gwt.xml that has misc. compiler
settings that most users won't touch.  While it's not a big deal, it
seems helpful to keep things to the smallest scope that makes sense.
Module scope is smaller than property scope.

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

--~--~-~--~~~---~--~~

[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

I get this error when gwt-compiling my app. gwt trunk compiles just
fine.

On Jul 22, 4:13 pm, Scott Blum sco...@google.com wrote:
 This is after ant clean?



 On Wed, Jul 22, 2009 at 5:14 AM, dflorey daniel.flo...@gmail.com wrote:

  After upgrading to trunk my app stopped working. In hosted mode in
  don't get any error msg, but the hosted mode browser stays empty. When
  compiling I get this error:

  [ERROR] Unexpected
  java.lang.NoSuchFieldError:
  reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
         at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
  (JdtCompiler.java:208)
         at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
  (JdtCompiler.java:94)
         at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
  253)
         at com.google.gwt.dev.javac.CompilationState.compile
  (CompilationState.java:338)
         at com.google.gwt.dev.javac.CompilationState.refresh
  (CompilationState.java:247)
         at com.google.gwt.dev.javac.CompilationState.init
  (CompilationState.java:116)
         at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
  (ModuleDef.java:285)
         at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
         at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
         at com.google.gwt.dev.Compiler.run(Compiler.java:193)
         at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
         at
  com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
  88)
         at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
  (CompileTaskRunner.java:82)
         at com.google.gwt.dev.Compiler.main(Compiler.java:151)

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread rice


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode174
Line 174: *   exitingEarly  $stackDepeth = stackIndex - 1;
There's a typo here: stackDep_e_th

On 2009/07/22 15:24:47, Lex wrote:
 There is no way to know for sure!  It could depend on whether the try
block
 throws an exception or simply fell off its end.  Further, the throw
might not be
 apparent in the code; it could have been thrown by some other function
that the
 try block calls.

 Maybe this pop code is not needed.  See my next comment.
 Is it even necessary to bother?  See my next comment.

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

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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread Scott Blum
I'm suggesting that ant clean and recompiling trunk from scratch might fix
this.  Also, make sure you svn up your tools directory, just in case.

On Wed, Jul 22, 2009 at 11:27 AM, dflorey daniel.flo...@gmail.com wrote:


 I get this error when gwt-compiling my app. gwt trunk compiles just
 fine.

 On Jul 22, 4:13 pm, Scott Blum sco...@google.com wrote:
  This is after ant clean?
 
 
 
  On Wed, Jul 22, 2009 at 5:14 AM, dflorey daniel.flo...@gmail.com
 wrote:
 
   After upgrading to trunk my app stopped working. In hosted mode in
   don't get any error msg, but the hosted mode browser stays empty. When
   compiling I get this error:
 
   [ERROR] Unexpected
   java.lang.NoSuchFieldError:
   reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
  at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
   (JdtCompiler.java:208)
  at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
   (JdtCompiler.java:94)
  at
 com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
   253)
  at com.google.gwt.dev.javac.CompilationState.compile
   (CompilationState.java:338)
  at com.google.gwt.dev.javac.CompilationState.refresh
   (CompilationState.java:247)
  at com.google.gwt.dev.javac.CompilationState.init
   (CompilationState.java:116)
  at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
   (ModuleDef.java:285)
  at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
  at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
  at com.google.gwt.dev.Compiler.run(Compiler.java:193)
  at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
  at
   com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
   88)
  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
   (CompileTaskRunner.java:82)
  at com.google.gwt.dev.Compiler.main(Compiler.java:151)
 
   Any ideas?
 


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



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

Update:
- When gwt-compiling using the Eclipse-plugin I get the error pasted
above.
- When starting hosted mode the browser page is empty with no errors
- When compiling from hosted mode browser everything works fine
- Launching compiled app in external browser works fine

On Jul 22, 5:27 pm, dflorey daniel.flo...@gmail.com wrote:
 I get this error when gwt-compiling my app. gwt trunk compiles just
 fine.

 On Jul 22, 4:13 pm, Scott Blum sco...@google.com wrote:



  This is after ant clean?

  On Wed, Jul 22, 2009 at 5:14 AM, dflorey daniel.flo...@gmail.com wrote:

   After upgrading to trunk my app stopped working. In hosted mode in
   don't get any error msg, but the hosted mode browser stays empty. When
   compiling I get this error:

   [ERROR] Unexpected
   java.lang.NoSuchFieldError:
   reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
          at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
   (JdtCompiler.java:208)
          at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
   (JdtCompiler.java:94)
          at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
   253)
          at com.google.gwt.dev.javac.CompilationState.compile
   (CompilationState.java:338)
          at com.google.gwt.dev.javac.CompilationState.refresh
   (CompilationState.java:247)
          at com.google.gwt.dev.javac.CompilationState.init
   (CompilationState.java:116)
          at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
   (ModuleDef.java:285)
          at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
          at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
          at com.google.gwt.dev.Compiler.run(Compiler.java:193)
          at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
          at
   com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
   88)
          at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
   (CompileTaskRunner.java:82)
          at com.google.gwt.dev.Compiler.main(Compiler.java:151)

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread bobv

I don't think getting this thing wrapped up will take too much more
work.


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode132
Line 132: // $stack[$stackDepth = stackIndex] = currentFunction
The assignment into $stack is from an earlier version of the code.  It
should be unnecessary.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
I think that popping in a finally block is necessary only when you have
a return statement in there.  Maybe the exitingEarly variable should
be called exitBlockExitsFunctionNormally.  The amended pattern is that
a pop is necessary anywhere normal flow control might exit the function.

function foo() {
try {
   if (maybe) {
 return;
   }
} finally {
   // maybe function exits and pops here
}

otherCodePossiblyExecuted();
// definitely pop here
}


I agree that there is no real reason to have special handling for throw
statements since the code has to handle native exceptions anyway.  Both
catch and finally blocks should reset their stack depth.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
exception - unconditional flow control change

arbitrary - within the associated try block

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode360
Line 360: earlyExitNames.remove(exitBlock);
It should; this has no cleanup effect as written

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode400
Line 400: // Don't need a pop after a throw or break statement
This is an optimization and I am taking advantage of the looser JS
syntax.

This could be made better with a visitor that will find all reachable
code and then treating the implicit return undefined at the end of the
block as just another normal exit path.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode620
Line 620: // Same location; ignore
 To correct this, a simple way
 would be to add paranoid extra line-number updaters for for loops and
while
 statements.

Makes sense.

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

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



[gwt-contrib] Re: GWT emulation of HTML5/CSS3 features

2009-07-22 Thread dflorey

I think it is helpful if we distinguish between optional and mandatory
features.
If GWT would come with a set of widgets or library components that
behave slightly different on different browsers this might not be bad
in general. I'm aware that the general approach of GWT is to write
software once and run it almost everywhere with identical results.
But I can imagine several areas where it may be appropriate to have
e.g. widgets that look even better when the rendering engine supports
3d animations etc. If the developer can use the widget as is and will
get a default behavior on all browsers and an extended behavior on
top on some of them, this would be beneficial IMO.
Think of a TabPanel widget that takes advantage of the new funky 3D
animation and transition feature on WebKit and provides a working
default implementation for browsers not supporting CSS3 looking a
little bit more boring.
When it comes to libraries like Database storage it would be helpful
to have a dummy implementation that will do nothing in case when no
persistence is available and to provide some isAvailable() method
for each additional feature.

On Jul 22, 5:00 pm, Arthur Kalmenson arthur.k...@gmail.com wrote:
 This would definitely be a killer feature.

 A common API for something like Web Workers and App Cache (maybe
 wrapper forhttp://code.google.com/p/webstorageportabilitylayer/) that
 can seamlessly switch talk to Gears or native HTML 5 implementation
 would be very nice. I think it's a lot easier to convince a company to
 install Gears then installing and using a completely new browser, so
 at least for enterprise settings some common API would be very useful.

 Regards,
 --
 Arthur Kalmenson



 On Mon, Jun 29, 2009 at 10:24 AM, dfloreydaniel.flo...@gmail.com wrote:

  Hi,
  I've been wondering how GWT should deal with upcoming new features in
  HTML5/CSS3.
  There are several areas where functionality that has been implemented
  in GWT is now also available in the upcoming rendering engines.

  GWT is creating highly optimized JavaScript and the JavaScript-engines
  are getting better and better... but: My guess is that for example
  animations will be smoother when using CSS3 animations instead of
  JavaScript based animations.
  Same about rounded corners/shadows and stuff alike. In GWT you'll
  typically use DecoratedPanel to implement rounded corners with
  shadows. But Firefox3.5 and the latest Safari and Chrome releases also
  support css-based rounded borders and shadows.

  So my proposal would be to use deferred binding to emulate these
  features on browsers that do not support the latest features (IE8...)
  and to use a lightweight css based impl on WebKit/Firefox 3.5.

  In my example of DecoratedPanel the 9x9 approach should be kept for IE
  and a null impl with css based rounded corners should be available for
  Firefox (css have to match the given theme).
  Animations that come with the standard widgets should also be able to
  fallback to css based animations when available.

  I've been also reading some posts about the new datagrid html
  extension and thought it might be clever to have a look at the spec
  when moving the tables from incubator to trunk to see how far the
  concepts match. Would be very cool to have a native table
  implementation on WebKit browsers while other fallback to gwt impls.

  What do you think?
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Problems after upgrading to trunk

2009-07-22 Thread dflorey

Hmmm, very strange. After deleting all the *.jdt.prefs* files in
my .settings directory everything works fine again.
No idea, never created these files but they seem to be harmful under
certain circumstances ;-)

On Jul 22, 5:37 pm, dflorey daniel.flo...@gmail.com wrote:
 Update:
 - When gwt-compiling using the Eclipse-plugin I get the error pasted
 above.
 - When starting hosted mode the browser page is empty with no errors
 - When compiling from hosted mode browser everything works fine
 - Launching compiled app in external browser works fine

 On Jul 22, 5:27 pm, dflorey daniel.flo...@gmail.com wrote:



  I get this error when gwt-compiling my app. gwt trunk compiles just
  fine.

  On Jul 22, 4:13 pm, Scott Blum sco...@google.com wrote:

   This is after ant clean?

   On Wed, Jul 22, 2009 at 5:14 AM, dflorey daniel.flo...@gmail.com wrote:

After upgrading to trunk my app stopped working. In hosted mode in
don't get any error msg, but the hosted mode browser stays empty. When
compiling I get this error:

[ERROR] Unexpected
java.lang.NoSuchFieldError:
reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
       at com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions
(JdtCompiler.java:208)
       at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.init
(JdtCompiler.java:94)
       at 
com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:
253)
       at com.google.gwt.dev.javac.CompilationState.compile
(CompilationState.java:338)
       at com.google.gwt.dev.javac.CompilationState.refresh
(CompilationState.java:247)
       at com.google.gwt.dev.javac.CompilationState.init
(CompilationState.java:116)
       at com.google.gwt.dev.cfg.ModuleDef.getCompilationState
(ModuleDef.java:285)
       at com.google.gwt.dev.Precompile.precompile(Precompile.java:455)
       at com.google.gwt.dev.Precompile.precompile(Precompile.java:395)
       at com.google.gwt.dev.Compiler.run(Compiler.java:193)
       at com.google.gwt.dev.Compiler$1.run(Compiler.java:144)
       at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:
88)
       at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
       at com.google.gwt.dev.Compiler.main(Compiler.java:151)

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Alen Vrecko

Hey guys.

Imho having Generators in the CCL club is icing on the cake...very
cool but not really essential.

I can confirm using JavaRebel solves both problems (generator code
change, and gin module changes, @Inject added etc). For the time being
I think this is a reasonable compromise for people who want to change
gin code in hosted mode.

afaik you don't need to supply source code of the generator. Should we
want them fully in the CCL club this would break backwards
compatibility.

As Class loading goes. How about: Load generator and all its libraries
from SystemCL to a GeneratorClassLoader and load all gwt client code
from CCL into GeneratorClassLoader to. Like a hybrid space of SystemCL
and CCL.

I see 2 problems with this. Passing the TreeLogger and Context isn't
compatible since one is from GeneratorCL the other from SystemCL (with
some very heavy lifting this can be worked around). Afraid that super
source code from CCL would be picked up before the same stuff from
SystemCL(I don't see any way to get this info).

Other ways might require more comprehensive changes to gwt codebase.

imho this is starting to sound like one of those things that are more
trouble than they are worth.

Cheers
Alen

On Jul 22, 4:53 pm, Scott Blum sco...@google.com wrote:
 But there is no CCL when running the compiler.  We never go through the
 trouble of constructing a client class loader environment for generators
 to access, they just run in the system class loader.  Supposing we did build
 a client classloader and run the generators there, how would generators then
 access stuff outside the client space?  IE, how would the Gin generator
 access Guice since it wouldn't be in client space?

 On Wed, Jul 22, 2009 at 10:30 AM, Bruce Johnson br...@google.com wrote:
  @Scott: Hasn't there been a subtle shift in this regard? With GWT 1.5,
  didn't we conclude that loading classes at least for annotations would make
  the most sense?
  I think now that we have enhanced the CCL, for deRPC, to delegate to grey
  area classes that aren't strictly in the client space, maybe we actually
  could run generators in the CCL.

  On Wed, Jul 22, 2009 at 10:24 AM, Brian Stoler bsto...@google.com wrote:

  Hi Scott,
  Gin uses reflection because it reuses the heavy lifting from Guice, which
  is not GWT-aware.

  Seems like both issues could be resolved if generators were loaded in the
  client code ClassLoader. Is there a technical or philosophical problem with
  doing so? I can understand it might not be at the top of the priority list
  right now, but wanted to know if it would be a bad thing if someone were to
  propose a patch.

  -brian

  On Wed, Jul 22, 2009 at 7:20 AM, Scott Blum sco...@google.com wrote:

  Generally speaking, you do not want to use reflection inside a generator
  to try to view the client code.  That's what TypeOracle is for, that's the
  supported way of viewing client code.
  As for the separate issue of modifying and recompiling a generator itself
  while running, you're right in that we don't explicitly support it.  Using
  unit tests during generator development as you suggest sounds like a good
  strategy to me.  In some cases, you might also get your IDE to do a
  hot-replace if you modify the code while debugging, but this can be flaky.

  On Wed, Jul 22, 2009 at 6:45 AM, Alen Vrecko alen_vre...@yahoo.comwrote:

  Hi,

  continuing from
 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
  . Sorry for the added garbage could have known better to post it here
  in the first place.

  I see generators as en extension to client code therefore I expect
  them to behave a bit like client code namely refresh recompiles the
  generator and client class code changes are visible to the generator.

  As recompiling the generator feature goes maybe it is a bit like
  fairytale i.e. not really needed. Will just write the unit tests for
  generators in any case before running the hosted mode and not play
  with the generator on the fly with change code shutdown-start hosted
  mode repeat.

  But seeing the latest class files inside generator is needed for
  refresh to work in some cases. Sure you can do much with TypeOracle
  but you can't instantiate the JType. Afaik there is no bridge between
  a JType and Class type.

  What do you think?

  Cheers
  Alen


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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon


http://gwt-code-reviews.appspot.com/47816/diff/1/5
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode184
Line 184: * the stack depth.
Oh, right, the pop for a return has to be placed in the enclosing
finally, and it must only do a pop if there is an early exit.  Tricky
tricky!  That means that final block tracking is necessary, and also
that the early-exit variables are necessary.  Bummer.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode197
Line 197: * An exit block might be nested in another exit block.
I see what is up with this, now.  The comment explains why it's a map.
It would be worth commenting what is in the map: the JsName for each
generated earlyExit variable.  Whenever a return happens within a
try-finally statement, the return sets earlyExit to true rather than
immediately popping the emulated stack.

http://gwt-code-reviews.appspot.com/47816/diff/1/5#newcode204
Line 204: * arbitrary point.
Cool.

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

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



[gwt-contrib] Re: Generators and hosted mode refresh

2009-07-22 Thread Scott Blum
Brian, do you know if Guice allows you to specify a ClassLoader other than
the active one?
In principle, I would be okay with GeneratorContext providing a special
other ClassLoader to generators that contained only client code; it would
have exactly what TypeOracle does.and just be another way to get the exact
same information.

I just think we need to separate the machine from the materials. :)

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



[gwt-contrib] fix a buffer overflow in AsyncFragmentLoader

2009-07-22 Thread spoon

Reviewers: bobv,

Description:
Freelend (fabbott) ran our test suite with assertions enabled, and found
an assertion failure in AsyncFragmentLoader.  Curiously, the code likely
works in a browser, due to arrays not being bounds checked when
compiling to JavaScript, but certainly the code is not behaving as
intended.

This patch adds a test case, fixes the bug, and gets RunAsyncFailureTest
to pass even with assertions enabled.


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

Affected files:
   user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java
   user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java



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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread bobv

Ready for another look.  Major changes:
   - No special handling for throw statements.
   - Force all try/finally to be try/catch/finally to ensure that a
caught JavaScriptException would have the correct stack data as well as
code running in the finally block.
   - Locations always record when execution order does not match
visitation order.
   - Add test case that always tests the JsStackEmulator.

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

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



[gwt-contrib] Re: fix a buffer overflow in AsyncFragmentLoader

2009-07-22 Thread bobv

LGTM.

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

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



[gwt-contrib] Re: RR : Emulate JS stack traces (phase 1)

2009-07-22 Thread spoon

LGTM.


http://gwt-code-reviews.appspot.com/47816/diff/3008/1037
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/47816/diff/3008/1037#newcode68
Line 68: private class Bootstrap extends JsVisitor {
Bootstrap took me a few minutes to figure out.  I think it is
bootstrapping the visitation?  If so, then something like
InstrumentAllFunctions looks more direct.

http://gwt-code-reviews.appspot.com/47816/diff/3008/1037#newcode748
Line 748: private boolean recordLineNumbers =
Boolean.getBoolean(gwt.dev.stack.recordLineNumbers);
Don't forget to change these to configuration properties, if it looks
good to you.  As further motivation, if they were config properties,
then an individual GWTTestCase could turn on the extra recording just
for itself.

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

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



[gwt-contrib] Force emulated stack traces when running JUnit tests?

2009-07-22 Thread BobV

Should running a web-mode test case always turn on the emulated stack
trace code?

You would get stack traces entries like:
Unknown.bx(YourClass.java:1234) regardless of which browser you're on
and the type of exception, Java-derived or native.  The cost is code
bloat: 64k versus 108k for the CoreSuite test to have both file names
and line numbers.  Just line numbers costs 96k and the stack alone is
80k.

The latter two cases would be more useful if JUnitShell retained the
symbol maps and deobfuscated the stack trace for you, but that's an
orthogonal pass.

-- 
Bob Vawter
Google Web Toolkit Team

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



[gwt-contrib] Re: Force emulated stack traces when running JUnit tests?

2009-07-22 Thread Scott Blum
On Wed, Jul 22, 2009 at 4:46 PM, BobV b...@google.com wrote:

 Should running a web-mode test case always turn on the emulated stack
 trace code?

 You would get stack traces entries like:
 Unknown.bx(YourClass.java:1234) regardless of which browser you're on
 and the type of exception, Java-derived or native.  The cost is code
 bloat: 64k versus 108k for the CoreSuite test to have both file names
 and line numbers.  Just line numbers costs 96k and the stack alone is
 80k.

 The latter two cases would be more useful if JUnitShell retained the
 symbol maps and deobfuscated the stack trace for you, but that's an
 orthogonal pass.


I say we assume we're going to do the second pass (where JUnitShell
deobfuscates) and do the cheaper thing.

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



[gwt-contrib] Re: Force emulated stack traces when running JUnit tests?

2009-07-22 Thread Bruce Johnson
On Wed, Jul 22, 2009 at 4:57 PM, Scott Blum sco...@google.com wrote:

 On Wed, Jul 22, 2009 at 4:46 PM, BobV b...@google.com wrote:

 Should running a web-mode test case always turn on the emulated stack
 trace code?


Would always on mean that it generates code even for browsers that have
native stack traces (i.e. FF)?

Generally, as much as I hate to say it, it seems we'd want variations of the
tests both with and without stack trace code, so that we don't inadvertently
break one mode or the other. It is much like -draftCompile in this
respect.

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



[gwt-contrib] [google-web-toolkit] r5774 commited - Temporary commit, which comments out 3 assertions I believe are flaky,...

2009-07-22 Thread codesite-noreply

Revision: 5774
Author: amitman...@google.com
Date: Wed Jul 22 18:24:34 2009
Log: Temporary commit, which comments out 3 assertions I believe are flaky,  
to find
out how long tests take in batching mode. Will continue to investigate these
commented out assertions.

Patch by: amitmanjhi


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

Modified:
  /trunk/user/test/com/google/gwt/xml/client/XMLTest.java

===
--- /trunk/user/test/com/google/gwt/xml/client/XMLTest.java Tue Oct 28  
11:27:54 2008
+++ /trunk/user/test/com/google/gwt/xml/client/XMLTest.java Wed Jul 22  
18:24:34 2009
@@ -268,10 +268,12 @@
public void testNavigation() {
  Document d = createTestDocument();
  Element documentElement = d.getDocumentElement();
-assertEquals(getPreviousSibling,  
documentElement.getPreviousSibling(),
-d.getChildNodes().item(0));
-assertEquals(getNextSibling, documentElement.getNextSibling(),
-d.getChildNodes().item(2));
+// TODO (amitmanjhi): investigate why these tests are failing just in  
batch
+// mode for both web and hosted mode tests.
+//assertEquals(getPreviousSibling,  
documentElement.getPreviousSibling(),
+//d.getChildNodes().item(0));
+//assertEquals(getNextSibling, documentElement.getNextSibling(),
+//d.getChildNodes().item(2));
  assertEquals(getDocumentElement, documentElement,  
d.getChildNodes().item(
  1));
  assertEquals(getTagName, documentElement.getTagName(), doc);
@@ -308,7 +310,9 @@
  assertEquals(top.getChildNodes().getLength(), 1);
  Comment commentNode = ns.createComment(comment ccc);
  top.replaceChild(commentNode, yyy);
-assertEquals(top.getFirstChild(), commentNode);
+// TODO (amitmanjhi): investigate why this test is failing just in  
batch
+// mode for both web and hosted mode tests.
+// assertEquals(top.getFirstChild(), commentNode);
  assertEquals(top.getChildNodes().getLength(), 1);
}


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



  1   2   >