Re: Flextable getCellClickedEvent

2013-02-01 Thread Arpita Dasgupta

On Wednesday, 30 January 2013 10:53:40 UTC+5:30, Arpita Dasgupta wrote: 
>
>  
> FlexTable table = new FlexTable();
> table.setBorderWidth( 1 ); 
> table.setText( 0, 1, "Span 2 Rows" );
> table.getFlexCellFormatter().setRowSpan( 0, 1, 2 ); 
> table.setText( 0, 0, "First" );
> table.setText( 1, 0, "Second" );
> table.setText( 0, 2, "First" );  
> table.setText( 1, 2, "Second" );
> table.setVisible(1,1,false);
>
> Now when I am clicking cell(1,2) table.getCellClickedEvent(event) is 
> giving colIndex 1 instead of 2.But table.isVisible(1,1) is giving false and 
> table.getCellCount(1) is giving 3.Please suggest any workaround to avoid 
> the column index change in getCellClickedEvent(event) due to 
> setVisible(false).
>
I am getting this problem when building and running with maven 
(2.3.2
  2.1.1
  1.6
  1.6
  1.0.0
  1.1.0
  1.5.0
  pre-gwt-2.2
  2.1.0-1
2.1.1
  2.1.0-1
  2.4
  2.4.3
  1.3
  2.1.2

   com.gwtent
   gwtent
   2.0.0.RC1
   provided
  
  
   com.gwtext
   gwtext
   2.0.5
   provided
  ).
But when I am using GWt SDK 2.1.1 it is working fine. Please help.
 

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread Thomas Broyer
Which kind of OutOfMemory are you seeing?
Also, try to set  to some value lower than the number of 
cores/cpus of your system: if you don't set localWorkers, the 
gwt-maven-plugin will use the number of cores/cpus by default, and 
obviously parallelizing work increases the memory needs.

On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:
>
> I've got a rather large GWT build using Maven and the gwt-maven-plugin and 
> I'm getting out of memory errors building now.  I'm not sure what's 
> changed, it used to take considerable memory but now its taking so much I 
> can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 64 
> bit to compile, here are some of my settings:
>
> MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m
>
> Then in the gwt-maven-plugin configuration I have -Xmx2048m 
> -Xmx2048m -XX:MaxPermSize=512m
>
> I've tried several combinations of values here with no luck...with these 
> values...
> - When I start the maven command line build the system has about 3GB of 
> memory used
> - When it it starts the GWT part of the build its at about 4GB used.
> - The I have lots of rebind operations going on generating code...during 
> this time it goes to about 5GB used.
> - Then when it hits the permutations step this is where it breaks 
> down...it very quickly goes to about 7.5 GB used.  Then I get out of memory 
> errors and the build fails.
>
> So there seems to be a couple of issues, first the GWT compiler doesn't 
> seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it 
> does about the same thing...it uses a lot more memory than that...and then 
> fails.  In this case it used 3.5 GB before it failed.  And secondly, I 
> can't give GWT more memory because my system doesn't have more to give 
> it...this was with almost all other programs closed...and it still failed.
>
> Does anyone have an idea why my build might be using so much memory and 
> how to limit this?
>
> Btw, at the start of the permutation compile step sometimes it reports 6 
> permutations and sometimes 12...seems to have the same problem in both 
> cases but I'm not sure why it sometimes has 12 and other times 6.
>
> -Dave
>
>
>
>

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




load indicator when loading application

2013-02-01 Thread Thomas Lefort
Is it possible (by fiddling with the bootstrap or else) to display a 
loading indicator at start-up, I mean to show how much is left to load of 
the application?

Thanks,

Thomas

-- 
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: Chrome incorrectly asks me to install GWT Developer Plugin

2013-02-01 Thread richard.row...@gmail.com
Hate to bump and ancient thread, but I am having this same issue today. 
 Using Ubuntu 12.04 LTS on a x64 machine.  When I browse to a hosted mode 
site, I get the same "Download the GWT Developer Plugin" for chrome button 
as below, but it doesn't do anything when I click it.  I went to the 
chrome:settings, then to extensions, and installed the GWT Developer Plugin 
from the extension "store", but when I browse to the hosted mode site, it 
still sais I need to download and install the plugin.  Got it working under 
Firefox no problem, so I am using that for now.  Very odd.

On Saturday, September 22, 2012 5:38:05 PM UTC-4, otosaat wrote:
>
> Chrome sporadically gives me the following message incorrectly:
>
> Development Mode requires the Google Web Toolkit Developer Plugin
> By downloading, you agree to the Terms & 
> Conditions
>  and Privacy Policy .
> Download the GWT Developer Plugin
> For 
> Chromeplugins
>  
> for other systems
>
>
> I already have the plugin installed. Would someone please give me pointers 
> to troubleshoot this issue?
>
> Below are some info about my development environment:
>
>1. Chrome: 21.0.1180.89 m
>2. Eclipse
>   1. Version: Juno Release
>   2. Build id: 20120614-1722
>
>  
> Thanks in advance for your help.
>
> -Otosaat
>

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread David Hoffer
The last error was this:

[INFO]  #
[INFO]  # There is insufficient memory for the Java Runtime
Environment to continue.
[INFO]  # Native memory allocation (malloc) failed to allocate
32744 bytes for ChunkPool::allocate
[INFO]  #
[INFO]  # There is insufficient memory for the Java Runtime
Environment to continue.
[INFO]  # Native memory allocation (malloc) failed to allocate
450768 bytes for Chunk::new

Not sure if it matters but we did recently upgrade to Java 1.7 build 11
(the previous builds had a major security flaw and we had to upgrade
everything) but that happened a couple days before I started seeing this I
believe.

I'll try the  suggestion...





On Fri, Feb 1, 2013 at 3:03 AM, Thomas Broyer  wrote:

