Boost performance of Widget creation by using DocumentFragment, Range.createContextualFragment or something else?

2014-03-04 Thread Carlos Aguayo
Hi folks,

I work with an app that builds hundreds of widgets and obviously has a 
performance hit. I'm well aware of performance improvements of the sort of: 
reduce the number of widgets, use directly html, use cell widgets, etc, 
however those paths are not helpful for me.

I'm just interested in making widget creation even faster. There's well 
known techniques using DocumentFragment or Range.createContextualFragment:
https://developer.mozilla.org/en/docs/Web/API/DocumentFragment
https://developer.mozilla.org/en-US/docs/Web/API/range.createContextualFragment
http://ejohn.org/blog/dom-documentfragments/

I noticed that in the GWT code and noticed that whenever creating widgets 
using UiBinder, GWT creates a hidden div that is directly attached to the 
DOM:
https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/uibinder/client/UiBinderUtil.java
 
 (line 84)
So apparently operations are not on an unattached DOM element which 
theoretically makes thing slower.

I tried to attach it to a DocumentFragment instead and while it seems that 
I'm seeing a small performance improvement, it's still hard to prove as the 
numbers that I get still vary a lot.

Anyway, my question for you  guys is that if you know of attempts to 
improve the speed of widget creation and what approaches have been taken?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: SuperDevMode

2014-01-20 Thread Carlos Aguayo
Thanks so much for helping out!

I got things up and running, your explanations and the video were really 
clear, thanks!

On Monday, January 20, 2014 7:48:05 PM UTC-5, emurmur wrote:

 Carlos,

 You've gotten to the point of launching the SuperDevMode codeserver.  So  
 http://localhost:9876/ is the code server. At that point, you don't need 
 to have the SuperDevMode page open in the browser.  Now you need to load 
 the page the GWT app is hosted within..  I can often just go to my GWT 
 project's war file and double-click the html file to load it into chrome, 
 then choose the Dev Mode On bookmark to compile and run.  If your page 
 needs to talk to a server, then you'll want to launch from the server 
 address (like the hosted Jetty in the video).  In either case, once you 
 have the SuperDevMode code server running, you then want to load your GWT 
 host page then do the Dev Mode On compile.

 Ed


 On Sunday, January 19, 2014 3:16:32 PM UTC-8, Carlos Aguayo wrote:

 Hi, I don't seem to be able to get SuperDevMode to work. I'm following 
 instructions from Brian's slides:

 https://docs.google.com/presentation/d/1DTWZ_06dQsTPhinIwzHSdoPMndRr92wpZoZWicK97YQ/edit?forcehl=1hl=en#slide=id.g25a114ce1_2056
 I can get to normal devmode with ant devmode. But when I do ant 
 superdevmode, things seem to compile and start up fine, I then go to 
 http://localhost:9876/ using Chrome (I tried both 32 and canary), I see 
 the welcome screen to drag the Dev mode on/off buttons, I drag them to 
 the toolbar, the welcome page says that the hello project is available, I 
 click on that link and then I click on the dev mode on bookmark and I get 
 the Can't find any GWT Modules on this page.. What step am I missing or 
 what am I doing wrong?
 Thanks!
 Carlos



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


SuperDevMode

2014-01-19 Thread Carlos Aguayo
Hi, I don't seem to be able to get SuperDevMode to work. I'm following 
instructions from Brian's slides:
https://docs.google.com/presentation/d/1DTWZ_06dQsTPhinIwzHSdoPMndRr92wpZoZWicK97YQ/edit?forcehl=1hl=en#slide=id.g25a114ce1_2056
I can get to normal devmode with ant devmode. But when I do ant 
superdevmode, things seem to compile and start up fine, I then go 
to http://localhost:9876/ using Chrome (I tried both 32 and canary), I see 
the welcome screen to drag the Dev mode on/off buttons, I drag them to 
the toolbar, the welcome page says that the hello project is available, I 
click on that link and then I click on the dev mode on bookmark and I get 
the Can't find any GWT Modules on this page.. What step am I missing or 
what am I doing wrong?
Thanks!
Carlos

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Firefox in OS X freezes in DevMode.

