Re: server push example with GWT?

2017-05-09 Thread Thomas Lefort
OK, finally got it to work, but had to add the following to my web.xml (so 
it was jetty all along), the webdefault didn't work


default

org.eclipse.jetty.servlet.DefaultServlet

useFileMappedBuffer
false

0



On Tuesday, 9 May 2017 15:42:00 UTC+2, Thomas Lefort wrote:
>
> Aw thanks Thomas, I feel guilty to take so much of your time.
>
> I did just figure out the -war option but ran into another issue... I am 
> running the jetty server from Intellij and the CodeServer with the no 
> server and war options as suggested. However when it comes to updating the 
> code (which it does ;-)) it gets stuck because the jetty server seems to be 
> locking the directory. I am basically getting a [ERROR] Can't update 
> launcher dir message. I guess this is something to do with Intellij and I 
> need to look into it a bit more. I just mention it in case someone has had 
> the issue before and is sympathizing with my problems ;-)
>
>
> On Tuesday, 9 May 2017 15:34:13 UTC+2, Thomas Broyer wrote:
>>
>>
>>
>> On Tuesday, May 9, 2017 at 3:18:38 PM UTC+2, Thomas Lefort wrote:
>>>
>>> Hi Thomas,
>>>
>>> Thanks for the reply. Sure I don't expect anyone to fix it for me, just 
>>> to know if it is a problem my end or if I am trying to do too much with the 
>>> embedded server indeed.
>>>
>>> I am happy with running an external server, however, it would be nice if 
>>> I could get a similar level of debug functionality, ie breakpoint in server 
>>> code, all the superdev mode feature, etc... Any good step by step manual? I 
>>> tried the noserver flag (in Intellij) and running a server aside (as per 
>>> GWT project page instructions) but it doesn't provide the goodies I 
>>> mentioned previously, for instance, it doesn't update the client when I 
>>> change it and reload it. To be honest, I can't really see how the magic 
>>> would happen without some connection between the two. I am probably missing 
>>> a key element/step :)
>>>
>>
>> Assuming a server setup that correctly reloads (redeploys the webapp) 
>> whenever server-side code (and/or resources) changes (this is outside the 
>> scope of GWT; same for debugging).
>> You run CodeServer with launcherDir pointing to a folder served by the 
>> server (or DevMode with -noserver, and -war pointing to that same folder), 
>> it then generates a *.nocache.js file in the directory (and copies public 
>> resources there too).
>> When you load your page in the browser, the *.nocache.js is loaded and 
>> triggers a compilation in the CodeServer.
>> Whenever you change client-side code, refresh the page in the browser and 
>> it'll trigger a recompilation.
>> Whenever you change server-side code, redeploy the webapp (depending on 
>> the setup, this can be entirely automatic, or involve some manual action).
>> To debug client-side code, use the browser's devtools, or your usual 
>> SDM/IDE integration (I never used any, so can't really comment)
>>
>> When using my gwt-maven-archetypes for example, "mvn tomcat7:run" will 
>> automatically redeploy the webapp whenever resources or classes change in 
>> target/classes. Most IDEs will happily compile your code (automatically on 
>> save, or triggered by a keyboard shortcut) into target/classes, which would 
>> trigger a redeploy. "mvnDebug tomcat7:run" (or running the Maven goal for 
>> debug in your IDE; for example, in Eclipse, Debug As… → Maven… → 
>> tomcat7:run) allows you to debug your server-side code. And "mvn 
>> gwt:codeserver" launches SDM for the client-side code.
>>
>> AFAIK, the GWT Eclipse Plugin has some "one click" way of running both a 
>> server runtime (configured in Eclipse WTP) and SDM, and I'd assume that 
>> Eclipse is smart enough to make redeploying after changes either completely 
>> automatic or only a keyboard shortcut / click away.
>>
>> The "connections" you're talking about are the standard JDWP protocol for 
>> connecting to a JVM to debug the server-side code in the server runtime, 
>> and SDM with SourceMaps (and possibly a "remote debugging" protocol of your 
>> browser if you want IDE integration rather than debugging right in your 
>> browser).
>>
>

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


Re: server push example with GWT?

2017-05-09 Thread Thomas Lefort
Aw thanks Thomas, I feel guilty to take so much of your time.

I did just figure out the -war option but ran into another issue... I am 
running the jetty server from Intellij and the CodeServer with the no 
server and war options as suggested. However when it comes to updating the 
code (which it does ;-)) it gets stuck because the jetty server seems to be 
locking the directory. I am basically getting a [ERROR] Can't update 
launcher dir message. I guess this is something to do with Intellij and I 
need to look into it a bit more. I just mention it in case someone has had 
the issue before and is sympathizing with my problems ;-)


On Tuesday, 9 May 2017 15:34:13 UTC+2, Thomas Broyer wrote:
>
>
>
> On Tuesday, May 9, 2017 at 3:18:38 PM UTC+2, Thomas Lefort wrote:
>>
>> Hi Thomas,
>>
>> Thanks for the reply. Sure I don't expect anyone to fix it for me, just 
>> to know if it is a problem my end or if I am trying to do too much with the 
>> embedded server indeed.
>>
>> I am happy with running an external server, however, it would be nice if 
>> I could get a similar level of debug functionality, ie breakpoint in server 
>> code, all the superdev mode feature, etc... Any good step by step manual? I 
>> tried the noserver flag (in Intellij) and running a server aside (as per 
>> GWT project page instructions) but it doesn't provide the goodies I 
>> mentioned previously, for instance, it doesn't update the client when I 
>> change it and reload it. To be honest, I can't really see how the magic 
>> would happen without some connection between the two. I am probably missing 
>> a key element/step :)
>>
>
> Assuming a server setup that correctly reloads (redeploys the webapp) 
> whenever server-side code (and/or resources) changes (this is outside the 
> scope of GWT; same for debugging).
> You run CodeServer with launcherDir pointing to a folder served by the 
> server (or DevMode with -noserver, and -war pointing to that same folder), 
> it then generates a *.nocache.js file in the directory (and copies public 
> resources there too).
> When you load your page in the browser, the *.nocache.js is loaded and 
> triggers a compilation in the CodeServer.
> Whenever you change client-side code, refresh the page in the browser and 
> it'll trigger a recompilation.
> Whenever you change server-side code, redeploy the webapp (depending on 
> the setup, this can be entirely automatic, or involve some manual action).
> To debug client-side code, use the browser's devtools, or your usual 
> SDM/IDE integration (I never used any, so can't really comment)
>
> When using my gwt-maven-archetypes for example, "mvn tomcat7:run" will 
> automatically redeploy the webapp whenever resources or classes change in 
> target/classes. Most IDEs will happily compile your code (automatically on 
> save, or triggered by a keyboard shortcut) into target/classes, which would 
> trigger a redeploy. "mvnDebug tomcat7:run" (or running the Maven goal for 
> debug in your IDE; for example, in Eclipse, Debug As… → Maven… → 
> tomcat7:run) allows you to debug your server-side code. And "mvn 
> gwt:codeserver" launches SDM for the client-side code.
>
> AFAIK, the GWT Eclipse Plugin has some "one click" way of running both a 
> server runtime (configured in Eclipse WTP) and SDM, and I'd assume that 
> Eclipse is smart enough to make redeploying after changes either completely 
> automatic or only a keyboard shortcut / click away.
>
> The "connections" you're talking about are the standard JDWP protocol for 
> connecting to a JVM to debug the server-side code in the server runtime, 
> and SDM with SourceMaps (and possibly a "remote debugging" protocol of your 
> browser if you want IDE integration rather than debugging right in your 
> browser).
>

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


Re: server push example with GWT?

2017-05-09 Thread Thomas Lefort
Hi Thomas,

Thanks for the reply. Sure I don't expect anyone to fix it for me, just to 
know if it is a problem my end or if I am trying to do too much with the 
embedded server indeed.

I am happy with running an external server, however, it would be nice if I 
could get a similar level of debug functionality, ie breakpoint in server 
code, all the superdev mode feature, etc... Any good step by step manual? I 
tried the noserver flag (in Intellij) and running a server aside (as per 
GWT project page instructions) but it doesn't provide the goodies I 
mentioned previously, for instance, it doesn't update the client when I 
change it and reload it. To be honest, I can't really see how the magic 
would happen without some connection between the two. I am probably missing 
a key element/step :)


On Tuesday, 9 May 2017 14:44:24 UTC+2, Thomas Broyer wrote:
>
>
>
> On Tuesday, May 9, 2017 at 1:52:03 PM UTC+2, Thomas Lefort wrote:
>>
>> Has anybody managed to run an example of websockets with the embedded 
>> jetty in gwt 2.8? ie only using the jsr API. I just can't get it to work, 
>> the ServerEndpoint annotation doesn't get picked up. I also tried with the 
>> "manual" registrarion, eg with serverContainer.addEndpoint, but I have 
>> other issues there too (class cast exception). On the other hand it seems 
>> to work fine on my standalone server, so it feels like it's a problem with 
>> the embedded version.
>>
>
> …and not something we're willing to "fix", fyi.
>
> (in case it wasn't clear: we're really pushing towards using external 
> servlet containers, and using the CodeServer endpoint rather than DevMode 
> integration; DevMode is handy but people regularly try to do "too much" 
> with it –just like you in this case–, spend an awful lot of time trying to 
> make it work, then find that their hacks break with a new version of GWT 
> and start complaining, etc. So, your time is much better spent setting up a 
> developer experience where you run an external server; if it were only me, 
> DevMode would only serve static files)
>

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


Re: server push example with GWT?

2017-05-09 Thread Thomas Lefort
Has anybody managed to run an example of websockets with the embedded jetty 
in gwt 2.8? ie only using the jsr API. I just can't get it to work, 
the ServerEndpoint annotation doesn't get picked up. I also tried with the 
"manual" registrarion, eg with serverContainer.addEndpoint, but I have 
other issues there too (class cast exception). On the other hand it seems 
to work fine on my standalone server, so it feels like it's a problem with 
the embedded version.



On Monday, 1 June 2015 20:14:54 UTC+2, Edward Montgomery wrote:
>
> Can anyone point me to a tutorial or example of how to implement server 
> push with a GWT application?
>
> Is this typically done by somehow matching a JavaScript socket on one end 
> to a Java socket on the other?
>
> Thanks.
>

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


Re: Get on hashmap returns undefined

2017-04-19 Thread Thomas Lefort
Yes, thanks. There was another issue indeed. The undefined in javascript 
was misleading.


On Tuesday, 18 April 2017 01:00:34 UTC+2, Jens wrote:
>
> Your java code should always check for null using == and it should just 
> work regardless if the Javascript implementation returns undefined or null.
>
> -- J.
>

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


Get on hashmap returns undefined

2017-04-17 Thread Thomas Lefort
I am using 2.8 and I occasionally get undefined instead of null when doing 
a get on a hashmap, ie when there is no maping to the key. I am wondering 
if this is a known bug or if I should not assume this behaviour for the 
hashmap get method?

Thanks!

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


Re: GWT for Web Development (again)

2016-04-21 Thread Thomas Lefort
Thanks to both.

Yes, these are options indeed. I just assumed as the ajax crawling scheme 
is deprecated, Google was able to crawl my pages OK. I guess we're not 
there yet completely. Strange thing though is that the "Fetch as Google" 
works perfectly fine...



On Thursday, 21 April 2016 15:16:16 UTC+2, Oleg K. wrote:
>
> We used Apache HTTP Client with javascript enabled.
> A perioid job was running on the backend: load page and save generated 
> html from it to cache.
> All search engines received that cached html.
>
> Everything was working fine.
>
> четверг, 25 декабря 2014 г., 10:12:43 UTC+3 пользователь Adolfo Rodriguez 
> написал:
>>
>> Hi, I suppose the question has been discussed many times but I will like 
>> to reopen the issue.
>>
>> Since I discovered GWT, aprox. 5 years ago, I do not want any other 
>> framework. It gives me the right tool to get a good productivity, forget 
>> about passing HTTP params back and forward, enjoy lots of libraries, and 
>> last times, with bootstrap I have added the best of design to my GWT 
>> projects. So, I feel having collected a great toolkit for development.
>>
>> There is only a problem: search engines. Search engines, in my experience 
>> do not like GWT. Even when you have the _escaped_fragment_ thing, I guess 
>> google does not treat you the same that with pure HTML code. I know that 
>> GWT is not intended for web but is really a shame not enjoying the full 
>> potential of the framework on web environments. I have noticed that most of 
>> companies that start in GWT migrates to common Java/HTML frameworks as soon 
>> as they are successful or they get funding, just because the SEO penalty.
>>
>> So, is there anything, at all, that could be done, in future releases, to 
>> claim GWT being also a framework for Web environments? I mean, not allowing 
>> google even know that your webapp was created with GWT. I know about the 
>> dynamic content generation but I guess something could be done about it. I 
>> think adoption would multiply by thousands.
>>
>> Thanks
>>
>

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


Re: GWT for Web Development (again)

2016-04-18 Thread Thomas Lefort
Hi,

sorry to revive this old thread. I am having issues with SEO and GWT.

I use Google Webmaster Tools and I can see that my web application is 
crawled fine when using the "Fetch as Google" tool. However this is not 
reflected in the indexation, structured data detection, etc... For instance 
my keywords are "loading" (sic) and a couple more from my static page 
title. I also added structured data which is not picked on. None of the 
dynamically loaded data seems to be "seen".

I must say it was a series of hit an miss until I managed to get my web 
application crawlable (including the fallback permutation missing), so this 
could explain the current indexation.
However, it's been a week now (I also resubmitted sitemap and indexing 
after "Fetch as Google") but still no update in the data scrapped, as far 
as I can tell.

Has anybody experienced such problems before? I am missing something? 
Should I just be more patient (that's more a question for the Google 
Webmaster Tools I guess ;-)).

Thanks!


On Wednesday, 31 December 2014 15:39:29 UTC+1, Joseph Lust wrote:
>
> Can you cite an example metric of the "SEO penalty" you're experiencing? 
> For more than a 18mo now, if you use Google Webmaster Tools 
>  and Fetch as Google, 
> you'll see your fully rendered GWT page with the async content loaded and 
> displayed. Given this is the Google spider, it follows that this is what's 
> being used to index your site and that GoogleBot understands your GWT app 
> just fine. Note: this is for sites I manage that don't even implement *escape 
> fragment*.
>
> -Joe
>

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


Re: Thanks to GWT developers/maintainers

