Saturday, August 31, 2013

Re: IE10 support in Gwt

IIRC, IE10 should use the ie9 permutation because of document.documentMode >= 9, unless you're opting in to quirks mode, in which case all IEs will behave as IE 5.5 and will use the ie6 permutation.
So, first thing is to make sure you're in standards mode.

On Saturday, August 31, 2013 4:04:13 PM UTC+2, Walter Hutchinson wrote:

Not sure if this is the place to add this but just wanted to pass on my finding related to IE10 browser support.

I ran into an issue with GWT cellTables and cellTrees using IE 10. When hovering over a row we used hovering styling for that row which worked fine.

However, if we stayed hovering over the row and the cellTree refreshed the hovering styling would disappear.

This was due to events like load and mouseover not firing for the cell widgets as it does with other browsers and lesser IE versions. I followed through the GWT code and found that since GWT cannot resolve the ie10 user.agent so the user.agent for ie6 is used.

I have verified this at many points in the code, but if you set a break point on line 36 in com.google.gwt.dom.client.DOMImplIE6 you will see first that this class is called and that isIE6Detected is set to true;

  static boolean isIE6() {

    if (!isIE6Detected) {

      isIE6 = isIE6Impl();

      isIE6Detected = true<!-- Line 36

    }

    return isIE6;

  }

I was thinking about the following two options, but am going to run them by more experienced members of our team.

Option #1

Since we are performing an upgrade to 2.5.1 now we could modify these 3 files to include an IE10 user agent and set it to fall back to IE8 as is IE9 currently in UserAgent.gwt.xml. They appear to be simple changes.

com.google.gwt.useragent.UserAgent.gwt.xml

com.google.gwt.useragent.rebind.UserAgentPropertyGenerator.java

com.google.gwt.user.DOM.gwt.xml

 

Option #2 (Admitted hack)

Since IE6 is no longer supported and IE10 is resolving to the IE6 user agent then this added to our Common.gwt.xml solves the problem and can be removed when a gwt support user agent IE10.

<replace-with class="com.google.gwt.dom.client.impl.DOMImplIE9">

       <when-type-is class="com.google.gwt.dom.client.impl.DOMImpl"/>

       <when-property-is name="user.agent" value="ie6"/>

</replace-with>



On Friday, April 26, 2013 4:13:16 PM UTC-4, Colin Alworth wrote:


In most cases that is true, but CssResource is an interesting exception. The fallback rules work by looking to see if there is no implementation for a particular value, and if not, looking to see if there *is* an implementation for some other value. In the case of ClientBundle and CssResource, they are generated at compile time - when you refer to @if user.agent ie9, that will be compiled *only* into the ie9 build, and not into any ie10 build, which will only contain non-qualified code or statements that actually evaluate to true for ie10.

But yes, otherwise it should behave as you've described.
On Monday, April 22, 2013 5:01:56 AM UTC-5, Honza Rames wrote:
It does but out of curiosity, if I add IE10 permutation/browser detection to UserAgent.gwt.xml to which value should I set the property-fallback? I mean is property fallback-recursive (I would assume it is) so setting it to IE9 should work? In case IE9 rule isn't specified it will recursively fallback to IE8 (and generate a compiler warning) right?

On Wednesday, April 17, 2013 12:40:04 AM UTC+2, Thomas Broyer wrote:


On Tuesday, April 16, 2013 2:07:34 PM UTC+2, Mariusz Magdziarz wrote:
When you add support for IE10??

AFAIK, IE10 works OK with the ie9 permutation.
Vaadin has started working on bringing MSPointerEvents to support touch-enabled (and touch-only) devices.

--
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+unsubscribe@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: IE10 support in Gwt

Not sure if this is the place to add this but just wanted to pass on my finding related to IE10 browser support.

I ran into an issue with GWT cellTables and cellTrees using IE 10. When hovering over a row we used hovering styling for that row which worked fine.

However, if we stayed hovering over the row and the cellTree refreshed the hovering styling would disappear.

This was due to events like load and mouseover not firing for the cell widgets as it does with other browsers and lesser IE versions. I followed through the GWT code and found that since GWT cannot resolve the ie10 user.agent so the user.agent for ie6 is used.

I have verified this at many points in the code, but if you set a break point on line 36 in com.google.gwt.dom.client.DOMImplIE6 you will see first that this class is called and that isIE6Detected is set to true;

  static boolean isIE6() {

    if (!isIE6Detected) {

      isIE6 = isIE6Impl();

      isIE6Detected = true<!-- Line 36

    }

    return isIE6;

  }