> Which kind of OutOfMemory are you seeing?
> Also, try to set  to some value lower than the number of
> cores/cpus of your system: if you don't set localWorkers, the
> gwt-maven-plugin will use the number of cores/cpus by default, and
> obviously parallelizing work increases the memory needs.
>
>
> On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:
>>
>> I've got a rather large GWT build using Maven and the gwt-maven-plugin
>> and I'm getting out of memory errors building now.  I'm not sure what's
>> changed, it used to take considerable memory but now its taking so much I
>> can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 64
>> bit to compile, here are some of my settings:
>>
>> MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m
>>
>> Then in the gwt-maven-plugin configuration I have -Xmx2048m
>> -Xmx2048m -XX:MaxPermSize=512m
>>
>> I've tried several combinations of values here with no luck...with these
>> values...
>> - When I start the maven command line build the system has about 3GB of
>> memory used
>> - When it it starts the GWT part of the build its at about 4GB used.
>> - The I have lots of rebind operations going on generating code...during
>> this time it goes to about 5GB used.
>> - Then when it hits the permutations step this is where it breaks
>> down...it very quickly goes to about 7.5 GB used.  Then I get out of memory
>> errors and the build fails.
>>
>> So there seems to be a couple of issues, first the GWT compiler doesn't
>> seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it
>> does about the same thing...it uses a lot more memory than that...and then
>> fails.  In this case it used 3.5 GB before it failed.  And secondly, I
>> can't give GWT more memory because my system doesn't have more to give
>> it...this was with almost all other programs closed...and it still failed.
>>
>> Does anyone have an idea why my build might be using so much memory and
>> how to limit this?
>>
>> Btw, at the start of the permutation compile step sometimes it reports 6
>> permutations and sometimes 12...seems to have the same problem in both
>> cases but I'm not sure why it sometimes has 12 and other times 6.
>>
>> -Dave
>>
>>
>>
>>  --
> 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.
>
>
>

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




How to best download a file on client side?

2013-02-01 Thread membersound
Hi,

what is the best way to create a download file on the client side, when the 
content that is to be saved also only exists on the client side?
Do I have to write a Servlet creating a file of the content that is send 
from the client side?
Or is there any possibility to just make an export without server involved 
(as data anyhow only exists on client side in my case).

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to best download a file on client side?

2013-02-01 Thread Alain Ekambi
The only cross browser way i know is by using  Flash.


2013/2/1 membersound 

> Hi,
>
> what is the best way to create a download file on the client side, when
> the content that is to be saved also only exists on the client side?
> Do I have to write a Servlet creating a file of the content that is send
> from the client side?
> Or is there any possibility to just make an export without server involved
> (as data anyhow only exists on client side in my case).
>
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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: How to best download a file on client side?

2013-02-01 Thread Kody
Ok, no that's not an option. I have to stick to plain gwt. So I have to use
servlets?

2013/2/1 Alain Ekambi 

> The only cross browser way i know is by using  Flash.
>

-- 
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: GWT Best practice for preventing duplicate requests and displaying busy icon

2013-02-01 Thread Marko Mišković
If you show modal dialog, user can't interact with elements outside of that 
dialog. You can display dialog every time user start action. Maybe in first 
second you can set style "display: none". You can try this.

On Thursday, 31 January 2013 03:24:04 UTC+1, andy_p1 wrote:
>
> Hello,
>  I am a new GWT developer and I have been doing a lot of reading, writing 
> test programs, and watching presentations by GWT gurus. But I have not yet 
> found any article that shows how to solve the following problem that I 
> believe should be a vary common problem for GWT applications. If some could 
> please point me to the right direction, I would really appreciate it. Here 
> it goes:
> 1. I have a bunch of services that I can call on the server and I know 
> that some of those services take a lot of time to return while some are 
> very quick.
> 2. I also know that due to unreliable network, the services that are 
> supposed to return results really quick may also take a long time or may 
> never even return.
>
>
> Now, based on the above, my UI is supposed to behave like this:
>
> 1. For calls that I know are going to take a long time, it should display 
> "Loading, please wait..." kind of dialog right way. I want to prevent the 
> user from doing anything for say at least 10 seconds and after that I will 
> assume that something is wrong and remove the dialog and let the user do 
> whatever he wants.
>
> 2. For calls I know will return quickly, I don't want to show the "Please 
> wait" dialog right away. May be wait for a second (because I expect a 
> response in a second), and then show the dialog. But when the dialog is NOT 
> displayed, I don't want the same request to be fired again and again. i.e. 
> I don't want the user to rapid fire the "Do It" button.
>
> Is there a standard way to handle this kind of a thing in GWT?
>
> thank you!
>

-- 
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: How to best download a file on client side?

2013-02-01 Thread membersound
Is there any way of sending content to the server and generating the 
downloadable file without submitting this content in the URL as parameter 
to the servlet?

-- 
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: How to best download a file on client side?

2013-02-01 Thread Thomas Broyer


On Friday, February 1, 2013 3:55:55 PM UTC+1, membersound wrote:
>
> Is there any way of sending content to the server and generating the 
> downloadable file without submitting this content in the URL as parameter 
> to the servlet?
>

Well, you can use a form with method=post.

If I were you, I'd try doing it all in JS for browsers that support it 
(support is rather good actually: 
http://www.html5rocks.com/en/features/file_access, e.g. constructing a blog 
and providing a download link with the blob URL), and only fallback to the 
"send to servlet" solution if that doesn't work. 

-- 
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: Chrome incorrectly asks me to install GWT Developer Plugin

2013-02-01 Thread Thomas Broyer


On Friday, February 1, 2013 2:10:05 PM UTC+1, richard...@gmail.com wrote:
>
> Hate to bump and ancient thread, but I am having this same issue today. 
>  Using Ubuntu 12.04 LTS on a x64 machine.  When I browse to a hosted mode 
> site, I get the same "Download the GWT Developer Plugin" for chrome button 
> as below, but it doesn't do anything when I click it.  I went to the 
> chrome:settings, then to extensions, and installed the GWT Developer Plugin 
> from the extension "store", but when I browse to the hosted mode site, it 
> still sais I need to download and install the plugin.  Got it working under 
> Firefox no problem, so I am using that for now.  Very odd.
>

How's the toolkit icon in the toolbar? red or grey? see 
https://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM

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




How to download a file from server without browser opening new window?

2013-02-01 Thread membersound
Hi,

I created a servlet that provides a downloadable file (from String content) 
by writing to the ServletOutputStream.
On the client side, I trigger the file download by an Anchor with:

Window.open(GWT.getModuleBaseURL() + "MyServlet", "_blank", "");

It works fine, BUT it seems to open a new browser window, which is somehow 
directly closed. After this the file download dialog is show.
How can I prevent this flickering of a new browser window? Can't I achieve 
this somehow inline?

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread David Hoffer
I've got 8 cores so I set  to 4...that makes a big difference
in how much RAM is uses, with that set it never spikes up near 8GB.
 However it still fails...with this error message:

[INFO]Compiling 12 permutations
[INFO]   Compiling permutation 1...
[INFO]   Process output
[INFO]  Error occurred during initialization of VM
[INFO]   Process output
[INFO]  Error occurred during initialization of VM
[INFO]  Could not reserve enough space for object heap
[INFO]  Could not reserve enough space for object heap
[INFO]   Process output
[INFO]  Error occurred during initialization of VM
[INFO]  Could not reserve enough space for object heap
[INFO]   Compiling permutation 4...


I do have some local changes...it's possible the local changes have some
errors in thembut I need the compiler to tell me what they are if
that's the case.  Instead it fails to compile, not sure what to do to
resolve this.  Note that if I didn't kill the build at this point...it
would continue on with the next permutation...and not report this error at
the end.

-Dave



On Fri, Feb 1, 2013 at 6:17 AM, David Hoffer  wrote:

> The last error was this:
>
> [INFO]  #
> [INFO]  # There is insufficient memory for the Java Runtime
> Environment to continue.
> [INFO]  # Native memory allocation (malloc) failed to allocate
> 32744 bytes for ChunkPool::allocate
> [INFO]  #
> [INFO]  # There is insufficient memory for the Java Runtime
> Environment to continue.
> [INFO]  # Native memory allocation (malloc) failed to allocate
> 450768 bytes for Chunk::new
>
> Not sure if it matters but we did recently upgrade to Java 1.7 build 11
> (the previous builds had a major security flaw and we had to upgrade
> everything) but that happened a couple days before I started seeing this I
> believe.
>
> I'll try the  suggestion...
>
>
>
>
>
> On Fri, Feb 1, 2013 at 3:03 AM, Thomas Broyer  wrote:
>
>> Which kind of OutOfMemory are you seeing?
>> Also, try to set  to some value lower than the number of
>> cores/cpus of your system: if you don't set localWorkers, the
>> gwt-maven-plugin will use the number of cores/cpus by default, and
>> obviously parallelizing work increases the memory needs.
>>
>>
>> On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:
>>>
>>> I've got a rather large GWT build using Maven and the gwt-maven-plugin
>>> and I'm getting out of memory errors building now.  I'm not sure what's
>>> changed, it used to take considerable memory but now its taking so much I
>>> can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 64
>>> bit to compile, here are some of my settings:
>>>
>>> MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m
>>>
>>> Then in the gwt-maven-plugin configuration I
>>> have -Xmx2048m -Xmx2048m -XX:MaxPermSize=512m>> extraJvmArgs>
>>>
>>> I've tried several combinations of values here with no luck...with these
>>> values...
>>> - When I start the maven command line build the system has about 3GB of
>>> memory used
>>> - When it it starts the GWT part of the build its at about 4GB used.
>>> - The I have lots of rebind operations going on generating code...during
>>> this time it goes to about 5GB used.
>>> - Then when it hits the permutations step this is where it breaks
>>> down...it very quickly goes to about 7.5 GB used.  Then I get out of memory
>>> errors and the build fails.
>>>
>>> So there seems to be a couple of issues, first the GWT compiler doesn't
>>> seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it
>>> does about the same thing...it uses a lot more memory than that...and then
>>> fails.  In this case it used 3.5 GB before it failed.  And secondly, I
>>> can't give GWT more memory because my system doesn't have more to give
>>> it...this was with almost all other programs closed...and it still failed.
>>>
>>> Does anyone have an idea why my build might be using so much memory and
>>> how to limit this?
>>>
>>> Btw, at the start of the permutation compile step sometimes it reports 6
>>> permutations and sometimes 12...seems to have the same problem in both
>>> cases but I'm not sure why it sometimes has 12 and other times 6.
>>>
>>> -Dave
>>>
>>>
>>>
>>>  --
>> 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.
>>
>>
>>
>
>

-- 
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+unsub

Re: GWT Best practice for preventing duplicate requests and displaying busy icon

2013-02-01 Thread Paul Stockley
I wrote a modal working mask that fades a working indicator into view after 
a second. At any time, input is blocked. The mask also does reference 
counting so if multiple RPC requests are kicked off, the mask is only 
hidden once all the requests are complete.


On Friday, February 1, 2013 9:14:56 AM UTC-5, Marko Mišković wrote:
>
> If you show modal dialog, user can't interact with elements outside of 
> that dialog. You can display dialog every time user start action. Maybe in 
> first second you can set style "display: none". You can try this.
>
> On Thursday, 31 January 2013 03:24:04 UTC+1, andy_p1 wrote:
>>
>> Hello,
>>  I am a new GWT developer and I have been doing a lot of reading, writing 
>> test programs, and watching presentations by GWT gurus. But I have not yet 
>> found any article that shows how to solve the following problem that I 
>> believe should be a vary common problem for GWT applications. If some could 
>> please point me to the right direction, I would really appreciate it. Here 
>> it goes:
>> 1. I have a bunch of services that I can call on the server and I know 
>> that some of those services take a lot of time to return while some are 
>> very quick.
>> 2. I also know that due to unreliable network, the services that are 
>> supposed to return results really quick may also take a long time or may 
>> never even return.
>>
>>
>> Now, based on the above, my UI is supposed to behave like this:
>>
>> 1. For calls that I know are going to take a long time, it should display 
>> "Loading, please wait..." kind of dialog right way. I want to prevent the 
>> user from doing anything for say at least 10 seconds and after that I will 
>> assume that something is wrong and remove the dialog and let the user do 
>> whatever he wants.
>>
>> 2. For calls I know will return quickly, I don't want to show the "Please 
>> wait" dialog right away. May be wait for a second (because I expect a 
>> response in a second), and then show the dialog. But when the dialog is NOT 
>> displayed, I don't want the same request to be fired again and again. i.e. 
>> I don't want the user to rapid fire the "Do It" button.
>>
>> Is there a standard way to handle this kind of a thing in GWT?
>>
>> thank you!
>>
>

-- 
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: How to download a file from server without browser opening new window?

2013-02-01 Thread Thomas Broyer
Can't you just link to your servlet?

Download (where {0} is replaced with your URL)

or new Anchor("Download", GWT.getModuleBaseURL() + "MyServlet")

On Friday, February 1, 2013 4:57:06 PM UTC+1, membersound wrote:
>
> Hi,
>
> I created a servlet that provides a downloadable file (from String 
> content) by writing to the ServletOutputStream.
> On the client side, I trigger the file download by an Anchor with:
>
> Window.open(GWT.getModuleBaseURL() + "MyServlet", "_blank", "");
>
> It works fine, BUT it seems to open a new browser window, which is somehow 
> directly closed. After this the file download dialog is show.
> How can I prevent this flickering of a new browser window? Can't I achieve 
> this somehow inline?
>

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread Thomas Broyer
By default, GWT spawns new processes for the "workers", you can switch to 
using threads by 
passing 
-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
 