2016-01-04 Thread Thomas Lefort
+1, I've been meaning to post something like that for a while!

I would only add this: thank you to the people who answer the questions of 
GWT users, like me, on this forum (they might be the same as the 
developers, or not).

Have a great year 2016.


On Monday, 4 January 2016 09:21:36 UTC+1, salk31 wrote:
>
> I do my fair share of whinging but many, many thanks to the people that 
> develop and maintain GWT.
>
> I'm not sure I could face using another framework and recently JsInterop 
> "just worked" for me in a beautiful way.
>
> I'll try and be good this year and submit some patches.
>
> Cheers
>
> Sam
>
>
>

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


Re: Java Deserialization Vulnerability

2015-11-21 Thread Thomas Lefort
I am not very well versed into that kind of things, but how is it possible if 
gwt uses a white list of classes for serialization and deserialization?

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


GWT Meet-up 2015 : which technologies for new project

2015-06-13 Thread Thomas Lefort
Drop UiBinder? I hope not, I use it all the time! What would replace it? May be 
I should check those slides ;-)

-- 
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: Important videos from GWT Meet-up 2015

2015-06-12 Thread Thomas Lefort
Is the phasing out of gwt-user something you heard when attending the 
meetings? It may be a question of interpretation but I don't read the same 
from the slides. Sounds more like a fork of GWT to me. Of course if all 
efforts go to the new project, then it is in effect the same thing ;-) may 
be some clarifications from the GWT contributors would help.


On Friday, 12 June 2015 11:21:49 UTC+2, Phineas Gage wrote:
>
> I thought I'd share this link to a series of important videos from the 
> recent GWT Meet-up 2015, which was posted on G+ and in the GWT Contributors 
> group:
>
> https://www.youtube.com/playlist?list=PL1yReUCGwGvrqscLu1EAyYRPrr0ceEHLE
>
> *Summary:*
>
> For anyone who wasn't already aware, there are seismic changes coming for 
> GWT. Basically, gwt-user and everything in it will be gradually mothballed, 
> so widgets, GWT-RPC, UiBinder, CssResource, etc. While we're at it, the GWT 
> compiler will probably go too. If the plan stays as presented, everything 
> is going, sooner or later. It looks as though a much simpler and faster 
> Java to JS transpiler is proposed, maybe under a different project name, 
> with optimizations handled by Closure. I welcome corrections if I've got 
> something wrong here.
>
> *Editorial:*
>
> Having used GWT for a number of years, I think this is a massive but 
> needed change. It looks like a great direction, that maybe could have been 
> taken even sooner. But personally, I now can't see using GWT for new 
> projects until it appears in its new form. We're in a kind of purgatory now 
> where anything you write in GWT may not be easy to maintain, but the new 
> vision is currently just a hope for the future.
>
> As for myself, since I've got a project in its early stages, I'll probably 
> be porting everything I have to JavaScript, until I can count on a stable 
> Java to JS transpiler. At that point, I can decide to move some of the code 
> back to Java, if it's not too painful and the benefits to doing so are 
> clear. At the same time, even with years of Java experience, I have to ask 
> myself, why Java? If it's a better language that compiles to JavaScript 
> that we want, there are many: Dart is coming along, and there are more 
> options than there were before. It's speculation to say what an open source 
> Swift will mean, but the external forces affecting these options can play 
> themselves out while JavaScript will likely continue to be stable for years 
> to come.
>
> So rather than drag it out, I'd like to see these changes happen ASAP. As 
> it's sometimes said, "if you find yourself in a hole, stop digging." I 
> believe that if a stable and fast Java to JS transpiler were released, the 
> community would chip in to help complete JRE emulation or other needed 
> projects, and I'm glad to hear that much of the GWT team is being diverted 
> to compiler work.
>
> Thanks to the GWT team for sharing these plans with the community!
>
>

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


Re: FileUpload mucking my response

2015-03-14 Thread Thomas Lefort
Thanks for your answer and the suggestions. I think i solve the issue. The 
trick is that the response is a HTML and the initial payload can be heavily 
changed by the browser... Turns out i was sending a badly formatted json object 
in my response and the browser tried to fix it somehow, hence all the extra 
code. Fixing the json value and putting it between tags solved the issue.

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


FileUpload mucking my response

2015-03-11 Thread Thomas Lefort
I am using FileUpload to retrieve the content of a file.

The response I get is perfect, headers are correct, I use text/html, the 
length is correct.

Everything is fine until I fetch the response using event.getResults(). At 
this point some extra characters are added at the end. It can be several 
hundreds of characters.

Has anybody had this problem before? Is there some gotcha I am not aware 
of? I use GWT 2.6.1.

Thanks!


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


Re: Application with code splitting not working in dev mode

2014-10-11 Thread Thomas Lefort
FOUND IT! Nothing to do with all the previous... It was due to a module I 
created to share code between the different applications. The module is in 
the same project and it messes up the dev mode compilation, but not the 
production compilation for some reason... gash. I don't know if it is 
something to do with Intellij IDEA or the gwt compiler, my hunch is that 
it's more likely to be the former.


On Friday, 10 October 2014 10:09:48 UTC+2, Thomas Lefort wrote:
>
> Thanks Joe.
>
> I removed all split points and I still have the same situation... My dev 
> mode or super dev mode won't work, whilst my compiled code works (although 
> not all compilations work! sometimes it hangs the same).
>
> Re your suggestion, I set my compiler sttings to compile to PRETTY but all 
> I'm getting from my server is the obsfucated version of the nocache file (I 
> use the embedded jetty server). I guess it's the case until I start the Dev 
> Mode On, but it never starts because it can't find the module...
> In any case, I noticed then that the nocache file was an old one (pre my 
> change of sdk from 2.5.1 to 2.6.1), cleaned my directory so that it'd be 
> regenerated. I restarted dev mode and I now have a message in my console 
> ;-) ie the devmode file is missing. For some reason the devmode file isn't 
> created/added to the directory, why would that happend? how can I get back 
> to "normal"?
>
> Looks like it's nothing to do with code splitting but more with something 
> that got messed up when I switched sdks...
>
>
> On 9 October 2014 21:32, Joseph Lust  wrote:
>
>> I meant any errors in the browser. Usually you'll get at least something 
>> the dev JS console. If not, you can compile in pretty mode and step through 
>> your .nocache bootstrap JS file and see how far it gets through there 
>> before failing, since you're not seeing it get to your entry point.
>>
>> In these cases I'm using Super Dev Mode, so that might be different from 
>> your experience.
>>
>> Joe
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Google Web Toolkit" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/google-web-toolkit/DpqEVihJo6E/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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.
>>
>
>

-- 
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: Application with code splitting not working in dev mode

2014-10-10 Thread Thomas Lefort
Thanks Joe.

I removed all split points and I still have the same situation... My dev
mode or super dev mode won't work, whilst my compiled code works (although
not all compilations work! sometimes it hangs the same).

Re your suggestion, I set my compiler sttings to compile to PRETTY but all
I'm getting from my server is the obsfucated version of the nocache file (I
use the embedded jetty server). I guess it's the case until I start the Dev
Mode On, but it never starts because it can't find the module...
In any case, I noticed then that the nocache file was an old one (pre my
change of sdk from 2.5.1 to 2.6.1), cleaned my directory so that it'd be
regenerated. I restarted dev mode and I now have a message in my console
;-) ie the devmode file is missing. For some reason the devmode file isn't
created/added to the directory, why would that happend? how can I get back
to "normal"?

Looks like it's nothing to do with code splitting but more with something
that got messed up when I switched sdks...


On 9 October 2014 21:32, Joseph Lust  wrote:

> I meant any errors in the browser. Usually you'll get at least something
> the dev JS console. If not, you can compile in pretty mode and step through
> your .nocache bootstrap JS file and see how far it gets through there
> before failing, since you're not seeing it get to your entry point.
>
> In these cases I'm using Super Dev Mode, so that might be different from
> your experience.
>
> Joe
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/DpqEVihJo6E/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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.
>

-- 
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: Application with code splitting not working in dev mode

2014-10-09 Thread Thomas Lefort
No trace, nada. The module doesn't get loaded at all. In dev mode I set a
breakpoint first line on the entry point but it never gets to this point. I
have several modules and applications under the same war. The ones without
code splitting are working fine as always, the one with stopped working the
day I added the split points. I sure did some other changes but this is the
most important one.
I will try removing the split points to see if it gets better (quite a lot
of them though, which is why I haven't done it yet).

Apart from that I use intellij idea 13 and gwt 2.6.1
 El 09/10/2014 17:03, "Joseph Lust"  escribió:

> Error messages? Traces?
>
> FWIW, code splitting in GWT-P has always worked 100% for me in DM and SDM.
>
> -Joe
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/DpqEVihJo6E/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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.
>

-- 
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: Application with code splitting not working in dev mode

2014-10-09 Thread Thomas Lefort
Hi,

turns out it doesn't work in SuperDevMode either. I looked at the boot 
sequence and the iframe is never created and the module never loaded by the 
*.nocache.js file (which is loaded fine). So, looks like something is wrong 
with the generation of the bootstrap file. There is no error raised in the 
javascript console. I am not quite where to go from here... any idea of 
something I could test to isolate further the root of my app not loading? I 
still have a strong feeling it is linked to the code splitting, but may be 
not...

Thanks


On Monday, 6 October 2014 14:52:02 UTC+2, Thomas Lefort wrote:
>
> I have a strange problem.
>
> My application runs fine in prod but I can't get it to start in dev mode. 
> This happend from the day I started to add some code splitting into it.
>
> I use gwt 2.6.1. I have used a "pattern" for code splitting which might 
> not go down well with dev mode? The pattern is as follows: I wanted to have 
> my code splitting around groups of activities (ie before login, after 
> login), so I created two abstract activities which call the runAsync in 
> their start method, when the callback is called, the activity overriding 
> this abstract class is started using a new method called startAsync, which 
> effectively does what the start method normally does. Could this be a 
> problem?
>
>
>

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


Application with code splitting not working in dev mode

2014-10-06 Thread Thomas Lefort
I have a strange problem.

My application runs fine in prod but I can't get it to start in dev mode. 
This happend from the day I started to add some code splitting into it.

I use gwt 2.6.1. I have used a "pattern" for code splitting which might not 
go down well with dev mode? The pattern is as follows: I wanted to have my 
code splitting around groups of activities (ie before login, after login), 
so I created two abstract activities which call the runAsync in their start 
method, when the callback is called, the activity overriding this abstract 
class is started using a new method called startAsync, which effectively 
does what the start method normally does. Could this be a problem?


-- 
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: CellTable with "optimal" page size

2014-08-20 Thread Thomas Lefort
I had the same request and went for the easy quick and dirty trick, ie 
override the onresize method.

@Override public void onResize() { super.onResize(); if(dataProvider.getList
().isEmpty() || !dataGrid.isVisible() || (dataGrid.getVisibleItems().size() 
== 0)) { return; } try { int pageStart = pager.getPageStart(); int rowHeight 
= dataGrid.getRowElement(0).getOffsetHeight(); // TODO - find a way to 
calculate the visible part of the rows panel int height = dataGrid.
getOffsetHeight() - 30; //((HeaderPanel) 
(dataGrid.asWidget())).getHeaderWidget().getOffsetHeight(); pager.
setPageSize(Math.max(1, (int) Math.floor((double) height / rowHeight))); 
pager.setPageStart(pageStart); } catch(Exception e) { } } 

As you can see in the code, I have not found a reliable way to get the 
header's size, and fixed it to 30px, there is always a little too much at 
the bottom because of that + the fact that you need an integer number of 
lines (so you will never have it fitting perfectly anyway), but at least it 
gets adjusted to the right number of lines automatically.

On Tuesday, 19 August 2014 18:48:25 UTC+2, Magnus wrote:
>
> I know that someone posted a method here some years ago, but I cannot find 
> it anymore...
>

-- 
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: 'Use capture' equivalent in gwt

2014-06-25 Thread Thomas Lefort
OK, Thanks Jens and Thomas, I will use JSNI then.


On Wednesday, 25 June 2014 00:20:22 UTC+2, Thomas Broyer wrote:
>
>
>
> On Tuesday, June 24, 2014 6:30:54 PM UTC+2, Thomas Lefort wrote:
>>
>> In javascript it is possible to decide whether we want to add a listener 
>> the bubbling way or the capturing way. Is this also possible with GWT? I 
>> have probably overlooked something but I couldn't find anything related in 
>> the docs.
>>
>>
> It doesn't exist because historically Internet Explorer didn't support it.
>
> You could possibly use EventPreview, but it still works in the bubbling 
> phase, it's just triggered before the event is dispatched to a GWT widget.
>
> If you really need to work in the capture phase, you have no other choice, 
> for now, than to use Elemental or JSNI. 
>

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


'Use capture' equivalent in gwt

2014-06-24 Thread Thomas Lefort
In javascript it is possible to decide whether we want to add a listener 
the bubbling way or the capturing way. Is this also possible with GWT? I 
have probably overlooked something but I couldn't find anything related in 
the docs.

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


Re: GWT/JavaScript code generation tool

2013-12-12 Thread Thomas Lefort
What if there were some level of interaction? for instance "tick the types 
supported" whenever it's ambiguous, and then it generates accordingly.


On Wednesday, 11 December 2013 20:19:26 UTC+1, Jens wrote:
>
> For example take the following JS code
>>
>> function doSomething(o){
>>
>> }
>>
>> How would a tool what the type of o is. Object ? Number ? String ? 
>>
>
>
> That's what I thought too and I think thats the reason why such a tool 
> does not exist. JavaScript is too dynamic to make such code generation work 
> reliably.
>
> -- J.
>

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


Re: Help on defered binding with Internet Explorer

2013-09-06 Thread Thomas Lefort
Thanks! makes a lot of sense. Will try the  suggestion.

Regarding the widget replacement, I assumed it was possible to proceed as I 
mentioned by looking at the Popup rule provided @ 
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsDeferred.html
It is true that PopupImpl is not being directly extended indeed. I will 
have to change my implementation.