I was thinking about the following two options, but am going to run them by more experienced members of our team.

Option #1

Since we are performing an upgrade to 2.5.1 now we could modify these 3 files to include an IE10 user agent and set it to fall back to IE8 as is IE9 currently in UserAgent.gwt.xml. They appear to be simple changes.

com.google.gwt.useragent.UserAgent.gwt.xml

com.google.gwt.useragent.rebind.UserAgentPropertyGenerator.java

com.google.gwt.user.DOM.gwt.xml

 

Option #2 (Admitted hack)

Since IE6 is no longer supported and IE10 is resolving to the IE6 user agent then this added to our Common.gwt.xml solves the problem and can be removed when a gwt support user agent IE10.

<replace-with class="com.google.gwt.dom.client.impl.DOMImplIE9">

       <when-type-is class="com.google.gwt.dom.client.impl.DOMImpl"/>

       <when-property-is name="user.agent" value="ie6"/>

</replace-with>



On Friday, April 26, 2013 4:13:16 PM UTC-4, Colin Alworth wrote:


In most cases that is true, but CssResource is an interesting exception. The fallback rules work by looking to see if there is no implementation for a particular value, and if not, looking to see if there *is* an implementation for some other value. In the case of ClientBundle and CssResource, they are generated at compile time - when you refer to @if user.agent ie9, that will be compiled *only* into the ie9 build, and not into any ie10 build, which will only contain non-qualified code or statements that actually evaluate to true for ie10.

But yes, otherwise it should behave as you've described.
On Monday, April 22, 2013 5:01:56 AM UTC-5, Honza Rames wrote:
It does but out of curiosity, if I add IE10 permutation/browser detection to UserAgent.gwt.xml to which value should I set the property-fallback? I mean is property fallback-recursive (I would assume it is) so setting it to IE9 should work? In case IE9 rule isn't specified it will recursively fallback to IE8 (and generate a compiler warning) right?

On Wednesday, April 17, 2013 12:40:04 AM UTC+2, Thomas Broyer wrote:


On Tuesday, April 16, 2013 2:07:34 PM UTC+2, Mariusz Magdziarz wrote:
When you add support for IE10??

AFAIK, IE10 works OK with the ie9 permutation.
Vaadin has started working on bringing MSPointerEvents to support touch-enabled (and touch-only) devices.

--
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+unsubscribe@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: RequestFactory Could not parse payload: payload[0] = N

See https://gwt.googlesource.com/gwt/+/2.5.1/samples/mobilewebapp/src/main/java/com/google/gwt/sample/gaerequest/ and https://github.com/tbroyer/gwt-maven-archetypes/tree/master/guice-rf-activities/src/main/resources/archetype-resources/

On Friday, August 30, 2013 9:40:49 PM UTC+2, Adrien Pinto wrote:
I have the same issue. 

I was implementing a kind of filter for the user authentification on the Request Factory. I have subclassed my RequestFactoryServlet and I just check if the user is authentificate, if not I send a Redirection to the login page. So I think that my call from the client side is waiting for a particular response from the server, but the client never get it because I make a redirection and I don't call "super.doPost()" in the servlet.

But I don't understand why the RequestFactrory workflow don't fire the failure function on client side?

I don't think that a good way to make my login workflow any way. I will try to find authentification examples with Google Accounts with GWT/GAE.
Here is the stacktrace maybe it can help you :) 

java.lang.RuntimeException: Could not parse payload: payload[0] = <
at com.google.web.bindery.autobean.vm.impl.JsonSplittable.create(JsonSplittable.java:70)
at com.google.web.bindery.autobean.shared.impl.StringQuoter.split(StringQuoter.java:73)
at com.google.web.bindery.autobean.shared.AutoBeanCodex.decode(AutoBeanCodex.java:54)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:351)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1151)
at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
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:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
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:242)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
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)

Le mercredi 29 mai 2013 00:37:22 UTC+2, Stephan White a écrit :
We just ran into the same issue.

SEVERE: Unexpected error
java.lang.RuntimeException: Could not parse payload: payload[0] = N
 at com.google.web.bindery.autobean.vm.impl.JsonSplittable.create(JsonSplittable.java:70)
 at com.google.web.bindery.autobean.shared.impl.StringQuoter.create(StringQuoter.java:46)
 at com.google.web.bindery.autobean.shared.ValueCodex$Type$7.encode(ValueCodex.java:125)
 at com.google.web.bindery.autobean.shared.ValueCodex.encode(ValueCodex.java:321)
 at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl$ValueCoder.extractSplittable(AutoBeanCodexImpl.java:500)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:277)
 at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
 at com.google.web.bindery.autobean.vm.impl.BeanPropertyContext.set(BeanPropertyContext.java:44)
 at com.google.web.bindery.requestfactory.server.Resolver$PropertyResolver.visitValueProperty(Resolver.java:155)
 at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
 at com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:414)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:491)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:233)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:135)
 at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
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+unsubscribe@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 php site