in .
Either that or try an even smaller value for localWorkers (or use a smaller 
memory opts)

On Friday, February 1, 2013 5:10:52 PM UTC+1, dhoffer wrote:
>
> I've got 8 cores so I set  to 4...that makes a big 
> difference in how much RAM is uses, with that set it never spikes up near 
> 8GB.  However it still fails...with this error message:
>
> [INFO]Compiling 12 permutations
> [INFO]   Compiling permutation 1...
> [INFO]   Process output
> [INFO]  Error occurred during initialization of VM
> [INFO]   Process output
> [INFO]  Error occurred during initialization of VM
> [INFO]  Could not reserve enough space for object heap
> [INFO]  Could not reserve enough space for object heap
> [INFO]   Process output
> [INFO]  Error occurred during initialization of VM
> [INFO]  Could not reserve enough space for object heap
> [INFO]   Compiling permutation 4...
>
>
> I do have some local changes...it's possible the local changes have some 
> errors in thembut I need the compiler to tell me what they are if 
> that's the case.  Instead it fails to compile, not sure what to do to 
> resolve this.  Note that if I didn't kill the build at this point...it 
> would continue on with the next permutation...and not report this error at 
> the end.
>
> -Dave
>
>
>
> On Fri, Feb 1, 2013 at 6:17 AM, David Hoffer 
> > wrote:
>
>> The last error was this:
>>
>> [INFO]  #
>> [INFO]  # There is insufficient memory for the Java Runtime 
>> Environment to continue.
>> [INFO]  # Native memory allocation (malloc) failed to allocate 
>> 32744 bytes for ChunkPool::allocate
>> [INFO]  #
>> [INFO]  # There is insufficient memory for the Java Runtime 
>> Environment to continue.
>> [INFO]  # Native memory allocation (malloc) failed to allocate 
>> 450768 bytes for Chunk::new
>>
>> Not sure if it matters but we did recently upgrade to Java 1.7 build 11 
>> (the previous builds had a major security flaw and we had to upgrade 
>> everything) but that happened a couple days before I started seeing this I 
>> believe.
>>
>> I'll try the  suggestion...
>>
>>
>>
>>
>>
>> On Fri, Feb 1, 2013 at 3:03 AM, Thomas Broyer 
>> > wrote:
>>
>>> Which kind of OutOfMemory are you seeing?
>>> Also, try to set  to some value lower than the number of 
>>> cores/cpus of your system: if you don't set localWorkers, the 
>>> gwt-maven-plugin will use the number of cores/cpus by default, and 
>>> obviously parallelizing work increases the memory needs.
>>>
>>>
>>> On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:

 I've got a rather large GWT build using Maven and the gwt-maven-plugin 
 and I'm getting out of memory errors building now.  I'm not sure what's 
 changed, it used to take considerable memory but now its taking so much I 
 can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 
 64 
 bit to compile, here are some of my settings:

 MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m

 Then in the gwt-maven-plugin configuration I 
 have -Xmx2048m -Xmx2048m -XX:MaxPermSize=512m>>> extraJvmArgs>

 I've tried several combinations of values here with no luck...with 
 these values...
 - When I start the maven command line build the system has about 3GB of 
 memory used
 - When it it starts the GWT part of the build its at about 4GB used.
 - The I have lots of rebind operations going on generating 
 code...during this time it goes to about 5GB used.
 - Then when it hits the permutations step this is where it breaks 
 down...it very quickly goes to about 7.5 GB used.  Then I get out of 
 memory 
 errors and the build fails.

 So there seems to be a couple of issues, first the GWT compiler doesn't 
 seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it 
 does about the same thing...it uses a lot more memory than that...and then 
 fails.  In this case it used 3.5 GB before it failed.  And secondly, I 
 can't give GWT more memory because my system doesn't have more to give 
 it...this was with almost all other programs closed...and it still failed.

 Does anyone have an idea why my build might be using so much memory and 
 how to limit this?

 Btw, at the start of the permutation compile step sometimes it reports 
 6 permutations and sometimes 12...seems to have the same problem in both 
 cases but I'm not sure why it sometimes has 12 and other times 6.

 -Dave



  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google Web Toolkit" group.
>>> To unsubscribe from this group and stop receiving e

Re: How to download a file from server without browser opening new window?

2013-02-01 Thread membersound
I'm using ui:binder. How should I provide href for the anchor as 
GWT.getModuleBaseURL()?

Am Freitag, 1. Februar 2013 17:13:06 UTC+1 schrieb Thomas Broyer:
>
> Can't you just link to your servlet?
>
> Download (where {0} is replaced with your URL)
>
> or new Anchor("Download", GWT.getModuleBaseURL() + "MyServlet")
>
> On Friday, February 1, 2013 4:57:06 PM UTC+1, membersound wrote:
>>
>> Hi,
>>
>> I created a servlet that provides a downloadable file (from String 
>> content) by writing to the ServletOutputStream.
>> On the client side, I trigger the file download by an Anchor with:
>>
>> Window.open(GWT.getModuleBaseURL() + "MyServlet", "_blank", "");
>>
>> It works fine, BUT it seems to open a new browser window, which is 
>> somehow directly closed. After this the file download dialog is show.
>> How can I prevent this flickering of a new browser window? Can't I 
>> achieve this somehow inline?
>>
>

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




How to use MultiSelectionModel with EditTextCell with a DataGrid

2013-02-01 Thread Claire
Hi,

I have managed to implement a multi row selection using the 
'setSelectionModel' method and the 'addSelectionChangeHandler'. This works 
nicely with TextCell type when initialising the columns in the data grid.

However, this stops working when I switch from a TextCell to an 
EditTextCell type. As soon as I click on a cell with an EditTextCell, the 
row selection stops working.

I have searched online but, failed to find anything relevant.
Does anyone have any ideas if this is possible? If yes, could you please 
provide a code sample?

Thanks,
Claire.

-- 
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: How to use MultiSelectionModel with EditTextCell with a DataGrid

2013-02-01 Thread Claire
I am not using the MultiSelectionModel with a checkbox column. I want to 
select a row by using a mouse click.