On Friday, 6 September 2013 12:19:39 UTC+2, Thomas Broyer wrote:
>
>
>
> On Friday, September 6, 2013 11:49:25 AM UTC+2, Thomas Lefort wrote:
>>
>> I have two cases of defered binding not working the way I thought it 
>> would. The problem I have is with IE.
>>
>> 1) I have the following rule:
>>   > class="com.metaaps.webapps.libraries.client.widget.PasswordTextBoxIE8">
>> > class="com.metaaps.webapps.libraries.client.widget.PasswordTextBox"/>
>> 
>>   
>>
>> My assumption is that the class would be replaced ONLY for IE8 browsers, 
>> however it is replaced for ALL IE versions.
>>
>
> Do "ALL IE versions" include IE6/IE7? or only IE8/IE9/IE10/etc. ?
> What matters is not much the "browser version", but the "document mode" it 
> uses (for IE8+).
> There's also the case that ie8 is the fallback for the ie9 permutation, so 
> maybe even if your IE9/IE10 uses the ie9 permutation, it'll fallback to 
> that rule ebcause you don't have any rule targetting the ie9 permutation. 
> Try adding either:
>
>  class="com.metaaps.webapps.libraries.client.widget.PasswordTextBox">
>class="com.metaaps.webapps.libraries.client.widget.PasswordTextBox"/>
>   
> 
>
> or a:
>
> 
>   
> 
>
> to your existing rule.
>  
>
>> 2) I have the following rule:
>>   > class="com.metaaps.webapps.earthimages.client.ui.widget.ResourceWidgetIE9">
>> > class="com.metaaps.webapps.earthimages.client.ui.widget.ResourceWidget"/>
>> 
>>   
>>   
>>   
>> 
>>   
>>
>> ResourceWidget is actually a Generic class.
>>
>> In this case, the ResourceWidget is never replaced by the 
>> ResourceWidgetIE9 in the classes that extend ResourceWidget.
>>
>
> I don't understand.
>
> Is there any obvious mistake in my rules or any limitations of defered 
>> binding I overlooked?
>>
>
>
>1. using deferred binding at the widget level is error-prone. You'd 
>generally extract/abstract differences into an "Impl" class that you 
>GWT.create() *within* your widget, so that it works whether your widget is 
>GWT.create()d or new'd.
>2. deferred binding is about instantiating a different class than the 
>one you passed to GWT.create(). It doesn't mess with class hierarchies (if 
>something extends ResourceWidget, it won't be "rewritten" to extend 
>ResourceWidgetIE9). GWT.create() is a factory, not a "code-rewriting" or 
>"bytecode-rewriting" tool.
>
>

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


Help on defered binding with Internet Explorer

2013-09-06 Thread Thomas Lefort
I have two cases of defered binding not working the way I thought it would. 
The problem I have is with IE.

1) I have the following rule:
  


  

My assumption is that the class would be replaced ONLY for IE8 browsers, 
however it is replaced for ALL IE versions.

2) I have the following rule:
  


  
  
  

  

ResourceWidget is actually a Generic class.

In this case, the ResourceWidget is never replaced by the ResourceWidgetIE9 
in the classes that extend ResourceWidget.

Is there any obvious mistake in my rules or any limitations of defered 
binding I overlooked?

Thanks,

Thomas

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


Re: GWT.create conference - call for presentations

2013-07-08 Thread Thomas Lefort
In addition to the formal presentations, I think it would be nice to run 
some kind of "poster session" - a seperate room with a few tables and 
screens (no printed poster necessary ;-)) - where people can showcase their 
web application and their use of GWT. This would help triggering 
discussions and exchanging best practice + see what can be done with GWT 
these days.

Personally I have been developing a rather large app for the past year (you 
can view some of it in this intro video 
https://www.youtube.com/watch?v=Kycc6O_sAvE) with a good mix of 
technologies. I am an average GWT user and I have no material for a 50mns 
presentation, but I wouldn't mind showing what I've done and sharing ideas 
(and get some advice) around their use of GWT and mine. In fact, I 
sometimes manage to have one to one meet ups with other companies and 
people using GWT in Madrid (where I am based) and the discussions are 
always very interesting (and useful).



On Sunday, 7 July 2013 10:11:51 UTC+2, Joonas Lehtinen wrote:
>
>
>
> Sounds very interesting. Could you submit presentation proposal through 
> the CFP form on the gwtcreate.com website?
>

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




Re: Composite with Image

2013-07-05 Thread Thomas Lefort
Correct. Thanks for the precious help. That's quite a few gotchas in the 
end.


On Friday, 5 July 2013 14:29:38 UTC+2, Jens wrote:
>
> Try adding styles after setResource and not before. If I remember 
> correctly setResource() causes the  tag to be replaced with a new one. 
> If you dont want that, put the image into a container and add the styles to 
> the container. In CSS you can then do ".imageContainer img {  }".
>
> -- J.
>

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




Re: Composite with Image

2013-07-05 Thread Thomas Lefort
You are a genius ;-)

This takes me to my next problem. I cannot add a style name or modify the 
styling.

If I do,

image.addStyleName("stylename");

No style is applied to the image and the class attribute is empty. My 
understanding with Composite is that the style name should be applied to 
the top widget, so in this case to the image widget.

Any idea?



On Friday, 5 July 2013 12:48:57 UTC+2, Jens wrote:
>
> I think Images must be attached to the DOM before you can use 
> setResource(). So try
>
> image = new TestImage();
> panel.add(image); //panel should also be attached to DOM
> image.setResource(xxx);
>
>
> -- J.
>

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




Composite with Image

2013-07-05 Thread Thomas Lefort
For some reason, I need to have a class extending composite with only an 
image inside. When I use it I can never get the image to display + other 
strange behaviours. So I simplified the code and it turns out even the code 
below doesn't display anything. Is it possible to composite with an Image?

public class TestImage extends Composite {

public TestImage(){
initWidget(new Image());
}

public void setResource(ImageResource resource) {
((Image) getWidget()).setResource(resource);
}

}

image = new TestImage();
image.setResource(xxx);
panel.add(image);

The image is there but no resource is being displayed.
I am sure it is somethign pretty trivial that I have overlooked.

-- 
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: Sharing styles between uibinders declarations

2013-05-30 Thread Thomas Lefort
Thanks Thomas,

I gather that it is not possible then. I will follow your advice.

Still I think it could be a nice to have feature. Do you think it is worth 
to put a request for that?


On Thursday, 30 May 2013 13:42:39 UTC+2, Thomas Broyer wrote:
>
>
>
> On Thursday, May 30, 2013 1:29:46 PM UTC+2, Thomas Lefort wrote:
>>
>> Hi,
>>
>> I am trying to do something that I believe should be possible.
>>
>> I am defining in one widget a number of css rules which I would like to 
>> share with another widget. I could make those rules available using 
>> @external but I'd rather not. What I would like to do is to export those 
>> rules to my widget class (using a MyStyle) and then import those rules into 
>> my second widget using the > /> uibinder tag.
>>
>> I tried teh above but I am getting a "Deferred binding result type 
>> xxx.MyStyle should not be abstract". I tried forcing it using a GWT.create, 
>> although I am pretty convinced that it is not needed. But it still fails.
>>
>> If anybody can provide me some directions as to why this is not working? 
>> can it work or should I do it differently?
>>
>
> If you want to share a CssResource between UiBinder templates, then don't 
> use the implicit one created by . Use an explicit one within an 
> explicit ClientBundle that you'll be able to reference with  (make 
> sure you call ensureInjected() in your Java code though!)
>
> If you don't mind duplicated code in the generated output, you can also 
> just use the src="" attribute of  to reference a shared CSS file 
> (this works best for @defs, when nothing will actually be duplicated).
>

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




Sharing styles between uibinders declarations

2013-05-30 Thread Thomas Lefort
Hi,

I am trying to do something that I believe should be possible.

I am defining in one widget a number of css rules which I would like to 
share with another widget. I could make those rules available using 
@external but I'd rather not. What I would like to do is to export those 
rules to my widget class (using a MyStyle) and then import those rules into 
my second widget using the  uibinder tag.

I tried teh above but I am getting a "Deferred binding result type 
xxx.MyStyle should not be abstract". I tried forcing it using a GWT.create, 
although I am pretty convinced that it is not needed. But it still fails.

If anybody can provide me some directions as to why this is not working? 
can it work or should I do it differently?

Thanks

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




Support for Composite Icons like Eclipse Decorators

2013-03-22 Thread Thomas Lefort
I have the need for composite icons, kind of like the Eclipse Decorators. I 
have objects displayed in a tree with a standard icon. The objects can be 
in different states, and to illustrate this, I would like some additional 
(smaller) icon to be overlayed on top of the standard icon.

Is there an off the shelf solution for this, eg existing extended Image 
class, or some compile time wizzardy with resources?

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




Detecting client connection closed with RPC call

2013-03-21 Thread Thomas Lefort
How could I detect a client connection has closed in my RPC server code? As 
far as I understand from the code, the RPC code (the one in the server side 
RPC method) will never see any of the exceptions thrown when sending the 
data, eg IOException... I would typically need this for long polls or for 
calls that could last a while (call to another server).

-- 
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: I/O 2013 - GWT Sessions?

2013-03-07 Thread Thomas Lefort
+1 too, definitely makes more sense now


On Thursday, 7 March 2013 06:32:31 UTC+1, James Horsley wrote:
>
> +1 for a separate GWT convention
>
>
> On 7 March 2013 06:06, Steve > wrote:
>
>> Now that GWT is more community run, I think it would be better if we just 
>> had our own convention...
>>
>> I went to the second I/O, and GWT was all over the place. Then each year 
>> after there were fewer and fewer session, more free swag, and an android 
>> push. On top of that, there is such a media hype about the event nowadays 
>> that it's become less and less about developers and more and more about 
>> "Oh, look what we did! And here's some free stuff! Not a developer? No 
>> problem! See the show! Here's some more free stuff!".
>>
>> It's a shame. I don't even think all of the GWT session videos made it up 
>> on youtube. They had some great pointers...
>>
>>
>>
>> On Wednesday, March 6, 2013 5:56:52 PM UTC-5, 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-we...@googlegroups.com
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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




Requestbuilder problem?

2013-02-25 Thread Thomas Lefort
I initially posted this question 
on 
SO, thinking that it was more something on HTTP headers, but I played with 
http headers without success and I am now thinking it could be a 
requestbuilder issue.

Essentially, I am sending some (gzipped file) binary data read using the 
HTML5 File Reader API to my server via a requestbuilder call. When I set 
the setRequestData, the content is fine. I debug in all the way to the js 
and the content is fine. However the server side payload received is much 
larger 1.5 to 2 times the size of the content I set (the unzipped file is 
10x the size). Also the firebug payload (in the net tab) says it's 1.5-2 
times the size. Looks as if when the actual ajax request is made, the 
payload is somehow increased with additional data. I checked the payload 
and the payload actually looks fine! It's as if the end of the message 
cannot be found somehow. This only happens with binary data files, text 
file is fine.

All this is in dev mode.

If anybody has the slightest idea or a suggestion to make?

Thanks in advance,

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




Re: Using a proxy in dev mode

2013-02-22 Thread Thomas Lefort
Thanks Jens, looks like it was pretty straightforward. Will give it a try 
asap then.

On Thursday, 21 February 2013 10:44:49 UTC+1, Jens wrote:
>
> I am developing on Mac and I am using the bundled apache server as proxy. 
> The document root is my project's war folder and server requests are 
> proxied to the backend. The backend could be an external server or the 
> embedded jetty that comes with GWT. You could also configure multiple 
> vhosts along with corresponding host entries in /etc/hosts and different 
> server proxy rules, e.g. https://app.embedded.local proxies to jetty and 
> https://app.remote.local proxies to an external server or something like 
> that.
>
> In production we use nginx instead of apache in front of our app servers 
> to serve static content and to proxy server request to the backend using 
> nginx load balancing. 
>
> Works pretty well for us.
>
> -- J.
>

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




Re: Object deep copy or serialization

2013-02-22 Thread Thomas Lefort
Sorry for reviving this thread. I do have a recurring need for 
duplicating/cloning (shallow and deep) objects, so I would be interested in 
a (elegant) solution (for both).

1. (not very elegant) I have tried to do serialize/deserialize using my rpc 
TypeOracle etc... but I have the effect mentioned by Thomas.

2. if we could, via an annotation automatically generate a constructor 
(kind of like in lombok) taking an object and duplicating the field, eg

public T(T original, boolean shallow) {
  field1 = original.field1;
  // etc... + recursively copy if !shallow && is an object that has the 
said annotation
}

we could also add an annotation to filter the fields that should not be 
copied, the fields that shoudl never be deep copied, etc...

1 would have the advantage of not generating any extra code for each class 
but is quite resource intensive + does not allow for deep/shallow copies

2 would do it for me, unless there is a glitch that I missed somewhere.

With auto beans I need to write down an interface, etc... which defeats the 
point for me. I just want to be able to duplicate objects without having to 
maintain an interface.

Any thoughts/comments are very welcome ;-)




On Wednesday, 7 December 2011 11:34:46 UTC+1, Thomas Broyer wrote:
>
> Just an additional note to what others said: GWT-RPC serialization is 
> asymmetric, to have the best (but still rather poor) performance on the 
> client; so you cannot use 
> SerializationStreamReader/SerializationStreamWriter to clone an object by 
> roundtripping on the client-side.

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




Using a proxy in dev mode

2013-02-21 Thread Thomas Lefort
In my prod setup I would like to have a proxy (nginx, apache), in front of 
my jetty server, to handle the https, static file transfer, etc...
In dev mode I would like to have the same setup, but only install the proxy 
and use the existing embedded jetty. I would also like to be able to not 
use the proxy sometimes.

Before I start diving into doc + attempts, is there an obvious reason why 
this would not be possible? has anyone set up such a configuration before? 
any recommendations?

Thanks

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




load indicator when loading application

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

Thanks,

Thomas

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




Re: Parametrized Css class

2013-01-09 Thread Thomas Lefort
That's indeed what I would need ;-) Thanks.


On Wednesday, 9 January 2013 14:43:23 UTC+1, Thomas Broyer wrote:
>
> No.
>
> All the additions of CssResource to CSS are listed in the documentation: 
> https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle#CssResource
>
> There's been some discussion about integrating Closure Stylesheets with 
> ClientBundle but I don't think anyone started working on it. Closure 
> Stylesheets adds mixins to CSS: 
> https://code.google.com/p/closure-stylesheets/#Mixins
>
> On Wednesday, January 9, 2013 1:21:56 PM UTC+1, Thomas Lefort wrote:
>>
>> Hi,
>>
>> Is it possible to define a parametrizable css class? Something like this:
>>
>> .paramClass(value) {
>>width: value;
>>height: value;
>> }
>>
>> and the in uiBinder have:
>>
>> 
>>
>> Thanks,
>>
>> Thomas
>>
>>

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



Parametrized Css class

2013-01-09 Thread Thomas Lefort
Hi,