2013-11-09 Thread Carlos Aguayo
Thanks Colin, yeah that's what I figured, initially I thought that it would 
be a problem in the plugin given that it was only blocking Firefox and only 
in OS X (given that Chrome worked and also Firefox but under Linux).
I started debugging and got all the way there.

I doubt that it's a breakpoint or having to wait for a long time as I did 
leave the browser for a few minutes, there's no breakpoints and CPU is not 
peaking, so I'd think there's something else waiting.

I'll follow your suggestion and check now the other side, but it's good to 
know that you haven't had an issue with FF and Mavericks as then that would 
sadly imply that there's something wrong with my computer :(.

On Friday, November 8, 2013 9:20:10 PM UTC-5, Colin Alworth wrote:

 Line 155:

 ssize_t n = recv(sock, readBuf, BUF_SIZE, 0);

 That seems to say 'block until bytes are written by the other end of the 
 socket', or in other words, wait until the JVM is ready to go. Are you sure 
 that the IDE isn't paused on a breakpoint, or that you have waited long 
 enough for the page to load? When the browser is in this state, try pausing 
 the JVM to see what the dev mode thread is doing - I'm betting it is hard 
 at work on something... but if it too is waiting for something, that could 
 be a problem.

 But the recv call is *supposed* to block, at least until dev mode has 
 finished running its not-yet-JS code.

 We've had no issues with Mavericks and latest FF in our projects fwiw, 
 aside from the usual 'dev mode takes longer to do anything' fun.

 On Thursday, November 7, 2013 10:59:18 PM UTC-6, Carlos Aguayo wrote:

 It's getting stuck in line 155 in:

 https://gwt.googlesource.com/gwt-plugins/+/master/common/Socket.cpp

 On Thursday, November 7, 2013 7:32:28 PM UTC-5, Carlos Aguayo wrote:

 I'm started to have issues when trying to use DevMode with Firefox in OS 
 X and the only thing new is that I upgraded to Mavericks.

 Here's what I see: I create a GWT sample app (the default one that comes 
 with the Eclipse GWT plugin), I launch dev mode and try to access it with 
 Firefox, as soon as I paste the address, the browser freezes.
 It stays frozen until I stop development mode, once I do that, Firefox 
 comes back to life.

 Using Chrome is fine. I also have a VM setup with Linux and Firefox, if 
 I try to debug through that Firefox, everything works as well.

 I tried to see if there was any sort of deadlock in the devmode plugin 
 by using jconsole but it says that there's no deadlock.

 I have already ensured that Firefox is clean by doing a Reset 
 Firefox

 Apparently the only thing that fixes this issue is by creating a new 
 profile. After I create a new profile, I only install the GWT plugin and 
 works for a few days, then it freezes again. I don't install anything else 
 in Firefox.

 I have tried different versions of Firefox (21, 24 and 25) and I see the 
 same behavior in all of them.

 I was wondering if anyone else could be seeing something similar and/or 
 would have any suggestions as to how to debug the GWT extension to try to 
 figure out what's going on?



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Firefox in OS X freezes in DevMode.

2013-11-09 Thread Carlos Aguayo
I really appreciate your help Colin.

At this point I believe it's some misconfiguration in my computer. I tried 
to do a jconsole on the devmode process and it said it couldn't connect to 
it. I then did a jstack and said the same but this time the utility 
suggested to use a -F to force it, when I did that, I was able to see the 
threads. I then tried to launch firefox and sudo mode, and voila, that 
worked! So I open Firefox in normal mode, it can't connect to the plugin, I 
then try it in root mode and works...

The devmode process and eclipse are running with my account, so I can't 
tell what else I could have messed up but the important is that I can work 
and move on.

I appreciate the help,