On Friday, February 1, 2013 4:31:45 PM UTC, Claire wrote:
>
> Hi,
>
> I have managed to implement a multi row selection using the 
> 'setSelectionModel' method and the 'addSelectionChangeHandler'. This works 
> nicely with TextCell type when initialising the columns in the data grid.
>
> However, this stops working when I switch from a TextCell to an 
> EditTextCell type. As soon as I click on a cell with an EditTextCell, the 
> row selection stops working.
>
> I have searched online but, failed to find anything relevant.
> Does anyone have any ideas if this is possible? If yes, could you please 
> provide a code sample?
>
> Thanks,
> Claire.
>

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread David Hoffer
Yes
using 
-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
fixed the problem!  Everything compiles fine now.

With that set I was able to remove ...but just wondering
what 
means when using threads.  Does that control the number of threads, have no
effect?

Thanks!
-Dave


On Fri, Feb 1, 2013 at 9:18 AM, Thomas Broyer  wrote:

> By default, GWT spawns new processes for the "workers", you can switch to
> using threads by
> passing 
> -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
> in .
> Either that or try an even smaller value for localWorkers (or use a
> smaller memory opts)
>
>
> On Friday, February 1, 2013 5:10:52 PM UTC+1, dhoffer wrote:
>
>> I've got 8 cores so I set  to 4...that makes a big
>> difference in how much RAM is uses, with that set it never spikes up near
>> 8GB.  However it still fails...with this error message:
>>
>> [INFO]Compiling 12 permutations
>> [INFO]   Compiling permutation 1...
>> [INFO]   Process output
>> [INFO]  Error occurred during initialization of VM
>> [INFO]   Process output
>> [INFO]  Error occurred during initialization of VM
>> [INFO]  Could not reserve enough space for object heap
>> [INFO]  Could not reserve enough space for object heap
>> [INFO]   Process output
>> [INFO]  Error occurred during initialization of VM
>> [INFO]  Could not reserve enough space for object heap
>> [INFO]   Compiling permutation 4...
>>
>>
>> I do have some local changes...it's possible the local changes have some
>> errors in thembut I need the compiler to tell me what they are if
>> that's the case.  Instead it fails to compile, not sure what to do to
>> resolve this.  Note that if I didn't kill the build at this point...it
>> would continue on with the next permutation...and not report this error at
>> the end.
>>
>> -Dave
>>
>>
>>
>> On Fri, Feb 1, 2013 at 6:17 AM, David Hoffer  wrote:
>>
>>> The last error was this:
>>>
>>> [INFO]  #
>>> [INFO]  # There is insufficient memory for the Java Runtime
>>> Environment to continue.
>>> [INFO]  # Native memory allocation (malloc) failed to allocate
>>> 32744 bytes for ChunkPool::allocate
>>> [INFO]  #
>>> [INFO]  # There is insufficient memory for the Java Runtime
>>> Environment to continue.
>>> [INFO]  # Native memory allocation (malloc) failed to allocate
>>> 450768 bytes for Chunk::new
>>>
>>> Not sure if it matters but we did recently upgrade to Java 1.7 build 11
>>> (the previous builds had a major security flaw and we had to upgrade
>>> everything) but that happened a couple days before I started seeing this I
>>> believe.
>>>
>>> I'll try the  suggestion...
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 1, 2013 at 3:03 AM, Thomas Broyer  wrote:
>>>
 Which kind of OutOfMemory are you seeing?
 Also, try to set  to some value lower than the number of
 cores/cpus of your system: if you don't set localWorkers, the
 gwt-maven-plugin will use the number of cores/cpus by default, and
 obviously parallelizing work increases the memory needs.


 On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:
>
> I've got a rather large GWT build using Maven and the gwt-maven-plugin
> and I'm getting out of memory errors building now.  I'm not sure what's
> changed, it used to take considerable memory but now its taking so much I
> can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 
> 64
> bit to compile, here are some of my settings:
>
> MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m
>
> Then in the gwt-maven-plugin configuration I
> have -Xmx2048m -Xmx2048m -XX:MaxPermSize=512m extraJvm**Args>
>
> I've tried several combinations of values here with no luck...with
> these values...
> - When I start the maven command line build the system has about 3GB
> of memory used
> - When it it starts the GWT part of the build its at about 4GB used.
> - The I have lots of rebind operations going on generating
> code...during this time it goes to about 5GB used.
> - Then when it hits the permutations step this is where it breaks
> down...it very quickly goes to about 7.5 GB used.  Then I get out of 
> memory
> errors and the build fails.
>
> So there seems to be a couple of issues, first the GWT compiler
> doesn't seem to work within the -Xmx2048m value, I used to use -Xmx1024m
> and it does about the same thing...it uses a lot more memory than
> that...and then fails.  In this case it used 3.5 GB before it failed.  And
> secondly, I can't give GWT more memory because my system doesn't have more
> to give it...this was with almost all other programs closed...and it still
> failed.
>
> Does anyone have an idea why my build might be using so much memory
> and how to lim

Dictionary not working on IE7

2013-02-01 Thread Deepak Singh
Hi All,

I am using Dictionary with GWT2.5. Its working fine everywhere except
exception on IE7. Here is the exception


java.util.MissingResourceException: 'upperSlideShow' is not a JavaScript
object and cannot be used as a Dictionary

Where 'upperSlideShow' is a var in html

var upperSlideShow {

}

Do i need to do anything else to work it on IE7 ?

Regards
Deepak Singh

-- 
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: GWT Designer - "Can't create SWT Browser"

2013-02-01 Thread Federico J. Rojkin
The instructions below maybe help you, I used it in a debian squeeze 
installation:

1-)Disable de options  "Used webkit for rendering GWT UI (if available)" 
that is in:  /Windows/Preferences/WindowsBuilder/GWT/
2-)Close Eclipse ide
3-)Download and install 
https://docs.google.com/file/d/0B9KWSpNWygKAYW1yeDhBa2xaRlU/edit# 
4-)Restar eclipse

WUALA!!!

PD: if you can't dowload the file fron the above link, try:
https://docs.google.com/file/d/0B_19kwXNeuHcZ0tsNjZRMFRvVnc/edit?usp=sharing
or
https://mega.co.nz/#!6w4UgQYT!VoLne2JjSEQcA8TymwLERind0TEoqrrCbCI3-qdkjoM

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




java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.Compiler

2013-02-01 Thread Seethalam Sundeep
Hi Guys,

I'm trying to build an application using SMART GWT using below 
configurations.

Eclipse Version : Juno 4.2
GWT Version : 2.0.0
App Engine : 1.3.7 