Is it possible to define a parametrizable css class? Something like this:

.paramClass(value) {
   width: value;
   height: value;
}

and the in uiBinder have:



Thanks,

Thomas

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



Business engine for gwt

2012-12-20 Thread Thomas Lefort
Hi,

I need some authorized users to be able to define a set of rules through my 
web application to be used by other users, eg price, automatic selection 
and configuration of objects, etc... I could do with a small lightweight 
rule based engine that could run on both the client and server side, 
obviously in Java. What I need really is simple - if then else - 
statements, logical and arithmetic operators, and nothing more. The rules 
will input and output either numbers, dates, strings or arrays of those. I 
don't necessarily need fancy interfaces, could be text based for instance, 
and I'd like the rules to be sent back and forth to the server as strings, 
eg "function ruleA(a, b, c) if (a + b + c) < 100 then return [1000, 10]". I 
don't need any mapping or updating of my database, it's really just to 
provide information to the user - running the code rules from the web 
application or from the server.

I have looked at various solutions and I am now focusing on MVEL 
(https://github.com/mikebrock/mvel) but also keeping an eye on making my 
own one.

Before I go too deep into all this, I'd like to know if someone has been 
working on a similar topic in the list and if they had any recommendations 
for me?

Thanks,

Thomas

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



Re: Cancelling an event handler within another event handler

2012-11-20 Thread Thomas Lefort
Your solution works indeed but in the end I decided to override the 
onBrowser event with a first filter to check for click on images.

Thanks again for helping out.


El 19/11/2012 23:43, Thomas Broyer escribió:



On Monday, November 19, 2012 10:34:37 PM UTC+1, Thomas Lefort wrote:

Thanks Thomas. Unfortunately i cannot prevent the use of
addDomHandler on the widget.


Well, because the image is a child widget, you can stopPropagation() 
from your handler to prevent the click to bubble up to your widget; 
and delegate the event to the handlers otherwise, or something like that.


The thing is: you cannot prevent "other handlers" on the same widget 
to be triggered from within a handler, so you have to split those 
handlers in two buckets.


Or possibly wrap the "external" handlers into ones that check a flag 
in the widget to conditionally delegate to the "real" handler, and 
have the first ("internal") handler set that flag; but IMO using two 
buckets is the cleanest solution.

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

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.


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



Cancelling an event handler within another event handler

2012-11-19 Thread Thomas Lefort
I have potentially several click handlers on a widget. The first one is 
used to capture click events on an image (then the event is fired on the 
image) within the widget and created at creation time. The other ones are 
added "outside" of the widget's code.

I would like to cancel (not remove) the other handlers if it's the image 
that is being clicked but I just can't find a way to do so. Any help would 
be appreciated.

Here's the code I use... for some reason if I don't capture teh click and 
fire the event on the image (in the constructor) it just doesn't trigger 
the event. May be if I can solve that problem another way to start with? I 
have the feeling the issue comes form the DOM.appendChild.

public class IconAnchorActions extends IconAnchor {

private List actions = new ArrayList();

public IconAnchorActions(){
super();
addClickHandler(new ClickHandler() {

@Override
public void onClick(ClickEvent event) {
for(Image image : actions) {

if(event.getNativeEvent().getEventTarget().equals(image.getElement())) {
image.fireEvent(new GwtEvent() {
@Override
public 
com.google.gwt.event.shared.GwtEvent.Type getAssociatedType() 
{
return ClickEvent.getType();
}
@Override
protected void dispatch(ClickHandler handler) {
handler.onClick(null);
}
});
event.stopPropagation();
return;
}
}
}
});
}

public void addClickAction(ImageResource imageResource, ClickHandler 
clickHandler, boolean left) {
Image image  = new Image(imageResource);
actions.add(image);

image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
if(left) {
image.getElement().getStyle().setFloat(Float.LEFT);
span.getStyle().setMarginLeft(5, Unit.PX);
} else {
image.getElement().getStyle().setFloat(Float.RIGHT);
span.getStyle().setMarginRight(5, Unit.PX);
}
image.getElement().getStyle().setCursor(Cursor.POINTER);
image.addClickHandler(clickHandler);
DOM.appendChild(getElement(), image.getElement());
}

}

-- 
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/-/4VLv8cqG9Y8J.
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.



Re: What is a correct way to override GWT default CSS style for widget?

2012-11-18 Thread Thomas Lefort
Personally I use @external, either in my uibinder files, ie for a specific 
widget, or in a separate css that I inject at startup via my ClientBundle.

I don't know if it is "optimal" but it works well and is convenient.


On Sunday, 18 November 2012 01:45:30 UTC+1, Dimitrijević Ivan wrote:
>
> What is a correct way to override GWT default CSS style for widget?
>
> In documentation listed bellow, both ways (Including Style sheets in the 
> HTML Host Page, Including Style sheets in the Module XML file) 
> aredepricated.
>
> https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCss
>
>
>

-- 
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/-/qenNiXAbO-UJ.
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.



Ensuring popup is on top

2012-11-13 Thread Thomas Lefort
I have a use case where I do need to show one dialog on top of the other. 
The problem is that those dialogs are reused across the application and if 
the one that should be on top for the use case happens to have been open 
(in another use case) before the one that should be below, it is not 
visible (covered by the other one) because (I believe) it was inserted in 
the DOM before.

Is there an obvious way of doing this? Currently, the two strategies I can 
think of to make sure the show method could always ensure that a dialog is 
on top of the others are the following:
- zindex, scanning the list of open popups and check for the higfhest 
zindex and setting the zindex of the one I am showing to zindex + 1
- detach/reattach the popup to the DOM.

I gave a quick try to the later one using the following code, which seems 
to work:
@Override
public void show() {
Widget parent = getParent();
if(parent instanceof Panel) {
((Panel) parent).remove(this);
((Panel) parent).add(this);
}
// blabla do the rest
}

Any idea if this detach/reattach strategy can have any side effect?


-- 
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/-/V3-pRXF2GUMJ.
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.



Re: onSubmitCompleted issue?

2012-11-12 Thread Thomas Lefort
Hi Thomas,

Thanks for the suggestion. I would have never thought of something like 
that! I tried your suggestion but unfortunately without success. That said, 
discussing always generates ideas and I had another look at the code. It 
turned out to be much more trivial than that: I was hiding the form panel 
before the submit completed handler is called... I guess I should have 
posted the whole code (a bit long though) ;-) I changed the implementation 
and it looks like it is working now. (it doesn't explain how it still 
managed to work sometimes though).

I kept your suggestion to avoid content sniffing issues in the future. 
Thanks again for a great help!



On Monday, 12 November 2012 13:47:05 UTC+1, Thomas Broyer wrote:
>
> Because Content-Types are so often wrong on the internet (particularly 
> when set to text/html or text/plain), browsers use 
> content-sniffing<http://mimesniff.spec.whatwg.org/>. 
> Because your response does not look like HTML, it might very-well be 
> sniffed as text/plain by the browser, which will then skip the 
> onSubmitComplete.
> Try prepending "" to your response so that browsers will 
> "sniff" it as text/html (or in other words, send back HTML, not something 
> that's only *labelled* as being HTML)
>
> On Monday, November 12, 2012 1:11:48 PM UTC+1, Thomas Lefort wrote:
>>
>> I implemented a simple image uploader which relies on the form panel. I 
>> pass an image file via a filupload widget and a multipart encoding to the 
>> server which then processes the image, stores it on the disk and returns 
>> the image file path as a text/html response. On the client side I have an 
>> onSubmitCompleted event handler that sets the image widget url to the one 
>> returned by the servlet.
>>
>> The onSubmitCompleted handler is sometimes (actually quite often) not 
>> called. I checked with firebug, the servlet does return the right file 
>> path, the image is stored, etc... The servlet also gets fully executed with 
>> no error (checked with various traces). I have the behavior for (at least) 
>> FF16. I have the issue in hosted mode or in compiled ran locally (with the 
>> embedded jetty).
>>
>> Here's my servlet code:
>>
>> @Override
>> protected void doPost(HttpServletRequest request, HttpServletResponse 
>> response)  throws ServletException, IOException {
>> response.setContentType("text/html");
>> PrintWriter writer = response.getWriter();
>> try {
>> // default values for width and height
>> int width = 50;
>> int height = 50;
>> InputStream filecontent = null;
>> String saveFile = null;
>> List items = new ServletFileUpload(new 
>> DiskFileItemFactory()).parseRequest(request);
>> for (FileItem item : items) {
>> if (item.isFormField()) {
>> String fieldName = item.getFieldName();
>> String fieldValue = item.getString();
>> if(fieldName.equalsIgnoreCase("width")) {
>> width = Integer.parseInt(fieldValue);
>> }
>> if(fieldName.equalsIgnoreCase("height")) {
>> height = Integer.parseInt(fieldValue);
>> }
>> } else {
>> String fieldName = item.getFieldName();
>> saveFile = FilenameUtils.getName(item.getName());
>> if(fieldName.equalsIgnoreCase("image")) {
>> filecontent = item.getInputStream();
>> }
>> }
>> }
>> // check values
>> if(filecontent == null) {
>> throw new FileNotFoundException("no file provided");
>> }
>> // Process the input stream
>> ByteArrayOutputStream out = new ByteArrayOutputStream();
>> int len;
>> byte[] buffer = new byte[8192];
>> while ((len = filecontent.read(buffer, 0, buffer.length)) != 
>> -1) {
>> out.write(buffer, 0, len);
>> }
>>
>> String imagePath = processAndStoreImage(out, saveFile, width, 
>> height);
>> System.out.println(imagePath);
>> 
>> // return the url of the file
>> writer.println(imagePath);
>>
>>  } catch (Exception e) {
>> 

onSubmitCompleted issue?

2012-11-12 Thread Thomas Lefort
I implemented a simple image uploader which relies on the form panel. I 
pass an image file via a filupload widget and a multipart encoding to the 
server which then processes the image, stores it on the disk and returns 
the image file path as a text/html response. On the client side I have an 
onSubmitCompleted event handler that sets the image widget url to the one 
returned by the servlet.

The onSubmitCompleted handler is sometimes (actually quite often) not 
called. I checked with firebug, the servlet does return the right file 
path, the image is stored, etc... The servlet also gets fully executed with 
no error (checked with various traces). I have the behavior for (at least) 
FF16. I have the issue in hosted mode or in compiled ran locally (with the 
embedded jetty).

Here's my servlet code:

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse 
response)  throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
try {
// default values for width and height
int width = 50;
int height = 50;
InputStream filecontent = null;
String saveFile = null;
List items = new ServletFileUpload(new 
DiskFileItemFactory()).parseRequest(request);
for (FileItem item : items) {
if (item.isFormField()) {
String fieldName = item.getFieldName();
String fieldValue = item.getString();
if(fieldName.equalsIgnoreCase("width")) {
width = Integer.parseInt(fieldValue);
}
if(fieldName.equalsIgnoreCase("height")) {
height = Integer.parseInt(fieldValue);
}
} else {
String fieldName = item.getFieldName();
saveFile = FilenameUtils.getName(item.getName());
if(fieldName.equalsIgnoreCase("image")) {
filecontent = item.getInputStream();
}
}
}
// check values
if(filecontent == null) {
throw new FileNotFoundException("no file provided");
}
// Process the input stream
ByteArrayOutputStream out = new ByteArrayOutputStream();
int len;
byte[] buffer = new byte[8192];
while ((len = filecontent.read(buffer, 0, buffer.length)) != 
-1) {
out.write(buffer, 0, len);
}

String imagePath = processAndStoreImage(out, saveFile, width, 
height);
System.out.println(imagePath);

// return the url of the file
writer.println(imagePath);

 } catch (Exception e) {
writeError(writer, "Error whilst processing and storing 
image.");
} finally {
writer.flush();
writer.close();
}

}

and the onSubmitHandler

imageForm.addSubmitCompleteHandler(new 
FormPanel.SubmitCompleteHandler() {
public void onSubmitComplete(SubmitCompleteEvent event) {
final String result = event.getResults();
// update thumbnail view with new image
thumbnailImage.setUrl(result);
Window.alert("YES");
}
});




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



Re: Problem to deploy application after upgrade to 2.5

2012-11-09 Thread Thomas Lefort
Following the post 
https://groups.google.com/forum/#!msg/google-web-toolkit/DUwXLpyMmbk/zSk2-qEXO44J
- I had a spurious requestfactory-servlet jar in my libs, I removed it and 
it worked.


On Friday, 9 November 2012 13:56:55 UTC+1, Thomas Lefort wrote:
>
> I upgraded to 2.5 recently. Everything works fine in hosted mode, but when 
> I compiled and deployed under jetty 6.x I get the following error:
>
> Exception while dispatching incoming RPC call 
> java.lang.NoSuchFieldError: CHARSET_UTF8 
>at 
> com.google.gwt.user.server.rpc.impl.SerializabilityUtil.generateSerializationSignature(SerializabilityUtil.java:862)
>  
>
>
> Any idea?
>
>

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



Problem to deploy application after upgrade to 2.5

2012-11-09 Thread Thomas Lefort
I upgraded to 2.5 recently. Everything works fine in hosted mode, but when 
I compiled and deployed under jetty 6.x I get the following error:

Exception while dispatching incoming RPC call 
java.lang.NoSuchFieldError: CHARSET_UTF8 
   at 
com.google.gwt.user.server.rpc.impl.SerializabilityUtil.generateSerializationSignature(SerializabilityUtil.java:862)
 


Any idea?

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



Re: Compile report

2012-10-19 Thread Thomas Lefort
Makes perfect sense! Thanks for the quick reply.


On Friday, 19 October 2012 13:46:21 UTC+2, Jens wrote:
>
> These are Java's anonymous classes. Activities/Presenters typically have 
> quite a few of them because of Callback implementations.
>
> class MyActivity {
>   doStuff() {
>  service.call(new AsyncCallback() {
>  //implement
>  });
>   }
> }
>
> will result in Activity$1 because of anonymous AsyncCallback 
> implementation.
>
> -- J.
>

-- 
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/-/1c7Zt7cu2ccJ.
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.



Compile report

2012-10-19 Thread Thomas Lefort
In my compile report I get a lot of
packageX.ClassZ$1
packageX.ClassZ$2
packageX.ClassZ$3
etc...

for some classes I can have up to 30 x the "$number" ending. If I add
up it can make quite a large size of code for one class.

I (google) checked but the only thing I found on these is code
splitting, which I don't (yet) do.

Can anybody explain what they are for?

Thanks,

Thomas

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



Extending GwtTransient

2012-10-10 Thread Thomas Lefort
I would like to extend GwtTransient to allow for parametrized serialisation 
in gwt rpc. The main use case is to send different version of the same 
object (with more or less data filled in) based on the call being made or 
on the type of user making the call.

My idea, right now (just an early chain of thoughts), is to add two 
parameters to the GwtTransient annotation which would be, let's say, 
"level" and "subLevel". It should be possible to specify several 
annotations on one field so it would be something like:


public @interface GwtTransient {
Levels[] value();
}

and

public @interface Levels {
String level();
String subLevel();
}

An example us of the annotation would be:

@GwtTransient({@Level(level="one"), @Level(level="two", 
subLevel="anotherLevel")})
public Object field1;

A "level" parameter needs to be set for the serialisation so that the 
serialisation process knows which level to use. This could be done for instance 
by adding a "level" field to the class being serialised and set the it to the 
corresponding value before returning it in the call (any other/better idea is 
very welcome ;-)).


Levels would work the following way:
WHEN SERIALISING (and vice versa)
for each field, check annotation
1) no annotation, the field is always serialised
2) an annotation is specified.
2.1) The level used for the call is not included in the list, the field is 
serialised.
2.2) The level used is included...
2.2.1) no subLevel is specified, the field is NOT serialised
2.2.2) a subLevel is specified, the field is serialised with the 
corresponding level (cascading of serialisation rules)

