Re: upgrade gwt 2.7 to gwt 2.8.1 not working

2019-02-01 Thread Thad Humphries
Thanks! You answered this question over a year and a half ago, but I just 
hit this very problem while converting an app from 2.7.0 to 2.8.2. (Why 
now? With Oracle cutting off Java 8, we moved to Amazon Corretto, and found 
some old imaging stuff that would not work with OpenJDK. As long as I was 
correcting this and moving from Java 6 to OpenJDK 8--and with this weeks 
Canary problems in mind--I decided to bump GWT as well.)

Interesting what you say about Jetty in 2.7.0: I've never had a problem 
with Servlet spec 2.5 and GWT 2.7.0 (this app has used 2.5 for years). 

>From my testing with Tomcat 8.5, I can still use servlet 2.5 or 3.0 in the 
web.xml header of the deployed app. Have you seen issues in deployment? I 
ask because we've one customer who runs WebLogic and their current 
version--12.1.3.0.0--only supports up to 3.0.

On Wednesday, May 10, 2017 at 5:35:50 AM UTC-4, Thomas Broyer wrote:
>
>
>
> On Wednesday, May 10, 2017 at 6:57:25 AM UTC+2, Gal Lavie wrote:
>>
>> Hi everyone
>> I develop application in gwt and google app engine.
>> until now i used with gwt 2.7 lib and google app engine 1.51 lib
>> i try to upgrade the gwt 2.7 to 2.8.1 lib
>> and i have 2 problems now 
>> i hope you can help me
>> 1) when i try to run the project i get exception in devModeBase.class 
>> file in run method 
>> this is the log of run + exception:
>>
>> Running CodeServer with parameters: [-noprecompile, -port, 65462, 
>> -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, 
>> /Users/gallavie/Documents/workspace/Darimpo/war, -logLevel, INFO, -style, 
>> OBFUSCATED, com.darimpo.Darimpo, com.darimpo.Darimpo]
>>
>> Super Dev Mode starting up
>>
>>workDir: 
>> /var/folders/fj/8gtg078929j8hjtfzyy5srv4gn/T/gwt-codeserver-8030568012575356208.tmp
>>
>> 2017-05-10 06:44:10.582:INFO::main: Logging initialized @3822ms
>>
>>Loading Java files in com.darimpo.Darimpo.
>>
>>Ignored 33 units with compilation errors in first pass.
>>
>> Compile with -strict or with -logLevel set to TRACE or DEBUG to see all 
>> errors.
>>
>>Module setup completed in 4961 ms
>>
>>Loading Java files in com.darimpo.Darimpo.
>>
>>Ignored 33 units with compilation errors in first pass.
>>
>> Compile with -strict or with -logLevel set to TRACE or DEBUG to see all 
>> errors.
>>
>>Module setup completed in 1273 ms
>>
>> 2017-05-10 06:44:15.046:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
>>
>> 2017-05-10 06:44:15.164:INFO:oejsh.ContextHandler:main: Started 
>> o.e.j.s.ServletContextHandler@7a508fdc{/,null,AVAILABLE}
>>
>> 2017-05-10 06:44:15.301:INFO:oejs.ServerConnector:main: Started 
>> ServerConnector@4ca4b342{HTTP/1.1}{127.0.0.1:65462}
>>
>> 2017-05-10 06:44:15.313:INFO:oejs.Server:main: Started @8553ms
>>
>>
>> The code server is ready at http://127.0.0.1:65462/
>>
>> Code server started in 6.828 s ms
>>
>> 2017-05-10 06:44:15.702:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
>>
>> 2017-05-10 06:44:19.948:WARN:oejuc.AbstractLifeCycle:main: FAILED 
>> org.eclipse.jetty.annotations.ServletContainerInitializersStarter@1e23623: 
>> java.lang.NoSuchMethodError: 
>> javax.servlet.ServletContext.getJspConfigDescriptor()Ljavax/servlet/descriptor/JspConfigDescriptor;
>>
>> java.lang.NoSuchMethodError: 
>> javax.servlet.ServletContext.getJspConfigDescriptor()Ljavax/servlet/descriptor/JspConfigDescriptor;
>>
>
> Check your classpath, you probably have Servlets API in version 2.x (2.4, 
> 2.5). This method was added in Servlets 3.0 (
> https://docs.oracle.com/javaee/7/api/javax/servlet/ServletContext.html#getJspConfigDescriptor--),
>  
> and Jetty 9.2.14.v20151106 (the version that GWT uses) actually needs 
> Servlets 3.1.0 (
> https://search.maven.org/#artifactdetails%7Corg.eclipse.jetty%7Cjetty-project%7C9.2.14.v20151106%7Cjar
> )
> (GWT 2.7.0 was using Jetty 8.1.12.v20130726, which BTW already needed 
> Servlets 3.0 
> https://search.maven.org/#artifactdetails%7Corg.eclipse.jetty%7Cjetty-project%7C8.1.12.v20130726%7Cjar,
>  
> but could have maybe worked OK with Servlets 2.5 – I doubt it, maybe you 
> changed the order of JARs in your classpath when upgrading; GWT 2.7 used to 
> bundle the Servlets API into gwt-dev, and this has changed in 2.8.1, when 
> retrieved from the Central Repository)
>
> 2) when i try to compile the project i get this exception 
>>
>>
>>
>>[ERROR] An internal compiler exception occurred
>>
>> com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during 
>> visit.
>>
>> at 
>> com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
>>
>> at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
>>
>> at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
>>
>> at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
>>
>> at 
>> com.google.gwt.dev.jjs.ast.JCastOperation.traverse(JCastOperation.java:76)
>>
>> at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
>>
>> at com.google.gwt.dev.jjs.ast.JModVisito

Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-28 Thread Thad Humphries
However the bug is still there on the Chrome Dev version: Version 
73.0.3679.0 (Official Build) dev (64-bit)
(Testing on Mac 10.14.2)

On Monday, January 28, 2019 at 3:13:23 AM UTC-5, Rob wrote:
>
> Can confirm that as mentioned in 
> https://bugs.chromium.org/p/chromium/issues/detail?id=923585
>
> Chrome Canary 74.0.3685.0 no longer suffers from this issue.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-25 Thread Thad Humphries
Rodolfo:

As noted above, I got a 2.7.0 app working on Canary by editting the 
generated file [@name-to]/[@name-to].nocache.js, changing $='javascript:""'
 to $='about:blank'. That worked for all 3 of my 2.7.0 apps.

Also, I'll confirm that 2.8.2 fixed the problem in my flagship app for me. 
The only changes I made to my build.gradle file were to change Java 
source/targetCompatibility from 1.6 to 1.8, and change the gwtVersion from 
2.7.0 to 2.8.2.

