GWT app doesn't work behind reverse proxy

2015-07-09 Thread dhoffer
We have a GWT app using (2.6.1) that is deployed to Tomcat and has been 
working fine, recently Tomcat's FORM container authentication was added and 
that too was working well.  The problem is now we want to put the 
app/Tomcat behind an Apache reverse proxy so end users get a nice URL and 
this is breaking the app.  First it breaks Tomcat's FORM authentication, we 
now get 408 errors when trying to log into the app.  As a test we took out 
the authentication and found that the client side UI works fine but all 
calls to the server fail, e.g. all RPC calls fail too.  This later problem 
seems similar/same as what is described here 
http://stackoverflow.com/questions/1517290/problem-with-gwt-behind-a-reverse-proxy-either-nginx-or-apache

What is the solution here?  I could try the approach in the link above but 
that only addresses the GWT part, I need that and authentication.  Putting 
the app behind a reverse proxy seems such a common thing to do it seems we 
are missing something here that will fix both issues.

Btw, the problem 'seems' to be that if the proxy is like this: 

ProxyPass /app name 
http://localhost:8080/appcontext/ myapp
ProxyPassReverse /app name 
http://localhost:8080/ appcontext/ 
myapp

What seems to be happening is that the requests that the app gets has 'app 
name' as the URL instead of the expected '
/appcontext/ myapp'.

-Dave

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


GWT Breadcrumb widget

2015-04-29 Thread dhoffer
I need a Breadcrumb panel/widget are there any examples of this?  I'm also 
using GXT but even GXT doesn't have any Breadcrumb panel/widgets.  I need 
breadcrumb widgets that are arrow shaped on the right of each widget to 
give visual indication of the logical flow.  I just need widgets where I 
can set state, i.e. color as user gets to that state in the app.  I don't 
need the Breadcrumb panel to manage anything, just report state.  Any 
ideas/examples of this?

-Dave

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


GWT throws random IllegalArgumentException in DevMode

2014-11-09 Thread dhoffer
All of a sudden I'm getting an IllegalArgumentException debugging a GWT app 
in DevMode.  I'm using 2.6.1.  It isn't clear to me what can cause this or 
how to debug the cause.  It seems somewhat random in its occurrence but 
seems to happen less if breakpoints are used.  What might be the cause of 
this?  

SEVERE: Something other than a Java object was returned from JSNI method 
'@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)':
 
JS value of type boolean, expected java.lang.Object
java.lang.IllegalArgumentException: Something other than a Java object was 
returned from JSNI method 
'@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)':
 
JS value of type boolean, expected java.lang.Object: at
com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:286)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
...
java.lang.IllegalArgumentException: Something other than a Java object was 
returned from JSNI method 
'@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)':
 
JS value of type boolean, expected java.lang.Object
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
at 
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:286)
at 
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at 
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at 
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at 
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at 
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at 
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at 
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at 
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at 
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:724)


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

Random Dev Mode Startup errors

2014-09-13 Thread dhoffer
I often get the following error starting my application in debug mode 
(standard Dev Mode not SDM). Why would GWT sometimes have a deferred 
binding error but not always? The message (did you forget to inherit a 
required module) makes no sense to me as if I didn't have GXT referenced it 
seems it would never work.

SEVERE: Deferred binding failed for 
'com.sencha.gxt.widget.core.client.grid.GridView$GridAppearance' (did you 
forget to inherit a required module?)
java.lang.RuntimeException: Deferred binding failed for 
'com.sencha.gxt.widget.core.client.grid.GridView$GridAppearance' (did you 
forget to inherit a required module?): at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
com.google.gwt.core.shared.GWT.create(GWT.java:72)
com.google.gwt.core.client.GWT.create(GWT.java:86)
com.sencha.gxt.widget.core.client.grid.GridView.(GridView.java:416)
com.sencha.gxt.widget.core.client.grid.Grid.(Grid.java:373)
com.trafficsoftware.adloader.ui.gwt.client.triads.mainappmodules.loadads.loadadsclean.panel.grid.view.CleanGridView.(CleanGridView.java:73)
com.trafficsoftware.adloader.ui.gwt.client.triads.mainappmodules.loadads.loadadsclean.panel.grid.CleanGridTriadFactory.createTriad(CleanGridTriadFactory.java:33)
com.trafficsoftware.adloader.ui.gwt.client.AdLoaderEntryPoint.onModuleLoadImpl(AdLoaderEntryPoint.java:423)
com.trafficsoftware.adloader.ui.gwt.client.AdLoaderEntryPoint.onModuleLoad(AdLoaderEntryPoint.java:219)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
java.lang.Thread.run(Thread.java:724)


Also sometimes I get this error instead:

SEVERE: Something other than a Java object was returned from JSNI method 
'@com.google.gwt.dom.client.DOMImpl::eventGetCurrentTarget(Lcom/google/gwt/dom/client/NativeEvent;)':
 
JS value of type boolean, expected java.lang.Object
java.lang.IllegalArgumentException: Something other than a Java object was 
returned from JSNI method 
'@com.google.gwt.dom.client.DOMImpl::eventGetCurrentTarget(Lcom/google/gwt/dom/client/NativeEvent;)':
 