It is important to note that there would only be one client object. As with 
the existing GwtTransient, some fields would not be "filled in".

This is basically the idea. Before I dive into the details, I would like to 
check with the community if:
1) has this or something equivalent been done before?
2) can you see any major flaw or even showstopper with the idea?
3) do you have any pointers on how to get started to implement this?

Thanks,

Regards,

Thomas

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



Re: Open new tab in dev mode with window.open

2012-09-11 Thread Thomas Lefort
fireEvent -> Oh I see, makes perfect sense! Thanks.

click -> I can't get it to work unfortunately, the object has no
'click' method, both using ButtonElement cast and JSNI
element.click(). I feel a bit useless there, if you have a little more
patience to detail your solution? Thanks.

tab -> I agree the browsers settings and behavior will define the
behavior. However in my case if I click on an anchor with teh _blank
target, it opens in a new tab. I am trying to reproduce the same
programatically but instead of getting a new tab I get a new window
with no navigation butttons or else, just the URL bar.

This is my code for the anchor

AnchorElement anchor = 
DOM.createAnchor().cast();
anchor.setHref("#EISearchResultPlace:" + 
result);
anchor.setTarget("_blank");
clickAnchor(anchor);

public static native void clickAnchor(Element element)/*-{
element.click();
}-*/;


On 11 September 2012 18:43, Thomas Broyer  wrote:
>
>
> On Tuesday, September 11, 2012 6:16:43 PM UTC+2, Thomas Lefort wrote:
>>
>> Hi,
>>
>> Thanks to both of you.
>>
>> Regarding teh anchor, I did try with the following code, but it still
>> doesn't work.
>>
>> Anchor anchor = new Anchor();
>> anchor.setHref("#EISearchResultPlace:" + result);
>> anchor.setTarget("_blank");
>> anchor.setVisible(false);
>> RootPanel.get().add(anchor);
>> anchor.fireEvent(new GwtEvent() {
>>
>> @Override
>> public com.google.gwt.event.shared.GwtEvent.Type
>> getAssociatedType() {
>> return ClickEvent.getType();
>> }
>>
>> @Override
>> protected void dispatch(ClickHandler handler) {
>> handler.onClick(null);
>> }
>> });
>
>
> fireEvent() is a GWT-ism, it does not dispatch an event to the element;
> there's absolutely no event going on in the browser with fireEvent.
> First, you should use an AnchorElement which is lighter-weight than an
> Anchor widget, then simply use JSNI to call the click() method (or, without
> JSNI: cast() to a ButtonElement)
>
>
>> I tried the URL trick from Thomas (1st suggestion) and it does work fine
>> wrt the URL, so that's one porblem solved, thanks! but the window is still
>> some stripped down version of my initial Chrome window and it is a window,
>> not a tab...
>
>
> You cannot force opening in a new tab or window, it all depends on the
> browser's configuration. In other words, it's at the user's discretion, and
> should stay that way (you'll find numerous discussions at the WHATWG or W3C
> HTML WG when people proposed adding a new _blankTab or similarly-named
> token, or new attributes on  to ask for a new tab rather than window, or
> control this through CSS, etc.)
>
> --
> 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/-/mjR6F7jYTIYJ.
>
> 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.

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



Re: Meteor DDP - or similar - with GWT?

2012-09-11 Thread Thomas Lefort
Yes, thanks.

In the end I made my own server push based on some code I had (using long 
polling). It's the long and hard way but I couldn't bend enough the 
different libraries available to support what I want to do.


On Friday, 7 September 2012 01:07:08 UTC+2, Andrea Boscolo wrote:
>
> I used it in a past project and it was simple and easy enough. Seems also 
> to be relatively up to date.
> There is also atmosphere that carries a gwt client side module with also 
> out of the box experimental support for websockets and much more: 
> https://github.com/Atmosphere/atmosphere/tree/master/modules
>

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



Re: Open new tab in dev mode with window.open

2012-09-11 Thread Thomas Lefort
Hi,

Thanks to both of you.

Regarding teh anchor, I did try with the following code, but it still 
doesn't work.

Anchor anchor = new Anchor();
anchor.setHref("#EISearchResultPlace:" + result);
anchor.setTarget("_blank");
anchor.setVisible(false);
RootPanel.get().add(anchor);
anchor.fireEvent(new GwtEvent() {

@Override
public com.google.gwt.event.shared.GwtEvent.Type 
getAssociatedType() {
return ClickEvent.getType();
}

@Override
protected void dispatch(ClickHandler handler) {
handler.onClick(null);
}
 });

I tried the URL trick from Thomas (1st suggestion) and it does work fine 
wrt the URL, so that's one porblem solved, thanks! but the window is still 
some stripped down version of my initial Chrome window and it is a window, 
not a tab...




On Tuesday, 11 September 2012 16:37:56 UTC+2, Thomas Broyer wrote:
>
>
> On Tuesday, September 11, 2012 4:08:46 PM UTC+2, Thomas Lefort wrote:
>>
>> Hi,
>>
>> I am trying to programatically open a new tab in dev mode with a new 
>> instance of my application, eg my application url + the place name. I use 
>> window.open("#myplacename:", "_blank"). But all I get is a window without 
>> any of the specs/options such as navigation, etc... also the url is wrong, 
>> it links to the hosted.html file.
>>
>> If I set the href and teh target of an anchor tag to the same values, 
>> there is no problem. It's really with the Windows.open that it fails. I 
>> also tried with a jsni, eg window.open(url, '_blank') but with the same 
>> issue.
>>
>> If anybody has an idea of what could possibly be wrong and why it works 
>> with an anchor but not with window.open, it would be very much appreciated.
>>
>
> How 
> about 
> Window.open(Window.Location.createUrlBuilder().setHash("#myplacename:").buildString(),
>  
> "_blank", "") ?
> (or using string manipulation on Window.Location.getHref() to 
> append/replace the hash)
>

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



Open new tab in dev mode with window.open

2012-09-11 Thread Thomas Lefort
Hi,

I am trying to programatically open a new tab in dev mode with a new 
instance of my application, eg my application url + the place name. I use 
window.open("#myplacename:", "_blank"). But all I get is a window without 
any of the specs/options such as navigation, etc... also the url is wrong, 
it links to the hosted.html file.

If I set the href and teh target of an anchor tag to the same values, there 
is no problem. It's really with the Windows.open that it fails. I also 
tried with a jsni, eg window.open(url, '_blank') but with the same issue.

If anybody has an idea of what could possibly be wrong and why it works 
with an anchor but not with window.open, it would be very much appreciated.

Thanks,

Thomas

-- 
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/-/IpENeXLy-4AJ.
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.



Re: Meteor DDP - or similar - with GWT?

2012-09-05 Thread Thomas Lefort
Another one... GWTEventService 
http://code.google.com/p/gwteventservice/wiki/StartPage
If anyine has used it and has an opinion, I am interested.