Example gwt + php + gxt
http://www.youtube.com/watch?v=azLSxQ0A2e0

Source http://www.merpf.com.ar/download/gwt

On Aug 31, 2013 6:22 AM, "Reza Razavipour" <reza.razavipour@gmail.com> wrote:

I am new to GWT, HTML, javascript...

I am a Java programmer and thus wanting to use GWT on the front end to redesign the site, better performance.
Backend, server is an apache PHP server. There is also a SOAP server on the back end also.
Right the JS calls PHP scripts and that returns HTML.

I want to tie the GWT to the php server and make the php scripts return JSON. Is this a good approach? What other options do I have?
It would be really useful to have the GWT make SOAP calls to the SOAP server. Is this possible? Is it a good option?


Thoughts on 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+unsubscribe@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.

--
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+unsubscribe@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.

Friday, August 30, 2013

gwt and php site

I am new to GWT, HTML, javascript...

I am a Java programmer and thus wanting to use GWT on the front end to redesign the site, better performance.
Backend, server is an apache PHP server. There is also a SOAP server on the back end also.
Right the JS calls PHP scripts and that returns HTML.

I want to tie the GWT to the php server and make the php scripts return JSON. Is this a good approach? What other options do I have?
It would be really useful to have the GWT make SOAP calls to the SOAP server. Is this possible? Is it a good option?


Thoughts on 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+unsubscribe@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: RequestFactory Could not parse payload: payload[0] = N

I have the same issue. 

I was implementing a kind of filter for the user authentification on the Request Factory. I have subclassed my RequestFactoryServlet and I just check if the user is authentificate, if not I send a Redirection to the login page. So I think that my call from the client side is waiting for a particular response from the server, but the client never get it because I make a redirection and I don't call "super.doPost()" in the servlet.

But I don't understand why the RequestFactrory workflow don't fire the failure function on client side?

I don't think that a good way to make my login workflow any way. I will try to find authentification examples with Google Accounts with GWT/GAE.
Here is the stacktrace maybe it can help you :) 

java.lang.RuntimeException: Could not parse payload: payload[0] = <
at com.google.web.bindery.autobean.vm.impl.JsonSplittable.create(JsonSplittable.java:70)
at com.google.web.bindery.autobean.shared.impl.StringQuoter.split(StringQuoter.java:73)
at com.google.web.bindery.autobean.shared.AutoBeanCodex.decode(AutoBeanCodex.java:54)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:351)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1151)
at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:258)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
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:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
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:242)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
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)

Le mercredi 29 mai 2013 00:37:22 UTC+2, Stephan White a écrit :
We just ran into the same issue.

SEVERE: Unexpected error
java.lang.RuntimeException: Could not parse payload: payload[0] = N
 at com.google.web.bindery.autobean.vm.impl.JsonSplittable.create(JsonSplittable.java:70)
 at com.google.web.bindery.autobean.shared.impl.StringQuoter.create(StringQuoter.java:46)
 at com.google.web.bindery.autobean.shared.ValueCodex$Type$7.encode(ValueCodex.java:125)
 at com.google.web.bindery.autobean.shared.ValueCodex.encode(ValueCodex.java:321)
 at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl$ValueCoder.extractSplittable(AutoBeanCodexImpl.java:500)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:277)
 at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
 at com.google.web.bindery.autobean.vm.impl.BeanPropertyContext.set(BeanPropertyContext.java:44)
 at com.google.web.bindery.requestfactory.server.Resolver$PropertyResolver.visitValueProperty(Resolver.java:155)
 at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
 at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
 at com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:414)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:491)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:233)
 at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:135)
 at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
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+unsubscribe@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: Correct way to sink events on UiBinder Element

Thanks all. The addDomHandler suggestion worked wonderfully for my needs.

On Tuesday, August 27, 2013 11:55:47 AM UTC-4, Thomas Broyer wrote:


On Tuesday, August 27, 2013 5:01:07 PM UTC+2, Shaun Tarves wrote:
Thomas,