On Saturday, November 9, 2013 3:10:58 PM UTC-5, Colin Alworth wrote:

 If you can repro this on at least one other machine and get the details of 
 what the JVM is doing, that'd be helpful. I have a very basic 
 familiarity with the dev mode code from researching the FF dev mode memory 
 leak, and would be happy to take a closer look. From your description it 
 sounds like the JVM is either also waiting for the browser (and we'll need 
 to figure out how it got into that bad state with one having ignored a 
 message from the other), or the JVM is blocked on something else entirely, 
 the real source of the bug. My bet is on the latter, that something funny 
 is going on there.

 Recent updates to Dev Mode were made for all platforms, nothing 
 mac-specific, so that seems unlikely. Getting an old copy of firefox and an 
 old (pre-ff25) copy of the plugin would probably be worth testing as well 
 if you are able to repro this on more than one box.

 Note: the FF-devmode memory leak has to do with the old pages failing to 
 shut down the plugin correctly, so make certain that you don't load more 
 than once. If you do, your JVM will have two different threads trying to 
 talk to the browser, and it may be difficult to tell which one is the 
 current one, versus the 'memory leak' one.

 On Saturday, November 9, 2013 11:01:40 AM UTC-6, Carlos Aguayo wrote:

 Thanks Colin, yeah that's what I figured, initially I thought that it 
 would be a problem in the plugin given that it was only blocking Firefox 
 and only in OS X (given that Chrome worked and also Firefox but under 
 Linux).
 I started debugging and got all the way there.

 I doubt that it's a breakpoint or having to wait for a long time as I did 
 leave the browser for a few minutes, there's no breakpoints and CPU is not 
 peaking, so I'd think there's something else waiting.

 I'll follow your suggestion and check now the other side, but it's good 
 to know that you haven't had an issue with FF and Mavericks as then that 
 would sadly imply that there's something wrong with my computer :(.

 On Friday, November 8, 2013 9:20:10 PM UTC-5, Colin Alworth wrote:

 Line 155:

 ssize_t n = recv(sock, readBuf, BUF_SIZE, 0);

 That seems to say 'block until bytes are written by the other end of the 
 socket', or in other words, wait until the JVM is ready to go. Are you sure 
 that the IDE isn't paused on a breakpoint, or that you have waited long 
 enough for the page to load? When the browser is in this state, try pausing 
 the JVM to see what the dev mode thread is doing - I'm betting it is hard 
 at work on something... but if it too is waiting for something, that could 
 be a problem.

 But the recv call is *supposed* to block, at least until dev mode has 
 finished running its not-yet-JS code.

 We've had no issues with Mavericks and latest FF in our projects fwiw, 
 aside from the usual 'dev mode takes longer to do anything' fun.

 On Thursday, November 7, 2013 10:59:18 PM UTC-6, Carlos Aguayo wrote:

 It's getting stuck in line 155 in:

 https://gwt.googlesource.com/gwt-plugins/+/master/common/Socket.cpp

 On Thursday, November 7, 2013 7:32:28 PM UTC-5, Carlos Aguayo wrote:

 I'm started to have issues when trying to use DevMode with Firefox in 
 OS X and the only thing new is that I upgraded to Mavericks.

 Here's what I see: I create a GWT sample app (the default one that 
 comes with the Eclipse GWT plugin), I launch dev mode and try to access 
 it 
 with Firefox, as soon as I paste the address, the browser freezes.
 It stays frozen until I stop development mode, once I do that, Firefox 
 comes back to life.

 Using Chrome is fine. I also have a VM setup with Linux and Firefox, 
 if I try to debug through that Firefox, everything works as well.

 I tried to see if there was any sort of deadlock in the devmode plugin 
 by using jconsole but it says that there's no deadlock.

 I have already ensured that Firefox is clean by doing a Reset 
 Firefox

 Apparently the only thing that fixes this issue is by creating a new 
 profile. After I create a new profile, I only install the GWT plugin and 
 works for a few days, then it freezes again. I don't install anything 
 else 
 in Firefox.

 I have tried different versions of Firefox (21, 24 and 25) and I

Firefox in OS X freezes in DevMode.