On Monday, 3 September 2012 23:29:23 UTC+2, nino wrote:
>
> I like Errai a bit more :)
>
> 2012/9/3 Thomas Lefort >
>
>> I also found an "old" project called GWT StreamHub 
>> http://code.google.com/p/gwt-comet-streamhub/
>>
>>
>>
>>
>> On Monday, September 3, 2012 1:24:38 PM UTC+2, Thomas Lefort wrote:
>>>
>>> I am looking at Errai CDI right now, thanks for your suggestion.
>>>
>>> On Monday, 3 September 2012 10:36:16 UTC+2, nino wrote:
>>>>
>>>> Have u had u look at errai from RedHat ?
>>>> On Sep 3, 2012 10:29 AM, "Thomas Lefort"  wrote:
>>>>
>>>>> Anybody aware of a gwt library that would provide a publish/subscribe 
>>>>> mechanism similar to the Meteor DDP? eg for live updates of clients when 
>>>>> the database gets updated.
>>>>>
>>>>>  -- 
>>>>> 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/-/**YfqQJEQYhEcJ<https://groups.google.com/d/msg/google-web-toolkit/-/YfqQJEQYhEcJ>
>>>>> .
>>>>> To post to this group, send email to google-we...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to google-web-toolkit+**
>>>>> unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at http://groups.google.com/**
>>>>> group/google-web-toolkit?hl=en<http://groups.google.com/group/google-web-toolkit?hl=en>
>>>>> **.
>>>>>
>>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google Web Toolkit" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/google-web-toolkit/-/5zSU04Po3L4J.
>>
>> To post to this group, send email to 
>> google-we...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/72YoBMykWLwJ.
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.



Re: Meteor DDP - or similar - with GWT?

2012-09-03 Thread Thomas Lefort
I also found an "old" project called GWT StreamHub 
http://code.google.com/p/gwt-comet-streamhub/



On Monday, September 3, 2012 1:24:38 PM UTC+2, Thomas Lefort wrote:
>
> I am looking at Errai CDI right now, thanks for your suggestion.
>
> On Monday, 3 September 2012 10:36:16 UTC+2, nino wrote:
>>
>> Have u had u look at errai from RedHat ?
>> On Sep 3, 2012 10:29 AM, "Thomas Lefort"  wrote:
>>
>>> Anybody aware of a gwt library that would provide a publish/subscribe 
>>> mechanism similar to the Meteor DDP? eg for live updates of clients when 
>>> the database gets updated.
>>>
>>>  -- 
>>> 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/-/YfqQJEQYhEcJ.
>>> To post to this group, send email to google-we...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5zSU04Po3L4J.
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.



Re: Meteor DDP - or similar - with GWT?

2012-09-03 Thread Thomas Lefort
I am looking at Errai CDI right now, thanks for your suggestion.

On Monday, 3 September 2012 10:36:16 UTC+2, nino wrote:
>
> Have u had u look at errai from RedHat ?
> On Sep 3, 2012 10:29 AM, "Thomas Lefort" > 
> wrote:
>
>> Anybody aware of a gwt library that would provide a publish/subscribe 
>> mechanism similar to the Meteor DDP? eg for live updates of clients when 
>> the database gets updated.
>>
>>  -- 
>> 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/-/YfqQJEQYhEcJ.
>> To post to this group, send email to 
>> google-we...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com .
>> For more options, visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/91QhxA4yeP4J.
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.



Meteor DDP - or similar - with GWT?

2012-09-03 Thread Thomas Lefort
Anybody aware of a gwt library that would provide a publish/subscribe 
mechanism similar to the Meteor DDP? eg for live updates of clients when 
the database gets updated.

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



Re: DragOverEvent issue

2012-07-27 Thread Thomas Lefort
OK, but you mentioned that it might not be supported by all browsers? I
might give it a try but it sounds like I could be going into murky waters.


On 27 July 2012 17:37, Thomas Broyer  wrote:

> JSNI to access the "types" property of the DataTransfer object?
> (along with using specific types to distinguish different types of data,
> rather than inferring from the content for a single type)
>
>
> On Friday, July 27, 2012 5:27:22 PM UTC+2, Thomas Lefort wrote:
>>
>> OK, thanks for the fast answer Thomas. I guess it's not good news though.
>> Any recommendations on how to distinguish between objects being dragged
>> over a widget using the dragovervent?
>>
>>
>> On Friday, 27 July 2012 15:52:29 UTC+2, Thomas Lefort wrote:
>>>
>>> I have an issue with DragOverEvent.
>>>
>>> At drag start I set my event data to a certain value, as follows:
>>>
>>> panel.addDomHandler(new DragStartHandler() {
>>>  @Override
>>> public void onDragStart(DragStartEvent event) {
>>> event.setData("text", ResourceWidget.this.resource.**
>>> getClass().getName());
>>> event.getDataTransfer().**setDragImage(panel.getElement(**), 10, 10);
>>> ... some more code
>>> }
>>> }, DragStartEvent.getType());
>>>
>>> On hover and on drop I test the value of the event data as follows:
>>>
>>> campaignMap.addDomHandler(new DragOverHandler() {
>>>  @Override
>>> public void onDragOver(DragOverEvent event) {
>>> event.preventDefault();
>>> if(event.getData("text") != null) {
>>>   (1)  ... some more code
>>> }
>>> }
>>> }, DragOverEvent.getType());
>>>  campaignMap.addDomHandler(new DropHandler() {
>>>  @Override
>>> public void onDrop(DropEvent event) {
>>> event.preventDefault();
>>> if(event.getData("text") != null) {
>>>   (2)  ... some more code
>>> }
>>> }
>>> }, DropEvent.getType());
>>> The issue is that with the hover event I get always null for my data
>>> value whilst for the drop I get the right value, ie (1) is never run and
>>> (2) runs.
>>>
>>> In the end the drag and drop works, but I would also like to make use of
>>> the drag event to display some information based on the value of the data.
>>>
>>> Any idea? is this a bug?
>>>
>>> Thanks,
>>>
>>> Thomas
>>>
>>>  --
> 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/-/JrFKzyv0NrAJ.
>
> 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.
>

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



Re: DragOverEvent issue

2012-07-27 Thread Thomas Lefort
OK, thanks for the fast answer Thomas. I guess it's not good news though. 
Any recommendations on how to distinguish between objects being dragged 
over a widget using the dragovervent?


On Friday, 27 July 2012 15:52:29 UTC+2, Thomas Lefort wrote:
>
> I have an issue with DragOverEvent.
>
> At drag start I set my event data to a certain value, as follows:
>
> panel.addDomHandler(new DragStartHandler() {
>  @Override
> public void onDragStart(DragStartEvent event) {
> event.setData("text", ResourceWidget.this.resource.getClass().getName());
> event.getDataTransfer().setDragImage(panel.getElement(), 10, 10);
> ... some more code
> }
> }, DragStartEvent.getType());
>
> On hover and on drop I test the value of the event data as follows:
>
> campaignMap.addDomHandler(new DragOverHandler() {
>  @Override
> public void onDragOver(DragOverEvent event) {
> event.preventDefault();
> if(event.getData("text") != null) {
>   (1)  ... some more code
> }
> }
> }, DragOverEvent.getType());
>  campaignMap.addDomHandler(new DropHandler() {
>  @Override
> public void onDrop(DropEvent event) {
> event.preventDefault();
> if(event.getData("text") != null) {
>   (2)  ... some more code
> }
> }
> }, DropEvent.getType());
> The issue is that with the hover event I get always null for my data value 
> whilst for the drop I get the right value, ie (1) is never run and (2) runs.
>
> In the end the drag and drop works, but I would also like to make use of 
> the drag event to display some information based on the value of the data.
>
> Any idea? is this a bug?
>
> Thanks,
>
> Thomas
>
>

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



DragOverEvent issue

2012-07-27 Thread Thomas Lefort
I have an issue with DragOverEvent.

At drag start I set my event data to a certain value, as follows:

panel.addDomHandler(new DragStartHandler() {
 @Override
public void onDragStart(DragStartEvent event) {
event.setData("text", ResourceWidget.this.resource.getClass().getName());
event.getDataTransfer().setDragImage(panel.getElement(), 10, 10);
... some more code
}
}, DragStartEvent.getType());

On hover and on drop I test the value of the event data as follows:

campaignMap.addDomHandler(new DragOverHandler() {
 @Override
public void onDragOver(DragOverEvent event) {
event.preventDefault();
if(event.getData("text") != null) {
  (1)  ... some more code
}
}
}, DragOverEvent.getType());
 campaignMap.addDomHandler(new DropHandler() {
 @Override
public void onDrop(DropEvent event) {
event.preventDefault();
if(event.getData("text") != null) {
  (2)  ... some more code
}
}
}, DropEvent.getType());
The issue is that with the hover event I get always null for my data value 
whilst for the drop I get the right value, ie (1) is never run and (2) runs.

In the end the drag and drop works, but I would also like to make use of 
the drag event to display some information based on the value of the data.

Any idea? is this a bug?

Thanks,

Thomas

-- 
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/-/sVx-WEuVer4J.
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.



Re: Force update of rows when using asyncdataprovider

2012-07-12 Thread Thomas Lefort
OK, this seems to work for now. I added the following code to my 
asyncdataprovider class:

public void refresh() {
for(HasData display : this.getDataDisplays()) {
onRangeChanged(display);
}
}

It reloads data from teh server each time but it's not a big issue.



On Thursday, 12 July 2012 17:40:23 UTC+2, Thomas Lefort wrote:
>
> I am looking for advice.
>
> I display potentially a large amount of data available on my server in a 
> cell table using the asyncdataprovider.
>
> I can edit the data items in the list or add new items to the list. My 
> problem is what is the best way to update the list once I have created a 
> new item or edited one? shall I create a refresh method that calls the 
> onRnageChanged method to force a refresh?
>
> Thanks,
>
> Thomas
>
>

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



Force update of rows when using asyncdataprovider

2012-07-12 Thread Thomas Lefort
I am looking for advice.

I display potentially a large amount of data available on my server in a 
cell table using the asyncdataprovider.

I can edit the data items in the list or add new items to the list. My 
problem is what is the best way to update the list once I have created a 
new item or edited one? shall I create a refresh method that calls the 
onRnageChanged method to force a refresh?

Thanks,

Thomas

-- 
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/-/3q_IZYaWzZ0J.
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.



Re: Strategy for saving data project

2012-07-03 Thread Thomas Lefort
me again... last one I promise.
I ended up using PlaceChangeEventRequest only. The place returned by 
getNextPlace is not null actually. What I ended up doing is have all my 
places implement my ow place interface and check if the getNextPlace is of 
that type. If not, it means we are leaving the page, in which case I use 
the setWarning (which now works).


On Tuesday, 3 July 2012 17:19:59 UTC+2, Thomas Lefort wrote:
>
> mm  I must come back on what I said... It turns out the 
> PlaceRequestHandler is called after the mayStop (actually during which is 
> plain weird), or at least after the check is done in mayStop, so too late 
> anyway... Is that normal? I have only tested in dev mode and with gwt 2.4.
>
> So I tried something else and implemented it all in 
> PlaceChangeEventRequest and used the setWarning method to popup a message, 
> but the message is never displayed... is that normal too?
>
>
> On Tuesday, 3 July 2012 10:39:57 UTC+2, Thomas Lefort wrote:
>>
>> OK, it looks like I might have managed two birds with one stone.
>>
>> Basically I have a leave flag that I set to true at the creation of the 
>> activity. This flag is set to false if there is a PlaceRequestEvent and the 
>> new place is not null. In mayStop I first save my workspace and then I 
>> check the flag. If the flag is set to false I return a message. If it is 
>> set to true then I clean up my activity. The point is I do not need to 
>> clean up my activity if I am moving away from the application.
>> Now I am no MVP guru like you, so if you see a possible flaw in this 
>> approach, please let me know.
>>
>> Thanks again.
>>
>>
>> On Tuesday, 3 July 2012 10:01:59 UTC+2, Thomas Lefort wrote:
>>>
>>> Hi Thomas, thanks for the detailed explanation. I added a window closing 
>>> handler but I then have the issue of handling mayStop clean up, ie mayStop 
>>> seems to be called first and does the cleanup, in which case if the user 
>>> decides to cancel the leave of the activity, the activity is in a cleaned 
>>> up state and not usable any more, eg no more event handlers.
>>>
>>> I will try to add a PlaceChangeRequest.Handler to raise a flag, in the 
>>> hope that it gets triggered before the mayStop. If it does then I don't 
>>> need the window closing handler anymore.
>>>
>>> I still think this will not cover all cases and the only viable solution 
>>> is to make (optimised) periodic saves.
>>>
>>>
>>> On Monday, 2 July 2012 10:44:39 UTC+2, Thomas Broyer wrote:
>>>>
>>>>
>>>> On Monday, July 2, 2012 9:31:56 AM UTC+2, Thomas Lefort wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I was relying on mayStop to save my user's project when they leave the 
>>>>> activity but it seems to work in some cases only, ie when navigating from 
>>>>> one activity to another but not when leaving the application or closing 
>>>>> the 
>>>>> browser... I don't know if it is normal? may be there is "not enough 
>>>>> time" 
>>>>> to send the last message with all the project's data?
>>>>>
>>>>
>>>> That's basically what happens yes.
>>>> See http://code.google.com/p/google-web-toolkit/issues/detail?id=4898and 
>>>> http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#navigating-across-documents
>>>>  among 
>>>> others.
>>>>  
>>>>
>>>>> If it is then I need a whole new strategy to make sure data is saved 
>>>>> when the user leaves. I would be interested in knowing of any suggestion 
>>>>> to 
>>>>> solve the issue.
>>>>> I have planned to save on every change made, but it is quite heavy as 
>>>>> there are many frequent updates possible (just moving the map would 
>>>>> trigger 
>>>>> a save). An optimisation to this would be a combination of a flag for 
>>>>> tracking changes and a timer to make periodic saves, eg every minute or 
>>>>> so, 
>>>>> when the project has changed.
>>>>> Anyway if anyone has recommendations on how to do this I would be very 
>>>>> happy hearing them.
>>>>>
>>>>
>>>> See 
>>>> http://code.google.com/p/google-web-toolkit/issues/detail?id=6726#c5 
>>>> Basically: onbeforeunload (which calls mayStop of the activities) 
>>>> exists so that you can tell the us

Re: Strategy for saving data project

2012-07-03 Thread Thomas Lefort
mm  I must come back on what I said... It turns out the PlaceRequestHandler 
is called after the mayStop (actually during which is plain weird), or at 
least after the check is done in mayStop, so too late anyway... Is that 
normal? I have only tested in dev mode and with gwt 2.4.

So I tried something else and implemented it all in PlaceChangeEventRequest 
and used the setWarning method to popup a message, but the message is never 
displayed... is that normal too?


On Tuesday, 3 July 2012 10:39:57 UTC+2, Thomas Lefort wrote:
>
> OK, it looks like I might have managed two birds with one stone.
>
> Basically I have a leave flag that I set to true at the creation of the 
> activity. This flag is set to false if there is a PlaceRequestEvent and the 
> new place is not null. In mayStop I first save my workspace and then I 
> check the flag. If the flag is set to false I return a message. If it is 
> set to true then I clean up my activity. The point is I do not need to 
> clean up my activity if I am moving away from the application.
> Now I am no MVP guru like you, so if you see a possible flaw in this 
> approach, please let me know.
>
> Thanks again.
>
>
> On Tuesday, 3 July 2012 10:01:59 UTC+2, Thomas Lefort wrote:
>>
>> Hi Thomas, thanks for the detailed explanation. I added a window closing 
>> handler but I then have the issue of handling mayStop clean up, ie mayStop 
>> seems to be called first and does the cleanup, in which case if the user 
>> decides to cancel the leave of the activity, the activity is in a cleaned 
>> up state and not usable any more, eg no more event handlers.
>>
>> I will try to add a PlaceChangeRequest.Handler to raise a flag, in the 
>> hope that it gets triggered before the mayStop. If it does then I don't 
>> need the window closing handler anymore.
>>
>> I still think this will not cover all cases and the only viable solution 
>> is to make (optimised) periodic saves.
>>
>>
>> On Monday, 2 July 2012 10:44:39 UTC+2, Thomas Broyer wrote:
>>>
>>>
>>> On Monday, July 2, 2012 9:31:56 AM UTC+2, Thomas Lefort wrote:
>>>>
>>>> Hi,
>>>>
>>>> I was relying on mayStop to save my user's project when they leave the 
>>>> activity but it seems to work in some cases only, ie when navigating from 
>>>> one activity to another but not when leaving the application or closing 
>>>> the 
>>>> browser... I don't know if it is normal? may be there is "not enough time" 
>>>> to send the last message with all the project's data?
>>>>
>>>
>>> That's basically what happens yes.
>>> See http://code.google.com/p/google-web-toolkit/issues/detail?id=4898and 
>>> http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#navigating-across-documents
>>>  among 
>>> others.
>>>  
>>>
>>>> If it is then I need a whole new strategy to make sure data is saved 
>>>> when the user leaves. I would be interested in knowing of any suggestion 
>>>> to 
>>>> solve the issue.
>>>> I have planned to save on every change made, but it is quite heavy as 
>>>> there are many frequent updates possible (just moving the map would 
>>>> trigger 
>>>> a save). An optimisation to this would be a combination of a flag for 
>>>> tracking changes and a timer to make periodic saves, eg every minute or 
>>>> so, 
>>>> when the project has changed.
>>>> Anyway if anyone has recommendations on how to do this I would be very 
>>>> happy hearing them.
>>>>
>>>
>>> See http://code.google.com/p/google-web-toolkit/issues/detail?id=6726#c5
>>>  
>>> Basically: onbeforeunload (which calls mayStop of the activities) exists 
>>> so that you can tell the user there are unsaved changes and he can cancel 
>>> the navigation to save them before navigating away again.
>>> With a PlaceChangeRequestEvent you could easily tell an onbeforeunload 
>>> from an internal navigation (the target place is 'null'), but that isn't 
>>> exposed to activities (mayStop). I suppose you could workaround this using 
>>> a PlaceChangeRequestEvent.Handler (or Window.ClosingHandler) and shared 
>>> state (considering mayStop methods are called first, they would store a 
>>> flag in the shared state, and the PlaceChangeRequestEvent.Handler would 
>>> setWarning if the target –place is 'null' –resp. the Window.ClosingHandler 
>>> would setMessage– w

Re: Strategy for saving data project

2012-07-03 Thread Thomas Lefort
OK, it looks like I might have managed two birds with one stone.

Basically I have a leave flag that I set to true at the creation of the 
activity. This flag is set to false if there is a PlaceRequestEvent and the 
new place is not null. In mayStop I first save my workspace and then I 
check the flag. If the flag is set to false I return a message. If it is 
set to true then I clean up my activity. The point is I do not need to 
clean up my activity if I am moving away from the application.
Now I am no MVP guru like you, so if you see a possible flaw in this 
approach, please let me know.

Thanks again.


On Tuesday, 3 July 2012 10:01:59 UTC+2, Thomas Lefort wrote:
>
> Hi Thomas, thanks for the detailed explanation. I added a window closing 
> handler but I then have the issue of handling mayStop clean up, ie mayStop 
> seems to be called first and does the cleanup, in which case if the user 
> decides to cancel the leave of the activity, the activity is in a cleaned 
> up state and not usable any more, eg no more event handlers.
>
> I will try to add a PlaceChangeRequest.Handler to raise a flag, in the 
> hope that it gets triggered before the mayStop. If it does then I don't 
> need the window closing handler anymore.
>
> I still think this will not cover all cases and the only viable solution 
> is to make (optimised) periodic saves.
>
>
> On Monday, 2 July 2012 10:44:39 UTC+2, Thomas Broyer wrote:
>>
>>
>> On Monday, July 2, 2012 9:31:56 AM UTC+2, Thomas Lefort wrote:
>>>
>>> Hi,
>>>
>>> I was relying on mayStop to save my user's project when they leave the 
>>> activity but it seems to work in some cases only, ie when navigating from 
>>> one activity to another but not when leaving the application or closing the 
>>> browser... I don't know if it is normal? may be there is "not enough time" 
>>> to send the last message with all the project's data?
>>>
>>
>> That's basically what happens yes.
>> See http://code.google.com/p/google-web-toolkit/issues/detail?id=4898and 
>> http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#navigating-across-documents
>>  among 
>> others.
>>  
>>
>>> If it is then I need a whole new strategy to make sure data is saved 
>>> when the user leaves. I would be interested in knowing of any suggestion to 
>>> solve the issue.
>>> I have planned to save on every change made, but it is quite heavy as 
>>> there are many frequent updates possible (just moving the map would trigger 
>>> a save). An optimisation to this would be a combination of a flag for 
>>> tracking changes and a timer to make periodic saves, eg every minute or so, 
>>> when the project has changed.
>>> Anyway if anyone has recommendations on how to do this I would be very 
>>> happy hearing them.
>>>
>>
>> See http://code.google.com/p/google-web-toolkit/issues/detail?id=6726#c5 
>> Basically: onbeforeunload (which calls mayStop of the activities) exists 
>> so that you can tell the user there are unsaved changes and he can cancel 
>> the navigation to save them before navigating away again.
>> With a PlaceChangeRequestEvent you could easily tell an onbeforeunload 
>> from an internal navigation (the target place is 'null'), but that isn't 
>> exposed to activities (mayStop). I suppose you could workaround this using 
>> a PlaceChangeRequestEvent.Handler (or Window.ClosingHandler) and shared 
>> state (considering mayStop methods are called first, they would store a 
>> flag in the shared state, and the PlaceChangeRequestEvent.Handler would 
>> setWarning if the target –place is 'null' –resp. the Window.ClosingHandler 
>> would setMessage– when the shared state indicates unsaved changes; but of 
>> course, you should also handle the case where the mayStop methods are 
>> called *last*); and you'd save data in your activities' onStop(), which are 
>> not called onbeforeunload.
>>
>

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



Re: Strategy for saving data project

2012-07-03 Thread Thomas Lefort
Hi Thomas, thanks for the detailed explanation. I added a window closing 
handler but I then have the issue of handling mayStop clean up, ie mayStop 
seems to be called first and does the cleanup, in which case if the user 
decides to cancel the leave of the activity, the activity is in a cleaned 
up state and not usable any more, eg no more event handlers.

I will try to add a PlaceChangeRequest.Handler to raise a flag, in the hope 
that it gets triggered before the mayStop. If it does then I don't need the 
window closing handler anymore.

I still think this will not cover all cases and the only viable solution is 
to make (optimised) periodic saves.


On Monday, 2 July 2012 10:44:39 UTC+2, Thomas Broyer wrote:
>
>
> On Monday, July 2, 2012 9:31:56 AM UTC+2, Thomas Lefort wrote:
>>
>> Hi,
>>
>> I was relying on mayStop to save my user's project when they leave the 
>> activity but it seems to work in some cases only, ie when navigating from 
>> one activity to another but not when leaving the application or closing the 
>> browser... I don't know if it is normal? may be there is "not enough time" 
>> to send the last message with all the project's data?
>>
>
> That's basically what happens yes.
> See http://code.google.com/p/google-web-toolkit/issues/detail?id=4898 and 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#navigating-across-documents
>  among 
> others.
>  
>
>> If it is then I need a whole new strategy to make sure data is saved when 
>> the user leaves. I would be interested in knowing of any suggestion to 
>> solve the issue.
>> I have planned to save on every change made, but it is quite heavy as 
>> there are many frequent updates possible (just moving the map would trigger 
>> a save). An optimisation to this would be a combination of a flag for 
>> tracking changes and a timer to make periodic saves, eg every minute or so, 
>> when the project has changed.
>> Anyway if anyone has recommendations on how to do this I would be very 
>> happy hearing them.
>>
>
> See http://code.google.com/p/google-web-toolkit/issues/detail?id=6726#c5 
> Basically: onbeforeunload (which calls mayStop of the activities) exists 
> so that you can tell the user there are unsaved changes and he can cancel 
> the navigation to save them before navigating away again.
> With a PlaceChangeRequestEvent you could easily tell an onbeforeunload 
> from an internal navigation (the target place is 'null'), but that isn't 
> exposed to activities (mayStop). I suppose you could workaround this using 
> a PlaceChangeRequestEvent.Handler (or Window.ClosingHandler) and shared 
> state (considering mayStop methods are called first, they would store a 
> flag in the shared state, and the PlaceChangeRequestEvent.Handler would 
> setWarning if the target –place is 'null' –resp. the Window.ClosingHandler 
> would setMessage– when the shared state indicates unsaved changes; but of 
> course, you should also handle the case where the mayStop methods are 
> called *last*); and you'd save data in your activities' onStop(), which are 
> not called onbeforeunload.
>

-- 
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/-/0o83GO3ADtgJ.
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.



Strategy for saving data project

2012-07-02 Thread Thomas Lefort
Hi,

I was relying on mayStop to save my user's project when they leave the 
activity but it seems to work in some cases only, ie when navigating from 
one activity to another but not when leaving the application or closing the 
browser... I don't know if it is normal? may be there is "not enough time" 
to send the last message with all the project's data?

If it is then I need a whole new strategy to make sure data is saved when 
the user leaves. I would be interested in knowing of any suggestion to 
solve the issue.
I have planned to save on every change made, but it is quite heavy as there 
are many frequent updates possible (just moving the map would trigger a 
save). An optimisation to this would be a combination of a flag for 
tracking changes and a timer to make periodic saves, eg every minute or so, 
when the project has changed.
Anyway if anyone has recommendations on how to do this I would be very 
happy hearing them.

Thanks,

Thomas

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



Re: issue with rpc when behind a reverse proxy

2012-07-02 Thread Thomas Lefort
Yes, thanks Jens. In the end I did what you suggested and overrode the 
doGetSerializationPolicy 
to make sure it pointed to the right path. It does work fine indeed.
 

On Wednesday, 27 June 2012 20:43:07 UTC+2, Jens wrote:
>
> Same answer: 
> https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/f9FFjvQd1xg
>
> -- J.
>

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



issue with rpc when behind a reverse proxy

2012-06-27 Thread Thomas Lefort
(this is a repost, I had to change some content)

I have the following problem:
- I have a web application installed on a customer's server and running 
with jetty at /ksatweb. The application module is named kweb.
- the application is available on the web through a reverse proxy and 
mapped to https://website.com/ordering/ksatweb/

The issue I get is when using rpc. Below is the error message I get. I 
tried many work arounds, found by googling the issue but none worked, eg I 
have no control over the proxy configuration so the use of headres is not 
possible, etc... If anybody has an idea how to get me out of there, I am 
ready to do some dirty hack to get this to work...

Thanks in advance,

2012-06-27 16:16:11.752:INFO:/ksatweb:
ResourcesService: ERROR: The module path requested, 
/ordering/ksatweb/kweb/, is not in the same web application as this 
servlet, /ksatweb.  Your module may not be properly configured or your 
client and server code maybe out of date.
2012-06-27 16:16:11.752:INFO:/ksatweb:ResourcesService: WARNING: Failed to 
get the SerializationPolicy '2225236803D085D4C928146663661808' for module '
https:// website.com/ordering/ksatweb/kweb/'; a legacy, 1.3.3 
compatible, serialization policy will be used.  You may experience 
SerializationExceptions as a result.
2012-06-27 16:16:11.768:WARN:/ksatweb:Exception while dispatching incoming 
RPC call com.google.gwt.user.client.rpc.SerializationException: Type 
'com.metaaps.webapps.ksatweb.shared.entity.User' was not assignable to 
'com.google.gwt.user.client.r pc.IsSerializable' and did not have a custom 
field serializer.For security purposes, this type will not be serialized.: 
instance = com.metaaps.webapps.ksatweb.s hared.entity.User@371d6be8

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



reverse proxy issue with rpc

2012-06-27 Thread Thomas Lefort
I have the following problem:
- I have a web application installed on a customer's server and running 
with jetty at /ksatweb. The application module is named kweb.
- the application is available on the web through a reverse proxy and 
mapped to https://portal.ksat.no/ordering/ksatweb/

The issue I get is when using rpc. Below is the error message I get. I 
tried many work arounds, found by googling the issue but none worked, eg I 
have no control over the proxy configuration so the use of headres is not 
possible, etc... If anybody has an idea how to get me out of there, I am 
ready to do some dirty hack to get this to work...

Thanks in advance,

2012-06-27 16:16:11.752:INFO:/ksatweb:ResourcesService: ERROR: The module 
path r
equested, /ordering/ksatweb/kweb/, is not in the same web application as 
this se
rvlet, /ksatweb.  Your module may not be properly configured or your client 
and
server code maybe out of date.
2012-06-27 16:16:11.752:INFO:/ksatweb:ResourcesService: WARNING: Failed to 
get t
he SerializationPolicy '2225236803D085D4C928146663661808' for module 
'https://po
rtal.ksat.no/ordering/ksatweb/kweb/'; a legacy, 1.3.3 compatible, 
serialization
policy will be used.  You may experience SerializationExceptions as a 
result.
2012-06-27 16:16:11.768:WARN:/ksatweb:Exception while dispatching incoming 
RPC c
all
com.google.gwt.user.client.rpc.SerializationException: Type 
'com.metaaps.webapps
.ksatweb.shared.entity.User' was not assignable to 
'com.google.gwt.user.client.r
pc.IsSerializable' and did not have a custom field serializer.For security 
purpo
ses, this type will not be serialized.: instance = 
com.metaaps.webapps.ksatweb.s
hared.entity.User@371d6be8

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



Re: Google IO 2012 : no GWT session ?

2012-06-19 Thread Thomas Lefort
https://groups.google.com/forum/?fromgroups#!topic/Google-Web-Toolkit-Employment/NJmWmKsXQlI

sounds pretty healthy to me :)

I bet competition will be fierce!


On Thursday, 17 May 2012 08:00:00 UTC+2, Celinio Fernandes wrote:
>
> Hello,
> I just noticed that the schedule for Google IO 2012 is now available : 
> https://developers.google.com/events/io/sessions
> Not sure whether it is definitive or not.
> I see that this year there is no session dedicated to GWT. How come ? 
> But there are 2 sessions dedicated to Dart. Is this a sign ?
>
>
>
>

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



Re: FilteredActivity

2012-05-09 Thread Thomas Lefort
Brilliant, that does work indeed! Thanks.

On Wednesday, 9 May 2012 16:45:10 UTC+2, Jens wrote:
>
> Any idea if this normal (that the place doesn't change to 
>> "EIRegisterPlace")? 
>>
>
> Yes thats normal. A FilteredActivity allows you to change activities for a 
> given place by temporary converting the current place to a different one to 
> trick the underlying ActivityMapper. So its not meant to globally transform 
> one place into another. Thats why PlaceController always contains the place 
> you call goTo() with.
>  
>
>> and is there a workaround? another way of proceeding?
>>
>
> You could copy the PlaceController.goTo() method and omitting the 
> oldPlace.equals(newPlace) check. So you basically fire 
> PlaceChangeRequestEvent and PlaceChangeEvent yourself and not through 
> PlaceController.goTo(). That way you can "reload" the current place.
>
> -- J.
>

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



FilteredActivity

2012-05-09 Thread Thomas Lefort
Hi,

I have the following issue: I use a FilteredActivityMapper with the 
following filtering:

@Override
public Place filter(Place place) {
if(// check user is logged in) {
return new EIRegisterPlace("", place);
}
 return place;
}

Filtering works well except that when the user logs in I call 
placeController.goTo(nextPlace) and the code gets stuck. The reason is that 
the "where" variable is still set to the old place (and not the 
EIRegsiterPlace), so where = nextPlace and the placeController gets blocked.

Any idea if this normal (that the place doesn't change to 
"EIRegisterPlace")? and is there a workaround? another way of proceeding?

Thanks,

Thomas

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



Re: Runtime exception: com.google.web.bindery.requestfactory.server.UnexpectedException: Could not find static method with a single parameter of a key type

2012-04-27 Thread Thomas Lefort
You do have to read the doc carefully indeed. I got stuck for a little 
while, I thought I could get away by simply using "find" but no you need to 
use "findEntity", ie replace Entity by your entity name. This got me, 
because at first it worked with a single entity, but when I had two 
entities with relationships, it wouldn't work anymore. By changing the 
method names to respect the convention mentioned above, it worked fine.


On Wednesday, 25 April 2012 11:48:21 UTC+2, Thomas Broyer wrote:
>
>
>
> On Wednesday, April 25, 2012 11:34:56 AM UTC+2, Ashu wrote:
>>
>> could you please provide me the sample findby() method for reference?
>>
>
> See 
> http://code.google.com/p/google-web-toolkit/source/browse/tags/2.4.0/samples/expenses/src/main/java/com/google/gwt/sample/expenses/server/domain/Expense.java#64
>  for 
> example (uses JPA for persistence) 
>

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



Re: IntegerBox not restricting input to integers in GWT 2.4.0

2012-04-20 Thread Thomas Lefort
Yes I have the same problem, also for other boxes like DoubleBox. I am 
pretty sure it used to work fine.

On Thursday, 19 April 2012 14:57:06 UTC+2, W Marsh wrote:
>
> Am I missing something? It just acts like a normal TextBox for me. Here's 
> the simplest example:
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.user.client.ui.IntegerBox;
> import com.google.gwt.user.client.ui.RootPanel;
>
> /**
>  * Entry point classes define onModuleLoad().
>  */
> public class IntegerBoxExample implements EntryPoint
> {
> public void onModuleLoad()
> {
> IntegerBox box = new IntegerBox();
>
> RootPanel.get().add(box);
> }
> }
>
> I can type letters into it. Is it just broken (perhaps related to the 
> notice "Experimental API: This class is still under rapid development, 
> and is very likely to be deleted. Use it at your own risk." note in the 
> documentation)?

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



