Re: How to stop IE8 from caching my Ajax requests ?
Problem solved. Just added a new param to my request : params + = "&time=" + (new Date()).getTime(); Thanks again for your help On 22 nov, 10:41, magat wrote: > Thanks for your answer ! > > I understand your point, but I'm not in charge of the server, which is > part of my client's other projects. > > The GET is a bad choice, but I have to deal with it, and adding server > headers isn't possible. > > I will try adding a timestamp param, and post the results here. > > On 17 nov, 12:12, Thomas Broyer wrote: > > > > > > > > > On 16 nov, 16:34, magat wrote: > > > > Hi all, > > > > I'm using a RequestBuilder from com.google.gwt.http.client to update > > > informations in my app (calling an external home-made API which I must > > > call with http GET). > > > Doing updates using GET requests is a Bad Thing™, to begin with. > > > > Everything works just the way I want to, except when using IE8 (and > > > maybe other IEs, haven't tested them yet). When inIE, the requests > > > are cached, and the server never receives any past the first one. > > > > I found out that this problem is related to the wayIEcaches Ajax > > > requests (someone had the same problem with JQuery here : > > >http://stackoverflow.com/questions/1013637/unexpected-caching-of-ajax...). > > > The workaround was to use "cache: false", which in jQuery adds a > > parameter to the query-string (named "_" with the value being the > > current timestamp: > > seehttps://github.com/jquery/jquery/blob/master/src/ajax.js#L268 > > ) > > > > Unfortunately, asking my users to change the caching params inIEis > > > not possible, so I'm trying to solve the problem in the request > > > builder itself. > > > > I tried to add http headers topreventIE from caching the requests : > > > > requestBuilder.setHeader("Cache-Control", "max-age=0,no-cache,no- > > > store,post-check=0,pre-check=0"); > > > requestBuilder.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); > > > > ButIEignores them :( > > > > I'm open to every suggestions, thanks for your help ! > > > Have you tried sending aggressive no-cacheheaders *from the server*? > > > But the obvious fix would be to not use GET for what it's not meant to. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to stop IE8 from caching my Ajax requests ?
Thanks for your answer ! I understand your point, but I'm not in charge of the server, which is part of my client's other projects. The GET is a bad choice, but I have to deal with it, and adding server headers isn't possible. I will try adding a timestamp param, and post the results here. On 17 nov, 12:12, Thomas Broyer wrote: > On 16 nov, 16:34, magat wrote: > > > Hi all, > > > I'm using a RequestBuilder from com.google.gwt.http.client to update > > informations in my app (calling an external home-made API which I must > > call with http GET). > > Doing updates using GET requests is a Bad Thing™, to begin with. > > > Everything works just the way I want to, except when using IE8 (and > > maybe other IEs, haven't tested them yet). When in IE, the requests > > are cached, and the server never receives any past the first one. > > > I found out that this problem is related to the way IE caches Ajax > > requests (someone had the same problem with JQuery here : > >http://stackoverflow.com/questions/1013637/unexpected-caching-of-ajax...). > > The workaround was to use "cache: false", which in jQuery adds a > parameter to the query-string (named "_" with the value being the > current timestamp: > seehttps://github.com/jquery/jquery/blob/master/src/ajax.js#L268 > ) > > > Unfortunately, asking my users to change the caching params in IE is > > not possible, so I'm trying to solve the problem in the request > > builder itself. > > > I tried to add http headers topreventIE from caching the requests : > > > requestBuilder.setHeader("Cache-Control", "max-age=0,no-cache,no- > > store,post-check=0,pre-check=0"); > > requestBuilder.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); > > > But IE ignores them :( > > > I'm open to every suggestions, thanks for your help ! > > Have you tried sending aggressive no-cacheheaders *from the server*? > > But the obvious fix would be to not use GET for what it's not meant to. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
How to stop IE8 from caching my Ajax requests ?
Hi all, I'm using a RequestBuilder from com.google.gwt.http.client to update informations in my app (calling an external home-made API which I must call with http GET). Everything works just the way I want to, except when using IE8 (and maybe other IEs, haven't tested them yet). When in IE, the requests are cached, and the server never receives any past the first one. I found out that this problem is related to the way IE caches Ajax requests (someone had the same problem with JQuery here : http://stackoverflow.com/questions/1013637/unexpected-caching-of-ajax-results-in-ie8). Unfortunately, asking my users to change the caching params in IE is not possible, so I'm trying to solve the problem in the request builder itself. I tried to add http headers to prevent IE from caching the requests : requestBuilder.setHeader("Cache-Control", "max-age=0,no-cache,no- store,post-check=0,pre-check=0"); requestBuilder.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); But IE ignores them :( I'm open to every suggestions, thanks for your help ! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT Spring integration - what is the best method in late 2010?
Hi, I recently used Spring to instanciate my RPC services impls, and I followed the approach described here : http://technophiliac.wordpress.com/2008/08/24/giving-gwt-a-spring-in-its-step/ Hope that helps, On 3 sep, 09:12, Alek wrote: > Hi, > > We also use SL for our project. I configured this solution once and > forgot about it. > > Respect > > On Aug 31, 11:24 pm, George Georgovassilis > > > > wrote: > > Hi Sam, > > > The SL [1] is a community maintained integration of Spring and GWT > > mainly focused at exporting Spring managed beans as RPC services. It > > was launched four years ago and has reached through many releases a > > high degree of maturity. The documentation is extensive, it's easy to > > use (though I'm biased) but it's been criticized for not using maven. > > > [1]http://gwt-widget.sourceforge.net/ > > > On Aug 31, 5:31 pm, Sam wrote: > > > > Note: this thread is about using Spring for your service impls in a > > > GWT app (it's not about integrating Spring MVC or using ROO. It's also > > > not about Guice) > > > > There are a few posts on this but it's hard to tell what the best > > > method is today. The two contenders seem to me to be: > > > > 1)http://code.google.com/p/gwt-spring-starter-app/(myprojectbased > > > on P.G. Taboada's > > > approach:http://pgt.de/2009/07/17/non-invasive-gwt-and-spring-integration-relo...) > > > > which is as simple as can be, however, the one annoyance is that you > > > need yet another class for each RPC Service (A wrapper that extends a > > > spring context injecting RemoteServiceServlet) > > > > 2)http://code.google.com/p/gwtrpc-spring/ > > > > Just glanced at this. Looks a lot more complicated and the project > > > has a lot of unresolved issues. > > > > Am I missing any approaches? Surely you other GWT devs are using > > > Spring on the back end if you're writing serious applications. Don't > > > be shy, please speak up. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Using TabLayoutPanel with UiBinder : custom header
Hi, I'm using TablLayoutPanel with UiBinder, like this : Header1 Content Header2 Content2 And it works great :) But, for some reason I need the content of the header to be a widget (so I can access it from java code, and adapt it to the current language or user preferences, ...), ie replace Header1 with . The invokation fails with the following message : "Found widget in an HTML context" , which I assume means that g:header gets converted to a HTML widget. How can I avoid using only html in g:header ? Thanks for your help ! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Browser Event Propagation
Tested on Mozilla 3.6, IE7/8 and Chrome, using both methods at the same time : event.preventDefault(); event.stopPropagation(); Need to test this on IE6 :( Thanks again for your help ! On 3 août, 13:43, magat wrote: > Thanks for your answers, I'll be testing this on IE and report my > conclusions here. > > On 3 août, 00:01, lineman78 wrote: > > > > >event.preventDefault works in both firefox and IE if you use the > > modern GWTeventhandling(handler registration method) instead of the > > DOMeventhandling (pre 1.6). > > > On Aug 2, 3:04 pm, Falcon wrote: > > > > (You can also useevent.returnValue = false, at least for IE.) > > > > On Aug 2, 3:50 pm, Falcon wrote: > > > > > In browsers that don't support the W3Ceventmodel, you'll need to > > > > return false instead. > > > > > (Also, to be clear,event.preventDefault() prevents the default > > > > browser action from happening, e.g. following a link that was clicked. > > > >event.stopPropagation() is what stops theeventfrom bubbling through > > > > the DOM tree.) > > > > > On Aug 2, 9:43 am, magat wrote: > > > > > > Hi, > > > > > > I'm currently trying to set up a contextual menu on my gwt app, that > > > > > is open a MenuBar in a PopupPanel on right-click. Using > > > > >event.preventDefault() seems to stop theeventpropagationin my > > > > > browser (Firefox 3.6) : my menu is displayed, not the browser one. > > > > > > I'm wondering if this behaviour was browser-specific ? I can't help > > > > > but thinking that theeventpropagationmay be different on another > > > > > browser. I couldn't find a clear answer in the doc, but maybe I missed > > > > > something. > > > > > > Thanks for reading this post ! > > > > > > Mathieu AGAR -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Browser Event Propagation
Thanks for your answers, I'll be testing this on IE and report my conclusions here. On 3 août, 00:01, lineman78 wrote: > event.preventDefault works in both firefox and IE if you use the > modern GWT event handling(handler registration method) instead of the > DOM event handling (pre 1.6). > > On Aug 2, 3:04 pm, Falcon wrote: > > > > > (You can also use event.returnValue = false, at least for IE.) > > > On Aug 2, 3:50 pm, Falcon wrote: > > > > In browsers that don't support the W3C event model, you'll need to > > > return false instead. > > > > (Also, to be clear, event.preventDefault() prevents the default > > > browser action from happening, e.g. following a link that was clicked. > > > event.stopPropagation() is what stops the event from bubbling through > > > the DOM tree.) > > > > On Aug 2, 9:43 am, magat wrote: > > > > > Hi, > > > > > I'm currently trying to set up a contextual menu on my gwt app, that > > > > is open a MenuBar in a PopupPanel on right-click. Using > > > > event.preventDefault() seems to stop the event propagation in my > > > > browser (Firefox 3.6) : my menu is displayed, not the browser one. > > > > > I'm wondering if this behaviour was browser-specific ? I can't help > > > > but thinking that the event propagation may be different on another > > > > browser. I couldn't find a clear answer in the doc, but maybe I missed > > > > something. > > > > > Thanks for reading this post ! > > > > > Mathieu AGAR -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Browser Event Propagation
Hi, I'm currently trying to set up a contextual menu on my gwt app, that is open a MenuBar in a PopupPanel on right-click. Using event.preventDefault() seems to stop the event propagation in my browser (Firefox 3.6) : my menu is displayed, not the browser one. I'm wondering if this behaviour was browser-specific ? I can't help but thinking that the event propagation may be different on another browser. I couldn't find a clear answer in the doc, but maybe I missed something. Thanks for reading this post ! Mathieu AGAR -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.