JS value of type boolean, expected java.lang.Object: at
com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:286)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.dom.client.DOMImpl.eventGetCurrentTarget(DOMImpl.java)
com.google.gwt.dom.client.NativeEvent$.getCurrentEventTarget$(NativeEvent.java:119)
com.google.gwt.user.client.impl.DOMImplStandard.dispatchUnhandledEvent(DOMImplStandard.java:343)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)

What might be causing this?  It's making it impossible to debug.  My 
app's onModuleLoad is quite large as I have a lot of initial objects 
created before the app starts to display anything, it's during this time 
that the errors occur.  Is there some limit to the amount of 'work' that 
can be done before the first widget is displayed?  (This initial 
objects/work is the initial object graph for my application which is IoC 
based but perhaps I need to defer the creation of some objects until needed 
later in the app?) 

-- 
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@g

GWT using SDM throws error at app startup

2014-08-30 Thread dhoffer
I'm getting the following error after SDM compiles my app and trying to 
load it. What's causing this? Seems the compiler is generating invalid JS? 
 How can I resolve this?  I can't debug my app anymore.


SEVERE: (TypeError) __gwt$exception: : Cannot read property 'view' 
of undefined com.google.gwt.core.client.JavaScriptException: (TypeError) 
__gwt$exception: : Cannot read property 'view' of undefined: at 
Unknown.$getView(adloader-0.js@21:31671) 
Unknown.setBookingSheetRowData_0(adloader-0.js@16:104761) 
Unknown.gridRowsChanged_1(adloader-0.js@17:104543) 
Unknown.updateGridRowsWithChildrenAdded(adloader-0.js@14:104468) 
Unknown.$addChildModelRows(adloader-0.js@39:103808) 
Unknown.LoadAdsPrepareModel_0(adloader-0.js@3:103898) 
Unknown.$onModuleLoadImpl(adloader-0.js@25:89933) 
Unknown.$onModuleLoad_2(adloader-0.js@5:89837) 
Unknown.init_1(adloader-0.js@19:17385) 
Unknown.apply_9(adloader-0.js@23:7805) 
Unknown.entry0(adloader-0.js@14:7895) 
Unknown.anonymous(adloader-0.js@16:7855) 
Unknown.gwtOnLoad(adloader-0.js@19:118446) 
Unknown.anonymous(adloader-0.js@167:118452)

I'm using GWT 2.6.1



-- 
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: SuperDevMode and Tomcat

2014-08-30 Thread dhoffer
I too am trying to make sense of SDM and trying to get productive using 
it...but it's not coming easy.

I like Joe's suggestion of running to console windows but I haven't had 
great luck with the *Maven **GWT Plugin *to launch the app so I just use 
IDEA to launch both servers...that part seems okay.  However I haven't 
figured out how to update the app when either client side or server side 
code changes are made.  Joe says to cycle tomcat...what does that mean? 
 One would need to build & deploy then cycle it seems.  Then in the 
client...how does SDM know you made client changes?  Do I have to re-select 
the Dev Mode On button?  That rebuilds and restarts the app.  (And even 
that did not pickup my last changes).

Then don't get me started on the IDE agnostic issue...yes it does...but 
that's a huge problem as the although the debugger in Chome is good it's 
only 10% of IDEA and the code in Chrome is just a read-only copy of the 
real code in the IDE...so I'm constantly going to the real code to figure 
out what has to change and then manually finding those same classes in 
Chrome (and Chrome provides no help to find anything unlike my IDE) to set 
breakpoints/etc.  Very ineffective workflow.  I must be missing something.

-Dave



On Friday, August 29, 2014 12:03:57 PM UTC-6, Tomek Kańka wrote:
>
>
>
> W dniu czwartek, 28 sierpnia 2014 21:11:59 UTC+2 użytkownik Joseph Lust 
> napisał:
>>
>> *[...]*
>> It's really pretty painless and makes you IDE agnostic.
>>
>>
> It also makes your IDE obsolete:).
> No debugger in client code (SDM) and no debugger in server code (maven).
>
>
>
>
> *-- Tomek*
>

-- 
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 SDM throws error inspecting results in Chrome debugger

2014-08-22 Thread dhoffer
I finally got SuperDevMode to work and am trying to debug using Chrome but 
when I step through the code when I get to the lower level it always throws 
and exception like the following so I haven't been able to inspect any 
variables yet. What is causing this?

SEVERE: (TypeError) __gwt$exception: : Cannot read property 
'name_0' of null com.google.gwt.core.client.JavaScriptException: 
(TypeError) __gwt$exception: : Cannot read property 'name_0' of 
null: at Unknown.$getName_7(adloader-0.js@21:86301)

I'm using GWT version 2.6.1

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


Random IllegalArgumentException at application startup

2014-08-21 Thread dhoffer
I recently upgraded to GWT 2.6.1 and I see errors like below randomly at 
startup in DevMode.  I saw this issue before the upgrade but it seems worse 
now.  It does not happen all the time, it seems to occur when there is a 
delay in the DevMode starting.

E.g. I will see this in the console... 
Dev Mode initialized. Startup URL: 
http://127.0.0.1:/index.html?gwt.codesvr=127.0.0.1:9997

...and then there is a very long pause before 'Debug enabled' appears in 
the console.  During this time the browser gives the busy/non-responding 
feedback and often will display the browser hung dialog box to which I 
select the continue option.  I'm using Firefox 24.2 and have been for some 
time as that works with DevMode.  This behavior does not happen all the 
time and I have not been able to determine what/when it will occur but it 
seems to occur more often now with 2.6.1.