On Friday, January 25, 2019 at 9:30:03 AM UTC-5, Rodolfo M. Raya wrote:
>
> I have an app that uses GWT 2.7.0 and fails in Canary. I can't upgrade to 
> GWT 2.8.2 because the app uses an old version of GXT.
>
> What can I do to make my app work on Canary?
>
> Thanks,
> Rodolfo
>
> On Tue, Jan 22, 2019 at 9:40 AM Rob > 
> wrote:
>
>> We've just tried to use our GWT app with Chrome Canary only to find that 
>> it is terminally broken. The GWT showcase app (
>> http://samples.gwtproject.org/samples/Showcase/Showcase.html) exhibits 
>> the same behaviour and we've also seen it on certain AWS console pages. It 
>> appears to be event related, so hopefully the Chrome devs will fix it.
>>
>> Has anyone else noticed this?
>>
>> -- ...
>>
> -- 
> Rodolfo M. Raya >
> http://www.maxprograms.com
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-24 Thread Thad Humphries
Are you using a particular linker in your *.gwt.xml 
file?  http://www.gwtproject.org/doc/latest/DevGuideLinkers.html

On Thursday, January 24, 2019 at 1:19:05 PM UTC-5, Jim Douglas wrote:
>
> I think I can confirm that simply rebuilding with GWT 2.8.2 should resolve 
> this issue for anyone experiencing it. We cut over our build systems to GWT 
> 2.8.2 in November 2017, but I just did a test build here with 2.8.1. With 
> that test, none of my GWT apps will load in Chrome Canary. Switching back 
> to GWT 2.8.2 immediately resolved the issue, with no other changes.
>
> Compiled with GWT 2.8.1:
>
> scrappy:gwtwebclient jimdouglas$ grep javascript *nocache*
>
> function gwtwebclient(){var 
> O='bootstrap',P='begin',Q='gwt.codesvr.gwtwebclient=',R='gwt.codesvr=',S='gwtwebclient',T='startup',U='DUMMY',V=0,W=1,X='iframe',
> Y='javascript:""',Z='position:absolute; width:0; height:0; border:none; 
> left: -1000px;',$=' top: -1000px;',_='CSS1Compat',ab=' html>',bb='',cb='<\/head><\/body><\/html>',db='undefined',eb='readystatechange',fb=10,gb='Chrome',hb='eval("',ib='");',jb='script',kb='javascript',lb='moduleStartup',mb='moduleRequested',nb='Failed
>  
> to load 
> ',ob='head',pb='meta',qb='name',rb='gwtwebclient::',sb='::',tb='gwt:property',ub='content',vb='=',wb='gwt:onPropertyErrorFn',xb='Bad
>  
> handler "',yb='" for "gwt:onPropertyErrorFn"',zb='gwt:onLoadErrorFn',Ab='" 
> for 
> "gwt:onLoadErrorFn"',Bb='#',Cb='?',Db='/',Eb='img',Fb='clear.cache.gif',Gb='baseUrl',Hb='gwtwebclient.nocache.js',Ib='base',Jb='//',Kb='user.agent',Lb='webkit',Mb='safari',Nb='msie',Ob=11,Pb='ie10',Qb=9,Rb='ie9',Sb=8,Tb='ie8',Ub='gecko',Vb='gecko1_8',Wb=2,Xb=3,Yb=4,Zb='selectingPermutation',$b='gwtwebclient.devmode.js',_b='1B074381A5A6D99AB6896BA4A3EF41CB',ac='2D63FF17625503B67A9A19DAAA6300D3',bc='5A6D94200904CC3FE501C45A9F1598A8',cc='75A52E0A57236FE95CC057202E391636',dc='E8A2397ED64648DD5BA91A420DB9A517',ec=':',fc='.cache.js',gc='loadExternalRefs',hc='end',ic='http:',jc='file:',kc='_gwt_dummy_',lc='__gwtDevModeHook:gwtwebclient',mc='Ignoring
>  
> non-whitelisted Dev Mode URL: ',nc=':moduleBase';var o=window;var 
> p=document;r(O,P);function q(){var a=o.location.search;return 
> a.indexOf(Q)!=-1||a.indexOf(R)!=-1}
>
>
> Compiled with GWT 2.8.2:
>
>
> scrappy:gwtwebclient jimdouglas$ grep javascript *nocache*
>
> function gwtwebclient(){var 
> O='bootstrap',P='begin',Q='gwt.codesvr.gwtwebclient=',R='gwt.codesvr=',S='gwtwebclient',T='startup',U='DUMMY',V=0,W=1,X='iframe',Y='position:absolute;
>  
> width:0; height:0; border:none; left: -1000px;',Z=' top: 
> -1000px;',$='CSS1Compat',_=' html>',ab='',bb='<\/head><\/body><\/html>',cb='undefined',db='readystatechange',eb=10,fb='Chrome',gb='eval("',hb='");',ib='script',jb='javascript',kb='moduleStartup',lb='moduleRequested',mb='Failed
>  
> to load 
> ',nb='head',ob='meta',pb='name',qb='gwtwebclient::',rb='::',sb='gwt:property',tb='content',ub='=',vb='gwt:onPropertyErrorFn',wb='Bad
>  
> handler "',xb='" for "gwt:onPropertyErrorFn"',yb='gwt:onLoadErrorFn',zb='" 
> for 
> "gwt:onLoadErrorFn"',Ab='#',Bb='?',Cb='/',Db='img',Eb='clear.cache.gif',Fb='baseUrl',Gb='gwtwebclient.nocache.js',Hb='base',Ib='//',Jb='user.agent',Kb='webkit',Lb='safari',Mb='msie',Nb=11,Ob='ie10',Pb=9,Qb='ie9',Rb=8,Sb='ie8',Tb='gecko',Ub='gecko1_8',Vb=2,Wb=3,Xb=4,Yb='selectingPermutation',Zb='gwtwebclient.devmode.js',$b='6143757447205109409E8E4B4B5953F5',_b

Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-24 Thread Thad Humphries
Does rebuilding with 2.8.2 remove/change $='javascript:""'? Is there a 
setting I'll need in my *gwt.xml file? Will I also need that setting in the 
GWT modules I include in my app?

On Thursday, January 24, 2019 at 1:56:13 AM UTC-5, Thomas Broyer wrote:
>
> You may want to first look for "javascript:" in the generated JS (possibly 
> in PRETTY mode), to confirm Chromium engineer's findings.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-24 Thread Thad Humphries
That worked for me: I have 3 apps built with GWT 2.7.0. If I edit the 
generated file [@name-to]/[@name-to].nocache.js, changing $='javascript:""' 
to $='about:blank', all 3 apps now work in Canary.

As for SSL, I am not seeing any mixed content message in Chrome. I'm 
running Apache 2.4 with a shelf-signed localhost certificate and ProxyPass 
to Tomcat 8.5

On Thursday, January 24, 2019 at 1:56:13 AM UTC-5, Thomas Broyer wrote:
>
> You may want to first look for "javascript:" in the generated JS (possibly 
> in PRETTY mode), to confirm Chromium engineer's findings.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-23 Thread Thad Humphries
FYI, Chromium issue 924105 has now been merged with 
924317: https://bugs.chromium.org/p/chromium/issues/detail?id=924317

On Wednesday, January 23, 2019 at 12:50:01 PM UTC-5, Thomas Broyer wrote:
>
> The samples might very well use an old-ish version of GWT, I'm not sure 
> they're updated each time a release is cut (hard to tell, Showcase has been 
> built against an unreleased version, as shown by $gwt_version = "0.0.0" in 
> the *.cache.js).
>
> On Wednesday, January 23, 2019 at 7:13:35 AM UTC+1, Jim Douglas wrote:
>>
>> I am seeing breakage with the GWT Showcase:
>>
>> http://samples.gwtproject.org/samples/Showcase/Showcase.html
>>
>> It looks ok in: 
>> Version 71.0.3578.98 (Official Build) (64-bit)
>> But fails in: Version 73.0.3680.0 (Official Build) canary (64-bit)
>>
>> (Where "fail" is "clicking in the top level menu doesn't seem to do 
>> anything").
>>
>> On Tuesday, January 22, 2019 at 9:37:19 PM UTC-8, Craig Mitchell wrote:
>>>
>>> The game I wrote with GWT 2.8.2 works fine:  https://drift.team/
>>> However, an old project I wrote with GWT 2.7 (I think?), button clicks 
>>> don't work:  https://www.invitbox.com/
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Chrome Canary 73.0.3680.0 breaks pretty much ALL GWT apps :(

2019-01-22 Thread Thad Humphries


I am seeing similar problems with Canary and three production apps written and 
built with GWT 2.7.0. Two apps fail to load anything beyond the index.html's 
background image. The third app (which uses some MGWT) loads the initial UI, 
but does not respond to a button click. All apps behave fine in standard Chrome.

OS: Mojave 10.14.2
Chrome standard: 71.0.3578.98
Chrome Canary: 73.0.3680.0 


I also see the same problems with the GWT Showcase.


My apps and GWT Showcase are also working in Safari 12.0.2 and Firefox 65.0b12


On Tuesday, January 22, 2019 at 9:40:51 AM UTC-5, Rob wrote:
>
> The showcase works fine on Chrome & Chrome Beta. Just not Canary. Same for 
> our app and AWS console.
>
> I've been debugging the GWT boot strapping code and can see that it 
> appears to be failing as for some reason Canary is clearing out the IFRAME 
> that the GWT app gets injected into.
>
>
> On Tuesday, 22 January 2019 14:03:21 UTC, esoco GmbH wrote:
>>
>> It doesn't seem to be a general problem. I just tried this with a 
>> deployed GWT application and another locally in development mode and both 
>> work as expected with Chrome 73.0.3680.0 (64-Bit) on Windows. I can 
>> reproduce the problem with the showcase but maybe that's caused by the site 
>> not running with HTTPS? As new browser versions are more and more rejecting 
>> unencrypted sites that may affect such old pages.
>>
>>
>> Am Dienstag, 22. Januar 2019 13:39:46 UTC+1 schrieb Rob:
>>>
>>> We've just tried to use our GWT app with Chrome Canary only to find that 
>>> it is terminally broken. The GWT showcase app (
>>> http://samples.gwtproject.org/samples/Showcase/Showcase.html) exhibits 
>>> the same behaviour and we've also seen it on certain AWS console pages. It 
>>> appears to be event related, so hopefully the Chrome devs will fix it.
>>>
>>> Has anyone else noticed this?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: New Gradle plugin for GWT available

2018-10-09 Thread Thad Humphries
Has something gone wrong with the plugin? Yesterday I was able to install 
and use it. Today, on a different machine, I check out my project, and the 
plugin cannot be found (see below). The line #18 in question is *id 
'de.esoco.gwt' version '1.0.2'*, just as it says on the GitHub page. My 
gradlew run Gradle 4.10.2.

$ ./gradlew clean

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/thad/experimental/webgwt282/build.gradle' line: 18

* What went wrong:
Error resolving plugin [id: 'de.esoco.gwt', version: '1.0.2']
> Could not resolve all dependencies for configuration 
'detachedConfiguration1'.
   > Could not determine artifacts for 
de.esoco.gwt:de.esoco.gwt.gradle.plugin:1.0.2
  > Could not get resource 
'https://plugins.gradle.org/m2/de/esoco/gwt/de.esoco.gwt.gradle.plugin/1.0.2/de.esoco.gwt.gradle.plugin-1.0.2.jar'.
 > Could not HEAD 
'https://plugins.gradle.org/m2/de/esoco/gwt/de.esoco.gwt.gradle.plugin/1.0.2/de.esoco.gwt.gradle.plugin-1.0.2.jar'.
> Read timed out

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or 
--debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 31s


On Tuesday, September 18, 2018 at 4:00:06 AM UTC-4, esoco GmbH wrote:
>
> Because both existing Gradle plugins for GWT are no longer maintained I 
> forked the most recent of these (previously known as 
> *putnami-gradle-plugin*) and released the most recent code with a few 
> improvements. The new plugin also supports the current GWT Eclipse plugin 
> so that it can be used together with the Gradle *eclipse* plugin. The new 
> plugin is available on GitHub:
>
> https://github.com/esoco/gwt-gradle-plugin
>
> The most recent version is 1.0.2, released yesterday. Although the names 
> are identical the new plugin should not be confused with the older and even 
> longer unmaintained *gwt-gradle-plugin* by Steffen Schaefer on GitHub. 
> The configuration syntax is inherited from the more recent *Putnami* 
> plugin, only have the plugin and task names been changed to the more 
> appropriate *gwt*. Please check the GitHub page for details.
>
> Feedback and contributions are welcome.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: New Gradle plugin for GWT available

2018-10-07 Thread Thad Humphries
Thank you. This arrives in the nick of time. I've been using the Schaefer 
plugin for years, but now that customers have *finally* upgraded from Java 
6, I'm updating to GWT 2.8.2, Java 8, and looking at Java 11 (tried Java 
9/Jigsaw over a year ago, and the only changes I had were server side to 
drop Java Advanced Imaging now that Java itself support TIFF).

On Tuesday, September 18, 2018 at 4:00:06 AM UTC-4, esoco GmbH wrote:
>
> Because both existing Gradle plugins for GWT are no longer maintained I 
> forked the most recent of these (previously known as 
> *putnami-gradle-plugin*) and released the most recent code with a few 
> improvements. The new plugin also supports the current GWT Eclipse plugin 
> so that it can be used together with the Gradle *eclipse* plugin. The new 
> plugin is available on GitHub:
>
> https://github.com/esoco/gwt-gradle-plugin
>
> The most recent version is 1.0.2, released yesterday. Although the names 
> are identical the new plugin should not be confused with the older and even 
> longer unmaintained *gwt-gradle-plugin* by Steffen Schaefer on GitHub. 
> The configuration syntax is inherited from the more recent *Putnami* 
> plugin, only have the plugin and task names been changed to the more 
> appropriate *gwt*. Please check the GitHub page for details.
>
> Feedback and contributions are welcome.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: gwt-maven-plugin: how can I chnage the Jetty port?

2018-10-04 Thread Thad Humphries
Where does this go? Which pom.xml? Sorry, I'm looking at returning to Maven 
because of the lack of Gradle support and their dizzying rate of updates.

So, I've generated a modular-webapp, I tried

  
net.ltgt.gwt.maven
gwt-maven-plugin
1.0-rc-9
true

  1.8
  true
  
-port
  

  


in the top-level pom.xm. Port  is open, but I still get 

[ERROR] Failed to execute goal 
org.eclipse.jetty:jetty-maven-plugin:9.4.8.v20171121:run (default-cli) on 
project web8-server: Failure: Address already in use


I've tried other places, but I'm out of ideas.

On Thursday, February 23, 2017 at 6:21:51 AM UTC-5, Thomas Broyer wrote:
>
>
>
> On Thursday, February 23, 2017 at 12:19:02 PM UTC+1, Tom Pijl wrote:
>>
>> I am using the gwt-maven-plug of Thomas Broyer.
>> I would like to change the Jetty server port from (default)  to e.g. 
>> 4200 when running mvn gwt:devmode.
>> Any pointers on how to configure that?
>>
>
> You'd use devmodeArgs 
>  
> to pass the -port argument 
> 
> :
> 
>   -port4200
> 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: gwt-maven-plugin: how can I chnage the Jetty port?

2018-10-04 Thread Thad Humphries
Where? Sorry, I'm getting fed up with Gradle, and I'm trying to remember 
how to do this in Maven

On Thursday, February 23, 2017 at 6:21:51 AM UTC-5, Thomas Broyer wrote:
>
>
>
> On Thursday, February 23, 2017 at 12:19:02 PM UTC+1, Tom Pijl wrote:
>>
>> I am using the gwt-maven-plug of Thomas Broyer.
>> I would like to change the Jetty server port from (default)  to e.g. 
>> 4200 when running mvn gwt:devmode.
>> Any pointers on how to configure that?
>>
>
> You'd use devmodeArgs 
>  
> to pass the -port argument 
> 
> :
> 
>   -port4200
> 
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


unsetting draggable

2016-10-27 Thread Thad Humphries
I have a widget that I set draggable with

widget.getElement().setDraggable(Element.DRAGGABLE_TRUE);

and register a DragStartHandler. Later there comes a time when I want to 
unregister the handler, as well as disable dragging with 

widget.getElement().setDraggable(Element.DRAGGABLE_FALSE);

However the widget is still draggable. When I look in Chrome Dev Tools, 
draggable="true" is still present. I've also tried

widget.getElement().removeAttribute("dragable");

but draggable="true" is still present.

Is it not possible to remove draggable? I am using GWT 2.7.0 and running 
Chrome 54.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


unsetting draggable

2016-10-27 Thread Thad Humphries
I have a widget that I set draggable with

widget.getElement().setDraggable(Element.DRAGGABLE_TRUE);

and register a DragStartHandler. Later there comes a time when I want to 
unregister the handler and disable dragging with 

widget.getElement().setDraggable(Element.DRAGGABLE_FALSE);

However the widget is still draggable. When I look in Chrome Dev Tools, 
draggable-"true" is still present. I've also tried

widget.getElement().removeAttribute("dragable");


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.0 released

2016-10-27 Thread Thad Humphries
The doc/javadoc directory is incomplete. It is missing the index.html and 
the other files to complete it. Will these be added to the gwt-2.8.0.zip?

On Friday, October 21, 2016 at 3:21:41 PM UTC-4, Daniel Kurka wrote:
>
> Hi all,
>
> I am very happy to announce GWT 2.8.0 on behalf of the GWT steering 
> committee and the GWT team at Google.
>
> You can download the release from http://www.gwtproject.org/download.html 
> or from maven central.
>
> The release notes can be found at 
> http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_0
>
> Daniel,
> on behalf of the GWT team
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Where is GWT Elemental?

2015-06-05 Thread Thad Humphries
You mean this video?  *GWT.create 2015 - Deep dive in JS Interop (Ray 
Cromwell) *

If not, which one? I have the Polymer bug.

On Friday, June 5, 2015 at 3:03:23 PM UTC-4, Ming-Yee Iu wrote:
>
> Never mind. I watched the JsInterop video and caught up.
>
>
>

-- 
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/d/optout.


Re: GWT 2.8.0 ?

2015-05-14 Thread Thad Humphries
There are no jar files in the 2.8.0-SNAPSHOT directories at this time. The 
last modified timestamp is Tue May 12 03:54:28 CDT 2015.

On Thursday, May 14, 2015 at 2:46:06 PM UTC-4, Bauna wrote:
>
> Yes, it works fine with maven. 
> Add this repository: 
>  
>   google-snapshots 
>   Google Snapshots 
>   
> https://oss.sonatype.org/content/repositories/google-snapshots/ 
>
>   false 
>   true 
>  
>
> -- 
> Bauna 
>
> On 05/14/2015 10:54 AM, Michael Joyner wrote: 
> > On 05/14/2015 09:26 AM, Patrick Tucker wrote: 
> >> Why not use the 2.8 snapshot? 
> > 
> > Does it work well via Maven? 
> > 
>
>

-- 
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/d/optout.


Re: How to load a json file on client side without clientbundle?

2015-03-20 Thread Thad Humphries
Solutions depend on when you want load the JSON files and who loads them. 
If the user is to pick the file, use the FileUpload widget to load the file 
to the server, then send it right back to your client (maybe after some 
server side safety checking). If the JSON files are restricted to an 
administrator, you could control the file upload by your application's 
authentication scheme. Alternately, you could define the JSON file (or 
files) in the application's servlet context (with Tomcat, 
META-INF/context.xml in your WAR). When the app deploys, the administrator 
would edit $CATALINA_BASE/conf/Catalina/[hostname]/[appname].xml to give 
the file's full path.

On Thursday, March 19, 2015 at 3:06:29 PM UTC-4, Dr.Doom wrote:
>
> Hi,
>
> I need an offline solution for my gwt project and i thought i can just put 
> the data as json files as resources in my project.
>
> Is there a way to load this json files on the client side?
> i only found the way with clientbundle, but then i cant modify the json 
> data files without recompiling the project.
>
>
>
>
>
> Thx for the answers ;)
>

-- 
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/d/optout.


Re: war vs webapp with GWT, AppEngine, Gradle and Eclipse

2015-03-13 Thread Thad Humphries
I have no experience with AppEngine, but I've been using Gradle for several 
months thanks to the GWT Gradle Plugin 
(https://github.com/steffenschaefer/gwt-gradle-plugin). If you are not 
using it already, you might find it useful. 

AFAIK, it is expected that whatever is in src will stomp on stuff in war. 
All you really need is build.gradle and your src directory to load into 
Eclipse (and .gitignore if you're using Git).

There is another GWT Gradle plugin in the works 
(see https://github.com/Putnami/putnami-gradle-plugin) but I've not tried 
it.

On Monday, March 9, 2015 at 2:06:09 PM UTC-4, Evan Ruff wrote:
>
> Hi guys,
>
> I was wondering if you could help me clarify my project setup. I'm an 
> Eclipse user who does a lot of work with GWT and AppEngine. I've started to 
> migrate all my projects to Gradle for dependency management and IDE 
> abstraction and am having a little issue figuring out exactly how things 
> should go.
>
> I understand that with Gradle, the files that were previously in the WAR 
> directory should go into src/main/webapp. My question comes from how this 
> all works with GPE and the build file.
>
> I've added the war plugin, appengine plugin and gwt plugin to the build 
> script, but sometimes, it appears that the files in /webapp overwrite 
> everything in /war. Is this expected behavior? Where does the appengine 
> datastore go? What about the class output directory? Should that be in 
> /war/WEB-INF/classes or /webapp/WEB-INF/classes? Where do the GWT output 
> files go?
>
> Should I be treating the /war directory like a build directory? How do I 
> set that up in the GPE so I can still use the debugging tools and such in 
> Eclipse?
>
> Sorry for such a rambling post, but I think I've thought and tested myself 
> in circles with the various configuration options and I'm just interested 
> in which approach is the correct one.
>
> Thanks,
>
> Evan
>

-- 
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/d/optout.


Re: FileUpload mucking my response

2015-03-13 Thread Thad Humphries
I use GWT's FileUpload widget *a lot*, mostly for stuff that I'm storing on 
the server--binary files, MS Office files, etc. On the server side I use 
FileUpload  from the 
Apache Commons to grab and store the file(s) before other libraries do 
something with it.

What are you doing on the server side to set the HTTP response to the user? 
Are you sending back a short string or the entire file? Are you calling 
response.setContentLength()? What's the server? I recall a but in WebLogic 
years ago that would not close and flush the response when the servlet 
finished. I had to do it myself.

When I have to return the file--say it's text I want to display in a 
TextArea--I don't send it back in the same servlet that did the upload. I 
send the user a short OK and maybe some other info about the upload, then 
make a second call to retrieve the file or some portion of it. In the case 
of a PDF or some other binary, this lets me set the MIME type properly.

On Wednesday, March 11, 2015 at 5:42:56 PM UTC-4, Thomas Lefort wrote:
>
> I am using FileUpload to retrieve the content of a file.
>
> The response I get is perfect, headers are correct, I use text/html, the 
> length is correct.
>
> Everything is fine until I fetch the response using event.getResults(). At 
> this point some extra characters are added at the end. It can be several 
> hundreds of characters.
>
> Has anybody had this problem before? Is there some gotcha I am not aware 
> of? I use GWT 2.6.1.
>
> 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/d/optout.


Re: Adding external jars to eclipse GWT projects

2014-12-29 Thread Thad Humphries
Are you trying to use Gson in client-side code? That will not work. 
(see http://www.gwtproject.org/doc/latest/DevGuideCodingBasics.html)

GWT includes the package com.google.gwt.json.client for client-side JSON. 
You can use Gson or another JSON package on the server-side (I use 
json.org).

On Thursday, December 25, 2014 6:09:10 PM UTC-5, Taher Abouzeid wrote:
>
> I want to use the gson jar to encode and decode data in json. i put it in 
> the war/WEB-INF/lib directory and used it in the code but eclipse couldn't 
> find it in order to be able to work with it until i added it to the build 
> path for the project. but after i do the gwt compile and start the server 
> and send a request, i get the following error
>
> WARNING: Error for /functionlibrary/functionlibrary
>
> java.lang.Error: Unresolved compilation problems: 
>
> Gson cannot be resolved to a type
>
> GsonBuilder cannot be resolved to a type
>
>
> i have searched online in countless forum posts and none of them work... 
> i'm using gson jar exclusively on the server side, and when i try to use 
> the one in the repackaged package that comes with gwt i get an error saying 
> that it's unreliable. i'd like someone to give me precise instructions on 
> how to add any jar i like to the server side code to work with.
>

-- 
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/d/optout.


Re: Device specific function of the operating system (iOS, Android, Windows Phone)

2014-12-29 Thread Thad Humphries
Check out mgwt and gwt-phonegap at http://www.m-gwt.com/ 

So far I've not used gwt-phonegap, so I'll leave that portion to others on 
the mgwt users list. However I'm quite pleased with mgwt's handling of 
mobile browsers for Android and iOS.

On Monday, December 29, 2014 5:34:15 AM UTC-5, Brotinger wrote:
>
> Hi,
>
> I want to develop a new website for an idea that I have and I want to use 
> GWT for it.
>
> I´ve just one short general question, for that I can´t find a answer at 
> the moment:
>
> This website I plan to start should be running in a normal browser on a 
> computer and on mobile devices.
> On mobile devices it is important that the site can access the camera or 
> other device/plattform specific methods.
> So on an iPhone, on Android devices or windows phone smartphones I want to 
> access some specific function of that operations systems.
>
> Is that even possible?
> I´ve have experiences with webviews an android and know that I can access 
> the camera or the contacts with javascript within the webview, but I want 
> to make it cross-platform compatible.
>
>
> 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/d/optout.


Success with GWT 2.7.0-rc1

2014-11-11 Thread Thad Humphries
I just wanted to pass on my experiences with GWT 2.7.0-rc1. In a word, 
excellent.

Converting my two Ant projects was simple: I just changed the GWT property 
to point to gwt-2.7.0-rc1 and everything ran fine. Everything built without 
error or warning. My first attempt to launch the devmode UI told me that 
firebugHandler and popupHandler were no longer supported--something I'd 
seen elsewhere but had forgotten. After removing those from my module file, 
the devmode UI launched, and it launched SuperDevMode in Chrome without a 
hitch. 

My 3rd project, which I've been building with Gradle, was a bit more 
trouble. Attempts to build it with 2.7.0-rc1 resulted in a 
java.lang.IncompatibleClassChangeError. Steffen asked me to run `gradle 
dependencies` which zeroed in on the problem: My project uses GIN, and GIN 
eventually brings in asm:asm:3.1, which conflicts with 
org.ow2.asm:asm:5.0.3 from gwt-dev. I excluded asm:asm:3.1 by changing

compile 'com.google.gwt.inject:gin:2.1.2'
compile 'com.google.inject.extensions:guice-servlet:3.0'

to

compile ('com.google.gwt.inject:gin:2.1.2') {
  exclude module: 'asm'
}
compile ('com.google.inject.extensions:guice-servlet:3.0') {
  exclude module: 'asm'
}

I should note that building the project with Maven did *not* cause the same 
class error (and the new devmode worked fine). I guess the GWT Maven plugin 
does not reach as deep as Gradle.

My 3rd project also uses MGWT, and I ran afoul of GWT change #7883, which 
caused MTextBox and MPasswordTextBox to no longer implement HasText. This 
was quickly caught and remedied in the MGWT 2.0.1-SNAPSHOT.

Now `gradle gwtDev` launches the devmode UI, and it launches SuperDevMode.

Being able to run SuperDevMode without having to run a -noserver instance 
and the codeserver separately is very nice. The rapid recompile with GWT 
2.7.0-rc1 is terrific. (BTW, though I've not tried it yet, change #10121 
"DevMode: wait for CodeServer to start before enabling buttons" is a great 
idea. I guess we'll see this in RC2?)

Generally I'm happy with debugging through the codeserver, debugging in 
Eclipse is more elegant. Therefore I also decided to give sdbg a go 
(https://github.com/sdbg/sdbg). Nice work! I will almost certainly use it, 
though probably not to the exclusion of using the codeserver. I look 
forward to seeing how this project develops.

Thanks for the great work and everyone's 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.
For more options, visit https://groups.google.com/d/optout.


Re: Problems upgrading Google Plugin for Eclipse

2014-11-08 Thread Thad Humphries
I dunno what the problem was, but it occurred on a second Mac that was 
configured like the first. In the end, on both machines I removed Eclipse 
Luna from /Applications and installed a fresh copy 
(eclipse-java-luna-SR1-macosx-cocoa-x86_64.tar.gz) to ~/Applications (off 
the user directory vs root) and loaded the GPE and the other plugins I 
used. I hope I don't have this trouble with the next release of the GPE.

On Thursday, November 6, 2014 4:46:45 PM UTC-5, Thad Humphries wrote:
>
> I haven't been able to install the "Google Plugin for Eclipse 
> 4.4 3.8.0.v201410302155-rel-r44" update. I'm told "Insufficient privileges 
> to apply this update". I've no idea why. Everything in 
> the /Applications/eclipse directory is owned by me, as is everything in the 
> .metadata directories of my workspaces. Even after removing all *.lock 
> files and restarting Eclipse, it's still not working. Any ideas? Maybe some 
> file(s) I should edit or delete. (I think before I blow everything away and 
> reinstall 4.4 from scratch, I'll wait for an update that includes GWT 
> 2.7.0.)
>

-- 
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/d/optout.


Problems upgrading Google Plugin for Eclipse

2014-11-06 Thread Thad Humphries
I haven't been able to install the "Google Plugin for Eclipse 
4.4 3.8.0.v201410302155-rel-r44" update. I'm told "Insufficient privileges 
to apply this update". I've no idea why. Everything in 
the /Applications/eclipse directory is owned by me, as is everything in the 
.metadata directories of my workspaces. Even after removing all *.lock 
files and restarting Eclipse, it's still not working. Any ideas? Maybe some 
file(s) I should edit or delete. (I think before I blow everything away and 
reinstall 4.4 from scratch, I'll wait for an update that includes GWT 
2.7.0.)

-- 
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/d/optout.


Re: Send event for keydown

2014-10-24 Thread Thad Humphries
Yeah. That happens to me more often than I care to admit.  :) 

When I first started with GWT I wrestled with the same problem, and someone 
on this list showed me how to do it. As I recall, the key was adding the 
Scheduler (though this was before GWT 1.5 and it was called something else 
then).

On Friday, October 24, 2014 9:16:53 AM UTC-4, Marteijn Nouwens wrote:
>
> This is what is now did But it feels off :-(
>
> Op donderdag 23 oktober 2014 16:34:15 UTC+2 schreef Thad Humphries:
>>
>> This KeyPressHandler will change the text to upper case as the user types:
>>
>> public class ForceUpperCase implements KeyPressHandler { 
>>   @Override
>>   public void onKeyPress(KeyPressEvent event) {
>> final TextBoxBase tbb = (TextBoxBase) event.getSource();
>> Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
>>@Override
>>public void execute() {
>>tbb.setText(tbb.getText().toUpperCase());
>>}
>> });
>>   }
>> }
>>
>> ..
>>
>> textBoxBase.addKeyPressHandler(new ForceUpperCase());
>>
>>
>> On Tuesday, October 21, 2014 7:49:57 AM UTC-4, Marteijn Nouwens wrote:
>>>
>>> In a sub class for a textbox i try to convert lower case to upper case. 
>>> This works ok but i would like to send the upper case as a Event.
>>>
>>> // NativeEvent down = Document.get().createKeyDownEvent(false, false, 
>>> true, false, keyCode);
>>> // DomEvent.fireNativeEvent(down, this, this.getElement());
>>>
>>> But this does not seem to trigger the browser event.
>>>
>>> Now i do substring and set value. The user does not see this but i feel 
>>> it's a bit overkill.
>>>
>>> Anybody any ideas.?
>>>
>>

-- 
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/d/optout.


Re: Send event for keydown

2014-10-23 Thread Thad Humphries
This KeyPressHandler will change the text to upper case as the user types:

public class ForceUpperCase implements KeyPressHandler { 
  @Override
  public void onKeyPress(KeyPressEvent event) {
final TextBoxBase tbb = (TextBoxBase) event.getSource();
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
   @Override
   public void execute() {
   tbb.setText(tbb.getText().toUpperCase());
   }
});
  }
}

..

textBoxBase.addKeyPressHandler(new ForceUpperCase());


On Tuesday, October 21, 2014 7:49:57 AM UTC-4, Marteijn Nouwens wrote:
>
> In a sub class for a textbox i try to convert lower case to upper case. 
> This works ok but i would like to send the upper case as a Event.
>
> // NativeEvent down = Document.get().createKeyDownEvent(false, false, 
> true, false, keyCode);
> // DomEvent.fireNativeEvent(down, this, this.getElement());
>
> But this does not seem to trigger the browser event.
>
> Now i do substring and set value. The user does not see this but i feel 
> it's a bit overkill.
>
> Anybody any ideas.?
>

-- 
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/d/optout.


Re: Webfonts with ClientBundle, UiBinder

2014-09-27 Thread Thad Humphries
Thanks again, Jens, for your help on this issue. Font Awesome is a nice 
package and I am very pleased with the results. I can use the icon directly 
in UiBinder, but more importantly, I can set them in my code. I've created 
a class that builds a static a JSONObject that matches a file MIME type to 
the CssResource for the desired icon:

mimeTable.put("image/jpeg", 
  new JSONString(FontAwesomeBundle.INSTANCE.fa().fileImageOutline()));


In cases where I want to stack two icons, I return both styles with a space 
separation: 

mimeTable.put("text/x-vcard", 
  new JSONString(FontAwesomeBundle.INSTANCE.fa().fileOutline() + 
" " + FontAwesomeBundle.INSTANCE.fa().user()));


In UiBinder I have


  
  


  



I get a list of files as AutoBeans from the server and pass these to the 
matching Impl.java file where I call

String stylings = MimeAssociation.get(fileInfo.getMime());
String [] fontStyles = stylings.split(" ");
if (fontStyles.length == 1) {
  icon.addClassName(fontStyles[0]);
  stack.removeFromParent();
}
else {
  stack2.addClassName(fontStyles[0]);
  stack1.addClassName(fontStyles[1]);
  icon.removeFromParent();
}


The smaller size for stack--2x vs 4x--gives the icons in the list the same 
visual size.

The result looks good in both GWT desktop widget and the MGWT gray 
background, and I have a consistent look across all my icons.


On Wednesday, September 24, 2014 12:36:44 PM UTC-4, Thad Humphries wrote:
>
> Success! Thank you. My CSS now starts with
>
> @url fawoff woff;
> @font-face{font-family:'FontAwesome';
>   src: fawoff format('woff');
>   font-weight:normal;font-style:normal}
>   .fa{display:inline-block;font:normal ...
>
>
> and the icon is there. Thank you. Once I flesh out my ClientBundle I'll be 
> able add icons as needed from code or via UiBinder.
>
> Interesting item: This change *did not work* at first when I simply 
> stopped and started SDM (Dev Mode Off, Dev Mode On). However I was 
> desperate so I stopped RunJettyRun in Eclipse and SDM in the terminal, and 
> ran `gradle clean jettyDraftWar` for a complete rebuild. Only after that 
> did the icon appear. Things like that are gonna make me paranoid. :)
>
> On Wednesday, September 24, 2014 11:42:18 AM UTC-4, Jens wrote:
>>
>>
>>> @font-face{
>>>   font-family:'FontAwesome';
>>>   @url fawoff woff?v=4.2.0;
>>>   font-weight:normal;font-style:normal}
>>>  .fa{display:inline-block;font:normal ... 
>>>
>>>
>> I guess it should be
>>
>> @url fawoff woff;
>> @font-face {
>>font-family: 'FontAwesome'
>>src: fawoff format('woff') /* fawoff should be replaced with url of 
>> DataResource woff() */
>>font-weight: normal;
>>font-style: normal;
>> } 
>>
>>
>> -- 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.
For more options, visit https://groups.google.com/d/optout.


Re: Webfonts with ClientBundle, UiBinder

2014-09-24 Thread Thad Humphries
Success! Thank you. My CSS now starts with

@url fawoff woff;
@font-face{font-family:'FontAwesome';
  src: fawoff format('woff');
  font-weight:normal;font-style:normal}
  .fa{display:inline-block;font:normal ...


and the icon is there. Thank you. Once I flesh out my ClientBundle I'll be 
able add icons as needed from code or via UiBinder.

Interesting item: This change *did not work* at first when I simply stopped 
and started SDM (Dev Mode Off, Dev Mode On). However I was desperate so I 
stopped RunJettyRun in Eclipse and SDM in the terminal, and ran `gradle 
clean jettyDraftWar` for a complete rebuild. Only after that did the icon 
appear. Things like that are gonna make me paranoid. :)

On Wednesday, September 24, 2014 11:42:18 AM UTC-4, Jens wrote:
>
>
>> @font-face{
>>   font-family:'FontAwesome';
>>   @url fawoff woff?v=4.2.0;
>>   font-weight:normal;font-style:normal}
>>  .fa{display:inline-block;font:normal ... 
>>
>>
> I guess it should be
>
> @url fawoff woff;
> @font-face {
>font-family: 'FontAwesome'
>src: fawoff format('woff') /* fawoff should be replaced with url of 
> DataResource woff() */
>font-weight: normal;
>font-style: normal;
> } 
>
>
> -- 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.
For more options, visit https://groups.google.com/d/optout.


Re: Webfonts with ClientBundle, UiBinder

2014-09-24 Thread Thad Humphries
Thanks for the info. I've made some changes, but still I'm only as close as 
when I added the Font Awesome CSS with a ui:style element: I'm not seeing 
the camera icon, only an empty rectangle with a heavy black border (running 
in Chrome with SDM).

I've edited the CSS--now named fontAwesomeWoff.css--to look like

@font-face{
  font-family:'FontAwesome';
  @url fawoff woff?v=4.2.0;
  font-weight:normal;font-style:normal}
 .fa{display:inline-block;font:normal ... 

 
My ClientBundle is
 

 public interface FontAwesomeBundle extends ClientBundle {
  
  FontAwesomeBundle INSTANCE = GWT.create(FontAwesomeBundle.class);
  
  @NotStrict
  @Source("./fonts/fontAwesomeWoff.css")
  FontAwesome fa();
  
  @DoNotEmbed
  @MimeType("application/font-woff")
  @Source("./fonts/fontawesome-webfont.woff")
  DataResource woff();
  
  public interface FontAwesome extends CssResource {
String fa();

@ClassName("fa-lg")
String large();
...


In my EntryPoint class, after setting the logging and window closing 
handlers and injecting the global stylesheet (as in Showcase), I call 

  FontAwesomeBundle.INSTANCE.fa().ensureInjected();


To try this out, in my UiBinder file I put

  
  ...
  


but instead of the camera, I see an empty rectangle with a heavy black 
border
  
I've attached a partial screen shot from Developer Tools showing the 
element (>
>> Since you only want woff you can remove everything else:
>>
>> @font-face {
>>   font-family: 'FontAwesome';
>>   src: url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff');
>>   font-weight: normal;
>>   font-style: normal;
>> }
>>
>> Next you have to decide if you want to embed the font into your GWT app 
>> as DataResource or if the browser should load the file normally like 
>> defined above. If you want to use DataResource you need to replace the 
>> url() part with the @url constant of GWT. If you want to leave it as is, I 
>> would create a public folder, place all fonts in "public/fonts" and then 
>> remove "../" from the url(). That way the font files will be copied to your 
>> war/app/fonts folder whenever you GWT compile your app and should be 
>> accessible by the browser. You might want to rename font files to contain 
>> ".cache." if you place them into the public folder so your web server sets 
>> correct caching headers.
>>
>
> I'd just use a DataResource in any case, and annotate it with @DoNotEmbed 
> if I don't want the font embedded as a "data:" URL.
> GWT will take care of the copying, renaming, etc.
> Actually, if the font file is "big enough" (the data: URL would be longer 
> than "(2 << 15) - 1" chars), it won't be embedded anyway, whether you use 
> @DoNotEmbed or not.
>

-- 
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/d/optout.


Webfonts with ClientBundle, UiBinder

2014-09-23 Thread Thad Humphries
I'd like to try out webfonts with my app. I can use the *.woff file from 
Font Awesome (http://fontawesome.io/) by adding it to my WAR directory and 
a link to a modified version of their CSS in my module's welcome-file (I'd 
like to go with just *.woff, since it's small and works across browsers). I 
would like to do things more the GWT way--UiBinder, ClientBundle, etc. I 
feel I'm close, but it's not coming together.

I've tried it first in UiBinder. I just tried adding the FontAwesome CSS:


...



I see nothing. Of course, this misses the *.woff. I can add that with 
  




but where and how to I reference it? I can add a style such as

@url fawoff woff;
.face {
  font-family: fawoff;
}

but adding that style to the class attribute doesn't work.

Furthermore, I'd like to wrap things a ClientBundle. I'd like my app to 
match file icons with file type from a document repository, and Font 
Awesome has a nice selection of file icons. I've created a ClientBundle but 
I don't know how to get make the CssResource and DataResource work together:

public interface FontAwesomeBundle extends ClientBundle {
  
  FontAwesomeBundle INSTANCE = GWT.create(FontAwesomeBundle.class);
  
  @NotStrict
  @Source("./fonts/fontAwesome.css")
  FontAwesome fa();
  
  @Source("./fonts/fontawesome-webfont.woff")
  DataResource woff();
  
  public interface FontAwesome extends CssResource {
String fa();

@ClassName("fa-lg")
String large();

@ClassName("fa-3x")
String scale3();

@ClassName("fa-camera-retro")
String cameraRetro();
...
  }
}


What am I missing?

-- 
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/d/optout.


Re: Which GWT Layout Panel is perfect for building Mobile Friendly Website?

2014-09-21 Thread Thad Humphries
Look at mgwt 2.0  and its showcase 
 (code at 
https://github.com/mgwt/mgwt.showcase). It may take a while to get your 
head around it, but it's well worth the time.

On Sunday, September 21, 2014 9:32:37 AM UTC-4, Tom wrote:
>
> Ok, A Mobile Friendly Website should be very short and focus on the task, 
> so it wont need to show the headers as in Desktop Website.
>
> Here is What I want to design.
>
> When user open mydomain.com in Mobile devices like Smartphone or Tablet. 
> They Will see
>
> Email:
> Pass:
> Login
>
> Registration
>
> Explanation
>
> About
>
> When they CLick Login they will go to a page that lists all the products, 
> the Page Should has "Home" link the Back button
>
> Home  Back
>
> Product 1 , some other info
> Product 2 , some other info
> Product 3 , some other info
> ..
>
> When user clicks on a product, it will show the details of the products
>
> Home  Back
>
> This is Product 1 
>
> Detail info of product 1..
>
>
> If user hits "Back" button then it will go back to the previous page (ie, 
> the list of products page).
>
> Note that: in the home page, we also have "Registration", "Explanation" & 
> "About" Buttons, but we will never show these buttons in any other pages 
> except the home page.
>
> So, my question is:
>
> Is there any Gwt Layout panel that can help me to achieve that Simple 
> Design for Mobile Friendly Website?
>
> The only 1 I can see is the TabLayoutPanel, but the headers are always 
> appear in all pages.
>
> What about "StackLayoutPanel"? How it look like? & is it good for Mobile 
> Website?
>
>
>
> http://stackoverflow.com/questions/25959731/which-gwt-layout-panel-is-perfect-for-building-mobile-friendly-website
>

-- 
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/d/optout.


Re: Error using IMAGE/IO in a Servlet

2014-09-05 Thread Thad Humphries
True. I have a static block in my RPC *Impl class that calls 
ImageIO.scanForPlugins(). It's not uncommon for someone to forget to modify 
the web.xml when upgrading Tomcat, and having that static block saves me 
some hassle. However the app will still leak if reloaded. The Tomcat 
administrator should still restart Tomcat at some point after replacing or 
reloading the WAR.

On Thursday, September 4, 2014 5:27:31 PM UTC-4, Paul Bartlett wrote:
>
> After another million years I have been trying various things out and I 
> found that if I add ImageIO.scanForPlugins(); before the calls it loads the 
> tiff image writers from the WEB_INF/lib directory.   This is better than 
> disabling memory leak protection.
>
>
> On Tuesday, 29 October 2013 04:29:49 UTC-7, Sean wrote:
>>
>> Wow, 
>>
>> Thank you Jens. I would have never figured that out in a million years! 
>> That was super subtle, but I learned a lot from it!
>>
>> Thank you! Your suggestion worked perfectly!
>>
>> -Sean
>>
>> On Monday, October 28, 2013 4:17:13 PM UTC-4, Jens wrote:
>>>
>>> This kind of ClassCastException typically occurs if you have a 
>>> ClassLoader issue. If the same class is loaded by two different ClassLoader 
>>> then Java treats these two classes as different and its likely that you get 
>>> the above ClassCastException.
>>>
>>> First I would make sure that you have the imageIO.jar only once in your 
>>> class path and then you could check if you have a ClassLoader leak when you 
>>> redeploy your application. 
>>>
>>> A ClassLoader leak isn't that unlikely because the first call to ImageIO 
>>> pins the current ClassLoader. If that's the WebAppClassLoader that is 
>>> responsible for your app, the app server (jetty) can not garbage collect 
>>> your deployed app once you redeploy it because some Java system classes 
>>> will hold a reference to that WebAppClassLoader...well and this reference 
>>> will never go away unless you restart the server. 
>>> If you are in that situations then its likely that everything works the 
>>> first time you start Jetty and it will start to fail once you have 
>>> redeployed your app the first time. 
>>>
>>> To fix this situation you could try using a ServletContextListener and 
>>> in its contextInitialized() method you first change the class loader of the 
>>> current thread to the system class loader. Then you make a dummy call to 
>>> ImageIO and finally you set back the class loader to the original one.
>>>
>>> In our app we have to do that for multiple classes because libraries 
>>> (and Java) are sometimes written in a way thats not very compatible to 
>>> application server class loading.
>>>
>>> -- 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.
For more options, visit https://groups.google.com/d/optout.


HOW-TO: Super Dev Mode, Ant, and Run-Jetty-Run

2014-07-30 Thread Thad Humphries
 

Though I've moved to Super Dev Mode for new projects, and have been trying 
out Maven and Gradle, I have two shipping products that are built with Ant 
and were developed using DevMode. I'm reluctant to screw with these much, 
but I must fix the occasional bug or tweak or add a feature. This summer 
I've had to reopen both projects, and decided that I might as well move 
them from GWT 2.5.1 to 2.6.1 and get them working with Super Dev Mode.

It ends up that Super Dev Mode was pretty easy. First I added the xsiframe 
linker to the module files. My projects' build.xml scripts were first built 
with GWT's webAppCreator (one back in GWT v1.something). I copied their 
devmode targets and modified them for SDM. Except for the last , the 
sdm target for both projects is the same:


  

  
  
  
  
  












  
 


While I could continue to use DevMode to run my projects in Jetty, I'd like 
to avoid DevMode altogether (maybe it will go away in some future GWT?). 
First I tried an Ant target, but I had no success when following the 
instructions 
. 
With a little searching, I found the Eclipse plugin Run Jetty Run 
. Success. With Run Jetty 
Run installed, the Jetty Webapp run/debug configuration builds itself when 
you highlight the project, right click, and select *Run As -> Run Jetty* 
(you can tweak this later; I prefer to run development on port ). Run 
picks up the app's war/WEB-INF/jetty-web.xml so it is easy to modify the 
web app context. 

With this set up, I start the webapp under Jetty though Eclipse, and run 
`ant sdm` in a console. I already have the *Dev Mode On*/*Off* buttons in 
my bookmarks toolbar, so I point Chrome at http://localhost:/cold and 
press *Dev Mode On*. Voila! I can debug the client side with Chrome's 
developer tools and debug the server side in Eclipse. Moreover, when I make 
a source code change on the server side, I don't have to restart the 
server. Run Jetty Run picks up the change in seconds. (Chrome only. Alas, 
while I can see the client side Java in Firefox 31, it's entirely 
alphabetical by filename, and the codeserver debugger does not honor 
breakpoints.)

-- 
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/d/optout.


Re: Making browser save userneme & password

2014-06-07 Thread Thad Humphries
I wouldn't think so. Then you have to decrypt it, and where do you do that? 
In your JavaScript? Or you could use the old UNIX approach--never decrypt, 
just apply the matching 2-character salt and see if the encrypted words 
match. But exposing the salt allows for dictionary/brute force techniques 
to break the password.

As I said, I don't store passwords. I don't let my browser do so and I 
don't use an password management tool (except to speed testing on a few, 
inside the firewall machines). If my customers choose to, well... (I'm 
recalling a fellow who wrote the vault combination *on the back of his 
business card*; .) I tend to be fatalistic about security--if it's 
online, it can (eventually) be found and cracked, and there are folks a 
whole lot smarter than me to do it.

On Saturday, June 7, 2014 10:06:45 AM UTC-4, Blake wrote:
>
> I don't suppose encrypting it before saving it to local storage is very 
> effective, is it?
>
>
> On Sat, Jun 7, 2014 at 1:34 AM, Thomas Broyer  > wrote:
>
>>
>>
>> On Saturday, June 7, 2014 5:31:51 AM UTC+2, Blake wrote:
>>>
>>> Thanks a lot for your input!  I thought about doing it this way, and I 
>>> like it a lot for all the reasons you state.  This would be the best and 
>>> easiest approach.  My only problem with it was that I fear security.  I 
>>> really don't understand cookies and local storage well.  I could encrypt 
>>> the password.  I just don't understand if an app from another site can just 
>>> read my local storage.  Do you have any comments about that concern?
>>>
>>
>>
>> DON'T DO THAT!
>> Your fears are well-founded. The only secure way to store a password is 
>> in a password manager (the one from the browser, or something like LastPass 
>> or 1Password).
>>
>> With this approach, if there's an XSS vulnerability anywhere in your site 
>> (not only the login page, not only the GWT app) it could be exploited to 
>> read the localStorage.
>> Similarly for cookies, which is why cookies should never be readable by 
>> scripts (i.e. should have the HttpOnly flag) unless it's really needed 
>> (which should never be the case when the cookies are about security).
>>
>

-- 
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/d/optout.


Re: Making browser save userneme & password

2014-06-06 Thread Thad Humphries
Can you use HTML5? If so, then why not 
use com.google.gwt.storage.client.Storage? For example in my newer apps, if 
the login is successful and a checkbox is set, the app remembers the target 
server and username:

// set/clear local storage
final Storage storage = Storage.getLocalStorageIfSupported();
if (storage != null) {
  if (view.getRememberId().getValue()) {
storage.setItem("o_username", user);
storage.setItem("o_server", server);
view.getRememberId().setValue(true);
  }
  else {
storage.setItem("o_username", "");
storage.setItem("o_server", "");
view.getRememberId().setValue(false);
  }
}

The next time the user calls up the app, I check local storage for these 
values:

// Fetch fields from storage.
final Storage storage = Storage.getLocalStorageIfSupported();
if (storage != null) {
  String user = storage.getItem("o_username");
  view.getUsername().setText(user);
  view.getServer().setText(storage.getItem("o_server"));
  if (user != null && !user.isEmpty()) {
view.getRememberId().setValue(true);
  }
}

I don't store the password, but I could.

This is a lot less painful than my older approach of injecting HTML 
(similar to yours) and it's consistent across HTML browsers, include mobile 
devices using MGWT.

On Tuesday, June 3, 2014 7:12:51 PM UTC-4, Blake wrote:
>
> Greetings,
>
> I would like to have the browser save the username/password to my 
> application.  I have searched and searched and found no solution that works 
> on all of the standard browsers (Chrome, IE, Firefox, Safari).  Best I have 
> been able to do (works on Firefox & IE) is:
>
>
> 
> 
> 
> 
> Continue as a guest 
>   or   Login ID:
>   name="username" id="username" placeholder=Email Address>
> (email address)
> 
> 
> Password:
>  name="password" id="password" placeholder=Password>
> Login
> 
> 
> 
> 
>
>
> private static final String FORM_ID = "login-form";
> private static final String USER_ID = "username";
> private static final String PASSWORD_ID = "password";
>
> 
>private static void doLogin() {
> Window.alert("test 1");
> }
>
> private static native void injectLoginFunction() /*-{
> $wnd.login = function() {
> @booklion.client.login.Login::doLogin()();
> };
> }-*/;
>
>
> public void onModuleLoad() {
> injectLoginFunction();  // ok
> TextBox fUsername = TextBox.wrap(DOM.getElementById(USER_ID));
> fUsername.setStyleName("gwt-TextBox");
> PasswordTextBox fPassword = 
> PasswordTextBox.wrap(DOM.getElementById(PASSWORD_ID));
> fPassword.setStyleName("gwt-PasswordTextBox");
> FormPanel fLoginForm = FormPanel.wrap(DOM.getElementById(FORM_ID), 
> false); 
> fLoginForm.setAction("");  //  ok
> fLoginForm.addSubmitHandler(new FormPanel.SubmitHandler() { 
>
> @Override
> public void onSubmit(FormPanel.SubmitEvent event) {
> Window.alert("test 2");
> }
> });
> fLoginForm.getElement().setAttribute("onsubmit", "login();return 
> false;");
> }
>
>
> test 1 gets displayed - not test 2.  Firefox and IE offer to save the 
> password.  Chrome and Safari do not.
>
> Sure would appreciate some help.
>
> Thanks.
>
> Blake McBride
>
>

-- 
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/d/optout.


Re: Preview Image before file upload in Gwt

2014-06-06 Thread Thad Humphries
None that I can think of. Basic rule of thumb--if it cannot be done in a 
standards compliant browser with HTML and JavaScript, it cannot be done in 
GWT.

On Thursday, June 5, 2014 4:22:36 AM UTC-4, Piyush Srivastava wrote:
>
> Is thier any way in GWT to preview an image on cli*ent side and g*et the 
> properties of the image such as *size, dimension, extention. *
> *It is possible to *achieve the same task using JSNI but can not use JSNI.
>
> I have tried to use image preloader but it is not working according to my 
> needs as it first upload the image to server and then preview the image on 
> client.
>
>

-- 
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/d/optout.


Re: blank page and mystic error in IE8

2014-06-04 Thread Thad Humphries
I looked into SVG solutions for IE8 about 2 years ago and found nothing. I 
was able to convince my boss that, at least for the product I was working 
on, users would be required to use IE9, Firefox, or Chrome. It was a good 
decision.

On Wednesday, June 4, 2014 1:41:47 PM UTC-4, Magnus wrote:
>
> Hi,
>
> I found it: The error was caused by the use of SVG! IE 8 does not support 
> SVG!
>
> So far, so good!
>
> But I am not happy with the hard way I had to go: I have repeatedly 
> commented out parts of my code, recompile, build and deploy, until I found 
> the problem. 
>
>
>- When I go to the homepage of the SVG library (svgjs.com) with IE8, I 
>get a nice message telling that my browser does not support SVG.
>- When I go to the homepage of another SVG library (snapsvg.io), I get 
>an error message pointing into the JS file of the library, wich is also ok.
>
>
> But when I load my app into IE 8, I get nothing, only this stupid 
> statement that "undefined" is "null". It's clear that there may be a 
> library function which tells if the browser supports SVG. I will look for 
> such a function in the first library. But until today I did not know that 
> SVG was causing the problem. What could I have done differently to find the 
> problem more quickly?
>
> BTW: Both SVG libraries seem to not support IE8. Do you know another 
> library that provides a fallback, e. g. to Flash, when the browser does not 
> support SVG? Or would you simply ignore such an old browser?
>
> Thanks
> Magnus
>

-- 
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/d/optout.


Re: CSS not loading

2014-05-29 Thread Thad Humphries
I suspect you much clear your browser cache. Your CSS is in separate file 
and loaded from your HTML, so GWT is never touching it. 

I've had a similar issue when I make changes to a JavaScript file loaded 
from my HTML by a 

Re: Possible solution to read a Rolling text file with pagination?

2014-05-28 Thread Thad Humphries
When I think of paging data, I think of cell widgets. Perhaps you could 
craft a CellTable where each row displays a String from an array of Strings 
and a Provider that pulls a set number of Strings/lines from your log file.

On Tuesday, May 27, 2014 4:08:17 PM UTC-4, Jeremy Kittel wrote:
>
> HI,
>
> I've a questions if anyone has an idea on how to possibly read a rolling 
> text file with pagination.  The file is will grow up tp 1024k and then roll 
> into archived text file
>
> i.e. rolling log filename blah.log.0, blah.log.1, blah.log.2, etc..
>
> I need a way to retrieve the current data and page back words if possible 
> to see the previous text files contents.
>
> This would be done using RPC call to the server from client.
>
> Any direction would be greatly appreciated.
>
> Jeremy
>
>

-- 
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/d/optout.


Re: GWT Gradle plugin: changing port? Tomcat vs Jetty?

2014-05-10 Thread Thad Humphries
Thank you. I appreciate the time that you and others put into this group 
(and GWT in general).

It took some more bumbling around, but I found it worked with two additions 
(highlighted below):

...
cargo {
  containerId = 'jetty9x'
  port = 

  deployable {
file = tasks.draftWar.archivePath
context = 'app'
  }

  local {
installer {
installUrl = 
file("$projectDir/etc/jetty-distribution-9.0.5.v20130815.zip").toURI()
downloadDir = file("$buildDir/download")
extractDir = file("$buildDir/extract")
}
  }
}
  
task jettyDraftWar(type: JettyRunWar) {
  dependsOn draftWar
  dependsOn.remove('war')
  webApp=draftWar.archivePath
  *httpPort = *
*  contextPath = 'app'*
}
...

This being Gradle, there are probably three other ways I could have done 
it, but it took me enough tries to find this one. :-/

That accomplished, if it makes no difference from the server side, I may 
just stick with Cargo. We'll see when it comes to Eclipse and servlet 
debugging.

I must say that while I can see how useful Gradle might be--assembling a 
GWT app, Javadocs, server apps, etc. can be difficult--learning Gradle is 
no small task. After a day walking through the exercises in *Maven by 
Example * I 
understood it well enough to start converting my project, from base 
libraries on through to the final distro. I've been banging away at the Gradle 
User's Guide and 
Ikkink's Gradle 
Effective Implementation 
Guidefor a while now and 
still feel overwhelmed. 

Coming soon--mgwt 2.0, Elemental, Java8 Lambdas, GWT 3.0... Some day I 
really hope to have the time to read fiction again.

On Friday, May 9, 2014 5:56:15 PM UTC-4, Jens wrote:
>
> If you run jettyDraftWar which is probably of type JettyRunWar you must 
> configure the jetty plugin. If you run cargo then you must configure jetty 
> through the cargo plugin.
>
> For the cargo plugin you configure the port using cargo { port =  ... 
> } and for the jetty plugin you configure the port using "jettyRun.httpPort 
> = " or "jettyRun { httpPort =  }".
>
> In general you are not forced to use both Jetty plugin and cargo plugin. I 
> guess the SDM example just wants to show that both is possible. Also I 
> think that the gwt-gradle-plugin does no additional magic behind the scenes 
> when running jetty or tomcat or anything else to serve your app. The 
> gwt-gradle-plugin only starts SDM and thats all. 
>
> How you serve your app and which plugin you choose to do so is up to 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.
For more options, visit https://groups.google.com/d/optout.


GWT Gradle plugin: changing port? Tomcat vs Jetty?

2014-05-09 Thread Thad Humphries
I'm trying out Gradle, the gwt-gradle-plugin, and Super Dev Mode. I've got 
the plugin (https://github.com/steffenschaefer/gwt-gradle-plugin) and am 
trying to run the super-dev-mode example. Since Tomcat is already running 
on my workstation, I want to change the Jetty port from 8080 to . 
However although I set "cargo { port = ...", I still get

:jettyDraftWar
failed SelectChannelConnector@0.0.0.0:8080: java.net.BindException: 
Address already in use

when I run `gradle jettyDraftWar`. If I run `gradle cargoRunLocal`, things 
are fine and I can run my app, but I suspect that's not doing everything 
the gwt-gradle-plugin intends, and I want to get off on the right foot (vs 
my initial bumbling around with Maven and SDM).

Is this a bug or should I be setting httpPort somewhere? I've tried several 
places. Jetty opens  but the app cannot be found.

Also, I can get my app running with Tomcat using tomcatRunWar (with 
alternate port and ajp.port), but I'm not finding the magic to do this via 
the gwt-gradle-plugin. Can anyone 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.
For more options, visit https://groups.google.com/d/optout.


Re: GWT treeItem expand button missing in Internet Explorer

2014-05-07 Thread Thad Humphries
Huh? Which version of GWT? When I point IE8 at the trees in the GWT 
Showcase, I see the +/- symbols. 

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwTree
and
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTree

I'm assuming this version Showcase is built with GWT 2.6.0, though the one 
I built with 2.5.1 works also.

As for my own apps, I've always extended Tree.Resources or 
CellTree.Resources to use my own open and close icons. For the one app that 
will still runs with IE8, those icons are visible (the other apps use SVG 
and so require IE9 and above).

On Wednesday, October 13, 2010 4:33:08 PM UTC-4, 12ock wrote:
>
> Hi, 
>
> I am having trouble displaying the expand (+/-) button for TreeItem in 
> internet explorer 8. It works fine in firefox. Basicly i parse an xml 
> file into tree structure and display it in the browser, if a node has 
> children, there should be an expand button (+/-) beside it. 
>
> Help please! 
>
> 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/d/optout.


Re: browse a file from my desktop

2014-04-21 Thread Thad Humphries
A problem I see (and there may be more) is your line:

File uploadedFile = File.createTempFile(UPLOAD_DIRECTORY,fileName);


Look at the javadoc for that call: 
 
http://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,
 
java.lang.String)

You are sending a prefix of "C:\\Users\\dell\\Downloads\\" and a suffix 
something like MyFile.txt. Those are neither a suitable prefix nor a 
suitable suffix. Java inserts a random string between the prefix and suffix 
and tries to create that file in java.io.tmpdir. Your call is telling java 
to create a filename--not a path, but a filename--similar to 
"C:\\Users\\dell\\Downloads\\1234567890MyFile.txt". 
 That is not a file name and the call to create the file fails.

Try instead something like 

File uploadedFile = File.createTempFile("imen", ".tmp", UPLOAD_DIRECTORY);


That should create a file similar to imen1234567890.tmp in 
C:\\Users\\dell\\Downloads\\

I think we are out the GWT area and into the Apache Commons area 
(http://commons.apache.org/proper/commons-fileupload/index.html). I suggest 
if you have further problems exclude GWT by trying file upload from a 
simple HTML form. If you're servlet still won't work, maybe some on the 
Apache Commons list can help.


On Monday, April 21, 2014 5:48:45 PM UTC-4, imen boukhris wrote:
>
> yes thad i am using a real directory on my computer.
> this is my entry point
> public class UploadFile implements EntryPoint {
> private static final String UPLOAD_ACTION_URL = 
> GWT.getModuleBaseURL()
> + "upload";
> 
>
> private static final String SERVER_ERROR = "An error occurred 
> while "
> + "attempting to contact the server. Please check 
> your network "
> + "connection and try again.";
>
> public void onModuleLoad() {
> // Create a FormPanel and point it at a service.
> final FormPanel form = new FormPanel();
> form.setAction(UPLOAD_ACTION_URL);
> form.setEncoding(FormPanel.ENCODING_MULTIPART);
> form.setMethod(FormPanel.METHOD_POST);
>
> // Create a panel to hold all of the form widgets.
> VerticalPanel panel = new VerticalPanel();
> form.setWidget(panel);
> ListBox lb = new ListBox();
> FileUpload upload = new FileUpload();
> upload.setName("uploadFormElement");
> panel.add(upload);
> panel.add(new Button("Submit", new ClickHandler() {
> public void onClick(ClickEvent event) {
> 
> form.submit();
> }
> }));
>
> form.addSubmitCompleteHandler(new 
> FormPanel.SubmitCompleteHandler() {
> public void onSubmitComplete(SubmitCompleteEvent 
> event) {
>  
> Window.alert(event.getResults());
> }
> });
>
> RootPanel.get().add(form);
>
> }
>
> }
> this is my servlet
> public class FileUploadServlet extends HttpServlet {
>
> private static final long serialVersionUID = 1L;
> private static final String UPLOAD_DIRECTORY = 
> "C:\\Users\\dell\\Downloads\\";
> private static final String DEFAULT_TEMP_DIR = "upload";
>
> @Override
> protected void doGet(HttpServletRequest req, HttpServletResponse 
> resp)
> throws ServletException, IOException {
> // TODO Auto-generated method stub
> super.doGet(req, resp);
> }
>
> @Override
> protected void doPost(HttpServletRequest req, HttpServletResponse 
> resp)
> throws ServletException, IOException {
> 
> // process only multipart requests
> if (ServletFileUpload.isMultipartContent(req)) {
>
>File tempDir = getTempDir();
> if (!tempDir.exists()) {
> tempDir.mkdirs();
> }
> // Create a factory for disk-based file items
> FileItemFactory factory = new 
> DiskFileItemFactory();
> // Create a new file upload handler
> ServletFileUpload upload = new 
> ServletFileUpload(factory);
> // Parse the request
> try {
> List items = 
> upload.parseRequest(req);
> for (FileItem fileItem : items) {
> // process only file upload
> if (fileItem.isFormField()) 
> continue;
> 
> 

Re: browse a file from my desktop

2014-04-21 Thread Thad Humphries
I believe the question still applies: Does UPLOAD_DIRECTORY exist and can 
whatever runs your server side code write to it? In the example, it's 
"d:\\uploaded\\". Is that a real directory on your system? If not, you'll 
never upload the file.

Try creating your upload file with java.io.File.createTempFile(String 
prefix, String suffix) or as a file you name in a directory you can write 
to, like java.io.tmpdir:

...

File uploadedFile = File.createTempFile("gwt", "foo");
item.write(uploadedFile);
resp.setStatus(HttpServletResponse.SC_CREATED);
resp.getWriter().print("The file was created successfully.");
resp.flushBuffer();

... 


Use your development environment's debugger to step through your servlet 
and see where the error is, or put some System.err.println()'s into your 
servlet and see where it's failing.

On Monday, April 21, 2014 4:14:00 PM UTC-4, imen boukhris wrote:
>
> Hi Thad
> i'm not running my app with tomcat ,i am running it as a web application 
> ,when i debug the code i find that the following line in null"File 
> uploadedFile = new File(UPLOAD_DIRECTORY, fileName);" and I got the 
> following error
>
> Le jeudi 3 avril 2014 00:36:28 UTC+2, imen boukhris a écrit :
>>
>> Hi GWT community,
>> how can i upload a file to server from my desktop in my google web 
>> toolkit project.Anyone could provide me with good tutorial that explain the 
>> file upload solution from start  to end please.
>> thanks in advance
>>  
>>
>

-- 
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/d/optout.


Re: SimplePager.Resources images not showing

2014-04-21 Thread Thad Humphries
Doh! My DataGrid was not yet paging so I was seeing the disabled images 
which I had not set. Unlike PushButton and some other widgets, they aren't 
drawn based of filtering the enabled image. You have to provide them.

On Wednesday, April 16, 2014 5:01:44 PM UTC-4, Thad Humphries wrote:
>
> I have declared a CellTable with a SimplePager in my UiBinder. The 
> UiBinder file is paired with a Java file that includes custom 
> SimplePager.Resources. The images from this resource are not showing in my 
> client UI. The images are there and correctly pathed: I can see them loaded 
> in the Developer Tools, and there are no errors in the JavaScript console, 
> yet they do not appear in my client UI. What might I be missing? 
>
>   interface PagerResources extends SimplePager.Resources {
> @Override
> @Source("../../images/SkipBackwards.png")
> ImageResource simplePagerFirstPage();
> @Override
> @Source("../../images/Backwards.png")
> ImageResource simplePagerPreviousPage();
> @Override
> @Source("../../images/Forwards.png")
> ImageResource simplePagerNextPage();
>   }
>
>   ...
>
>   @Inject
>   public QueryResultsViewDesktopImpl(final Messages messages, 
>   AppState appState) {
> this.messages = messages;
> this.appState = appState;
> PagerResources pagerResources = GWT.create(PagerResources.class);
> pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 
> 0, false) {
>   @Override
>   protected String createText() {
> return "Showing " + (getPageStart()+1) + " thru " + getPageSize();
>   }
> };
> ...
> cellTable = new DataGrid(KEY_PROVIDER);
> cellTable.setEmptyTableWidget(empty);
> pager.setDisplay(cellTable);
> ...
> LayoutPanel panel = uiBinder.createAndBindUi(this);
> main.add(panel);
>   }
> 
>

-- 
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/d/optout.


Re: browse a file from my desktop

2014-04-21 Thread Thad Humphries
In the example you cite, does UPLOAD_DIRECTORY (FileUploadServlet, lines 9 
and 43) exist and does the user Tomcat is running as have write permissions 
to it? If not, correct that or use javax.servlet.context.tempdir (see 
http://commons.apache.org/proper/commons-fileupload/using.html).

On Monday, April 21, 2014 4:34:30 AM UTC-4, imen boukhris wrote:
>
> hi Davide Micheletti ,
> I did not unterstand you.what you mean by"you don't create the server's 
> upload directory "
>
> Le jeudi 3 avril 2014 00:36:28 UTC+2, imen boukhris a écrit :
>>
>> Hi GWT community,
>> how can i upload a file to server from my desktop in my google web 
>> toolkit project.Anyone could provide me with good tutorial that explain the 
>> file upload solution from start  to end please.
>> thanks in advance
>>  
>>
>

-- 
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/d/optout.


SimplePager.Resources images not showing

2014-04-16 Thread Thad Humphries
I have declared a CellTable with a SimplePager in my UiBinder. The UiBinder 
file is paired with a Java file that includes custom SimplePager.Resources. 
The images from this resource are not showing in my client UI. The images 
are there and correctly pathed: I can see them loaded in the Developer 
Tools, and there are no errors in the JavaScript console, yet they do not 
appear in my client UI. What might I be missing? 

  interface PagerResources extends SimplePager.Resources {
@Override
@Source("../../images/SkipBackwards.png")
ImageResource simplePagerFirstPage();
@Override
@Source("../../images/Backwards.png")
ImageResource simplePagerPreviousPage();
@Override
@Source("../../images/Forwards.png")
ImageResource simplePagerNextPage();
  }

  ...

  @Inject
  public QueryResultsViewDesktopImpl(final Messages messages, 
  AppState appState) {
this.messages = messages;
this.appState = appState;
PagerResources pagerResources = GWT.create(PagerResources.class);
pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 
0, false) {
  @Override
  protected String createText() {
return "Showing " + (getPageStart()+1) + " thru " + getPageSize();
  }
};
...
cellTable = new DataGrid(KEY_PROVIDER);
cellTable.setEmptyTableWidget(empty);
pager.setDisplay(cellTable);
...
LayoutPanel panel = uiBinder.createAndBindUi(this);
main.add(panel);
  }


-- 
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/d/optout.


Re: Chrome Canary 36 not showing sourcemaps

2014-04-16 Thread Thad Humphries
I just updated Chrome Canary to Version 36.0.1944.0 and sourcemaps are back.

On Wednesday, April 16, 2014 8:03:13 AM UTC-4, James Horsley wrote:
>
> FWIW I have the same problem with Firefox hanging while using 100% CPU 
> with SDM
>
>
> On 16 April 2014 05:41, Stefano Ciccarelli 
> > wrote:
>
>> Chrome 35 too. I ha dato switch back to chrome 34. 
>> On Firefox suorce maps are showing, but our project is so big that 
>> Firefox became unusable. 
>>
>>
>> Il mercoledì 16 aprile 2014, Thad Humphries 
>> > 
>> ha scritto:
>>
>> I'm trying to use the device emulator in Chrome Canary (v. 36.0.1941.0) 
>>> to test various mobile devices. I'd like to debug my mobile code with SDM's 
>>> sourcemaps, but they are not there, unlike on Chrome 34 where sourcemaps 
>>> are 
>>> at localhost:9876/sourcemaps/mymodule. Is there a flag I need to add to get 
>>> sourcemaps, the way I must add --touch-events to test touch events?
>>>
>>> ...
>

-- 
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/d/optout.


Chrome Canary 36 not showing sourcemaps

2014-04-15 Thread Thad Humphries
I'm trying to use the device emulator in Chrome Canary (v. 36.0.1941.0) to 
test various mobile devices. I'd like to debug my mobile code with SDM's 
sourcemaps, but they are not there, unlike on Chrome 34 where sourcemaps are 
at localhost:9876/sourcemaps/mymodule. Is there a flag I need to add to get 
sourcemaps, the way I must add --touch-events to test touch events?

-- 
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/d/optout.


Re: Deferred binding failed for ClientFactory

2014-04-15 Thread Thad Humphries
This fix has been so many releases ago--Eclipse 3.7 and GWT 2.3--that 
whatever I did probably would no longer apply. That said, I was setting up 
a Windows 7 machine, and having no end of difficulty. From my notes, the 
eventual solution seems to have been install the EE version of Eclipse vs 
the standard version. However, these days I'm working on a Mac (thank 
goodness!) and the standard version of Eclipse Kepler (4.3) is working fine 
for me.

Since 2006 I've set up several machines--Mac, Windows, and Linux--for GWT 
development and the choice of Eclipse always confuses me. I would find it 
helpful if the GWT docs would offer some guidance.

On Tuesday, April 15, 2014 7:27:19 AM UTC-4, Boris Hounwanou wrote:
>
>
>  Hi, please how did you fix the error about th ClientFactory???
>
>

-- 
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/d/optout.


Re: Disabling ActionCells

2014-04-07 Thread Thad Humphries
My solution: I copied the com.google.gwt.cell.client.ActionCell into my app 
and modified it by adding an alternative htmlDisabled member and a boolean 
enabled member with get/is methods. In render() I sb.append() html or 
htmlDisabled based on the value of enabled.

I also added a class to the  in my ActionCell so I could set a 
style in my CSS. I copied in the style for gwt-Button and tweaked it.

On Wednesday, April 2, 2014 12:12:58 PM UTC-4, Thad Humphries wrote:
>
> I have two ActionCells inside a CompositeCell. These cells appear as two 
> button that, because of the intentional narrowness of their Column, appear 
> stacked within their Column of a DataGrid. Excellent.
>
> Depending on circumstances--say, product licensing or user permissions--I 
> want the second action button in each row to be disabled. The other button 
> is to stay enabled, so I don't want to disable the entire column. Is this 
> possible?
>

-- 
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/d/optout.


Disabling ActionCells

2014-04-02 Thread Thad Humphries
 

I have two ActionCells inside a CompositeCell. These cells appear as two 
button that, because of the intentional narrowness of their Column, appear 
stacked within their Column of a DataGrid. Excellent.

Depending on circumstances--say, product licensing or user permissions--I 
want the second action button in each row to be disabled. The other button 
is to stay enabled, so I don't want to disable the entire column. Is this 
possible?

-- 
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/d/optout.


AutoBean unstable on server side

2014-03-17 Thread Thad Humphries
I think I've run across a known bug 
(https://code.google.com/p/google-web-toolkit/issues/detail?id=5926). I 
only wish I hadn't spent so long puzzling over it.

I had been hand-rolling my server-side JSON, but as I would refactor 
interfaces, I found the JSON key strings on the server getting out-of-sync 
with my client side methods. After reading more on AutoBean, I figured I 
could create objects with the as() method, populate them, and then dump the 
payload back to my client. It looked slicker, and, if a method name was 
changed, Eclipse would do the work of updating stuff I might miss until I 
compiled and ran it. (And I'm using as() in my unit tests to avoid the time 
spent with a GWT.create() call.)

For me this works fine with small objects, like a hand full of keys and 
maybe one small JSONArray. However when I attempted to create a much 
larger, more complex object--more keys, longers lists, and lists within 
lists, etc.--I'm seeing all sorts of bugs:  A 13-member list with all 
members the same (the last value added), *many* fields missing in the JSON 
payload (upwards of hal!), and in one case, a setter method for a boolean 
that crashes with an IllegalArgumentException when called with a boolean!

So far this on the server side (and Issue #5926 is specifically server). 
Since I dunno where the tipping point is, I'm going to pull *all* my server 
side AutoBean and, once again, hand-roll the JSON.

Someone with access may want to annotate the AutoBean 
wikiwith this 
issue. Sucn a note may have saved me a lot of 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.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.6 CSSResource Changes?

2014-03-11 Thread Thad Humphries
I've seen errors like these come and go depending on the state of the MGWT 
SNAPSHOT. Perhaps there is moderately erroneous with a style in GXT?

On Tuesday, March 11, 2014 9:11:44 AM UTC-4, Evan Ruff wrote:
>
> Hey guys,
>
> So I updated GWT to 2.6 and I'm having a heck of a time with CSSResources. 
> I'm getting A TON of errors and warnings that look like:
> [WARN] [app] - Line 12 column 33: encountered "-". Was expecting one of: 
> "}" ";"  
> [WARN] [app] - Line 14 column 10: encountered " ". Was expecting one of: 
>   
> [WARN] [app] - Line 13 column 10: encountered "0". Was expecting one of: 
>   
>
> Those line numbers don't seem to line up with the my .css file and I don't 
> recall ever getting anything like this prior.
>
> Also, it doesn't look like the CssResource.style property is being honored 
> anymore. I have it in my .gwt.xml file as:
> 
>
> but all my class names are coming out obsufucated anyways.
>
> Has anyone else experienced these sorts of issues? My entire stack is 
> (Java7, GWT 2.6, AppEngine 1.9.0, GXT 3.1 beta)
>
> Thanks,
>
> E
>
>

-- 
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/d/optout.


Re: Changes in SuperDevMode not picked up - sometimes

2014-02-27 Thread Thad Humphries
SuperDevMode needs to be compiled only so far as you need to click you Dev 
Mode On bookmark and press the Compile button. That loads your changes. I 
can't speak to the Netbeans IDE (I'm using Eclipse).

On Thursday, February 27, 2014 7:02:16 AM UTC-5, Raphael Bauer wrote:
>
> Hi, 
>
>
> I am just upgrading my apps to 2.6 and SuperDevMode. 
> All in all I have not much trouble and everything works out of the box 
> (strange feeling though). 
>
> But finally I found a small glitch. 
>
> My setup: gwt-maven-plugin and mvn gwt:superdevmode to fire everything up 
> (2.6) 
>
> My Ide is Netbeans and sometimes my changes do not get picked up in 
> SuperDevMode. 
>
> The root cause seems to be that Netbean's integrated maven compilation 
> is out of sync and does not longer 
> perform recompiles of changed java files. I know that from other 
> projects, and a simple "clean and build" in my Ide fixes the problem. 
>
>
> But what really puzzles me: Does SuperDevMode need compiled class 
> files to pick up changes? In my imagination the whole java to js 
> compilation should run on java files and not on bytecode. So wouldn't 
> it be enough to detect changes in the src dir and not the target dir 
> of the application? 
>
>
> Thanks! 
>
>
> Raphael 
>

-- 
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: Chrome Touch Emulation and GWT

2014-02-27 Thread Thad Humphries
See 
https://developers.google.com/chrome-developer-tools/docs/mobile-emulation: 
 Note under 'Emulating Touch Events': "elem.ontouch* handlers will 
currently not fire with this feature. Use the --touch-events command line 
flag to let Chrome trigger these handlers."

On Wednesday, February 19, 2014 11:12:52 AM UTC-5, Alexander Zbiek wrote:
>
> Hi all,
> hope it is not wrong to post a question here.
>
> I have a problem with touch events when emulated via the Chrome Emulation. 
> I have a simple Canvas with an added Touch Handler:
>
>  final Canvas ca=Canvas.createIfSupported();
> ca.setCoordinateSpaceWidth(wiCo);
> ca.setCoordinateSpaceHeight(wiHe);
> //ca.sinkEvents(Event.TOUCHEVENTS);
> ca.sinkEvents(Event.ONTOUCHSTART);
>
>
>
>
> ca.addTouchStartHandler(new TouchStartHandler() {
>  @Override
>  public void onTouchStart(TouchStartEvent event) {
>  // TODO Auto-generated method stub
>  Touch t=event.getTargetTouches().get(0);
>  ca.getContext2d().setStrokeStyle("#fff");
>  ca.getContext2d().clearRect(0, 0, 800, 200);
>  ca.getContext2d().setStrokeStyle("#000");
>  ca.getContext2d().strokeText("Move "+(t.getPageX()-ca.getAbsoluteLeft())+
> ","+(t.getPageY()-ca.getAbsoluteTop()),10,60);
>  consoleLog("Touch move ");
>  }
>  });
>
>
> It works perfect on my Nexus7 but it doesnt work on my chrome when 
> emulating Nexus7 and touches. Other Touch web apps (nativ JavaScript ? ) 
> work in Emulation mode. But my (working) GWT app doesnt react to the 
> (emulated) touch events. :(
>
> Any experiences with it?
>
> Many thanks in advance
>  alex
>

-- 
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 and -noserver (Tomcat) debugging

2014-02-13 Thread Thad Humphries
Sorry, I meant to add that when I run-codeserver, I do see this anomaly:

[INFO]Compiling 1 permutation
[INFO]   Compiling permutation 0...
[INFO]   Source Maps Enabled
[INFO]Compile of permutations succeeded
[INFO] Linking into 
/var/folders/t3/2t6b810n69q0vl26t99wsxmcgp/T/gwt-codeserver-4178506489384599107.tmp/org.codehaus.mojo.Foo/compile-1/war/Foo;
 
Writing extras to 
/var/folders/t3/2t6b810n69q0vl26t99wsxmcgp/T/gwt-codeserver-4178506489384599107.tmp/org.codehaus.mojo.Foo/compile-1/extras/Foo
[INFO]Link succeeded
[INFO]Compilation succeeded -- 7.514s
[INFO] Compile completed in 7961 ms
[ERROR] 2014-02-13 22:33:48.198:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
[ERROR] 2014-02-13 22:33:48.228:INFO:oejs.AbstractConnector:Started 
SelectChannelConnector@127.0.0.1:9876
[INFO] 
[INFO] The code server is ready.
[INFO] Next, visit: http://localhost:9876/

What is this ERROR trying to tell me? Could it be the culprit?

On Thursday, February 13, 2014 11:08:50 PM UTC-5, Thad Humphries wrote:
>
> I thought I had this working, and I do, but only in one project. Now I'm 
> trying to recreate the magic, and it's not working.
>
> I've an older project that I started running SuperDevMode from a console 
> and DevMode from Eclipse. Since I wanted some features of Tomcat, I 
> switched to running the app as a Remote Java Application. Debugging works. 
> Moreover, when I make a change in a server-only class--like a servlet--the 
> change is there on the very next run.
>
> I want to recreate what I've done and document it for the next guy. 
> Accordingly I
>
> 1) Generate a new project, Foo, using the gwt-maven-plugin archetype.
>
> 2) Add pluginManagement for org.eclipse.m2e to my pom.xml so Eclipse won't 
> squawk about i18n and import the project (see 
> http://stackoverflow.com/questions/16068127/maven-gwt-2-5-1-setup-issue)
>
> 3) Add 
>
>   
>   
>
> to the module file.
>
> 4) Run `mvn clean generate-sources gwt:run` from a console.
>
> 5) Launch the app in the browser then quit DevMode.
>
> 6) Copy target/Foo-1.0-SNAPSHOT to $CATALINA_HOME/webapps/Foo
>
> 7) Run `mvn clean generate-sources gwt:run-codeserver` from a console.
>
> 8) In Eclipse, create a Debug Remote Java Application on Foo and run it.
>
> 9) Open http://localhost:8080/Foo in my browser (Chrome).
>
> 10) Turn Dev Mode On. Compile. Project runs.
>
> If I put a breakpoint in my servlet (GreetingServiceImpl), it breaks in 
> the Eclipse debugger.
>
> 11) Disconnect from Tomcat (in Eclipse). Modify GreetingServiceImpl.java. 
> Restart the remote debug in Eclipse.
>
> 12) In the browser, turn Dev Mode Off, turn Dev Mode On, and Compile
>
> When I call the RPC function, the change made in Step #11 does NOT take 
> effect, though I can see those changes while stepping 
> through GreetingServiceImpl in the Eclipse debugger.
>
>
> What could I be missing? As I said, in my older project (which has gone 
> through some evolution from 2.5.1 to 2.6.0, from DevMode to SuperDevMode 
> and -noserver, from Java 1.5 to 1.6 to 1.7, etc.) server-side changes show 
> on the next run. What might be missing from a archetype generated project 
> and/or from my Eclipse configuration that would cause server-side change to 
> NOT take effect in Foo when they do elsewhere?
>
>

-- 
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 and -noserver (Tomcat) debugging

2014-02-13 Thread Thad Humphries
I thought I had this working, and I do, but only in one project. Now I'm 
trying to recreate the magic, and it's not working.

I've an older project that I started running SuperDevMode from a console 
and DevMode from Eclipse. Since I wanted some features of Tomcat, I 
switched to running the app as a Remote Java Application. Debugging works. 
Moreover, when I make a change in a server-only class--like a servlet--the 
change is there on the very next run.

I want to recreate what I've done and document it for the next guy. 
Accordingly I

1) Generate a new project, Foo, using the gwt-maven-plugin archetype.

2) Add pluginManagement for org.eclipse.m2e to my pom.xml so Eclipse won't 
squawk about i18n and import the project (see 
http://stackoverflow.com/questions/16068127/maven-gwt-2-5-1-setup-issue)

3) Add 

  
  

to the module file.

4) Run `mvn clean generate-sources gwt:run` from a console.

5) Launch the app in the browser then quit DevMode.

6) Copy target/Foo-1.0-SNAPSHOT to $CATALINA_HOME/webapps/Foo

7) Run `mvn clean generate-sources gwt:run-codeserver` from a console.