Avoiding DTOs in RPC

2012-04-19 Thread Thomas Lefort
I want to avoid having to use DTOs for transferring my Users with RPC.
Basically I have a number of rpc calls for my users, and based on the 
configuration and the user rights, etc... there is a number of fields I 
want to hide. My approach has been to create DTOs for each case. I was now 
thinking of using the JPA relationships and lazy loading instead. For 
instance I store additional information (bio, etc...) in an "Additional" 
object, with a onetoone relationship and lazy loading. So I guess based on 
the call I just need to load the field or not, instead of filling up a 
dedicated DTO each time I send a User with "holes".

Does that make sense? any one has cons on this idea? will RPC send empty 
fields or will it be more clever and just not add the fields that are null?

Thanks,

Thomas


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



Re: UIBinder

2012-04-19 Thread Thomas Lefort
Sure, I'll try to do that tonight

On Wednesday, 18 April 2012 18:55:13 UTC+2, Thomas Broyer wrote:
>
>
>
> On Wednesday, April 18, 2012 6:36:44 PM UTC+2, Thomas Lefort wrote:
>>
>> One word of advice as I spent a couple of hours on this. DO NOT name 
>> (ui:field) your widgets "template". This causes great disturbances when 
>> generating the code! it looks like a field named "template" is used 
>> internally.
>>
>>
> Would you mind filing a bug? IIRC UiBinder takes great care not to 
> introduce possibly-conflicting fields, so it's likely something that a) can 
> be fixed, b) is likely to be considered as a "should be fixed".
>

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