2013-11-07 Thread Carlos Aguayo
I'm started to have issues when trying to use DevMode with Firefox in OS X 
and the only thing new is that I upgraded to Mavericks.

Here's what I see: I create a GWT sample app (the default one that comes 
with the Eclipse GWT plugin), I launch dev mode and try to access it with 
Firefox, as soon as I paste the address, the browser freezes.
It stays frozen until I stop development mode, once I do that, Firefox 
comes back to life.

Using Chrome is fine. I also have a VM setup with Linux and Firefox, if I 
try to debug through that Firefox, everything works as well.

I tried to see if there was any sort of deadlock in the devmode plugin by 
using jconsole but it says that there's no deadlock.

I have already ensured that Firefox is clean by doing a Reset Firefox

Apparently the only thing that fixes this issue is by creating a new 
profile. After I create a new profile, I only install the GWT plugin and 
works for a few days, then it freezes again. I don't install anything else 
in Firefox.

I have tried different versions of Firefox (21, 24 and 25) and I see the 
same behavior in all of them.

I was wondering if anyone else could be seeing something similar and/or 
would have any suggestions as to how to debug the GWT extension to try to 
figure out what's going on?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Firefox in OS X freezes in DevMode.

2013-11-07 Thread Carlos Aguayo
It's getting stuck in line 155 in:

https://gwt.googlesource.com/gwt-plugins/+/master/common/Socket.cpp

On Thursday, November 7, 2013 7:32:28 PM UTC-5, Carlos Aguayo wrote:

 I'm started to have issues when trying to use DevMode with Firefox in OS X 
 and the only thing new is that I upgraded to Mavericks.

 Here's what I see: I create a GWT sample app (the default one that comes 
 with the Eclipse GWT plugin), I launch dev mode and try to access it with 
 Firefox, as soon as I paste the address, the browser freezes.
 It stays frozen until I stop development mode, once I do that, Firefox 
 comes back to life.

 Using Chrome is fine. I also have a VM setup with Linux and Firefox, if I 
 try to debug through that Firefox, everything works as well.

 I tried to see if there was any sort of deadlock in the devmode plugin by 
 using jconsole but it says that there's no deadlock.

 I have already ensured that Firefox is clean by doing a Reset Firefox

 Apparently the only thing that fixes this issue is by creating a new 
 profile. After I create a new profile, I only install the GWT plugin and 
 works for a few days, then it freezes again. I don't install anything else 
 in Firefox.

 I have tried different versions of Firefox (21, 24 and 25) and I see the 
 same behavior in all of them.

 I was wondering if anyone else could be seeing something similar and/or 
 would have any suggestions as to how to debug the GWT extension to try to 
 figure out what's going on?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: I/O 2013 - GWT Sessions?

2013-05-19 Thread Carlos Aguayo
Slides for GWT Roadmap for the Future are here:
https://docs.google.com/presentation/d/1PfXXegni0gcZQYpX09t0gs2Z9dqST5MmiHc_NoPSluo/edit#slide=id.p18

I couldn't find the youtube video for it.

The youtube video for the Demystifying MVP and EventBus in GWT is here:
http://www.youtube.com/watch?v=kilmaSRq49g


On Sunday, May 19, 2013 1:50:38 PM UTC-4, Benjamin Possolo wrote:

 I think a GWT conference would be great as well.
 It would probably make more sense to occur somewhere on the west coast 
 though since it is much closer to silicon valley.

 The San Diego Convention Center is always a great place for conventions.


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




Re: User visible urls

2012-08-29 Thread Carlos Aguayo
Hi, I created an example and published an example based on Thomas' example:

http://carlosaguayo.posterous.com/html5-history-in-gwt