SEVERE: Something other than a Java object was returned from JSNI method 
'@com.google.gwt.user.client.ui.PotentialElement::resolve()': JS value of 
type int, expected java.lang.Object
java.lang.IllegalArgumentException: Something other than a Java object was 
returned from JSNI method 
'@com.google.gwt.user.client.ui.PotentialElement::resolve()': JS value of 
type int, expected java.lang.Object: at
com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:286)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.user.client.ui.PotentialElement$.resolve$(PotentialElement.java)
com.google.gwt.user.client.ui.PotentialElement$.resolve(PotentialElement.java:112)
com.google.gwt.user.client.DOM.insertChild(DOM.java:1224)
com.sencha.gxt.core.client.dom.XElement$.insertChild$(XElement.java:1357)
com.sencha.gxt.widget.core.client.container.Container.doPhysicalAttach(Container.java:321)
com.sencha.gxt.widget.core.client.container.Container.insert(Container.java:395)
com.sencha.gxt.widget.core.client.container.SimpleContainer.setWidget(SimpleContainer.java:109)
com.sencha.gxt.widget.core.client.container.SimpleContainer.add(SimpleContainer.java:56)

-Dave

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


Using GWT for mobile and tablet apps?

2014-07-14 Thread dhoffer
I'm inquiring what's the current status of GWT's support for mobile 
devices, phones and tablets.  I have a use case that has to run on mobile 
devices and I'm wondering if I can use GWT for this.  Is mgwt the way to go 
here?  What are the best options for GWT and mobile and how viable is this?

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


Random deferred binding error at starup in dev mode

2014-06-08 Thread dhoffer
I get the following error at dev mode startup often.  It seems random when 
it occurs but is a productivity killer...some times it will happen several 
times in a row...then not happen for a while.  Any ideas as to the cause?

SEVERE: Deferred binding failed for 
'com.sencha.gxt.widget.core.client.tree.Tree$TreeAppearance' (did you 
forget to inherit a required module?)
java.lang.RuntimeException: Deferred binding failed for 
'com.sencha.gxt.widget.core.client.tree.Tree$TreeAppearance' (did you 
forget to inherit a required module?): at
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
com.google.gwt.core.shared.GWT.create(GWT.java:72)
com.google.gwt.core.client.GWT.create(GWT.java:86)
com.sencha.gxt.widget.core.client.tree.Tree.(Tree.java:571)

-- 
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: Development Mode will not be supported in Firefox 27+

2014-03-28 Thread dhoffer
Could you elaborate on how you have your POM setup?  I'm trying to make the 
switch to SDM but I get errors running run-codeserver.  Your setup seems 
ideal I'd like to know how you have both of those things configured.  Not 
sure it matters but I use IntelliJ instead of Eclipse...DM worked great.

-Dave

On Tuesday, March 4, 2014 2:36:41 PM UTC-7, Joseph Lust wrote:
>
> I'm surprised more folks are not excited to jump ship to SuperDevMode. 
>
> I'd argue Eclipse DevMode is more pain than it's worth. Certainly, it is 
> very cool to have your backend and frontend breakpoints set and hit on the 
> same screen. Yet I've spent a lot of time trying to all of the *Run 
> Configurations* setup properly. Have a multi-module project? Have an OSGi 
> project? Trying to debug a remote server? Working with JSO's? It's a bit of 
> trial and error and not always possible. Startup is slow. Recompile is even 
> slower and it's a memory hog, crashing with OutOfMemory more than I'd like. 
> Plus, you need a ring of chicken blood around your computer to ward of 
> breakages with new browser upgrades.
>
> Enter SDM. I open one console type *mvn tomcat7:run-war*. I open a second 
> and run *mvn gwt:run-codeserver*. No need for configuration settings 
> windows and embedded Jetty's. No need to *even have an IDE at all*! 
> Personally I find simpler, imperative tooling much easier to use and 
> troubleshoot. Add to this Chrome Dev Tools will be a full fledged IDE soon 
> at the rate they're adding features and FF Dev Tools have also come a very 
> long way since FireBug.
>
> Finally, don't we want the GWT team to spend their time building new 
> features rather than keeping old tooling alive in the ICU? I think GWT's 
> hit an inflection point where dumping IE everything and DevMode would free 
> up a lot of resources. Many projects never make such painful decisions and 
> become dinosaurs for it. I hope GWT does not.
>
> 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.
For more options, visit https://groups.google.com/d/optout.


Need to add HTML5 desktop to browser DnD support in GWT application

2014-02-21 Thread dhoffer
I need to have a widget that accepts DnD files from the desktop, how can I 
do this in a GWT 2.5.1 application? See the link below for the JS code to 
do this. Does GWT already have a widget for this? If not how could I create 
my own? 

>From the link below I understand it all starts with a div in the rendered 
HTML and then wires in support for DnD with the JS code shown in the link. 
So in my case I'm starting with a GWT layout and need to add this 'widget' 
to that existing layout. I've never created my own GWT widget before, would 
I start with an existing GWT widget and then add the JS via JSNI? If so, 
what would be the best starting widget to build on?

http://www.htmlgoodies.com/html5/jav...id=TdDQb7R8c9d