8) In Eclipse, create a Debug Remote Java Application on Foo and run it.

9) Open http://localhost:8080/Foo in my browser (Chrome).

10) Turn Dev Mode On. Compile. Project runs.

If I put a breakpoint in my servlet (GreetingServiceImpl), it breaks in the 
Eclipse debugger.

11) Disconnect from Tomcat (in Eclipse). Modify GreetingServiceImpl.java. 
Restart the remote debug in Eclipse.

12) In the browser, turn Dev Mode Off, turn Dev Mode On, and Compile

When I call the RPC function, the change made in Step #11 does NOT take 
effect, though I can see those changes while stepping 
through GreetingServiceImpl in the Eclipse debugger.


What could I be missing? As I said, in my older project (which has gone 
through some evolution from 2.5.1 to 2.6.0, from DevMode to SuperDevMode 
and -noserver, from Java 1.5 to 1.6 to 1.7, etc.) server-side changes show 
on the next run. What might be missing from a archetype generated project 
and/or from my Eclipse configuration that would cause server-side change to 
NOT take effect in Foo when they do elsewhere?

-- 
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: GWT 2.6.0, SuperDevMode, and GWT-RPC serialization error

2014-01-31 Thread Thad Humphries
Yes, it works with -noserver, just add "-Dgwt.codeserver.port=9876" to the 
'VM Arguments'.