On Tuesday, February 28, 2012 10:31:43 AM UTC-5, apanizo wrote:

 Hi all,

 In the next weeks I'm going to start a new app, and I am really interested 
 in this question.

 The solution that @Thomas has proposed is really interested. But I don't 
 know exactly how it works.

 The question is, could you provide me an simple simple example? Or link?

 Thank you,

 Adolfo.

 2012/2/27 Carlos Aguayo carlos...@gmail.com javascript:

 works like a sharm! thanks buddy!


 On Wednesday, February 22, 2012 5:08:23 AM UTC-5, Thomas Broyer wrote:

 On Tuesday, February 21, 2012 6:04:55 PM UTC+1, Carlos Aguayo wrote:

 Hi Thomas, could you share the one that you wrote to use pushState? 
 Thanks!


 Here's a skeleton implementation: 
 https://gist.**github.com/1883821https://gist.github.com/1883821

  -- 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-web-toolkit/-/OjZDD6XpY5gJ.

 To post to this group, send email to 
 google-we...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.




 -- 
 El precio es lo que pagas. El valor es lo que recibes.
 Warren Buffet
  

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/6bTuY7t332IJ.
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: User visible urls

2012-02-27 Thread Carlos Aguayo
works like a sharm! thanks buddy!

On Wednesday, February 22, 2012 5:08:23 AM UTC-5, Thomas Broyer wrote:

 On Tuesday, February 21, 2012 6:04:55 PM UTC+1, Carlos Aguayo wrote:

 Hi Thomas, could you share the one that you wrote to use pushState? 
 Thanks!


 Here's a skeleton implementation: https://gist.github.com/1883821


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OjZDD6XpY5gJ.
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: User visible urls

2012-02-21 Thread Carlos Aguayo
Hi Thomas, could you share the one that you wrote to use pushState? Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pKyIVdEyL4EJ.
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 Developer Plugin for Firefox 9

2012-02-02 Thread Carlos Aguayo
FF10 is already here so that will mean updating the plugin again. Is this 
something that can be done by the community? If so, where should we take a 
look at?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bTdcKuBTpFUJ.
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: 2.4 beta and mobilewebapp sample

2011-09-02 Thread Carlos Aguayo
The Missing artifact com.google.gwt:gwt-servlet:jar:
2.4.0:runtime errors go away if you update gwtVersion in pom.xml to
this line:
gwtVersion2.4.0-rc1/gwtVersion

On Jul 19, 1:07 pm, Michel Jonker michel.jon...@e-office.com wrote:
 Hi,

 Thanks for the reply.
 Are you suggesting that I fetch the missing DataGrid class from
 subversion, instead of using the provided jars from the GPE 2.4?

 Michel
 On Jul 19, 12:10 pm, dreamer venugopal.vasire...@gmail.com wrote:







  1) Please make sure Java is compiling fine - meaning jar is there some
  where in classpath
  2) Then GWT cross compilation - needs sources - these paths are found
  by GWTC from gwt.xml
          Typically all of the paths were included in
        inherits name='com.google.gwt.user.User' /

  On Jul 18, 4:18 am, Michel Jonker michel.jon...@e-office.com wrote:

   By the way, the maven build complains about:

   18-7-11 13:12:17 CEST: Missing artifact com.google.gwt:gwt-servlet:jar:
   2.4.0:runtime
   18-7-11 13:12:17 CEST: Missing artifact com.google.gwt:gwt-user:jar:
   2.4.0:provided
   18-7-11 13:12:17 CEST: Missing artifact com.google.gwt:gwt-dev:jar:
   2.4.0:compile

   On 18 jul, 13:11, Michel Jonker michel.jon...@e-office.com wrote:

I am trying to get the mobile webapp sample to work and I found (in
this forum) that others are also having troubles to get it to work.

Im am running Eclipse 3.6 with the GPE 2.4 beta.

When I try to run the application I get errors regarding the
RequestFactoryServlet

java.lang.ClassNotFoundException:
com.google.web.bindery.requestfactory.server.RequestFactoryServlet

I tried putting the gwt-servlet.jar on the classpath, but that did not
help.

When I do a GWT compile, I get the error (amongst others):

The import com.google.gwt.user.cellview.client.DataGrid cannot be
resolved

This class is available in the online (SVN) repository, but not in the
2.4 beta distribution it seems.