-- 
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: GWTBridgeImpl throws com.google.gwt.core.ext.UnableToCompleteException exception

2014-01-09 Thread dhoffer
I was finally able to get this working in hosted mode again but I'm not 
exactly sure why.  All the evidence points to a bug in IntelliJ as the fix 
involved deleting the IntelliJ project files and rebuilding from the Maven 
pom files and messing with the JDK version both specified in the Maven pom 
files and in IntelliJ.

I've seen cases before where IntelliJ gets confused by the Maven project 
and just looses dependencies, but that did not seem to be occurring in this 
case.  Also IntelliJ does not handle well cases where, in a multi-module 
build, modules use more than one JDK version.  And that is my case due to 
GWT not supporting JDK7 yet.

That being said...it's possible that I don't have the JDK version specified 
properly in my Maven pom files.  I'd like to know how best to configure the 
JDK in the Maven build when using GWT.  Here is my use case:

I have a multi-module build where my runtime JDK has to be 7.0.  In 
addition I have lots of dependencies that were built with JDK7 so I have to 
use that as my main compiler for my build.  In my maven project I have one 
child folder that handles all the GWT parts of the build.  That GWT parent 
folder has the following 3 modules:

myapp-gwt-api
- Module that contains shared code between myapp-gwt-dev & both the client 
and server portion of myapp-gwt-war
- This module is of type pom but it generates a jar.  I presume this was 
made a pom type to give full control over what goes in the jar, the build 
is configured to compile and then include both the classes and the java 
source in the jar.  However in this build the JDK version is not specified 
in the maven-compiler-plugin configuration...so I guess it uses some 
default?  In retrospect it seems the classes could use JDK7 as that is what 
all the server side code uses but the java source has to be JDK6 compatible 
else the GWT compiler won't be able to use the source.

myapp-gwt-dev
- Module that contains GWT rebind code.  Our project makes heavy use of 
GWT's rebind code generation feature so all the code that is needed to 
rebind/generate code is in this module.
- This module has a dependency on myapp-gwt-api
- This module is of type pom but generates a jar.  This module appears to 
be just like the previous one...it generates a jar with both classes and 
source files.  
- Also this module gets the GWT compiler classes from the gwt-dev jar and 
puts them in this module.  I presume this is so that in the next module GWT 
has all that it needs to perform the GWT rebind operation without having to 
add a dependency on gwt-dev in the war module.  Also it would serve as a 
way to keep the rebind code out of the war...as that is not needed at 
runtime.

myapp-gwt-war
- This is the main GWT module and is of type war.
- It has a dependency on myapp-gwt-api and on myapp-gwt-dev however in the 
later case it has provided scope to stop it from going into the wars 
runtime dependencies.
- This module uses gwt-maven-plugin to compile the GWT application, however 
the JDK version is not specified so I assume that uses a GWT default?
- In this module, in the maven-compiler-plugin, we do specify the JDK 
version, it's set to 1.6 for both source & target.  I'm not clear what this 
should be.  Ideally we would want the source & target to be 1.7 for the 
server side code.  However the client side source has to be 1.6 for GWT. 
 And does this setting affect what compiler is used by the 
gwt-maven-plugin, or is that completely separate?

Now that I get to the end of analysis of the Maven build I see that that 
the maven-compiler-plugin is configured in the pluginManagement section to 
use JDK 1.7 for both source & target.  So I assume that where I said above 
the compiler version was not specified...it would use 1.7 as the defaults.

In retrospect it seems that for both myapp-gwt-api & myapp-gwt-dev we 
should use 1.6 for the source and 1.7 for the target in the 
maven-compiler-plugin config?  I'm not sure about in myapp-gwt-war...maybe 
the same.

I'd really appreciate feedback on how best to configure this.

-Dave

On Wednesday, January 8, 2014 1:39:41 PM UTC-7, dhoffer wrote:
>
> I have a large GWT application using 2.5.1 and all of a sudden I am 
> getting the following error when run/debug in GWT hosted mode:
>
> com.google.gwt.core.ext.UnableToCompleteException: (see previous log 
> entries)
>
> This happens in the GWTBridgeImpl#create(Class requestedClass) method. 
>  After the exception it builds a RuntimeException with the following error 
> message: Deferred binding failed for 
> 'com.google.gwt.user.client.rpc.XsrfTokenService' (did you forget to 
> inherit a required module?)
>
> My build is maven 3.x and I'm using IntelliJ to run in hosted mode.  This 
> worked fine up until a couple days ago and I don't know what has changed 
> that might cause this.  I've 

GWTBridgeImpl throws com.google.gwt.core.ext.UnableToCompleteException exception

2014-01-08 Thread dhoffer
I have a large GWT application using 2.5.1 and all of a sudden I am getting 
the following error when run/debug in GWT hosted mode:

com.google.gwt.core.ext.UnableToCompleteException: (see previous log 
entries)

This happens in the GWTBridgeImpl#create(Class requestedClass) method. 
 After the exception it builds a RuntimeException with the following error 
message: Deferred binding failed for 
'com.google.gwt.user.client.rpc.XsrfTokenService' (did you forget to 
inherit a required module?)

My build is maven 3.x and I'm using IntelliJ to run in hosted mode.  This 
worked fine up until a couple days ago and I don't know what has changed 
that might cause this.  I've never seen this error/problem before. 
 XsrfTokenService is part of GWT so I don't know why it would be having any 