For debugging with Tomcat, I added "-Dgwt.codeserver.port=9876" to 
JAVA_OPTS ins setenv.sh.

Thanks again.

On Friday, January 31, 2014 3:35:19 PM UTC-5, Thad Humphries wrote:
>
> Thank, Jens. That's working: I added "-Dgwt.codeserver.port=9876" to the 
> 'VM Arguments' in my run configuration and my RPC call works.
>
> I'm guessing there might be similar magic when running -noserver, right? I 
> want to tackle that next, since Jetty configuration is gone with 2.6.0 and 
> I dearly miss being able to configure my log4j.properties beyond my 
> product's default.
>
> On Friday, January 31, 2014 3:11:57 PM UTC-5, Jens wrote:
>>
>> When using SuperDevMode your server side code must access the GWT-RPC 
>> serialization policy files from your SDM code server (because thats the one 
>> compiling your app and generating the up-to-date policy file). 
>>
>> This was kind of annoying with previous GWT versions but now GWT is able 
>> to download these files from the code server automatically if you set the 
>> system property gwt.codeserver.port for your server. As you seem to use 
>> classic DevMode as jetty server you must launch classic DevMode with 
>> -Dgwt.codeserver.port=
>>
>> If for whatever reasons your SDM code server is not listening on 
>> localhost you have to override 
>> RemoteServiceServlet.getCodeServerPolicyUrl(). Also take a look at the 
>> JavaDoc of that method.
>>
>> -- 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GWT 2.6.0, SuperDevMode, and GWT-RPC serialization error