The same is working in Eclipse GALILEO version 

Jars used:
appengine-api-1.0-sdk-1.3.7.jar
appengine-api-labs-1.3.7.jar
appengine-jsr107cache-1.3.7.jar
commons-beanutils-1.8.1.jar
commons-collections.jar
commons-digester-1.7.jar
commons-io-1.4.jar
commons-logging.jar
datanucleus-appengine-1.0.7.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
font.jar
fscontext.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
groovy-all-1.5.5.jar
gwt-dev.jar
gwt-inc-20091216-r1739.jar
gwt-servlet.jar
gwt-user.jar
gwt-vis.jar
itext-2.1.7.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
log4j-1.2.15.jar
ojdbc14.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.3.RELEASE.jar
poi-3.5-FINAL-20090928.jar
quartz-all-1.6.0.jar
smartgwt-skins.jar
smartgwt.jar
spring-core.jar
spring.jar

When I'm trying to complie the  
java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler
Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.Compiler
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main" 

I'm not able to find out whether the issues is releated wrong plug-in, jars 
or any property i'm missing in the showcase.gwt.xml ...??
Request share me the your suggestions to fix the same. 

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




RPC - Silent failure using LinkedHashMap

2013-02-01 Thread peter
In a serialized class (Solutions) sent to the client via RPC, I have this 
method:
@SuppressWarnings("unchecked")
public LinkedHashMap copyMap() {
return (LinkedHashMap) solutionsMap.clone();
}

In the class containing a Solutions object, I have this method call:
LinkedHashMap excludedSolutions = 
model.getSolutions().copyMap();

The above works fine in hosted mode. As soon as I run in web mode, the 
application fails silently - no js console errors or any notification I can 
find. The RPC call works; I see the payload sent to the client, but the 
code after the RPC call is never executed.

I tried removing the clone() and it still fails.

What works is changing the returned type from LinkedHashMap to a HashMap. 
Note: the underlying solutionsMap is still a LinkedHashMap, just the cast 
has been changed.

The new declaration:
@SuppressWarnings("unchecked")
public HashMap copyMap() {
return (HashMap) solutionsMap.clone();
}

The new call:
HashMap excludedSolutions = 
model.getSolutions().copyMap();

Any thoughts? Should I file as a bug?

Thanks,
Peter

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




Does GWT optimize inefficient code?

2013-02-01 Thread Joel Cairney
Dear forum,

I've searched as hard as I can, but I haven't found any information on what 
specific developer practices GWTs compiler optimizations might optimize 
out.  For instance:

for(int i = 0; i < myList.size(); i++) {...}

or in the presenter:

getView().doAction();

for every action, instead of:

_view.doAction();


Note that I'm not suggesting I plan to go through my code base and fix 
these, so please, please spare me the discussion on whether premature 
optimization is the root of all evil.  I would just like my curiousity 
satisfied.  Does GWT compiler change these code imperfections?

-Joel

-- 
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: GWT 2.5 compiler is running out of memory

2013-02-01 Thread Thomas Broyer


On Friday, February 1, 2013 6:02:11 PM UTC+1, dhoffer wrote:
>
> Yes 
> using 
> -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
>  
> fixed the problem!  Everything compiles fine now.
>
> With that set I was able to remove ...but just wondering 
> what  means when using threads.  Does that control the 
> number of threads, have no effect?
>

localWorkers controls the number of "workers" (defaults to 1 in the 
Compiler, but gwt-maven-plugin sets it to 
Runtime#availableProcessors()
 by 
default); the workers are created by a factory. The default factory 
(ExternalPermutationWOrkerFactory) spawns external processes (looking at 
the code, you can override the JVM opts the the subprocesses by setting the 
gwt.jjs.javaArgs system property, and even the java command –to use a 
different JVM for instance– using the gwt.jjs.javaCommand system prop).
Google probably uses a custom factory the distribute the load to a cluster, 
in this case the localWorkers is not used (if the factory returns false 
from its isLocal() method).

-- 
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: Does GWT optimize inefficient code?

2013-02-01 Thread Dennis Haupt
the first one: unlikely - the size might change in the loop
the second one is more likely

Am 01.02.2013 19:27, schrieb Joel Cairney:
> Dear forum,
> 
> I've searched as hard as I can, but I haven't found any information on
> what specific developer practices GWTs compiler optimizations might
> optimize out.  For instance:
> 
> for(int i = 0; i < myList.size(); i++) {...}
> 
> or in the presenter:
> 
> getView().doAction();
> 
> for every action, instead of:
> 
> _view.doAction();
> 
> 
> Note that I'm not suggesting I plan to go through my code base and fix
> these, so please, please spare me the discussion on whether premature
> optimization is the root of all evil.  I would just like my curiousity
> satisfied.  Does GWT compiler change these code imperfections?
> 
> -Joel
> 
> -- 
> 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.
>  
>  


-- 

-- 
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: Dictionary not working on IE7

2013-02-01 Thread Thomas Broyer
What's you literal object looking like exactly? IIRC, IE7 strictly follows 
ECMAScript for literal objects in that it chokes on an ending comma; comma 
can only be used as a separator between properties; i.e. { foo: 1, bar: 2, 
} is incorrect, and in IE it's a parse errors (while other browsers recover 
from the error).

On Friday, February 1, 2013 7:05:16 PM UTC+1, Deepak Singh wrote:
>
> Hi All,
>
> I am using Dictionary with GWT2.5. Its working fine everywhere except 
> exception on IE7. Here is the exception
>
>
> java.util.MissingResourceException: 'upperSlideShow' is not a JavaScript 
> object and cannot be used as a Dictionary 
>
> Where 'upperSlideShow' is a var in html
>
> var upperSlideShow {
>
> }
>
> Do i need to do anything else to work it on IE7 ?
>
> Regards
> Deepak Singh 
>

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




How to implement HasValue for ListBox?

2013-02-01 Thread BM
I have a custom class which is used to assign single handler to all of my 
UI text fields. 

Custom Class Watcher:
=

private ValueChangeHandler reusableChangeHandler;

public void registerHandlers(HasValue element) {

element.addValueChangeHandler(reusableChangeHandler);

}

The idea here is I can assign all of my textfields same valueChangeHandler.

myView Class:

===

TestBox myTextBox = new TextBox();

Watcher.registerHandlers(myTextBox);

But it doesn't work for ListBox. How do I make a overloaded method to 
accomodate Listbox?