Since I could not find the magic steps to get it to work, I am asking
this community for help.

TIA

Michel

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



Value function - Example - Developer's Guide - Client Bundle

2010-12-13 Thread Carlos Aguayo
Could someone provide a more elaborate example on how to use the
Value function as described here:

http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#CssResource

The documentation has this example:

.myDiv {
  offset-left: value('imageResource.getWidth', 'px');
}

However I don't know where is imageResource coming from or defined.

Thanks!

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



Re: Value function - Example - Developer's Guide - Client Bundle

2010-12-13 Thread Carlos Aguayo
Ok we figured it out, here's the more elaborate example:

public interface MyResources extends ClientBundle {

  @Source(MyCompanyLogo.png)
  ImageResource myLogo();

  @Source(skins.css)
  CssResource skins();

}

Then in skins.css you can have:

.myClassName {
  width: value('logo.getWidth', 'px');
}

On Dec 13, 7:58 pm, Carlos Aguayo carlos.agu...@gmail.com wrote:
 Could someone provide a more elaborate example on how to use the
 Value function as described here:

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

 The documentation has this example:

 .myDiv {
   offset-left: value('imageResource.getWidth', 'px');

 }

 However I don't know where is imageResource coming from or defined.

 Thanks!

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



Re: Value function - Example - Developer's Guide - Client Bundle

2010-12-13 Thread Carlos Aguayo
I had a typo...

public interface MyResources extends ClientBundle {
  @Source(MyCompanyLogo.png)
  ImageResource myLogo();

  @Source(skins.css)
  CssResource skins();
}

Then in skins.css you can have:
.myDiv {
  offset-left: value('myLogo.getWidth', 'px');
}

On Dec 13, 8:23 pm, Carlos Aguayo carlos.agu...@gmail.com wrote:
 Ok we figured it out, here's the more elaborate example:

 public interface MyResources extends ClientBundle {

   @Source(MyCompanyLogo.png)
   ImageResource myLogo();

   @Source(skins.css)
   CssResource skins();

 }

 Then in skins.css you can have:

 .myClassName {
   width: value('logo.getWidth', 'px');

 }

 On Dec 13, 7:58 pm, Carlos Aguayo carlos.agu...@gmail.com wrote:







  Could someone provide a more elaborate example on how to use the
  Value function as described here:

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

  The documentation has this example:

  .myDiv {
    offset-left: value('imageResource.getWidth', 'px');

  }

  However I don't know where is imageResource coming from or defined.

  Thanks!

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



FocusPanel with nested focusable elements

2010-11-02 Thread Carlos Aguayo
Hi,

If I have something like this:

g:FocusPanel ui:field=main
  g:FlowPanel
g:TextBox ui:field=textfield1 /
g:TextBox ui:field=textfield2 /
  /g:FlowPanel
/g:FocusPanel

Where I have elements that are focusable within a FocusPanel. Whenever
I focus/blur on the textboxes, the focus/blur events are not being
fired in the FocusPanel, I'd have to click outside the textboxes but
within the FocusPanel for the event to be fired.

Is there a way I can get the events fired in the FocusPanel while
focusing in the textboxes?

Thanks,
Carlos

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



Re: Adding Event Handlers on the body element...

2010-09-09 Thread Carlos Aguayo
You can try something like this:

Event.addNativePreviewHandler(new NativePreviewHandler() {
  @Override
  public void onPreviewNativeEvent(NativePreviewEvent event) {
int KEY_F8 = 119;
if (keyup.equals(event.getNativeEvent().getType()) 
event.getNativeEvent().getKeyCode() == KEY_F8) {
  // do something onkeyup  f8
}
  }
});