Thanks for the heads up about the leak. How would I use "uibinder for
cells" if I am just creating a standard Composite-based widget?

Either you compose widgets, or you go low-level and then you can use "uibinder for cells" to work at the element-level.

What would an event delegation path look like at the composite level?
Do I just sink the events on this.getElement() and then check if the
event target is my UiField Element?

Basically, yes (you'd use addDomHandler or override onBrowserEvent though rather than "sink the events on this.getElement()")

With "uibinder for cells" (aka UiRenderer), you'd either build a Cell to use in CellWidget (have a look at TextButton for an example of such widget, even though it doesn't use UiRenderer) or extend Widget. In the latter case, you can render() your element into some root element (say, a <div>) using setInnerHTML, and delegate the widget's onBrowserEvent to the UiRenderer's onBrowserEvent, so it will do the dispatch to the appropriate @UiHandler method. And you can possibly get the inner elements to manipulate them directly.

--
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+unsubscribe@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: EditTextCell column fires update when clicked if using SiingleSelectionModel

Glad to hear that your problem is solved.
I'm going to open an issue about this problem.
It might be useful for others as it was for us.

About why does it happens when SelectionModel is set, I guess that the SelectionModel forces an update on the click. So it just anticipates this unexpected behavior. If you don't use SelectionModel you still realize that EditTextCell fires update when you click on the cell for editing, and click out with no changes (that was my exactly problem).

The abstract popup cell concept seems to be very extendable. It would be interesting to have such a feature.

Eventually, if the EditSelectCell component will be useful for you, you can email me and I'll share it with you.

--
D. Reinert

Em sexta-feira, 30 de agosto de 2013 10h49min30s UTC-3, Steve C escreveu:
Danilo,

That worked for me, although the line numbers were slightly different.  I edited code from 2.5.1 - was yours based on an earlier version?

I'm still trying to figure out the logic flow, given that the issue doesn't occur until I add a selection model.

I like the selection cell concept.  I've made a radio group cell to handle a set of radio buttons, but the drawback has been that it takes up a lot of space.  Your concept layered on top of that might be a good solution, especially if I can use a popup when the buttons are displayed. (General thought - it seems like a generic popup cell might be useful, which things like DatePickerCell could extend, but that would also give inherited logic for any other sort of custom popup cell I'd want to create.)


On Sunday, August 25, 2013 12:25:33 PM UTC-4, Steve C wrote:
In a simple celltable, if I set a SingleSelectionModel, then clicking on an EditTextCell triggers the updater for that column, even though the editor doesn't even open (and the value is the current value).  Without the selection model this doesn't happen.

Is this expected behavior?

I've pasted sample code below.

Also worth noting is the behavior if I hit Enter to clear the alert box - that triggers whatever enter would do on the cell (like open it for editing). Better yet, try editing a cell, and clicking on a different row, then using Enter to close all of the alerts that come up.

public class EditTextCellBug implements EntryPoint {
    public void onModuleLoad() {
       
        List<Bean> list = new ArrayList<Bean>();
        list.add(new Bean("John"));
        list.add(new Bean("Jane"));
       
        ListDataProvider<Bean> provider = new ListDataProvider<Bean>(list);
       
        // problem occurs whether we use explicit key provider or not
        CellTable<Bean> ct = new CellTable<Bean>(provider);
        provider.addDataDisplay(ct);
       
        Column<Bean, String> col = new Column<Bean, String>(new EditTextCell()) {
            @Override
            public String getValue(Bean b) {
                return b.name;
            }
        };
        col.setFieldUpdater(new FieldUpdater<Bean, String>() {
            @Override
            public void update(int index, Bean b, String value) {
                Window.alert(b.name + " updating to " + value);
                b.name = value;
            }
        });
        ct.addColumn(col);
       
        // problem doesn't occur if we don't set the selection model
        SingleSelectionModel<Bean> selModel = new SingleSelectionModel<Bean>();
        ct.setSelectionModel(selModel);
       
        RootPanel.get().add(ct);
       
        // doesn't fire updater - only manual selection does
        selModel.setSelected(list.get(0), true);
    }
}
class Bean {
    public String name;
    public Bean(String name) {
        this.name = name;
    }
}

As a side note, with the single selection model in place, it takes a second click to open the cell for editing if the row wasn't currently selected. (I think I may have a misunderstanding of the role of a selection model, since it doesn't seem to be needed for simple editing, and there are three states a row can have, no bg, yellow bg, and blue, using the default styling.  Do I only need one if I actually want to "do something" with the user's selection?)


--
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+unsubscribe@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.