Basically I want to do something when any of my UI elements value changes 
in a center location. 




 



-- 
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: Does GWT optimize inefficient code?

2013-02-01 Thread Colin Alworth
What about the first could be optimized out - just the size() accessor? 
Most List implementations have a size field (see 
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/super/com/google/gwt/emul/java/util/ArrayList.java?r=6609#77
 
for the actual ArrayList used in compiled GWT code) that will be accessed 
instead of running a method. But if the loop modifies the list, rechecking 
the actual size is important. Again, in the case of ArrayList, any change 
made to the size of the list will itself change that same field.

For the second: it depends. If the compiler detects that there is a 
subclass of the current presenter that overrides getView(), then it will 
need to leave that method in so that it can call the right version. But if 
there is only one possible implementation at that point (current class is 
final, only one real impl ever, or various type/method tightening 
optimizations that already occur as part of the compilation process), then 
yes, it will almost certainly compile out to this._view.doAction() (the 
'this' keyword is not implicit in JavaScript as it is in Java).

So the short answer is that it will probably do the sane thing. If it 
doesn't, it is either a more complex optimization than you think it is 
(for-each loop to for loop for example), or some specific Java semantics 
must be preserved (static initializers are a big one), or the compiler 
noticed something you forgot (another subclass of your Presenter that 
overrides getView()). I try compiling my app out in style PRETTY every few 
weeks/months and page through briefly to look for anything that surprises 
me, and it usually ends up that the surprises are what it *can* do than 
what it cannot.

On Friday, February 1, 2013 12:27:43 PM UTC-6, Joel Cairney wrote:
>
> Dear forum,
>
> I've searched as hard as I can, but I haven't found any information on 
> what specific developer practices GWTs compiler optimizations might 
> optimize out.  For instance:
>
> for(int i = 0; i < myList.size(); i++) {...}
>
> or in the presenter:
>
> getView().doAction();
>
> for every action, instead of:
>
> _view.doAction();
>
>
> Note that I'm not suggesting I plan to go through my code base and fix 
> these, so please, please spare me the discussion on whether premature 
> optimization is the root of all evil.  I would just like my curiousity 
> satisfied.  Does GWT compiler change these code imperfections?
>
> -Joel
>

-- 
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: RPC - Silent failure using LinkedHashMap

2013-02-01 Thread Jens
Do you have an uncaught exception handler registered using 
GWT.setUncaughtExceptionHandler() to see if any unexpected exception has 
occurred?

If that does not give any information you could compile your app in PRETTY 
mode so you can see all the java method names (DETAILED also gives your 
package names if you need them to find the JS method). Using Chrome 
DevTools / FireFox FireBug you get a pretty good idea whats going on and 
where to set break points. That way you should definitely get some 
information.

As it works in DevMode and HashMap.clone() is emulated by GWT I would think 
its a bug but having some additional information never hurts :-)

-- J.

-- 
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: Does GWT optimize inefficient code?

2013-02-01 Thread Jens
Just compile your app in PRETTY or DETAILED mode and you will see how 
different the code can end up compared to what you have written in Java ;-) 

GWT does a pretty good job in optimizing your code.

-- J.

-- 
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: How to implement HasValue for ListBox?

2013-02-01 Thread Jens
ListBox has addChangeHandler() which is defined in HasChangeHandlers. So 
you would need registerHandlers(HasChangeHandlers element).

Alternatively you could use ValueListBox instead of ListBox which also 
implements HasValue.

-- J.

-- 
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: How to implement HasValue for ListBox?

2013-02-01 Thread Thomas Broyer
The easiest is to use a ValueListBox but it works a bit differently from a 
ListBox (API wise; for the same generated DOM).
The reason ListBox is not a HasValue is that some people would like 
getValue to return the selected index while others would prefer the 
selected option's value, and a few would want an Option class with a 
getValue(), getLabel() and 
getIndex(): 
https://code.google.com/p/google-web-toolkit/issues/list?can=1&q=ListBox+HasValue
If you can't use a ValueListBox, is relatively easy to make an HasValue 
around a ListBox; ask if you need it and can't come to doing it yourself.

On Friday, February 1, 2013 9:46:08 PM UTC+1, BM wrote:
>
> I have a custom class which is used to assign single handler to all of my 
> UI text fields. 
>
> Custom Class Watcher:
> =
>
> private ValueChangeHandler reusableChangeHandler;
>
> public void registerHandlers(HasValue element) {
>
> element.addValueChangeHandler(reusableChangeHandler);
>
> }
>
> The idea here is I can assign all of my textfields same valueChangeHandler.
>
> myView Class:
>
> ===
>
> TestBox myTextBox = new TextBox();
>
> Watcher.registerHandlers(myTextBox);
>
> But it doesn't work for ListBox. How do I make a overloaded method to 
> accomodate Listbox?
>
> Basically I want to do something when any of my UI elements value changes 
> in a center location. 
>
>
>
>
>  
>
>
>
>

-- 
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: How to implement HasValue for ListBox?

2013-02-01 Thread BM
Thanks Jens and Thomas! Appreciate your quick response. Always learning new 
in GWT! 

I am not sure the exact difference between ListBox and ValueListbox. 

I can make a custom ListBox called WrappedListBox which extends ListBox and 
implements HasValue. I think that is what you are referring here 
right? 

But I sometimes get confused that I have to inherit bunch of methods for 
getValue, SetValue and  

addValueChangeHandler. So do I keep the implementation of getvalue, 
SetValue and addValueChangeHandler  all blank? and just do implementation 
of addValueChangeHandler and copy the method implementation of 
ValueListBox. addValueChangeHandler in that?

Please advise. 
On Friday, February 1, 2013 4:00:02 PM UTC-6, Thomas Broyer wrote:
>
> The easiest is to use a ValueListBox but it works a bit differently from a 
> ListBox (API wise; for the same generated DOM).
> The reason ListBox is not a HasValue is that some people would like 
> getValue to return the selected index while others would prefer the 
> selected option's value, and a few would want an Option class with a 
> getValue(), getLabel() and getIndex(): 
> https://code.google.com/p/google-web-toolkit/issues/list?can=1&q=ListBox+HasValue
> If you can't use a ValueListBox, is relatively easy to make an HasValue 
> around a ListBox; ask if you need it and can't come to doing it yourself.
>
> On Friday, February 1, 2013 9:46:08 PM UTC+1, BM wrote:
>>
>> I have a custom class which is used to assign single handler to all of my 
>> UI text fields. 
>>
>> Custom Class Watcher:
>> =
>>
>> private ValueChangeHandler reusableChangeHandler;
>>
>> public void registerHandlers(HasValue element) {
>>
>> element.addValueChangeHandler(reusableChangeHandler);
>>
>> }
>>
>> The idea here is I can assign all of my textfields same 
>> valueChangeHandler.
>>
>> myView Class:
>>
>> ===
>>
>> TestBox myTextBox = new TextBox();
>>
>> Watcher.registerHandlers(myTextBox);
>>
>> But it doesn't work for ListBox. How do I make a overloaded method to 
>> accomodate Listbox?
>>
>> Basically I want to do something when any of my UI elements value changes 
>> in a center location. 
>>
>>
>>
>>
>>  
>>
>>
>>
>>

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