2014-01-31 Thread Thad Humphries
Thank, Jens. That's working: I added "-Dgwt.codeserver.port=9876" to the 
'VM Arguments' in my run configuration and my RPC call works.

I'm guessing there might be similar magic when running -noserver, right? I 
want to tackle that next, since Jetty configuration is gone with 2.6.0 and 
I dearly miss being able to configure my log4j.properties beyond my 
product's default.

On Friday, January 31, 2014 3:11:57 PM UTC-5, Jens wrote:
>
> When using SuperDevMode your server side code must access the GWT-RPC 
> serialization policy files from your SDM code server (because thats the one 
> compiling your app and generating the up-to-date policy file). 
>
> This was kind of annoying with previous GWT versions but now GWT is able 
> to download these files from the code server automatically if you set the 
> system property gwt.codeserver.port for your server. As you seem to use 
> classic DevMode as jetty server you must launch classic DevMode with 
> -Dgwt.codeserver.port=
>
> If for whatever reasons your SDM code server is not listening on localhost 
> you have to override RemoteServiceServlet.getCodeServerPolicyUrl(). Also 
> take a look at the JavaDoc of that method.
>
> -- 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GWT 2.6.0, SuperDevMode, and GWT-RPC serialization error

2014-01-31 Thread Thad Humphries
I thought of that since I recall something similar going from 2.4 to 2.5 
(or some such upgrade). I cleared my browser cache completely and (as I 
said) called `mvn clean` to remove target. I also removed the www-test and 
gwt-unitCache 
directories. I even did a clean on supporting libraries. Is there something 
else I should zap?