On Aug 6, 8:45 pm, seth.ho...@gmail.com seth.ho...@gmail.com
wrote:
 Hello,

 I'm using GWT for 2 years now and i did many great things with it.
 However, i'm still looking for how to implements KeyboardHandlers on
 the BodyElement.
 The only way i found is writing something like this in the HTML file :

   bodyonkeypress=return keyPress(event); onkeydown=returnkeyDown(event); 
 onkeyup=return keyUp(event);

 And something like that in the EntryPoint

 public void onModuleLoad() {
         // publish();}

 private native final void publish() /*-{
         $wnd[keyPress] = function(event) {
                 
 @webapp.client.Application::keyPress(Lcom/google/gwt/dom/client/
 NativeEvent;)(event);
         }
         $wnd[keyUp] = function(event) {
                 @webapp.client.Application::keyUp(Lcom/google/gwt/dom/client/
 NativeEvent;)(event);
         }
         $wnd[keyDown] = function(event) {
                 
 @webapp.client.Application::keyDown(Lcom/google/gwt/dom/client/
 NativeEvent;)(event);
         }

 }-*/;

 But i'm really not satisfied with that solution.
 Any ideas 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



ui:image, image within an anchor or a button

2010-04-23 Thread Carlos Aguayo
I'd like to have an image within an anchor or a button tag. I'm using
the UiBinder and I need the anchor or button to be a widget so I can
use their HasClickHandlers interface.

I wanted to use an image widget so I can use an ImageResource,
something like this:

!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
 xmlns:g='urn:import:com.google.gwt.user.client.ui'

  ui:with field='res' type='com.test.Test.Resources'/

  g:HTMLPanel
g:Anchorg:Image resource={res.add} / Add/g:Anchor
  /g:HTMLPanel

/ui:UiBinder

But since neither the Anchor nor the Button can take widgets, I get
the Found widget in an HTML context error.

I've seen posts mentioning the ui:image tag but couldn't find
documentation on how to use it and I couldn't get it to work.

If I do:

!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
 xmlns:g='urn:import:com.google.gwt.user.client.ui'

  g:HTMLPanel
ui:image src=add.gif /
  /g:HTMLPanel

/ui:UiBinder

It's doing something since it won't compile if add.gif is not under
the right package. However when I see it in the browser, the ui:image
didn't get compiled into an image.

Do you know what am I missing here?

Thanks!

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



Re: Is there a way to mock JSONObject?

2010-02-02 Thread Carlos Aguayo
Not as good or ideal as a mockobject but you could use the
GWTTestCase.

On Feb 2, 4:19 pm, Kevin Q kevin.jing@gmail.com wrote:
 Our application consumes JSON web services. We're using JSONParser,
 returning a JSONObject, and construct domain models from the result
 JSONObject. I'd like to test that piece of code, but it seems I cannot
 use JSONObject in JVM unit tests, as it depends on native code.

 java.lang.UnsatisfiedLinkError:
 com.google.gwt.core.client.JavaScriptObject.createObject()Lcom/google/
 gwt/core/client/JavaScriptObject;
         at com.google.gwt.core.client.JavaScriptObject.createObject(Native
 Method)
         at com.google.gwt.json.client.JSONObject.init(JSONObject.java:46)
             [output cut...]

 I'm wondering is there a way to mock JSONObject, use a hash map to
 hold the key/value pairs, which enables me to run these tests in JVM?
 JSONObject is an interface, so EasyMock can't help here. (correct me
 if I'm wrong)

 Also, I tried creating a class MockJSONObject extending JSONObject,
 and replace the put/get logic with HashMap based implementation but
 still no avail, because the JSONObject constructor calls native JS
 code as well...

 Any input is appreciated.

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



UiBinder and non standard CSS properties.

2010-02-01 Thread Carlos Aguayo
Hi,
UiBinder can't seem to take non standard CSS properties.

I have the following:

ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
 xmlns:g='urn:import:com.google.gwt.user.client.ui'

  ui:style
  .test {
-moz-border-radius: 4px;
  }
  /ui:style

  g:HTMLPanel
input type=text class={style.test} /
  /g:HTMLPanel
/ui:UiBinder

And it shows the following warning when trying to display the page:
21:01:53.994 [WARN] [gwtsandbox] Line 3 column 20: encountered -.
Was expecting one of: } ; IDENT

Is this as designed that you can't use non standard CSS properties?
Thanks,

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