trouble finding/loading that.  

Does anyone have any suggestions as to what might be the cause?


-- 
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: Automatically generated GWT Wrapper

2013-12-17 Thread dhoffer
That would be great of Google could open source what Ray/Google has...it 
would be very useful.

-Dave

On Tuesday, June 4, 2013 7:25:05 PM UTC-6, Martin Kimmel wrote:
>
> Hello,
>
> I just thought that it would be pretty cool to have a tool which analyses 
> JavaScript Libraries and automatically generates some Java/GWT Files as a 
> Wrapper (using JSNI, JavaScript Overlays, ...)
> Do you know if something like this already exists?
>
> Else I would like to try programming such a tool.
> Do you have any input what things I have to consider when doing so?
>
> Best regards,
> Martin
>

-- 
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 support Comet/Server-side-push ?

2013-12-17 Thread dhoffer
The two that I am aware of are Atmosphere 
https://github.com/Atmosphere/atmosphere and CometD both high quality 
libraries with somewhat differing feature sets, I think one downside to 
CometD is there is no provided GWT client whereas Atmosphere does have a 
GWT client.

-Dave

On Friday, December 13, 2013 9:26:44 AM UTC-7, Zhong-zheng Xiao wrote:
>
> I want to use GWT to build a rich web apps, including subscribe-push model.
>

-- 
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/JavaScript code generation tool

2013-12-11 Thread dhoffer
Are there any tools out there that can auto generate the GWT wrapper code 
for native JavaScript code?  I'm looking for a way to automate using 
JavaScript in GWT applications, sometimes it's best to start with an 
existing JavaScript client library and wrap for use in GWT.  I have in mind 
the CometD JS client library for instance.  Ideally I'd like to integrate 
this with the maven build.  What I'm looking for is exactly like SWIG for 
generating wrapper code from existing C/C++ code.

-Dave

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


Re: GWT and Web Security

2013-07-26 Thread dhoffer
Thanks Thomas that's good information.  I too have found that best 
practices for securing GWT applications difficult to come by.  There are 
just bits and pieces on the web...and if you get the Spring Security book, 
for example as I did, they don't even mention GWT.  What's needed are some 
comprehensive examples showing some best practices around security in the 
context of GWT.

As you say...it would be great if you could make 
your ServiceLayerDecorator public too that would really help.  You 
recommend AOP and possibly Guice, what do you use to implement the actual 
security, Spring/Acegi?  What about OpenID support/etc?  I know Spring 
Security can use an AOP approach...I didn't know that Guice could do that. 
 If you could elaborate on this it would be super helpful.

(Btw, I'm using Guice for IoC but didn't know it could help with security.)