Implementing Custom SingleSelectionModel

2013-02-01 Thread BM
So I have a custom SingleSelectionModel which I am using to catch the 
setSelection well before it is selected. Basically to Cancel selection of 
second cell if the form data of the first cell is not saved. 

public class PromptingSelectionModel extends SingleSelectionModel {

private boolean stopSelection;

public PromptingSelectionModel() {

super();

}

public PromptingSelectionModel(ProvidesKey keyProvider) {

super(keyProvider);

}

@Override

public void setSelected(T object, boolean selected) {

if (formChanged

&& !Window.confirm("There are unsaved changes, are you sure 
you want to continue?")) {

stopSelection = true;

return;

} else {

stopSelection = false;

}

if (!(stopSelection)) {

super.setSelected(object, selected);

  }

}

 The problem I see here is When I move from one Cell item to another the 
setSelected method here is sometimes called twice and sometimes it is 
called once. 

Cell 1 selected. Which shows form data. I changed form data. formChanged 
get set to True. 

Clicked on Cell 3. setSelected method of PromptingSelectionModel is called. 
I see parameters to the methods are coming as DTO of Cell 1 and false. I 
get the confirm dialog box. I clicked Cancel. setSelected method of 
PromptingSelectionModel is called again. I see parameters to the methods 
are coming as DTO of Cell 2 and true.  I get the confirm dialog box again. 
Clicking Cancel now will keep the selection of Cell 1. So I got two confirm 
here okay? Then I click Cell 5. setSelected method of 
PromptingSelectionModel is called. I see parameters to the methods are 
coming as DTO of Cell 5 and true.I get the confirm dialog box only once. 
Clicking Cancel now will keep the selection of Cell 1.

Is this a know bug? It seems internally hasCellPresenter class is called or 
something which sets the second cell as true. 





-- 
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: How to implement HasValue for ListBox?

2013-02-01 Thread Thomas Broyer


On Friday, February 1, 2013 11:11:49 PM UTC+1, BM wrote:
>
> Thanks Jens and Thomas! Appreciate your quick response. Always learning 
> new in GWT! 
>
> I am not sure the exact difference between ListBox and ValueListbox.
>

ValueListBox produces the same DOM as ListBox but is "data oriented", a bit 
more high-level.
 

> I can make a custom ListBox called WrappedListBox which extends ListBox 
> and implements HasValue. I think that is what you are referring 
> here right?
>

I was more referring to a class that implements HasValue and wraps a 
ListBox (rather than extends ListBox).
 

> But I sometimes get confused that I have to inherit bunch of methods for 
> getValue, SetValue and  
>
> addValueChangeHandler. So do I keep the implementation of getvalue, 
> SetValue and addValueChangeHandler  all blank? and just do implementation 
> of addValueChangeHandler and copy the method implementation of 
> ValueListBox. addValueChangeHandler in that?
>
>>
>> http://turbomanage.wordpress.com/2010/04/01/selectonelistbox-for-use-with-gwtmvp/
>>  
has an example. 

-- 
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: How to implement HasValue for ListBox?

2013-02-01 Thread BM
Thanks Thomas. I will take a look. It seems to be quite involved but I 
should be able to figure out what's happening here.


On Friday, February 1, 2013 5:31:57 PM UTC-6, Thomas Broyer wrote:
>
>
>
> On Friday, February 1, 2013 11:11:49 PM UTC+1, BM wrote:
>>
>> Thanks Jens and Thomas! Appreciate your quick response. Always learning 
>> new in GWT! 
>>
>> I am not sure the exact difference between ListBox and ValueListbox.
>>
>
> ValueListBox produces the same DOM as ListBox but is "data oriented", a 
> bit more high-level.
>  
>
>> I can make a custom ListBox called WrappedListBox which extends ListBox 
>> and implements HasValue. I think that is what you are referring 
>> here right?
>>
>
> I was more referring to a class that implements HasValue and wraps a 
> ListBox (rather than extends ListBox).
>  
>
>> But I sometimes get confused that I have to inherit bunch of methods for 
>> getValue, SetValue and  
>>
>> addValueChangeHandler. So do I keep the implementation of getvalue, 
>> SetValue and addValueChangeHandler  all blank? and just do implementation 
>> of addValueChangeHandler and copy the method implementation of 
>> ValueListBox. addValueChangeHandler in that?
>>
>>>
>>>
> http://turbomanage.wordpress.com/2010/04/01/selectonelistbox-for-use-with-gwtmvp/has
>  an example. 
>

-- 
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: CellTree How to render "different" cell types at a given level ?

2013-02-01 Thread chaitanya deosthale
Subhro or metalhammer, Can you guys post some sample code?

Where exactly did you use the trick "to use a common super type or 
interface and cast as needed."? 

Should i be checking for casts inside the render method of the cell or just 
extend AbstractCell and then cast the value being passed in the 
constructor?

Thanks in advance for the help.

On Sunday, December 5, 2010 3:05:57 AM UTC-8, subhro wrote:
>
> Ohh! I just made a sample working project.
> Yes, that what i did as u mentioned below, common base class.
>
> Thanks,
> Subhro.
>
> On Sun, Dec 5, 2010 at 5:26 AM, metalhammer29a 
> 
> > wrote:
>
>> I found this, from the previous posts on this forum. [1]
>> and so far it seems I got it working.
>>
>> The trick was:
>> "to use a common super type or interface and cast as needed."
>>
>> I used Composite Design Pattern.
>>
>> [1] 
>> https://groups.google.com/group/google-web-toolkit/browse_thread/thread/c5411fe74fabd8ba/61e53348a581e111?lnk=gst
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google Web Toolkit" group.
>> To post to this group, send email to 
>> google-we...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To 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.