On Friday, January 31, 2014 2:54:23 PM UTC-5, Juan Pablo Gardella wrote:
>
> Seems a cache error. Did you clean all temp data?
>
>
> 2014-01-31 Thad Humphries >:
>
>> I have switched over a new project to GWT 2.6.0. I running with Maven and 
>> the GWT Maven Plugin 2.6.0-rc3.
>>
>> Everything was working swimmingly with GWT 2.5.1. Now I'm getting GWT-RPC 
>> serialization errors when running SuperDevMode.
>>
>> If I start DevMode from Maven (gwt:run) or through Eclipse, the classes 
>> that I have marked as implementing java.io.Serializable pass through the 
>> RPC layer without a hitch. However, serialization fails with 
>> SuperDevMode:
>>  
>> - start SuperDevMode from a console with Maven and gwt:run-codeserver)
>> - start the server though Eclipse in Development Mode
>> - on the Development Mode messsage 
>> http://192.168.1.101:/Mobile.html?gwt.codesvr=192.168.1.101:9997, 
>>   open the URL http://192.168.1.101:/Mobile.html
>> - turn Dev Mode On and Compile
>>
>> Now executing the GWT-RPC method shows this in my console file:
>>
>> Starting Jetty on port 
>>[WARN] Exception while dispatching incoming RPC call
>> com.google.gwt.user.client.rpc.SerializationException: Type 
>> 'com.optix.mobile.shared.AboutBoxData' was not assignable to 
>> 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom 
>> field serializer.For security purposes, this type will not be serialized.: 
>> instance = com.optix.mobile.shared.AboutBoxData@adc7bb6
>>  at 
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
>> at 
>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130)
>>  at 
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
>> at 
>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:587)
>>  at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:605)
>> at 
>> com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:471)
>>  at 
>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:563)
>> at 
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>>  at 
>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
>> at 
>> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>>  at 
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
>> at 
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
>>  at 
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>> at 
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>>  at 
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>> at 
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>>  at 
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
>> at 
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>>  at 
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>> at 
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>>  at 
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> at 
>> org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
>>  at 
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>> at org.eclipse.jetty.server.Server.handle(Server.java:370)
>>  at 
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
>> at 
>> org.eclipse.jetty.server.A

body.scrollLeft and body.scrollTop deprecated in strict mode

2014-01-31 Thread Thad Humphries
When I'm running my project in SuperDevMode with GWT 2.6.0, I occasionally 
these messages in Chrome's JavaScript Console:

body.scrollLeft is deprecated in strict mode. Please use 
'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only 
if in quirks mode. 

body.scrollTop is deprecated in strict mode. Please use 
'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if 
in quirks mode. 


After copying down the source, the former seems to come from 
user/src/com/google/gwt/user/client/impl/DOMImpl.java, 
line 481. The latter seems to come from 
user/src/com/google/gwt/dom/client/Element.java, 
line 847. (I could be way off. I'm making assumption because both calls are 
in native JavaScript and I find no others.)

It's probably inconsequential for some time to come, but I just thought I'd 
point it 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.
For more options, visit https://groups.google.com/groups/opt_out.


GWT 2.6.0, SuperDevMode, and GWT-RPC serialization error

2014-01-31 Thread Thad Humphries
I have switched over a new project to GWT 2.6.0. I running with Maven and 
the GWT Maven Plugin 2.6.0-rc3.

Everything was working swimmingly with GWT 2.5.1. Now I'm getting GWT-RPC 
serialization errors when running SuperDevMode.

If I start DevMode from Maven (gwt:run) or through Eclipse, the classes 
that I have marked as implementing java.io.Serializable pass through the 
RPC layer without a hitch. However, serialization fails with SuperDevMode:
 
- start SuperDevMode from a console with Maven and gwt:run-codeserver)
- start the server though Eclipse in Development Mode
- on the Development Mode 
messsage http://192.168.1.101:/Mobile.html?gwt.codesvr=192.168.1.101:9997, 
  open the URL http://192.168.1.101:/Mobile.html
- turn Dev Mode On and Compile

Now executing the GWT-RPC method shows this in my console file:

Starting Jetty on port 
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 
'com.optix.mobile.shared.AboutBoxData' was not assignable to 
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom 
field serializer.For security purposes, this type will not be serialized.: 
instance = com.optix.mobile.shared.AboutBoxData@adc7bb6
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:587)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:605)
at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:471)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:563)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:305)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at 
org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at 
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:744)
[ERROR] 500 - POST /optixm/mobile (192.168.1.101) 57 bytes
   Request headers
  Host: 192.168.1.101:
  Connection: keep-alive
  Content-Length: 137
  X-GWT-Module-Base: http://192.168.1.101:/optixm/
  X-GWT-Permutation: FAC089581D0988AAD23493D0B52C84AF
  Origin: http://192.168.1.101:
  User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36
  Content-Type: text/x-gwt-rpc; charset=UTF-8
  Accept: *

Re: 2.6.0-rc3 and Jetty's WebAppContext (jetty-web.xml)

2014-01-25 Thread Thad Humphries
I'm not using the tomcat-maven-plugin. I'm managing Tomcat in a separate 
console using the $CATALINA_HOME/bin/startup.sh and shutdown.sh scripts 
(having modified startup.sh to add jpda to the command).

I can see that Eclipse is writing 
to target/MyApp-1.0-SNAPSHOT/WEB-INF/classes. What I can't understand is 
how Tomcat sees those changes. $CATALINA_HOME/webapps/myapp/WEB-INF/classes 
doesn't change, but that is certainly what I'm pointing my browser to.

On Friday, January 24, 2014 3:48:01 PM UTC-5, Jens wrote:
>
> I log out and change a log entry in my servlet. I open a new tab in 
>> Chrome, etc., and I see the new message written in my log file. 
>> Interestingly (to me, at least) is that the date and time of the servlet 
>> class in /Library/Tomcat/catalina/webapps/myapp/WEB-INF/classes is still 
>> from yesterday. The update has occurred to the class file 
>> in target/MyApp-1.0-SNAPSHOT/WEB-INF/classes. That seems magical to me. 
>> Isn't my app running from Tomcat?
>>
>
> Well, if you start Tomcat through Maven using the tomcat-maven-plugin then 
> the folder target/MyApp-1.0-SNAPSHOT will be deployed to Tomcat via Maven 
> as thats the exploded war output folder of your Maven project. Also Eclipse 
> has most likely configured itself to output class files into 
> target/MyApp-1.0-SNAPSHOT/WEB-INF/classes because Eclipse knows you are 
> using Maven.
>
> -- 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: 2.6.0-rc3 and Jetty's WebAppContext (jetty-web.xml)

2014-01-24 Thread Thad Humphries
Hm... Okay, it's working on *this* machine. 

I start my app with Maven from a console (`mvn clean generate-sources 
gwt:run-codeserver`) and from Eclipse start a debug Remote Java Application 
for my project. 

Before all this (as in yesterday) I ran Web Application in Eclipse with the 
-noserver flag and killed it. The program arguments box looks like

-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -codeServerPort 9997 
-noserver -war

/Library/Tomcat/catalina/webapps/myapp -startupUrl 
http://localhost:8080/myapp -logLevel TRACE 

com.corp.myapp.MyApp


(Eclipse insists on putting in all that you see before "-noserver" though I 
delete it.)

In Chrome I open an new tab, go to http://localhost:8080/myapp, click my 
Dev Mode On bookmark and Compile. I log in to my app. I can get to debug in 
my servlet and see the log written.

I log out and change a log entry in my servlet. I open a new tab in Chrome, 
etc., and I see the new message written in my log file. Interestingly (to 
me, at least) is that the date and time of the servlet class in 
/Library/Tomcat/catalina/webapps/myapp/WEB-INF/classes is still from 
yesterday. The update has occurred to the class file 
in target/MyApp-1.0-SNAPSHOT/WEB-INF/classes. That seems magical to me. 
Isn't my app running from Tomcat?

And, yes, if I make a change to, say, a *.ui.xml file and press my Compile 
bookmark, the change happens.

I'm a bit uncomfortable with the magic described above, but it *is* working. 
I'm working remote today, but when I'm back with my in my on Monday, I'll 
compare settings on that system and see why it wasn't working there. You 
can bet I'll ask again if something goes wrong (and I have other projects 
to convert to SuperDevMode).

Meanwhile if anyone cares to explain what I'm seeing with the *.class file 
updates, I'd appreciate it.

On Wednesday, January 22, 2014 5:46:44 PM UTC-5, Thad Humphries wrote:
>
> Thanks, Jens. It's *almost* coming together, but not quite.
>
> I've got Tomcat started with debug and I've got Eclipse linked to it (per 
> http://wiki.apache.org/tomcat/FAQ/Developing). However when I make a 
> change to my servlet, I don't see it reflected in the run. 
>
> I've got the Eclipse Web Application DevMode -noserver option and 
> -war /Library/Tomcat/catalina/webapps/myapp
> I changed a line of debug in my servlet and ran this. The servlet's class 
> file does not change, and the new log message does not appear. How do I 
> make this work?
>
> On Wednesday, January 22, 2014 4:25:43 PM UTC-5, Jens wrote:
>>
>> or using -noserver and losing the Eclipse debugger
>>>
>>
>> You don't loose Eclipse debugger when using -noserver. Just launch your 
>> app server of choice with debug enabled and then connect to it with 
>> Eclipse. You can also configure Eclipse to launch a Jetty of your choice 
>> (or any other supported app server) and let Eclipse deploy your application 
>> automatically to that Jetty instance (Eclipse WTP)
>>
>> Personally I pretty much always use -noserver just because I want to use 
>> the same app server during development as for production. I don't think I 
>> loose anything (development speed, debugging, hot re-deploy) compared to 
>> using the build in Jetty of GWT.
>>
>> -- 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: 2.6.0-rc3 and Jetty's WebAppContext (jetty-web.xml)

2014-01-22 Thread Thad Humphries
Thanks, Jens. It's *almost* coming together, but not quite.

I've got Tomcat started with debug and I've got Eclipse linked to it (per 
http://wiki.apache.org/tomcat/FAQ/Developing). However when I make a change 
to my servlet, I don't see it reflected in the run. 

I've got the Eclipse Web Application DevMode -noserver option and 
-war /Library/Tomcat/catalina/webapps/myapp
I changed a line of debug in my servlet and ran this. The servlet's class 
file does not change, and the new log message does not appear. How do I 
make this work?

On Wednesday, January 22, 2014 4:25:43 PM UTC-5, Jens wrote:
>
> or using -noserver and losing the Eclipse debugger
>>
>
> You don't loose Eclipse debugger when using -noserver. Just launch your 
> app server of choice with debug enabled and then connect to it with 
> Eclipse. You can also configure Eclipse to launch a Jetty of your choice 
> (or any other supported app server) and let Eclipse deploy your application 
> automatically to that Jetty instance (Eclipse WTP)
>
> Personally I pretty much always use -noserver just because I want to use 
> the same app server during development as for production. I don't think I 
> loose anything (development speed, debugging, hot re-deploy) compared to 
> using the build in Jetty of GWT.
>
> -- 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: 2.6.0-rc3 and Jetty's WebAppContext (jetty-web.xml)

2014-01-22 Thread Thad Humphries
On Wednesday, January 22, 2014 11:53:27 AM UTC-5, Thomas Broyer wrote:
>
>
>
> On Tuesday, January 21, 2014 10:12:52 PM UTC+1, Thad Humphries wrote:
>>
>> In short: How to I configure my GWT 2.6.0-rc* webapp launch in Eclipse 
>> and process webapp context settings for Jetty?
>>
>> I'm giving GWT 2.6.0-rc3 a trial run using Maven and SuperDevMode. I 
>> launch the code server in a console with "mvn clean generate-sources 
>> gwt:run-codeserver" and launch my webapp from Eclipse.
>>
>> With GWT 2.5.1, I created src/main/webapp/WEB-INF/jetty-web.xml such as
>>
>> 
>> > 1.2//EN" 
>> "http://jetty.mortbay.org/configure.dtd";>
>>
>> 
>>   
>> 
>>   /Users/thad/temp
>>   86400
>>   /Users/thad/temp/slf4j.properties
>> 
>>   
>>
>> 
>>
>> /Users/thad/temp/slf4j.properties declares 
>> "log4j.appender.MYAPP.File=/Users/thad/temp/mobile-slf4j.log" so I don't 
>> have to go chasing my log fill around my Mac's /var/folders directory.
>>
>> This all works great with GWT 2.5.1 (as it did on an earlier project with 
>> GWT 2.5.1 using Ant and DevMode). And all this without any Jetty dependency 
>> in my pom.xml
>>
>> However when I try GWT 2.6.0-rc3 (and GWT 2.6.0-rc1) a try, launching my 
>> webapp in Eclipse I get various errors in my console. Jetty does not read 
>> jetty-web.xml and my log file is no where to be found.
>>
>> With the jetty-web.xml above, I get
>>
>> [WARN] Server resource 'org/eclipse/jetty/xml/configure_6_0.dtd' could 
>> not be found in the web app, but was found on the system classpath
>>[WARN] Adding classpath entry 'file:/opt/gwt-2.6.0-rc3/gwt-dev.jar' to 
>> the web app classpath for this session
>>For additional info see: 
>> file:/opt/gwt-2.6.0-rc3/doc/helpInfo/webAppClassPath.html
>> Starting Jetty on port 
>>[WARN] Unable to process jetty-web.xml
>> java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext
>> at java.lang.ClassLoader.findClass(ClassLoader.java:531)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>> at 
>> org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407)
>> at 
>> org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
>> at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)
>> 
>>
>> BTW, I see no such [WARN] on gwt-dev.jar with GWT 2.5.1 (gwt-dev is "<
>> scope>provided" in my pom.xml).
>>
>> On a hunch, I tried changing > class="org.mortbay.jetty.webapp.WebAppContext"> to > class="org.eclipse.jetty.webapp.WebAppContext"> but that gives the error 
>> below and the app fails to start:
>>
>> [WARN] Server resource 'org/eclipse/jetty/xml/configure_7_6.dtd' could 
>> not be found in the web app, but was found on the system classpath
>>[WARN] Adding classpath entry 'file:/opt/gwt-2.6.0-rc3/gwt-dev.jar' to 
>> the web app classpath for this session
>>For additional info see: 
>> file:/opt/gwt-2.6.0-rc3/doc/helpInfo/webAppClassPath.html
>> Starting Jetty on port 
>>[WARN] Failed startup of context 
>> c.g.g.d.s.j.WebAppContextWithReload{/,file:/Users/thad/workspace/Mobile/target/Mobile-1.0-SNAPSHOT/},/Users/thad/workspace/Mobile/target/Mobile-1.0-SNAPSHOT
>> java.lang.IllegalArgumentException: Object of class 
>> 'com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload' is 
>> not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type 
>> Class are from different loaders.
>> at 
>> org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:323)
>> at 
>> org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:281)
>> at 
>> org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:103)
>> at 
>> org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:468)
>> at 
>> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1237)
>> at 
>> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
>> at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
>> ...
>>
>> What's the magic?
>>
>
> It's "broken" (between quotes, because I don&#

2.6.0-rc3 and Jetty's WebAppContext (jetty-web.xml)

2014-01-21 Thread Thad Humphries
In short: How to I configure my GWT 2.6.0-rc* webapp launch in Eclipse and 
process webapp context settings for Jetty?

I'm giving GWT 2.6.0-rc3 a trial run using Maven and SuperDevMode. I launch 
the code server in a console with "mvn clean generate-sources 
gwt:run-codeserver" and launch my webapp from Eclipse.

With GWT 2.5.1, I created src/main/webapp/WEB-INF/jetty-web.xml such as


http://jetty.mortbay.org/configure.dtd";>


  

  /Users/thad/temp
  86400
  /Users/thad/temp/slf4j.properties

  
   


/Users/thad/temp/slf4j.properties declares 
"log4j.appender.MYAPP.File=/Users/thad/temp/mobile-slf4j.log" so I don't 
have to go chasing my log fill around my Mac's /var/folders directory.

This all works great with GWT 2.5.1 (as it did on an earlier project with 
GWT 2.5.1 using Ant and DevMode). And all this without any Jetty dependency 
in my pom.xml

However when I try GWT 2.6.0-rc3 (and GWT 2.6.0-rc1) a try, launching my 
webapp in Eclipse I get various errors in my console. Jetty does not read 
jetty-web.xml and my log file is no where to be found.

With the jetty-web.xml above, I get