Re: Blank Screen in IE8 but Normal in FF3.5

2010-01-12 Thread Carlos Aguayo
I have the same problem and also for me the x-ua-compatible tag
fixed it.

I created a project using the gwt eclipse plugin, here's the java
file:

===

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;

public class GwtSandbox implements EntryPoint {

  interface Binder extends UiBinderLayoutPanel, GwtSandbox { }
  private static final Binder binder = GWT.create(Binder.class);

  public void onModuleLoad() {
LayoutPanel panel = binder.createAndBindUi(this);
RootLayoutPanel.get().add(panel);
  }
}
===
Here's the ui xml file:

ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
 xmlns:g='urn:import:com.google.gwt.user.client.ui'

 g:LayoutPanel
   g:layer
 g:LabelLorem ipsum.../g:Label
   /g:layer
   g:layer left='25%' right='25%' top='4px' height='10em'
 g:LabelHeader/g:Label
   /g:layer
 /g:LayoutPanel

/ui:UiBinder

I can see it working in Chrome and in FF, however in IE8 I don't see
anything, if I inspect it using the DeveloperTool I see that the
markup is there but is not displayed. If I add the x-ua-compatible
tag to the html where the gwt script (nocache.js) is included, then it
works in IE8.


On Dec 30 2009, 3:12 am, jd jdpatter...@gmail.com wrote:
 I am having exactly the same problem with 2.0.  Yes I am in standards
 IE8 standards mode and the problem is fixed by changing to IE7
 standards mode with the tag

 meta http-equiv=X-UA-Compatible content=IE=7/

 However, I have tested a simple DockLayoutPanel including a map (which
 I thought could be the problem) and it all seems to work fine in IE8
 standards mode - so there must be some other factor in my code that
 prevents the DockLayoutPanel from displaying.  I am happy for now with
 the meta tag but will try to figure out what the cause is some time.
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Validating ClientBundles ?

2009-12-22 Thread Carlos Aguayo
Hi,

After upgrading the Eclipse plugin to GWT 2.0, whenever I import my
Eclipse projects, Eclipse crashes. After importing the projects, I see
multiple multiple (~12) jobs spawned called Validating
ClientBundles, then it either shows a warning saying that it ran out
of memory or just closes.

When inspecting the Eclipse log, I found this:

!ENTRY org.eclipse.core.jobs 4 2 2009-12-22 11:07:17.178
!MESSAGE An internal error occurred during: Refreshing workspace.
!STACK 0
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:597)
at org.eclipse.core.internal.jobs.WorkerPool.jobQueued
(WorkerPool.java:145)
at org.eclipse.core.internal.jobs.JobManager.schedule(JobManager.java:
1001)
at org.eclipse.core.internal.jobs.InternalJob.schedule
(InternalJob.java:391)
at org.eclipse.core.runtime.jobs.Job.schedule(Job.java:435)
at
com.google.gdt.eclipse.core.BuilderUtilities.revalidateCompilationUnits
(BuilderUtilities.java:170)
at
com.google.gwt.eclipse.core.clientbundle.ClientBundleResourceChangeListener
$1.visit(ClientBundleResourceChangeListener.java:154)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept
(ResourceDelta.java:48)
at
com.google.gwt.eclipse.core.clientbundle.ClientBundleResourceChangeListener.visitResourceDelta
(ClientBundleResourceChangeListener.java:124)
at
com.google.gwt.eclipse.core.clientbundle.ClientBundleResourceChangeListener.resourceChanged
(ClientBundleResourceChangeListener.java:116)
at org.eclipse.core.internal.events.NotificationManager$2.run
(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify
(NotificationManager.java:285)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges
(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange
(Workspace.java:313)
at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java:1022)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
===
These are my JVM settings in eclipse.ini:

--launcher.XXMaxPermSize
256m
-Xms256m
-Xmx1024m
-Xss1024k

Is there a way to turn off this validation upon importing the project.
Am I missing something or is this a bug?

Thanks,
Carlos

--

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