On Thursday, July 25, 2013 4:39:53 PM UTC-6, asif...@gmail.com wrote:
>
> Hi ,
>
> I am navigating my way through GWT  - and hit a major conceptual roadblock 
> with security issues.
>
> If i want to implement security ( authentication and authorization) in my 
> GWT webapp( doesn't include app-engine) what is conceptually the best 
> *Framework 
> *( for example shiro , acegi etc) to use.
>
> I tried shiro but the shiro concept of using a separate loginUrl and 
> successUrl doesnot go down well with my understanding of GWT single page 
> application.
>
> Also I want to use widget level authorization - depending on the 
> authorization of logged in user , widgets are made visible or invisible etc 
> - so looking for a very fine grained authorization framework.
>
> Which is the best way for me to look? Any samples/tutorials will be highly 
> appreciated.
>
> Regards
>

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




How to set RichTextArea background color in IE10?

2013-06-14 Thread dhoffer
I'm using the following to set the RichTextArea  background color which 
works for Firefox and most IE versions but with IE10 it just ignores the 
method.  After calling the method the developer tools indicate the style 
was not added/set.  Why?  How to do this for IE10?

getElement().getStyle().setBackgroundColor(hexValue);

I'm using GWT 2.5.1

-- 
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 & HTML5 DnD

2013-06-07 Thread dhoffer
I figured out a way for users to DnD into GWT's RichTextArea from either 
inside the GWT application and for us even more importantly from another 
website/page.  We had to use JSNI as the standard GWT drop listeners are 
never fired, I assume it's because it uses an iFrame.  I thought I'd post 
it here as perhaps others will find it useful.  Also if you see some 
potential problems let me know as I'd like to improve it. 

One question I have is should I be adding the listener to the iframe too or 
just to iframe.contentWindow?

Also things works really well with Firefox I need to determine if any 
changes are needed for IE8/9/10 and Chrome.

public class GwtRichTextArea extends RichTextArea {

private Object dragenterFunction = null;
private Object dragoverFunction = null;
private Object dropFunction = null;

public GwtRichTextArea () {
}

@Override
protected void onAttach() {
super.onAttach();

IFrameElement iFrame = IFrameElement.as(getElement());
iFrame.setName(UUID.uuid());
addDragOverHandler(iFrame);
addDropHandler(iFrame);
}

@Override
protected void onDetach() {
IFrameElement iFrame = IFrameElement.as(getElement());
removeDragOverHandler(iFrame);
removeDropHandler(iFrame);

super.onDetach();
}

private native void addDragEnterHandler(IFrameElement iframe)
/*-{
if (iframe == null)
return;

var _this = this;

var dragenterFunction = function (e) {

// todo: add some css style here
}


_th...@com.gwtcommon.gwt.user.client.ui.GwtRichTextArea::dragenterFunction 
= dragenterFunction;

iframe.addEventListener('dragenter', dragenterFunction, true);
iframe.contentWindow.addEventListener('dragenter', dragenterFunction, 
true);

}-*/;

private native void addDragOverHandler(IFrameElement iframe)
/*-{
if (iframe != null) {
var _this = this;

var dragoverFunction = function (e) {

if (e.preventDefault) {
e.preventDefault(); 
}

e.dataTransfer.dropEffect = 'copy'; 

return false;
}


_th...@com.gwtcommon.gwt.user.client.ui.GwtRichTextArea::dragoverFunction = 
dragoverFunction;

iframe.addEventListener('dragover', dragoverFunction, true);
iframe.contentWindow.addEventListener('dragover', dragoverFunction, 
true);
}
}-*/;

private native void addDropHandler(IFrameElement iframe)
/*-{
if (iframe == null) {
return;
}

var _this = this;

var dropFunction = function (event) {

   // Handle the drop.  We attach to the body element...
   iframe.contentWindow.document.body.appendChild(newElement);


return false;
}

_th...@com.gwtcommon.gwt.user.client.ui.GWTRichTextArea::dropFunction = 
dropFunction;

iframe.addEventListener('drop', dropFunction, true);
iframe.contentWindow.addEventListener('drop', dropFunction, true);

}-*/;

private native void removeDragOverHandler(IFrameElement iframe)
/*-{
if (iframe != null) {
var _this = this;

var dragoverFunction = 
_th...@com.gwtcommon.gwt.user.client.ui.GWTRichTextArea::dragoverFunction;

iframe.removeEventListener('dragover', dragoverFunction, true);
iframe.contentWindow.removeEventListener('dragover', 
dragoverFunction, true);
}
}-*/;

private native void removeDropHandler(IFrameElement iframe)
/*-{
if (iframe != null) {
var _this = this;

var dropFunction = 
_th...@com.gwtcommon.gwt.user.client.ui.GWTRichTextArea::dropFunction;

iframe.removeEventListener('drop', dropFunction, true);
iframe.contentWindow.removeEventListener('drop', dropFunction, 
true);
}
}-*/;

private native void removeTextPasteHandler(IFrameElement iframe)
/*-{
if (iframe != null) {
var _this = this;

var pasteFunction = 
_th...@com.gwtcommon.gwt.user.client.ui.WebTASRichTextArea::pasteFunction;

iframe.removeEventListener('paste', pasteFunction, true);
iframe.contentWindow.removeEventListener('paste', pasteFunction, 
true);
}
}-*/;

}


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




Re: RichTextArea how to implement native Drag & Drop?

2013-05-30 Thread dhoffer
When I try for a pure GWT solution by adding all the drag/drop listeners to 
the RichTextArea I get the enter, a few overs, and then strangely I get the 
leave event.  The drop event never occurs.  How can I fix this?  If I can 
get the onDrop event to fire it seems I could do the same work I was doing 
in JSNI with the DropEvent object.

Console log from the various handlers...
onDragEnter: An event type
onDragOver: An event type
onDragOver: An event type
onDragOver: An event type
onDragOver: An event type
onDragLeave: An event type

-Dave

On Wednesday, May 29, 2013 6:07:29 PM UTC-6, dhoffer wrote:
>
> What is the best way to implement native DnD for RichTextArea?  I need to 
> support users dropping items into the RichTextArea that originated from 
> outside the browser (from another web app).
>
> Currently what I have partially works (in production seems to work about 
> 50% of the time) in hosted mode it's only working on the first Drop (could 
> be because of recent changes).  Currently we are doing this with JSNI. 
>  I'll paste the full code below but the key parts are that on the drop 
> event I need to get the 'text' data, e.g.
>
> var data = event.dataTransfer.getData("Text");
>
> Then I parse that data/URI and build a div which I then append to the 
> original element.
>
> Some of the things I'm not sure about are...what Document to be working 
> with.  The original code used document in the JSNI method but I see online 
> that $doc should be used.  Or I could pass into the JSNI method the 
> document, e.g. 
>
>  IFrameElement fe = getElement().cast();
>  Document document = fe.getContentDocument();
>
> Or ideally I'd prefer to do this with a more pure GWT solution and use 
> less JSNI if that's possible.  How best to respond to these native drops? 
>  Why would this code only be working for the first drop?  (Note, we have 
> several instances of this widget in the application)  Here is the full 
> code. (The first set of methods ininitDnD just parse URI...nothing 
> interesting until the allowDrop/droppedHandler/addEvent methods)
>
>
> // This will be called only once at startup.
> protected void onInitializeOnce() {
> super.onInitializeOnce();
>
> Document document = getContentDocument();
> BodyElement body = getBodyElement();
> initDnD(document, body);
> }
>
>  private native void initDnD(Document document, Element elem) /*-{
>
> function strictEncodeURIComponent(string) {
> return encodeURIComponent(string).replace(/[!'()*]/g, escape);
> }
>
> encode = strictEncodeURIComponent;
> decode = decodeURIComponent;
>
> var parseURI = function (string) {
> var pos, t, parts = {};
> 
> pos = string.indexOf('#');
> if (pos > -1) {
> // escaping?
> parts.fragment = string.substring(pos + 1) || null;
> string = string.substring(0, pos);
> }
>
> // extract query
> pos = string.indexOf('?');
> if (pos > -1) {
> // escaping?
> parts.query = string.substring(pos + 1) || null;
> string = string.substring(0, pos);
> }
>
> // extract protocol
> if (string.substring(0, 2) === '//') {
> // relative-scheme
> parts.protocol = '';
> string = string.substring(2);
> // extract "user:pass@host:port"
> string = parseURIAuthority(string, parts);
> } else {
> pos = string.indexOf(':');
> if (pos > -1) {
> parts.protocol = string.substring(0, pos);
> if (string.substring(pos + 1, pos + 3) === '//') {
> string = string.substring(pos + 3);
>
> // extract "user:pass@host:port"
> string = parseURIAuthority(string, parts);
> } else {
> string = string.substring(pos + 1);
> parts.urn = true;
> }
> }
> }
>
> // what's left must be the path
> parts.path = string;
>
> // and we're done
> return parts;
> };
> var parseURIHost = function (string, parts) {
> // extract host:port
> var pos = string.indexOf('/'),
>   

RichTextArea how to implement native Drag & Drop?

2013-05-29 Thread dhoffer
What is the best way to implement native DnD for RichTextArea?  I need to 
support users dropping items into the RichTextArea that originated from 
outside the browser (from another web app).

Currently what I have partially works (in production seems to work about 
50% of the time) in hosted mode it's only working on the first Drop (could 
be because of recent changes).  Currently we are doing this with JSNI. 
 I'll paste the full code below but the key parts are that on the drop 
event I need to get the 'text' data, e.g.

var data = event.dataTransfer.getData("Text");

Then I parse that data/URI and build a div which I then append to the 
original element.

Some of the things I'm not sure about are...what Document to be working 
with.  The original code used document in the JSNI method but I see online 
that $doc should be used.  Or I could pass into the JSNI method the 
document, e.g. 

 IFrameElement fe = getElement().cast();
 Document document = fe.getContentDocument();

Or ideally I'd prefer to do this with a more pure GWT solution and use less 
JSNI if that's possible.  How best to respond to these native drops?  Why 
would this code only be working for the first drop?  (Note, we have several 
instances of this widget in the application)  Here is the full code. (The 
first set of methods ininitDnD just parse URI...nothing interesting until 
the allowDrop/droppedHandler/addEvent methods)


// This will be called only once at startup.
protected void onInitializeOnce() {
super.onInitializeOnce();

Document document = getContentDocument();
BodyElement body = getBodyElement();
initDnD(document, body);
}

 private native void initDnD(Document document, Element elem) /*-{

function strictEncodeURIComponent(string) {
return encodeURIComponent(string).replace(/[!'()*]/g, escape);
}

encode = strictEncodeURIComponent;
decode = decodeURIComponent;

var parseURI = function (string) {
var pos, t, parts = {};

pos = string.indexOf('#');
if (pos > -1) {
// escaping?
parts.fragment = string.substring(pos + 1) || null;
string = string.substring(0, pos);
}

// extract query
pos = string.indexOf('?');
if (pos > -1) {
// escaping?
parts.query = string.substring(pos + 1) || null;
string = string.substring(0, pos);
}

// extract protocol
if (string.substring(0, 2) === '//') {
// relative-scheme
parts.protocol = '';
string = string.substring(2);
// extract "user:pass@host:port"
string = parseURIAuthority(string, parts);
} else {
pos = string.indexOf(':');
if (pos > -1) {
parts.protocol = string.substring(0, pos);
if (string.substring(pos + 1, pos + 3) === '//') {
string = string.substring(pos + 3);

// extract "user:pass@host:port"
string = parseURIAuthority(string, parts);
} else {
string = string.substring(pos + 1);
parts.urn = true;
}
}
}

// what's left must be the path
parts.path = string;

// and we're done
return parts;
};
var parseURIHost = function (string, parts) {
// extract host:port
var pos = string.indexOf('/'),
t;

if (pos === -1) {
pos = string.length;
}

if (string[0] === "[") {
// IPv6 host - 
http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6
// I claim most client software breaks on IPv6 anyways. To 
simplify things, URI only accepts
// IPv6+port in the format [2001:db8::1]:80 (for the time 
being)
var bracketPos = string.indexOf(']');
parts.hostname = string.substring(1, bracketPos) || null;
parts.port = string.substring(bracketPos + 2, pos) || null;
} else if (string.indexOf(':') !== string.lastIndexOf(':')) {
// IPv6 host contains multiple colons - but no port
// this notation is actually not allowed by RFC 3986, but 
we're a liberal parser
parts.hostname = string.substring(0, pos) || null;
parts.port = null;
} else {
t = string.substring(0, pos).split(':');
parts.hostname = t[0] || null;
parts.port = t[1] || null;
}

if (parts.hostname && string.substring(pos)[0] !== '/') {
pos++;
 

Re: I/O 2013 - GWT Sessions?

2013-05-20 Thread dhoffer
Since some want the GWT conference on the west coast and some on the east, 
I say let's split the difference and meet in the middle.  I vote for Denver.

-Dave

On Wednesday, March 6, 2013 3:56:52 PM UTC-7, James wrote:
>
> I know it's earlybut is anyone familiar with the planned Google Web 
> Toolkit sessions for Google I/O 2013?  It was a bit disappointing last year 
> when there was only one real GWT session...after there had been many in all 
> the previous years.  GWT Team...any comments?

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




RichTextArea & HTML how to dynamically style anchor elements?

2013-05-16 Thread dhoffer
How can I dynamically change the color for links anywhere in RichTextArea 
& HTML elements?  That is, I need to be able to set the link color 
dynamically as the user is allowed to specify the UI colors.  I can change 
the general foreground and background colors no problem but I'm having 
trouble figuring out how to change all the 'a' elements.

-Dave

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




Re: gwt-maven-plugin JVM failures

2013-03-14 Thread dhoffer
And if I remove the -XX:MaxPermSize=256m option...then it fails on 
the -Xmx1024m parameter.

-Dave

On Thursday, March 14, 2013 10:28:54 AM UTC-6, dhoffer wrote:
>
> All of a sudden, we are getting the following build errors with our GWT 
> 2.5.0 builds.  Any idea what would cause this?  This was working fine.
>
> Our extraJvmArgs are.
>
> -Xms1024m -Xmx1024m -XX:MaxPermSize=256m 
> -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory
> 
> *
> *
> *[10:10:54]**[com.issinc.chat-dashboard:dashboard-webapp] [INFO] --- 
> gwt-maven-plugin:2.5.0:compile (gwt-compile) @ dashboard-webapp ---*
> *[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] Error: 
> Could not create the Java Virtual Machine.*
> *[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] Error: 
> A fatal exception has occurred. Program will exit.*
> *[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] 
> Unrecognized VM option 'MaxPermSize=256m*
>

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




gwt-maven-plugin JVM failures

2013-03-14 Thread dhoffer
All of a sudden, we are getting the following build errors with our GWT 
2.5.0 builds.  Any idea what would cause this?  This was working fine.

Our extraJvmArgs are.

-Xms1024m -Xmx1024m -XX:MaxPermSize=256m 
-Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory

*
*
*[10:10:54]**[com.issinc.chat-dashboard:dashboard-webapp] [INFO] --- 
gwt-maven-plugin:2.5.0:compile (gwt-compile) @ dashboard-webapp ---*
*[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] Error: 
Could not create the Java Virtual Machine.*
*[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] Error: A 
fatal exception has occurred. Program will exit.*
*[10:10:56]**[com.issinc.chat-dashboard:dashboard-webapp] [ERROR] 
Unrecognized VM option 'MaxPermSize=256m*

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




How to detect when user DnD something into the app and the page unloads?

2013-02-28 Thread dhoffer
I'd like to disable DnD in my GWT app unless I specifically allow it (which 
I do in places).  Is there a way to detect and optionally prevent drops 
globally (prevent page unloads in this case)?

My use case is that we do support DnD in certain ways but if they drop 
wrong it causes the entire page to unload and then when they select the 
back browser button...the app will come back but they have to login again 
and reinitialize the app.

I thought of just adding a global Window.ClosingHandler() handler but that 
doesn't work because...there are lots of valid reasons the page is 
unloading and our security filters have already processed the logout...so 
that's too late...I think I need to detect that they did a drop, possibly 
by accident, and allow them to cancel the drop.

-Dave 

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




Problems debugging client code using IntelliJ

2013-02-16 Thread dhoffer
I have been using IntelliJ for GWT development for a long time but
every once in a while I can't debug the client code when run in hosted
mode using IntelliJ, all the breakpoints are ignored.  (Server side
breakpoints work fine.)

I'm using GWT 2.4/2.5 and IntelliJ 11.1.5, JDK (x64) 1.7 build 13.
I've seen this issue from time to time...I'm not quite sure what fixes
it but...today I just can't get the debugging to work I'm not sure
what changed.

I'm hoping others have seen this and might be able to point me in the
right direction to fix this.

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




GWT 2.5 compiler is running out of memory

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

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

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

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

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

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

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

-Dave



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




How to modify Enter key behavior in RichTextArea?

2013-01-04 Thread dhoffer
Pressing the Enter key in RichTextArea creates a new line (and adds 
'' to the html content) but if the Ctrl key is down then it 
doesn't.  That makes sense for normal text editing but I want to basically 
reverse that.  Where is this behavior coded?  Is that controlled in GWT 
code or is that just the behavior of the browser? 

I tried overriding onBrowserEvent() and adding '' if the control 
key is down but that didn't help.

Then I went looking for a setCursorPosition method on RichTextArea but 
didn't find one.  It seems lots of folks have asked for that.

What's the best way to solve this?  Is there some 
custom setSelectionRange() logic out there for setting the cursor position? 
 I found a couple of JSNI examples of this but they didn't work...perhaps 
because my browser is too new, not sure.

-Dave

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



Errors passing javascript variables to GWT

2012-12-14 Thread dhoffer
I'm following the example given here 
https://developers.google.com/web-toolkit/articles/dynamic_host_page of 
passing a global info javascript variable back to the GWT app when it 
loads.  E.g.

// In GwtHostingServlet's doGet() method...
writer.append("");
writer.append("");

// Open a second  tag where we will define some extra data
writer.append("