[WARN] Server resource 'org/eclipse/jetty/xml/configure_6_0.dtd' could not 
be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/opt/gwt-2.6.0-rc3/gwt-dev.jar' to 
the web app classpath for this session
   For additional info see: 
file:/opt/gwt-2.6.0-rc3/doc/helpInfo/webAppClassPath.html
Starting Jetty on port 
   [WARN] Unable to process jetty-web.xml
java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext
at java.lang.ClassLoader.findClass(ClassLoader.java:531)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at 
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:407)
at 
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)


BTW, I see no such [WARN] on gwt-dev.jar with GWT 2.5.1 (gwt-dev is "
provided" in my pom.xml).

On a hunch, I tried changing  to  but that gives the error 
below and the app fails to start:

[WARN] Server resource 'org/eclipse/jetty/xml/configure_7_6.dtd' could not 
be found in the web app, but was found on the system classpath
   [WARN] Adding classpath entry 'file:/opt/gwt-2.6.0-rc3/gwt-dev.jar' to 
the web app classpath for this session
   For additional info see: 
file:/opt/gwt-2.6.0-rc3/doc/helpInfo/webAppClassPath.html
Starting Jetty on port 
   [WARN] Failed startup of context 
c.g.g.d.s.j.WebAppContextWithReload{/,file:/Users/thad/workspace/Mobile/target/Mobile-1.0-SNAPSHOT/},/Users/thad/workspace/Mobile/target/Mobile-1.0-SNAPSHOT
java.lang.IllegalArgumentException: Object of class 
'com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload' is 
not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type 
Class are from different loaders.
at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:323)
at 
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:281)
at 
org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:103)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:468)
at 
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1237)
at 
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
...

What's the magic? 

Is this in any way related 
to https://groups.google.com/d/topic/google-web-toolkit/jikekBQr5O8/discussion 
 ?

-- 
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: Layout with nested SplitLayoutPanel

2013-12-13 Thread Thad Humphries
Just a hunch--I've not tried this--maybe you should instead override 
onLoad().

>From the Javadocs:

onAttach: "It is strongly recommended that you override 
onLoad()
 or 
doAttachChildren()
 instead 
of this method to avoid inconsistencies between logical and physical 
attachment states."

onLoad: "This method is called immediately after a widget becomes attached 
to the browser's document."

I've had to deal *a lot* with sizing issues, like trying to size an 
AbsolutePanel or CustomScrollPanel a tab not yet selected or brought front. 
Nothing gets a size until the DOM realizes it. Though I have instantiated 
and attached widget in my code, the DOM may not have done it's thing yet. 
Getting it right can be frustrating (I'm not above using the occasional 
state variable to be sure the timing works).


On Friday, December 13, 2013 11:59:01 AM UTC-5, Magnus wrote:
>
> Hi Patrick,
>
> thanks, but it didn't help.
>
> I call the resize method from within onAttach, but the value is still 0 
> (see below).
>
> Magnus
>
>
>  
>
>>  public void resetSplitters ()
>>  {
>>   int ys = this.getOffsetHeight ();
>>   Window.alert ("h:" + ys);
>>  }
>>  
>>
>>  @Override
>>  protected void onAttach()
>>  {
>>   super.onAttach ();
>>   resetSplitters ();
>>  }
>>
>>

-- 
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: Super Dev Mode on Mobile, Tablet, IPad Browser

2013-11-06 Thread Thad Humphries
I've tried this as described. However when I access the app from a tablet, 
I get the "must recompile" message. Of course, the mobile browser has no 
such bookmark.