UIBinder

2012-04-18 Thread Thomas Lefort
One word of advice as I spent a couple of hours on this. DO NOT name 
(ui:field) your widgets "template". This causes great disturbances when 
generating the code! it looks like a field named "template" is used 
internally.

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



Re: Recruiting

2012-04-18 Thread Thomas Lefort
Hi Thanks. I did try (this is what I called the dedicated group) and
got a couple of answers, with very good CVs indeed. However, I was
expecting a fair amount more. My (quick) deduction was that there are
not so many GWT developers out there - which is not great news for a
company. Hence my question.

Although not the intention, I got some more CVs through this post. So
I guess the GWT Employment group does not have such a wide audience.


On 17 April 2012 23:20, Thad  wrote:
> You might want to look at the google-web-toolkit-employment group.
> (https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/N9NaadyNOk4)
>
>
> On Sunday, April 15, 2012 6:08:41 AM UTC-4, Thomas Lefort wrote:
>>
>> I am looking into recruiting - or at least a bit of freelancing first,
>> ideally someone around Madrid but not necessarily. I tried the dedicated
>> group and also a few other websites (free). I got a couple of good CVs with
>> the group but only two and not in Spain. With the websites, nothing at all.
>> I am trying pay for job boards now.
>> I am wondering if anybody else experienced any difficulty recruiting GWT
>> savvy people. I was naively hoping given the crisis recruiting would be easy
>> but it doesn't appear to be the case. There appears to be shortage of highly
>> skill computer engineers.
>> Anybody else experienced difficulties recruiting gwt profiles, or even
>> Java web engineers in general?
>>
> --
> 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/-/I03pg9fDjLkJ.
>
> 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.

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



Re: does any Breedcrumb widget in gwt 2.4?

2012-04-16 Thread Thomas Lefort
May be follow bootstrap for gwt? There is a breadcrumb in bootstrap so you 
can imagine one days the guys at gwt bootstrap will add it? may be add a 
feature request?

https://github.com/gwtbootstrap/gwt-bootstrap


On Friday, 16 March 2012 07:52:30 UTC+1, tong123123 wrote:
>
> Hi,
>
> is there Breedcrumb control provided in GWT 2.4?
> I see a link in
>
> http://code.google.com/p/gwt-examples/source/browse/trunk/Core/src/org/gonevertical/core/client/ui/breadcrumbs/BreadCrumbs.java?spec=svn1926&r=1924
> but it has not download link and no related example of how to use it.
>
> I just think is there any official Breedcrumb widget in GWT?
> the format is just simple
> > menu1 > menu 1.1 > menu 1.1.2
> and user can go back to menu 1.1 by clicking the "menu 1.1" in the 
> Breedcrumb control.
>

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



Re: Filtering requestfactory response

2012-04-16 Thread Thomas Lefort
Ha! (I feel a bit stupid)

That does indeed solve the issue of the db update, however I still get the 
error message "Could not find static method with a single parameter of a 
key type". Will look into that a bit more.

Thanks again.

Thomas


On Sunday, 15 April 2012 14:19:53 UTC+2, Thomas Broyer wrote:
>
> You have to use the same RequestContext to create all your proxies!

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



Re: Call for action: Time to rethink a road-map and more frequent updates for GWT.

2012-04-15 Thread Thomas Lefort
+1 (for whatever it's worth), totally agree, one language AND it's Java, 
with all the tools that come with it
+ it's fast, very fast

On Sunday, 15 April 2012 19:41:14 UTC+2, Carl wrote:
>
> GWT is the best thing I've ever come across as a web programmer. My 
> company does 100% in GWT and Java. Using only one standard language for 
> both server and client that works on all browsers is brilliant and unigue. 
>
> Google, please realize that GWT is awesome and put all your great efforts 
> into GWT instead of starting all over with a language like Dart that 
> doesn't bring any real pros to the table and will never be a standard like 
> Java/Javascript. 
>
> A roadmap including some long term commitment would really make my day. 
>
>

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



Recruiting

2012-04-15 Thread Thomas Lefort
I am looking into recruiting - or at least a bit of freelancing first, 
ideally someone around Madrid but not necessarily. I tried the dedicated 
group and also a few other websites (free). I got a couple of good CVs with 
the group but only two and not in Spain. With the websites, nothing at all. 
I am trying pay for job boards now.
I am wondering if anybody else experienced any difficulty recruiting GWT 
savvy people. I was naively hoping given the crisis recruiting would be 
easy but it doesn't appear to be the case. There appears to be shortage of 
highly skill computer engineers.
Anybody else experienced difficulties recruiting gwt profiles, or even Java 
web engineers in general?

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



Re: Filtering requestfactory response

2012-04-15 Thread Thomas Lefort
Hi Thomas,

Thanks. I guess it makes sense ;-)

Another question if you don't mind... I am moving slowly with RF, I still 
like the RPC's simplicity and I already have many services implemented with 
RPC so the transition is difficult. I have set up a seperate project to 
test a bit the different scenarios and I quickly ran into problems when 
trying to create a new entity proxy and adding a list of other entity 
proxies to this entity. Basically, Employee has N Projects. I create an 
Employee client side and a few projects (for test sake) and add them to the 
user and attempt to save the whole graph at once. I do get user saved with 
the N projects hwoever all projects are empty, ie with default values, and 
I get a "Could not find static method with a single parameter of a key 
type" error message. The entities are persisted though as I said. I have 
the impression the issue is with persisting projects. I use JPA on the 
other side.
What got me is I couldn't find an equivalent example piece of code/project 
for this simple problem.

Here's a bit of code:

EmployeeRequest request = requestFactory.employeeRequest();
EmployeeProxy newEmployee = request.create(EmployeeProxy.class);
newEmployee.setDisplayName("Employee " + Math.random());
newEmployee.setDepartment("Department " + Math.random());
ProjectProxy project = 
requestFactory.projectRequest().create(ProjectProxy.class);
project.setName("Project " + Math.random());
newEmployee.setProjects(Arrays.asList(project));
Request createReq = 
request.persist().using(newEmployee).with("projects");

If you have any clues ;-), highly appreciated.

Thanks,

Thomas


On Friday, 6 April 2012 17:57:54 UTC+2, Thomas Broyer wrote:
>
>
> On Friday, April 6, 2012 5:04:20 PM UTC+2, Thomas Lefort wrote:
>>
>> I have a user profile page and I want the server to send different 
>> information when the user profile page is the one from the user and when 
>> it's the one from another user.
>> I used to get my user profile information with rpc, so I just had to 
>> send a DTO with some empty fields when it was another user.
>> I moved to request factory recently and I am trying to do the same type 
>> of filtering. Is this possible? How can it be done?
>
>
> Same as you did previously: have your service return an object with some 
> empty fields; simply replace RemoteServiceServlet#getThreadLocalRequest() 
> with RequestFactoryServlet.getThreadLocalRequest() to get the current user.
>

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



Re: DatePicker UTC

2012-04-15 Thread Thomas Lefort
Just saw your answer, thanks.

I use JsDate to get the UTC conversion. However this still doesn't work for 
the picker, as it will still display the date using the local time format. 
If I have 12/04/2012 at 1am UTC in the US, it will show me the picker at 
11/04/2012. May be the solution would be to pass a "converted" date to the 
picker, ie add the time offset to the data when opening the picker. I do 
not use the DateBox but my own widget, so I can pass the date I want to the 
picker.


On Thursday, 29 March 2012 15:56:33 UTC+2, kjordan wrote:
>
> http://code.google.com/p/gwt-traction/ (Look for UTCDateBox towards the 
> bottom)
>
> http://gwt-traction.googlecode.com/hg/demo/com.tractionsoftware.gwt.demo.utcdatebox.UTCDateBoxDemo/UTCDateBoxDemo.html(Demo
>  of it).
>
> I created one based off of this for GXT and this should do what you want. 
>  Although when I went to create a GXT version, I kept it so get/setValue 
> used Date and not Long but did the timezone offset subtraction that this 
> did.
>
> On Wednesday, March 28, 2012 3:07:39 PM UTC-5, Thomas Lefort wrote:
>>
>> I need the datepicker to render the date in UTC and not the local 
>> format. Is there any simple way to do so?
>>
>>

-- 
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/-/0y3Odj482gYJ.
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.



Filtering requestfactory response

2012-04-06 Thread Thomas Lefort
I have a user profile page and I want the server to send different 
information when the user profile page is the one from the user and when 
it's the one from another user.
I used to get my user profile information with rpc, so I just had to 
send a DTO with some empty fields when it was another user.
I moved to request factory recently and I am trying to do the same type 
of filtering. Is this possible? How can it be done?


Thanks,

Thomas

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



Re: DatePicker UTC

2012-03-29 Thread Thomas Lefort
To be more clear, I have a date which is 2012-03-29 at 01:00:00 UTC, if I 
do setDate(date) on the datepicker and if the user is based in the US, the 
date selected on the calendar will be the 2012-03-28, because it uses their 
local time. I want the calendar to show 2012-03-29 wherever the user is.


On Wednesday, 28 March 2012 22:07:39 UTC+2, Thomas Lefort wrote:
>
> I need the datepicker to render the date in UTC and not the local 
> format. Is there any simple way to do so?
>
>

-- 
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/-/0A_WEwacv9sJ.
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.



DatePicker UTC

2012-03-28 Thread Thomas Lefort
I need the datepicker to render the date in UTC and not the local 
format. Is there any simple way to do so?


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



GWT Chat Widget with Jetty

2012-03-21 Thread Thomas Lefort
Hi,

I want to add a very simple chat window to my GWT web application with 
Jetty 6 on the server side. Can anybody recommend me a good OS project for 
that? I checked atmosphere so far but I am sure there are many others.

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



That very desirable arrow in the SplitPanel of the new google groups webpage

2012-03-06 Thread Thomas Lefort
Hi,

As far as I can tell the new Google Groups web page was built with GWT.

There is nice little arrow that appears on the left pane of the web page so 
that you can collapse its content in addition to resize it like the 
standard GWT SplitLayoutPanel does. Any idea how to get it enabled? is it 
available out of the box, or is there some code somewhere that I can 
directly grab?

Thanks,

Thomas

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



Re: Synchronise view "loading" and activity start in MVP

2012-02-23 Thread Thomas Lefort
Hi Thomas,

Thanks for you suggestion.

Not sure that would be enough. This is my use case:
- I have 3d applet in my view, it takes a while to load, as well with
user authorisation, etc... I am able to detect when the applet has
started running though
- the view is created once and managed by client factory
- my activity loads at start up some user data, some of it to be
displayed in the applet via my view interface
- I need to be able to wait for the applet to be ready to add the user
data, at least for the first time the view has been created

This is actually just as valid for the 2d map, which I load
asynchronously via the google api library. Even if I didn't I still
need to be able to habdle the case where the library hasn't loaded at
all, reached api limit or network issue, and prevent the activity from
trying to add map data.

My current idea is to add a whenViewReady(AsyncCallback) to my view in
the activity start. This method will call the callback if the view is
already ready (immediate) or when the view is ready (upon completion
of the load). If there are better suggestions (use of event bus or
else), I am happy to hear them.

Thanks for any help,

Thomas


On Feb 3, 1:06 pm, Thomas Broyer  wrote:
> Simply wait for all your code to be "loaded" (could be required scripts, or
> RPC/RequestFactory calls to the server) before "pushing" your view into the
> AcceptsOneWidget passed to the Activity#start() method.

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



Synchronise view "loading" and activity start in MVP

2012-02-03 Thread Thomas Lefort
Hi,

Let's say you have a view that needs to load a library, eg the google
maps library. Some of the method offered by the view should only be
called by the activity when the map is fully loaded otherwise
resulting in errors. I need a way to hold off any UI call from the
activity until the view is fully loaded, and if loaded with errors act
accordingly. What is the recommended way of doing this with the GWT
MVP framework?

Thanks,

Thomas

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



Server side Custom Serialization only

2012-02-02 Thread Thomas Lefort
Hi,

I want to add a custom serialization to my objects but only on the
server side (to store them as Lob). Any idea of how I could do that?
The custom writeObject and readObject won't work, I get a Unresolved
type java.io.ObjectOutputStream error...

Any help would be VERY much appreciated.

Thanks,

Thomas

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



Loading map using scriptinjector

2012-01-03 Thread Thomas Lefort

Hi, is it possible to load the maps v3 api using the scriptinjector? as in:

   
ScriptInjector.fromUrl("http://maps.googleapis.com/maps/api/js?sensor=false";).setCallback(new 
Callback() {
  
   @Override

   public void onSuccess(Void result) {
   Window.alert("Loaded");
   }
  
   @Override

   public void onFailure(Exception reason) {
   Window.alert("Could not load map");
   }
   }).inject();

It doesn't work for me.

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



Re: problem with getting height of widget

2011-12-12 Thread Thomas Lefort
Hi Thanks for all the tips. The deferred didn't work, it sort of
hangs. I ended up showing/hiding the popups at start up, and that
seems to be enough.


On Dec 11, 3:57 pm, jhulford  wrote:
> Are you using any DeferredCommands that would result in your widget's
> content not being able to be determined when it's outer container is
> actually added to the DOM?  It really sounds like your widget
> initially doesn't have any real content at the point when show() is
> being called and is actually being built out in a callback running off
> the event queue.
>
> On Dec 10, 3:14 pm, Thomas Lefort  wrote:
>
>
>
>
>
>
>
> > Thanks! Just tried, sounded like a great idea, but it doesn't work
> > unfortunately. It's really as if the widgets I add inside the panel
> > are rendered/added after. Really strange...

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



Re: problem with getting height of widget

2011-12-10 Thread Thomas Lefort
Thanks! Just tried, sounded like a great idea, but it doesn't work
unfortunately. It's really as if the widgets I add inside the panel
are rendered/added after. Really strange...


On Dec 9, 9:19 pm, Jens  wrote:
> You can use
>
> popupPanel.setPopupPositionAndShow(new PositionCallback() {
>
>   public void setPosition(int offsetWidth, int offsetHeight) {
>      //do your calculations. Offset sizes shouldn't be 0 here
>   }
>
> });
>
> -- J.

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



  1   2   >