On Wednesday, November 6, 2013 2:22:32 AM UTC-5, Martones wrote:
>
> If you're using MGWT there is a helper method you can use within your code 
>  : SuperDevModeUtil.showDevMode(); 
> (see : http://blog.daniel-kurka.de/2012/07/mgwt-super-dev-mode.html)
>
> I use it with a param in the URL : http://myapp?SDM pops de SDM menu.
>
> Le lundi 4 novembre 2013 10:07:11 UTC+1, CHEN NEE LIM a écrit :
>>
>> Hi,
>>
>> Does anyone know how to run super dev mode on Mobile, Tablet, IPad 
>> Browser?
>>
>> 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: Event.stopPropagation() not working for KeyDownEvent

2013-11-03 Thread Thad Humphries
I've succeeded by removing the KeyDownHandler and adding this in my login 
widget:

Event.addNativePreviewHandler(new Event.NativePreviewHandler() { 
  @Override 
  public void onPreviewNativeEvent(NativePreviewEvent event) { 
Event nativeEvent = Event.as(event.getNativeEvent()); 
int c = nativeEvent.getKeyCode(); 
if (c==KeyCodes.KEY_ENTER) { 
  event.consume(); 
  login_btn.click(); 
} 
  } 
});

The alert's onPreviewNativeEvent() is unchanged.

On Sunday, November 3, 2013 5:15:02 PM UTC-5, Thad Humphries wrote:
>
> I have a user login form that I want submitted if the user presses ENTER 
> in the password field or clicks the login button. So I add a KeyDownHandler:
>
> KeyDownHandler kdh = new KeyDownHandler() { 
>   @Override 
>   public void onKeyDown(KeyDownEvent event) { 
> if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { 
>   event.stopPropagation(); 
>   login_btn.click(); 
> } 
>   } 
> }; 
> password.addKeyDownHandler(kdh); 
>
> The login button calls the presenter to doLogin(). Before sending the 
> request to the server, the method checks that the fields are filled in. If 
> not, an alert is popped up.
>
> I want this alert to hide on ENTER or ESC, so the alert has a method:
>
> @Override 
> public void onPreviewNativeEvent(Event.NativePreviewEvent event) { 
>   Event nativeEvent = Event.as(event.getNativeEvent()); 
>   int c = nativeEvent.getKeyCode(); 
>   if (c==KeyCodes.KEY_ENTER || c==KeyCodes.KEY_ESCAPE) { 
> hide(); 
>   }
> }
>
> Problem: The alert pops up and disappears all on a single ENTER.
>
> Why isn't Event.stopPropagation() stopping the ENTER key? Why should I 
> even need to try since the alert is only created when the error is 
> detected? How can I accomplish this (other than Window.alert())?
>

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


Event.stopPropagation() not working for KeyDownEvent

2013-11-03 Thread Thad Humphries
I have a user login form that I want submitted if the user presses ENTER in 
the password field or clicks the login button. So I add a KeyDownHandler:

KeyDownHandler kdh = new KeyDownHandler() { 
  @Override 
  public void onKeyDown(KeyDownEvent event) { 
if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { 
  event.stopPropagation(); 
  login_btn.click(); 
} 
  } 
}; 
password.addKeyDownHandler(kdh); 

The login button calls the presenter to doLogin(). Before sending the 
request to the server, the method checks that the fields are filled in. If 
not, an alert is popped up.

I want this alert to hide on ENTER or ESC, so the alert has a method:

@Override 
public void onPreviewNativeEvent(Event.NativePreviewEvent event) { 
  Event nativeEvent = Event.as(event.getNativeEvent()); 
  int c = nativeEvent.getKeyCode(); 
  if (c==KeyCodes.KEY_ENTER || c==KeyCodes.KEY_ESCAPE) { 
hide(); 
  }
}

Problem: The alert pops up and disappears all on a single ENTER.

Why isn't Event.stopPropagation() stopping the ENTER key? Why should I even 
need to try since the alert is only created when the error is detected? How 
can I accomplish this (other than Window.alert())?

-- 
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: Error using IMAGE/IO in a Servlet

2013-10-28 Thread Thad Humphries
The problem sounds like the JreMemoryLeakPreventionListener. In 
$CATALINA_HOME/conf/server.xml add appContextProtection="false" to that 
Listener:



You will be opening up Tomcat to a memory leak, which will require 
restarting Tomcat when you change your WAR file.

For more on this issue, see this Tomcat thread: http://bit.ly/1bwiKuM and 
the Tomcat list for more info. 

On Monday, October 28, 2013 3:32:42 PM UTC-4, Sean wrote:
>
> I'm trying to read a .tiff on the back end of my server. I do:
>
> [...]
> FileImageInputStream fis = new FileImageInputStream(new File(p_tifName));
> Object o = ImageIO.getImageReadersByFormatName(
> "tiff").next();
> TIFFImageReader reader = (TIFFImageReader)o;
> reader.setInput(fis);
> [...]
>
> If I run this code in the Servlet via a main() it works fine. But when 
> running in Dev Mode, I get the error:
> java.lang.ClassCastException: 
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader cannot be cast to 
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader
>
> I have the imageIO.jar on the class path. Everything seems happy, except 
> in Dev mode. Does anyone have any ideas? I'm at a loss at how to get around 
> an error saying a class can't be casted to itself. 
>
> -Sean
>

-- 
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: GWT RPC not working behind Apache and Tomcat

2013-10-19 Thread Thad Humphries
You servlet-mapping is

   
rpc 
/app1/rpc 
   

In your de.class.server.RPCService.java interface, do you have "app1" in 
the annotation? For example:

@RemoteServiceRelativePath("app1")
public interface RPCService extends RemoteService {...


On Wednesday, February 29, 2012 1:22:43 PM UTC-5, mukarev wrote:
>
> Hi again, 
>
> a friend of mine solved the problem during the night. I will force him 
> to write the solution here. 
>
> Thanks for your thoughts. 
>
> Greetz Markus 
>
> On 25 Feb., 18:25, mukarev  wrote: 
> > Hi folks, 
> > 
> > I'try to serve two gwt webapps via one apache from one tomcat with JK 
> > and I'm always running in the same error. Apache sends a 404 and tells 
> > me that it's not able to find the servlet if I try to communcate via 
> > RPC. 
> > 
> > I have two virtual hosts pointing at the directories within tomcat 
> > webapps. The webapps are running successfully as long as I don't try 
> > to communicate via RPC. It seems that Apache isn't able to resolve the 
> > requested service. 
> > 
> > Need help, I'm sitting here around hopeless. 
> > 
> > Thanks! 
> > 
> > Markus

-- 
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: Hiding methods on shared classes - not fields

2013-10-19 Thread Thad Humphries
@GwtIncompatible sounds *excellent*. Thanks!

On Friday, October 18, 2013 5:19:12 AM UTC-4, Thomas Broyer wrote:
>
> GWT 2.6 will ignore classes and methods (and fields maybe) annotated with 
> @GwtIncompatible (any annotation with this name, independently of its 
> package)
> In the mean time, the only alternative is to have a super-source version 
> for client-side use.
>
> On Friday, October 18, 2013 3:08:37 AM UTC+2, Aron Olsen wrote:
>>
>> Hi there,
>>
>> I am a very very newbie to GWT and is wondering if the follow pattern is 
>> valid in respect of GWT.
>> My intent is to share some common methods between the client and the 
>> server, but to add special methods client-side and server-side respectively.
>> Is this the way to go, or do I have a more convenient way to get by:
>>
>> package ...client
>>
>> class ClientConfiguration extends SharedConfiguration
>> {
>>   transient String clientcString:
>>
>>   public String getClientString()
>>   {
>> return clientString;
>>   }
>> }
>>
>> package ..server
>>
>> class ServerConfiguration extends SharedConfiguration
>> {
>>   private String  serverString;
>>
>>   public String getServerString()
>>   {
>> return serverString;
>>   }
>> }
>>
>> package ..shared
>>
>> abstract class SharedConfiguration
>> {
>>   String sharedString:
>>
>>   public String getSharedString()
>>   {
>> return sharedString;
>>   }
>> }
>>
>> I dislike having to have three classes for this. Need a method-annotation 
>> telling what "logic" is not to be shared (members and methods).
>> I do have made use of "transient" but it doesn't cover my need completely 
>> for methods. Suggestions anybody?
>> Thanks in advance.
>>
>> /Aron
>>
>>
>>
>>
>>
>>
>>
>>
>>

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


JSON discrepancy in gwt-dev.jar vs. json-20090211.jar

2013-09-20 Thread Thad Humphries
I spent much of yesterday moving an old GWT project from Ant to Maven. Much 
of that time was spent running down a serious discrepancy in the 
server-side conversion of XML to JSON, specifically the call 
org.json.XML*.*toJSONObject(java.lang.String 
string). (I'm thinking this needs to be filed as an issue.)

The project was originally built with Ant. Following the build.xml in the 
GWT samples, it had gwt-dev.jar in the project classpath (see, for example, 
Showcase's build.xml). When run in devmode, this version of JSON will 
convert

448
293

to 

{"height":"293", "width":"448"}

When this arrives at the client-side, in terms of the 
com.google.gwt.json.client package we have a JSONString vs. a JSONNumber.

In my Maven build, the pom.xml declares dependencies only on 
gwt-servlet.jar and gwt-user.jar, neither of which includes org.json 
(though gwt-servlet-deps.jar has the same org.json as gwt-dev.jar). JSON is 
being provided by json-20090211.jar from mavenrepository.com. Now that same 
XML converts to

{"height":293, "width":448}

JSONNumber vs JSONString! This makes a *huge* difference in how the data is 
handled:

   JSONString: int width = Integer.parseInt(jsonObject.get("width
").isString().stringValue());

   JSONNumber: int width = (int)jsonObject.get("width"
).isNumber().doubleValue();

Use the wrong one and an exception is thrown.
I think that json-20090211.jar is the correct approach. Certainly AutoBean 
would fail if it got a string vs a number for an integer field (or maybe 
just a zero value?).

One can get the same results with the Ant in devmode by removing  from project.class.path and 
adding it only to the gwtc and devmode targets (and any target using 
GWTTestCase). However I think that GWT should be brought in line with 
json-20090211.jar. (Looking at the tools directory for building GWT, it 
seems the JSON used (r2_20080312) is not a version available from 
mavenrepository.com.)

Has anyone else seen this? I don't see an issue filed on it. I'm happy to 
put one in, but I thought I'd raise it here first.


-- 
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: Upload blob: image from GWT

2013-09-07 Thread Thad Humphries
For security reasons, http://stackoverflow.com/a/1696884/1316011  (If you have code showing 
otherwise, I'm sure I'm not the only one who'd like to see it.)

As for uploading a file, the example in the GWT JavaDoc for FileUpload 
works. Obviously you need a servlet that saves the file. I use Apache 
Commons FileUpload for my servlets 
(http://commons.apache.org/proper/commons-fileupload/).

Once you get the file up, you can use a GWT RPC call to open the file, to 
convert it to a Base64 string, and return it to your browser where you can 
call Image.setUrl(...your-Base64...). However it would be faster and 
simpler to write a servlet that streams the image back to you, and call 
that servlet in Image.setUrl()

On Friday, September 6, 2013 12:40:06 AM UTC-4, Xybrek wrote:
>
> I managed to get a blob and create a URL for it which I put in a img tag 
> src attribute to show the image like this:
>
> 
>
> My question would be how would I upload this blob via GWT FileUpload with 
> com.google.gwt.user.client.ui.FormPanel? 
>
> Also the com.google.gwt.user.client.ui.FileUpload does not have a 
> setFilename method to programatically set the filename as oppose to 
> selecting via File/Window box. 
>
> So, it seems its like impossible to do this with GWT, I've seen pure 
> Javascript solution. 
>

-- 
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: logging not working? kepler/gwt 2.5.1

2013-09-05 Thread Thad Humphries
Logging handlers?

http://www.gwtproject.org/doc/latest/DevGuideLogging.html#Different_Types_of_Handlers

On Thursday, September 5, 2013 3:07:16 PM UTC-4, dk wrote:
>
> Hi, this seems really odd to me.  I have a fairly old gwt project.  The 
> project "works" but needs a tweak.  I had logging enabled for the project 
> in the past then set:
>
> 
>
> 
>
>
> in a class I say:
>
> public class MyClass extends Composite implements
> HasValueChangeHandlers {
> Logger logger = Logger.getLogger("MyClass");
>
> ... 
> logger.info("Form: a");
>
>  
>
> Then I move it to production. ...time passes...  Now I need to make a 
> change.  I set 
>
> 
>
>
> "clean" and refresh the project and I get nothing.  The logging pane does 
> not appear and the javascript console in the browser shows nothing.
>
> I know I must be missing something obvious but I can not see it at this 
> moment.  Ideas are welcome. 
>

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


Accessing the Android MenuButton

2013-09-03 Thread Thad Humphries
Using MGWT, how might I access the Android MenuButton? 
(see 
http://docs.phonegap.com/en/1.0.0/phonegap_events_events.md.html#menubutton)

I'd like to pop-up a panel that includes a settings button the way other 
Android applications do.

I understand that for iOS I'll need to use another button on the screen, 
since in iOS, what appears to be the MenuButton to Android users is the 
HomeButton. Is this correct?

-- 
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: Problem decoding complex AutoBean

2013-08-20 Thread Thad Humphries
On Tuesday, August 20, 2013 8:40:47 AM UTC-4, Thomas Broyer wrote:

>
>
> On Tuesday, August 20, 2013 1:47:58 PM UTC+2, Thad Humphries wrote:
>>
>> Thank you, Thomas. That worked.
>>
>> I added the interface
>>
>> public interface MQueryWrapper {
>>   MQuery getMquery();
>> }
>>
>> In BeanFactory, I changed "AutoBean mquery();" for 
>> "AutoBean mquery();"
>>
>> My onResponseReceived() now looks like
>>
>>   AutoBean bean = 
>>   AutoBeanCodex.decode(clientFactory.getBeanFactory(), 
>> MQueryWrapper.class, 
>>   response.getText());
>>   MQuery mQuery = bean.as().getMquery();
>>   logger.log(Level.INFO, mQuery.getScreenname());
>>   screenName = mQuery.getScreenname();
>>   fieldList = mQuery.getFields().getField();
>>   view.renderFields(fieldList);
>>
>> Client-side this beats overlay types because it can handle nested objects 
>> (so long as I figure out nesting).
>>
>
> Why wouldn't you be able to do it with JSOs?
>

Ah, thank you for that little programming problem. I was missing something 
when I previously looked at overlay types. Yes, they can handle nested 
objects.

Assuming the same JSON structure as above, these two objects manage it:

public class MQueryField extends JavaScriptObject {
  protected MQueryField() {}
  public final native String getTitle() /*-{ return this.title; }-*/;
  public final native String getName() /*-{ return this.name; }-*/;
  public final native String getValue() /*-{ return this.value; }-*/;
}

public class MQueryRoot extends JavaScriptObject {
  protected MQueryRoot() {}
  public final native String getScreenName() /*-{ return this.screenname; 
}-*/;
  public final native JsArray getFields() 
  /*-{ return this.fields.field; }-*/;
}

Now reading in that same string:

JSONObject jobj = new JSONObject(JsonUtils.safeEval(response.getText()));
MQueryRoot root = 
jobj.get("mquery").isObject().getJavaScriptObject().cast();
logger.log(Level.INFO, root.getScreenName());
// prints "Index Card"
logger.log(Level.INFO, "fields["+root.getFields().length()+"]");
// prints "fields[3]"

Hm… I think I prefer AutoBeans, but this is nice to know. 

 
>
>> I've not tried it server-side yet, but that looks *very* handy.
>>
>
> Yup, I'm using it to serialize some 
> data<https://github.com/tbroyer/gwt-maven-archetypes/blob/598bed4f16a52d97b21a5f0fa9a3ce65650903a4/guice-rf-activities/src/main/resources/archetype-resources/__rootArtifactId__-server/src/main/java/ServerUser.java#L29>that
>  I output 
> in the host 
> page<https://github.com/tbroyer/gwt-maven-archetypes/blob/598bed4f16a52d97b21a5f0fa9a3ce65650903a4/guice-rf-activities/src/main/resources/archetype-resources/__rootArtifactId__-server/src/main/webapp/index.jsp#L70>
>  and 
> load on the client-side at 
> startup<https://github.com/tbroyer/gwt-maven-archetypes/blob/598bed4f16a52d97b21a5f0fa9a3ce65650903a4/guice-rf-activities/src/main/resources/archetype-resources/__rootArtifactId__-client/src/main/java/__module__GinModule.java#L74>,
>  
> works great and you're sure that your JSON will be understood by the end 
> and don't fear forgetting to update the code on one side and not the other.
>

Thank you for these examples.
 

-- 
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: Problem decoding complex AutoBean

2013-08-20 Thread Thad Humphries
Thank you, Thomas. That worked.

I added the interface

public interface MQueryWrapper {
  MQuery getMquery();
}

In BeanFactory, I changed "AutoBean mquery();" for 
"AutoBean mquery();"

My onResponseReceived() now looks like

  AutoBean bean = 
  AutoBeanCodex.decode(clientFactory.getBeanFactory(), 
MQueryWrapper.class, 
  response.getText());
  MQuery mQuery = bean.as().getMquery();
  logger.log(Level.INFO, mQuery.getScreenname());
  screenName = mQuery.getScreenname();
  fieldList = mQuery.getFields().getField();
  view.renderFields(fieldList);

Client-side this beats overlay types because it can handle nested objects 
(so long as I figure out nesting). I've not tried it server-side yet, but 
that looks *very* handy. However it's probably wise at this early stage to 
come up with better tags than "field" and "fields" for the XML that my JSON 
originates from. As more structures are added, I may have conflicts. (I 
wonder if JSON's XML.toJSONObject() does some magic with namespaces...)

On Tuesday, August 20, 2013 5:34:03 AM UTC-4, Thomas Broyer wrote:
>
> You don't seem to have an AutoBean interface with a "MQuery getMquery()" 
> method.
> The object you're parsing has only a "mquery" property, so if you look at 
> it as if it were an MQuery object, getScreenname and getFields would 
> expectedly be null.
>
> On Tuesday, August 20, 2013 4:37:30 AM UTC+2, Thad Humphries wrote:
>>
>> I've managed a simple AutoBean with a list. Now I've a more complex one, 
>> and I don't understand what's wrong. My get methods are returning null 
>> though the debugger shows the object has data.
>>
>> The JSON looks like this:
>>
>> {
>>   "mquery":
>> {
>>   "screenname":"Index Card",
>>   "fields":
>> {
>>   "field":[
>> {"title":"Name",  "name":"odname",   "value":"*TIFF*"},
>> {"title":"Date",  "name":"oddate",   "value":""},
>> {"title":"Ref #", "name":"odrefnum", "value":""}
>>   ]
>> }
>> }
>> } 
>>
>>
>> I have three interfaces:
>>
>> public interface Field {
>>   String getTitle();
>>   void setTitle(String title);
>>   String getName();
>>   void setName(String name);
>>   String getValue();
>>   void setValue(String value);
>> }
>>
>> public interface FieldList {
>>   List getField();
>>   void setField(List field);
>> }
>>
>> public interface MQuery {
>>   String getScreenname();
>>   void setScreenname(String screenname);
>>   FieldList getFields();
>>   void setFields(FieldList fields);
>> }
>>
>> In my bean factory, I have
>>
>> public interface BeanFactory extends AutoBeanFactory {
>>   ...
>>   AutoBean field();
>>   AutoBean fields();
>>   AutoBean mquery();
>> }
>>
>> In my onResponseReceived() method, I call
>>
>>   AutoBean mqueryBean = 
>>   AutoBeanCodex.decode(clientFactory.getBeanFactory(), 
>>   MQuery.class, response.getText());
>>   MQuery mQuery = mqueryBean.as();
>>   logger.log(Level.INFO, mQuery.getScreenname());
>>   screenName = mQuery.getScreenname();
>>   fieldList = mQuery.getFields().getField();
>>   view.renderFields(fieldList);
>>
>> When I look at the debugger in Chrome, screenname, etc are populated (in 
>> mQuery:this$0:data_0 there is mquery with screenename set and 3 field 
>> objects in fields). However mQuery.getScreenname() returns null as does 
>> mQuery.getFields().
>>
>> What am I not seeing here? Could the presence of other AutoBean<>s in my 
>> factory (beans that work) be messing me up (do I need a separate factory)?
>>
>>

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


Problem decoding complex AutoBean

2013-08-19 Thread Thad Humphries
I've managed a simple AutoBean with a list. Now I've a more complex one, 
and I don't understand what's wrong. My get methods are returning null 
though the debugger shows the object has data.

The JSON looks like this:

{
  "mquery":
{
  "screenname":"Index Card",
  "fields":
{
  "field":[
{"title":"Name",  "name":"odname",   "value":"*TIFF*"},
{"title":"Date",  "name":"oddate",   "value":""},
{"title":"Ref #", "name":"odrefnum", "value":""}
  ]
}
}
} 


I have three interfaces:

public interface Field {
  String getTitle();
  void setTitle(String title);
  String getName();
  void setName(String name);
  String getValue();
  void setValue(String value);
}

public interface FieldList {
  List getField();
  void setField(List field);
}

public interface MQuery {
  String getScreenname();
  void setScreenname(String screenname);
  FieldList getFields();
  void setFields(FieldList fields);
}

In my bean factory, I have

public interface BeanFactory extends AutoBeanFactory {
  ...
  AutoBean field();
  AutoBean fields();
  AutoBean mquery();
}

In my onResponseReceived() method, I call

  AutoBean mqueryBean = 
  AutoBeanCodex.decode(clientFactory.getBeanFactory(), 
  MQuery.class, response.getText());
  MQuery mQuery = mqueryBean.as();
  logger.log(Level.INFO, mQuery.getScreenname());
  screenName = mQuery.getScreenname();
  fieldList = mQuery.getFields().getField();
  view.renderFields(fieldList);

When I look at the debugger in Chrome, screenname, etc are populated (in 
mQuery:this$0:data_0 there is mquery with screenename set and 3 field 
objects in fields). However mQuery.getScreenname() returns null as does 
mQuery.getFields().

What am I not seeing here? Could the presence of other AutoBean<>s in my 
factory (beans that work) be messing me up (do I need a separate factory)?

-- 
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: Export CellTable's selected rows into a csv file

2013-08-12 Thread Thad Humphries
On Tuesday, August 13, 2013 12:35:00 AM UTC-4, Winnie T wrote:

> Oh I see. I did something like this (below), wonder if you can spot the 
> error when I handle the results that is being passed to the library
>
> try {
> session.beginTransaction( );   
> // I am using hibernate session
> Criteria criteria = session.createCriteria(Book.class);   
> // Create criteria to filter base on the type of 
> search
> criteria.add(Restrictions.like(field,"%" + search + 
> "%").ignoreCase());
>
>bookList = criteria.list( );   
>  //Call the search results to a list
> String[] bookArray = new String[bookList.size()]; 
>// Dump the result list into an string array (as 
> CSVWriter could only take in string array, not list)
>

*All the statement above is doing is allocating an array of Strings. It's 
not writing anything to that array. Two lines later (see below), you write 
an empty array. Ergo, the file is empty. You need to copy the contents of 
bookList into bookArray.*
 

> CSVWriter writer = new CSVWriter(new FileWriter("export.csv"), 
> '\t');   // Using OpenCSV library to write a new file export.csv
> writer.writeNext(bookArray);   
>   // Writes the string array line by line into 
> export.csv   
> writer.close();
>
> session.getTransaction().commit();
> return bookList;// return 
> the search results to a cell table for displaying 
>
> } catch (HibernateException e) {
> log("Failed to retrie ve profile information from the 
> database", e);
> throw new RuntimeException("Failed to retrieve profile 
> information from the database");
> } catch (IOException e) {
> e.printStackTrace();  //To change body of catch statement use 
> File | Settings | File Templates.
>     }
> return null;   //requires a return which I am not sure why
> }
>
> Thank you!! =)
>
> Winnie
>
> On Monday, August 12, 2013 7:49:39 PM UTC+8, Thad Humphries wrote:
>>
>> No, I was just saying how I did it. As I recall--it's been several 
>> years--I first used OpenCSV but switched to Apache's CSV because it also 
>> had a tab delimited option (though I guess you can do the same thing with 
>> OpenCSV by changing the delimiters). 
>>
>> If your file is empty, I'd check your file calls, not the CSV library: Is 
>> the file opened for writing, is the file handle properly passed to the 
>> library, is the data still there to write, is the output properly flushed, 
>> and is the file closed. I'd write something to the file before and after my 
>> CVS calls to see if anything gets written. And I'd check the file on the 
>> server, not just what my servlet returns.
>>
>> On Sunday, August 11, 2013 10:32:23 PM UTC-4, Winnie T wrote:
>>>
>>> Hi Thad, thanks for responding. Currently, I tried using OpenCSV, and 
>>> had successfully create a CSV file when I click the export button, but the 
>>> CSV file was empty. Do you meant that I could use Apache Commons instead of 
>>> OpenCSV?
>>>
>>> On Thursday, August 8, 2013 10:27:06 PM UTC+8, Thad Humphries wrote:
>>>>
>>>> If your server side still has a copy of your list, you can send 
>>>> references to the rows by row number (i thru n) or some sort of row id set 
>>>> in a servlet call. The servlet could build the CSV (Apache Commons has a 
>>>> CSV module) and return it to the browser with the MIME text/csv so the 
>>>> browser could decide what to do with it. You'll have to target your 
>>>> servlet 
>>>> at a _blank page or an IFRAME to prevent stomping on your GWT app.
>>>>
>>>> On Thursday, February 3, 2011 2:42:26 AM UTC-5, Ido wrote:
>>>>>
>>>>> Well, the server side which should populate the csv file is the server 
>>>>> package within the GWT project.
>>>>> I'm not using any external backend to populate the csv file.
>>>>> When mentioned sending list of objects using RPC I meant using the 
>>>>> RemoteServiceServlet.
>>>>>
>>>>> Once my "server" get's 

Re: Export CellTable's selected rows into a csv file

2013-08-12 Thread Thad Humphries
No, I was just saying how I did it. As I recall--it's been several years--I 
first used OpenCSV but switched to Apache's CSV because it also had a tab 
delimited option (though I guess you can do the same thing with OpenCSV by 
changing the delimiters). 

If your file is empty, I'd check your file calls, not the CSV library: Is 
the file opened for writing, is the file handle properly passed to the 
library, is the data still there to write, is the output properly flushed, 
and is the file closed. I'd write something to the file before and after my 
CVS calls to see if anything gets written. And I'd check the file on the 
server, not just what my servlet returns.

On Sunday, August 11, 2013 10:32:23 PM UTC-4, Winnie T wrote:
>
> Hi Thad, thanks for responding. Currently, I tried using OpenCSV, and had 
> successfully create a CSV file when I click the export button, but the CSV 
> file was empty. Do you meant that I could use Apache Commons instead of 
> OpenCSV?
>
> On Thursday, August 8, 2013 10:27:06 PM UTC+8, Thad Humphries wrote:
>>
>> If your server side still has a copy of your list, you can send 
>> references to the rows by row number (i thru n) or some sort of row id set 
>> in a servlet call. The servlet could build the CSV (Apache Commons has a 
>> CSV module) and return it to the browser with the MIME text/csv so the 
>> browser could decide what to do with it. You'll have to target your servlet 
>> at a _blank page or an IFRAME to prevent stomping on your GWT app.
>>
>> On Thursday, February 3, 2011 2:42:26 AM UTC-5, Ido wrote:
>>>
>>> Well, the server side which should populate the csv file is the server 
>>> package within the GWT project.
>>> I'm not using any external backend to populate the csv file.
>>> When mentioned sending list of objects using RPC I meant using the 
>>> RemoteServiceServlet.
>>>
>>> Once my "server" get's this list , it should create a csv out of it and 
>>> *somehow* send it to the client.
>>> Just can't figure how to do so.
>>> Maybe the server should return the user a path to the created file, but 
>>> then what?
>>> Maybe new servlet should be created to handle this kind of action, but 
>>> how can I send the list of the selected objects?
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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: Export CellTable's selected rows into a csv file

2013-08-08 Thread Thad Humphries
If your server side still has a copy of your list, you can send references 
to the rows by row number (i thru n) or some sort of row id set in a 
servlet call. The servlet could build the CSV (Apache Commons has a CSV 
module) and return it to the browser with the MIME text/csv so the browser 
could decide what to do with it. You'll have to target your servlet at a 
_blank page or an IFRAME to prevent stomping on your GWT app.

On Thursday, February 3, 2011 2:42:26 AM UTC-5, Ido wrote:
>
> Well, the server side which should populate the csv file is the server 
> package within the GWT project.
> I'm not using any external backend to populate the csv file.
> When mentioned sending list of objects using RPC I meant using the 
> RemoteServiceServlet.
>
> Once my "server" get's this list , it should create a csv out of it and 
> *somehow* send it to the client.
> Just can't figure how to do so.
> Maybe the server should return the user a path to the created file, but 
> then what?
> Maybe new servlet should be created to handle this kind of action, but how 
> can I send the list of the selected objects?
>
>
>
>
>
>

-- 
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: only RPC call completes rest of my code should execute - how should I do it - very urgent please

2013-07-30 Thread Thad Humphries
If I understand you correctly, your app sends instructions to the server to 
create a CSV which you then wish to retrieve.

If the CSV is small, you could always use GWT RPC and return it as a string 
to your app. However if you want to return it as a file so the browser can, 
say, open it in a spreadsheet app, you can follow this generic description 
for file creation and downloading:

https://groups.google.com/d/msg/google-web-toolkit/nZsQYKTLxH0/SVVGJIusog8J

I use this technique for many sorts of files, usually directing the servlet 
to an IFRAME so I don't get an unwanted new tab or, worse, blow away my GWT 
app with a new URL.

On Monday, July 29, 2013 6:00:33 PM UTC-4, fedex wrote:
>
> Hi everyone,
>
> I have an interface where the user selects the values and upon clicking 
> the download button the selected values runs in the sql query and the 
> obtained data is written to csv file. 
>
> I am doing an RPC call to send the user selected values from the interface 
> to the server. And on the server side I am storing these values in the http 
> session variable. And I am retrieving these values in the servlet class 
> which has a funtionality to write a data to csv file. Because the values 
> send to the server is a RPC call, my initial session value remains zero ( 
> first download click) and it writes nothing to the csv file though i have 
> selected values from the user. On second click of download button it writes 
> the data of the first selected values. How can expedite the RPC call or how 
> can I make a RPC to synchronize call ? Can someone please suggest a 
> possible to overcome this? Thanks a lot in advance 
>

-- 
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: how to send huge list of data to the server side from client interface in GWT

2013-07-27 Thread Thad Humphries
On Friday, July 26, 2013 5:06:14 AM UTC-4, Jens wrote:

>
> In My application I ave a front interface where the users select values 
>> and click the download button . So what ever values user is going to select 
>> will be passed to the sql query and will hit the oracle database and 
>> obtained values will be written to csv file.
>>
>
> Hopefully you validate the received values on the server, otherwise you 
> might be vulnerable to SQL injection.
>
>  
>
>> So, the end user should get csv file on clicking the download button. 
>> Earlier I have built this application by passing the front interface values 
>> as a query strin through window.location , But by this method we oftenly 
>> get socket connection error when the list is huge. To avoid this I have to 
>> pass the values as object to the server side and write to csv file. Do you 
>> know any way we can achieve this. if possible can u share any sample code
>>
>
> I pretty much always use the following workflow:
> 1.) Send user selection to server using GWT-RPC, RequestFactory, 
> RequestBuilder
> 2.) In the UI show a message "Download link will be generated, please wait"
> 3.) On the server:
>  - generate the file
>  - generate a unique id for that file
>  - save the file + the file's content type somewhere so you can find 
> it using the unique id
>  - send back a download link like http://domain.com/download/ id>
> 4.) client receives download link and shows it using an Anchor.
> 5.) User needs to click on the anchor to download the file
>
> To make this work you also have to: 
> 1.) register a http servlet at http://domain.com/download/* and let it 
> load the file and return it to the client using associated content type.
> 2.) regularly clear old downloads from disk/session => clean up
>
> May sound complex, but it works really well for me.
>
> -- J.
>

I'll second Jen on this approach. I use it several places in my products 
and it works well. Theses apps also run a ServletContextListener to clean 
up old temp files. 

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




Where does GWT.log() go in Super Dev Mode?

2013-06-19 Thread Thad Humphries
I'm guessing, no where. At least I don't see it in Chrome's JavaScript 
console or the Eclipse console. Is GWT.log() ignored|optimized out in Super 
Dev Mode?

If GWT.log() is unavailable, I guess I should take a stab at GWT's client 
side logging. However I prefer the simplicity of GWT.log().

Even if so, I'm hooked on Super Dev Mode. I got fed up with apps that run 
unreliably or not at all with the Chrome plugin, and decided to give Super 
Dev Mode a try. In addition, I've recently switched from ant to maven, and 
discovered the gwt:run-codeserver goal in the Codehaus gwt-maven-plugin. 
This goal makes running Super Dev Mode a snap.

-- 
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: Best practices for inlining build (revision) number into GWT App?

2013-06-11 Thread Thad Humphries
I'm switching from ant to maven, and recently tried 
http://mojo.codehaus.org/buildnumber-maven-plugin/. I think I will use it 
on my next project.

On Tuesday, June 11, 2013 1:17:42 PM UTC-4, Joseph Lust wrote:
>
> For various reasons you need to know the revision of the GWT app code. For 
> example to verify that the server API is not newer than the JS code (i.e. 
> if you deploy GWT JS to a CDN).
>
> Some common approaches which I find to be rather hackish:
>
>- Use Maven replacer to replace a sequence in a *source* file at the 
>validation stage and have that inlined into your GWT file at compile 
>(hackish)
>- Use Maven replacer or Maven war plugin filters to add the build 
>number to the index.html page, or a backend service (JS code still not 
>independently versioned, more API calls)
>- Hardcode it (don't hardcode things)
>
> After two years, the best method I've see is to create a *code generator* to 
> allow deferred binding of the build number. This however has always stuck 
> me as massively overkill to add a number to a build artifact.
>
>
> So, I was curious how others here have dealt with this common issue. 
> Hopefully there is a simpler way.
>
>
> Sincerely,
> Joseph
>

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