Re: GWT for Solaris
Thank you. Shall I download GWT for Mac or Linux? I will try Linux and will let you know if it really runs on Open/Solaris. Peter 2009/4/6, hazy1 matt.egyh...@gmail.com: Wow, you actually develop on Solaris? I think your kind will soon be extinct. You realize that GWT runs just fine on Solarisright? On Apr 5, 12:02 pm, Peter Ondruška peter.ondru...@gmail.com wrote: Hello, Are there any plans to provide GWT for Solaris? If not is it OK to request this by creating bug a let vote/star for it? Thanks, Peter --~--~-~--~~~---~--~~ 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: Newbie question
Thanks Paul !! On Apr 3, 7:03 pm, Paul Robinson ukcue...@gmail.com wrote: redzediwrote: Hi All, Here are a couple of elementary questions, pardon me if they sound very naive but i really really need to know the answer :- 1. why do we need to do a setEndPoint on the client-side stub we get from GWT.create() ?? because you choose what the name of your servlet will be in your web.xml. It can't know what name you put in there. 2. is the resultant stub as thus created threadsafe or is their any kind of restrictions of its being used simultaneously i.e can i save a reference of the stub as a static variable and call it from anywhere in my code ?? Client-side GWT code runs in the browser and is therefore single-threaded. Paul --~--~-~--~~~---~--~~ 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: Why doesn't work my form?
Yess. It's my stupid mistake. Very thanks for your reply, it's working. :-)) Just one question... I try to read out the request parameters from the request object: request.getParameter(textBoxFormElement) or MapString,String[] parameters = request.getParameterMap(); , but i get null objects. Can you know the reason why? thanks On Apr 5, 3:57 pm, Thomas Broyer t.bro...@gmail.com wrote: On 5 avr, 10:43, milcsi04 milcs...@gmail.com wrote: final FormPanel formPanel = new FormPanel(); formPanel.setEncoding(FormPanel.ENCODING_MULTIPART); formPanel.setMethod(FormPanel.METHOD_POST); formPanel.setAction(GWT.getModuleBaseURL() + /uploader); VerticalPanel panel = new VerticalPanel(); formPanel.setWidget(panel); [...] initWidget(panel); initWidget(formPanel); WIth your code, the form panel is actually never added to the page. --~--~-~--~~~---~--~~ 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: GWT for Solaris
Found it on Google. No Solaris yet. Starred issue 609. Peter 2009/4/6, Peter Ondruška peter.ondru...@gmail.com: Thank you. Shall I download GWT for Mac or Linux? I will try Linux and will let you know if it really runs on Open/Solaris. Peter 2009/4/6, hazy1 matt.egyh...@gmail.com: Wow, you actually develop on Solaris? I think your kind will soon be extinct. You realize that GWT runs just fine on Solarisright? On Apr 5, 12:02 pm, Peter Ondruška peter.ondru...@gmail.com wrote: Hello, Are there any plans to provide GWT for Solaris? If not is it OK to request this by creating bug a let vote/star for it? Thanks, Peter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Maven versus Cypal
Hi, I started using GWT around a year ago and I used Cypal plugin in Eclipse. I now found out that there is another plugin that is used for SmartGWT which is called Maven. What's the difference between them? Should I switch to Maven or I can continue my work with Cypal? Thank you --~--~-~--~~~---~--~~ 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: GWT for Solaris
Hi I am not that familiar with solaris, but you could perhabs install virtualbox and then run gwt developement inside that? on linux, windows. I know it will not give you a solaris port of gwt...but if you just cant wait I think it moght work out. happy easter :-) /Flemming 2009/4/6 Peter Ondruška peter.ondru...@gmail.com Found it on Google. No Solaris yet. Starred issue 609. Peter 2009/4/6, Peter Ondruška peter.ondru...@gmail.com: Thank you. Shall I download GWT for Mac or Linux? I will try Linux and will let you know if it really runs on Open/Solaris. Peter 2009/4/6, hazy1 matt.egyh...@gmail.com: Wow, you actually develop on Solaris? I think your kind will soon be extinct. You realize that GWT runs just fine on Solarisright? On Apr 5, 12:02 pm, Peter Ondruška peter.ondru...@gmail.com wrote: Hello, Are there any plans to provide GWT for Solaris? If not is it OK to request this by creating bug a let vote/star for it? Thanks, Peter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
call to JSNI randomly fires Object doesn't support this property or method
Hi I declared a native method public native void defineBridgeMethod(ModelHandler modh) /*-{ $wnd.computeLoanInterest = function(amt) { mo...@com.dhc.dhcvision.ui.client.modelhandler::computeLoanInterest(I) (amt); } }-*/; and build in in my application by calling ModelHandler modH = new ModelHandler(); defineBridgeMethod(modh); ModelHandler class looks like this: public class ModelHandler { public void computeLoanInterest(int amt) { MessageBox.alert(String.valueOf(amt) + inner); } } I call the native method in html javascript like that: parent.computeLoanInterest(5); The first time I called the native method from javascriptside everything works fine but now after a while I always get an error message Object doesn't support this property or method. It seems that the mentioned 'object' is the ModelHandler instance because the javascript error is pointed to line 2 which is position of the call of the ModelHandler instance in the native method declaration. Any idea why it works in the beginning and what could happened that it does not work anymore? I always test these stuff in Hosted Mode. Thx. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HorizontalSplitPanel splitter image through CSS
Hi, What's the correct way of setting the image of the HorizontalSplitPanel splitter through CSS? I've tried several different methods, none worked. This is what I have currently: .gwt-HorizontalSplitPanel .hsplitter { background: #42453D; background-image: url(img/horizontalSplitPanelThumb.png) } I'm using GWT 1.6 RC2. Thanks! --~--~-~--~~~---~--~~ 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: Approaches to develop a stateful application
On 31 mar, 11:34, Thomas Broyer t.bro...@gmail.com wrote: On 31 mar, 12:55, Ivan M supertra...@gmail.com wrote: Every request has to be secured and verified on the server side. Whether you pass a login/password pair or a ticket (that could be your session ID, managed transparently by your server's session handling feature) doesn't change much things, you still have to pass along something that the server can check to make sure you're authorized to make such a request. With an HttpSession, you let the server do this verification for you (and associate data with this session), but be careful about CSRF, as securing an app against CSRF needs client-server cooperation (cookies and tokens in URLs aren't secure *at all* The thing is, a state-less server is (generally) easier to maintain (reacting to a request only depends on the request and on the server's data, not any previous state associated with the user session) and easier to scale (first: no need to maintain sessions, so it consumes less memory; then: need two servers instead of one? just add the second server and set up a load balancer, no need for session-sharing between your servers or sticky-sessions at the load- balancer level), among other things. But of course, YMMV. Thank you, Thomas. I perform authentication against a rather slow LDAP server, so I can't afford querying this server for every GWT request. I'm considering tickets but I still don't know how to implement it. I understand I can use the following as the ticket, so I don't need to pass an extra parameter: getThreadLocalRequest().getSession().getId() I don't want the trouble of storing tickets and their access permits in the DDBB. Since I read there is one instance of the server running for all clients, I suppose I can store them in a data structure in the server. How can I detect that a session has been closed or expired, to delete the record from the structure?. Thanks again. --~--~-~--~~~---~--~~ 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: Anyone know what an NS_ERROR_NOT_AVAILABLE is?
Just got 3 more and one on a different line (details to follow). If anyone has any idea how to investigate this further, please let me know. Unfortunately, these errors are coming from the live web site and it doesn't happen to me, it seems to be happening to some poor sod from Germany who's using Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) If anyone fancies trying to be a victim, then the site is http://kivivi.comand I'd really be grateful for any feedback if you have a problem. Thanks, Ian (NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText] QueryInterface: function QueryInterface() { [native code] } result: 2147746065 filename: http://kivivi.com/Kivivi/F70A2E28EEB11C134EB9B1C3FCEF493F.cache.html lineNumber: 875 columnNumber: 0 inner: null data: null initialize: function initialize() { [native code] } line 875 is: function ifb(f,g){var e,h;if(g.a.status!=200){e=ai;e+=bi;e+=ci;e+=di;e+=this.c;e+=ci;e+=ei;e+=g.a.status;e+=ci;e+=hi;e+=g.a.statusText;e+=ii;Bib(e);this.b=gjb(bi,ji);return}this.b=zib(g.a.responseText);h=Aib(this.b,ki);cjb(h+vk)} --~--~-~--~~~---~--~~ 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: HorizontalSplitPanel splitter image through CSS
What's the HTML for this? 2009/4/6 Miloš Ranđelović milos@gmail.com: Hi, What's the correct way of setting the image of the HorizontalSplitPanel splitter through CSS? I've tried several different methods, none worked. This is what I have currently: .gwt-HorizontalSplitPanel .hsplitter { background: #42453D; background-image: url(img/horizontalSplitPanelThumb.png) } I'm using GWT 1.6 RC2. Thanks! --~--~-~--~~~---~--~~ 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: Approaches to develop a stateful application
On 6 avr, 11:02, Ivan M supertra...@gmail.com wrote: Thank you, Thomas. I perform authentication against a rather slow LDAP server, so I can't afford querying this server for every GWT request. I'm considering tickets but I still don't know how to implement it. I understand I can use the following as the ticket, so I don't need to pass an extra parameter: getThreadLocalRequest().getSession().getId() I don't want the trouble of storing tickets and their access permits in the DDBB. Since I read there is one instance of the server running for all clients, I suppose I can store them in a data structure in the server. How can I detect that a session has been closed or expired, to delete the record from the structure?. If you use HttpSession, don't bother storing things related to the session in another storage than the session itself; it would be counter-productive (except if what you store is actually shared amongst sessions). But what I said earlier still applies: With an HttpSession, you let the server do this verification for you (and associate data with this session), but be careful about CSRF, as securing an app against CSRF needs client-server cooperation (cookies and tokens in URLs aren't secure *at all* This doc is very enlightnening wrt CSRF and how HttpSession's are vulnerable out of the box: http://www.adambarth.com/papers/2008/barth-jackson-mitchell-b.pdf As a simple session-less solution, I'd just store a last access timestamp and run a job periodically (a simple timer+runnable would do it) to delete expired objects. But there are a number of good cache implementations out there doing it for you: http://java-source.net/open-source/cache-solutions http://www.vipan.com/htdocs/cachehelp.html The advantage is that it allows a same ticket to be shared amongst sessions (a browser and a download manager for instance) in some circumstances (that *you* control; the cases where you don't want such sharing being protected using anti-CSRF techniques). And all of this without using cookies or rewritten URLs (except if you want to, by doing it explicitly in your code). --~--~-~--~~~---~--~~ 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: Anyone know what an NS_ERROR_NOT_AVAILABLE is?
Something in your error handling? https://bugzilla.mozilla.org/show_bug.cgi?id=238559#c0 On Mon, Apr 6, 2009 at 8:13 AM, Ian Bambury ianbamb...@gmail.com wrote: Just got 3 more and one on a different line (details to follow). If anyone has any idea how to investigate this further, please let me know. Unfortunately, these errors are coming from the live web site and it doesn't happen to me, it seems to be happening to some poor sod from Germany who's using Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) If anyone fancies trying to be a victim, then the site is http://kivivi.com and I'd really be grateful for any feedback if you have a problem. Thanks, Ian (NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText] QueryInterface: function QueryInterface() { [native code] } result: 2147746065 filename: http://kivivi.com/Kivivi/F70A2E28EEB11C134EB9B1C3FCEF493F.cache.html lineNumber: 875 columnNumber: 0 inner: null data: null initialize: function initialize() { [native code] } line 875 is: function ifb(f,g){var e,h;if(g.a.status!=200){e=ai;e+=bi;e+=ci;e+=di;e+=this.c;e+=ci;e+=ei;e+=g.a.status;e+=ci;e+=hi;e+=g.a.statusText;e+=ii;Bib(e);this.b=gjb(bi,ji);return}this.b=zib(g.a.responseText);h=Aib(this.b,ki);cjb(h+vk)} --~--~-~--~~~---~--~~ 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: Anyone know what an NS_ERROR_NOT_AVAILABLE is?
Ian Bambury schrieb: [NS_ERROR_NOT_AVAILABLE] Just got 3 more and one on a different line (details to follow). If anyone has any idea how to investigate this further, please let me know. Unfortunately, these errors are coming from the live web site and it doesn't happen to me, it seems to be happening to some poor sod from Germany who's using Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) The National Socialists don't exist in Germany anymore, so the error is no error here ;-) Maybe http://radio.javaranch.com/pascarello/2006/02/07/1139345471027.html helps you further. Regards, Lothar --~--~-~--~~~---~--~~ 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: HorizontalSplitPanel splitter image through CSS
Hi, I'm not sure which HTML do you refer to... ? On Apr 6, 2:33 pm, alan m alan.jame...@gmail.com wrote: What's the HTML for this? 2009/4/6 Miloš Ranđelović milos@gmail.com: Hi, What's the correct way of setting the image of the HorizontalSplitPanel splitter through CSS? I've tried several different methods, none worked. This is what I have currently: .gwt-HorizontalSplitPanel .hsplitter { background: #42453D; background-image: url(img/horizontalSplitPanelThumb.png) } I'm using GWT 1.6 RC2. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Search engine indexing
does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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: HorizontalSplitPanel splitter image through CSS
the HorizontalSplitPanel html that gets served out to the browser, that you're trying to use your css on, of course :-) 2009/4/6 Miloš Ranđelović milos@gmail.com: Hi, I'm not sure which HTML do you refer to... ? On Apr 6, 2:33 pm, alan m alan.jame...@gmail.com wrote: What's the HTML for this? 2009/4/6 Miloš Ranđelović milos@gmail.com: Hi, What's the correct way of setting the image of the HorizontalSplitPanel splitter through CSS? I've tried several different methods, none worked. This is what I have currently: .gwt-HorizontalSplitPanel .hsplitter { background: #42453D; background-image: url(img/horizontalSplitPanelThumb.png) } I'm using GWT 1.6 RC2. Thanks! --~--~-~--~~~---~--~~ 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 Portlets framework published
GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ 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: guide on using third party tool to create CSS
I am interested too :) I'm not sure such an editor will be ever available, since gwt apps are completely dynamic and, most of the times, they work with servlet(s) that usually query databases. Maybe you can you Dreamweaver or some other to design a static view (or more) for the programmers to see how to construct the panels/widgets. And besides ... what do you mean by GWT TEMPLATES? :) On Apr 6, 5:56 am, studproc jim.the...@gmail.com wrote: any step by step guideliness or procedures on how to use third party tools like dreamweaver..etc to come out GWT templates? I want to know in detail how designer work with gwt developer ? what files required by designers? --~--~-~--~~~---~--~~ 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: Search engine indexing
Current crawl bots ignore flash and javascript. So if your web app is completely built in GWT (the default behavior when creating a project with projectCreator is to create a single HTML file with a single link to a .nocache.js files which is actually your entry point for entire app), all content will be discarded. On Apr 6, 4:11 pm, Prashant Gupta nextprash...@gmail.com wrote: does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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: A thought about GWT project structure
If you're referencing server-only code from the client, then you have a fundamental problem in what you're trying to do. Same if you're referencing a Widget from the server. Your developers should already know that. If they don't, they need to be educated anyway. It's not rules and tricks but rather right and wrong ways to build an app. The wrong way is to mix client side and server side in one single project. --~--~-~--~~~---~--~~ 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: Easiest way to package a library with optional features requiring a sub-library?
On 6 avr, 04:31, John Gunther johncurtisgunt...@yahoo.com wrote: Sorry, for late reply, I just saw your post. I think you are correct. But, my goal is to eliminate the need for users to physically add the extra JAR file associated with the optional library to their project (unless they need the optional features it provides). What I want is: o Just 1 JAR distributed by me. o Code for optional library in separate JAR distributed/maintained by others o Users of my library don't have to physically mess with the optional JAR (no need to download it, place it on build path, or add an inherits clause) if they don't use those optional features in their code. Ideally, my code might even somehow check if the optional library is available. If so, it uses it, otherwise it uses the built-in fallback. But it would be OK if the developer using my library would just tell it if the optional library is to be used or not. Can't you put those optional features into another module that developers would only inherit if they want to (and thus would have to pull the third-party JAR and put it in the classpath only when opting- in)? If you don't want (or can't, for whichever reason) separate the optional features in a distinct module, than you can use deferred- binding; and opting-in could be either: - inheriting another module containing the appropriate replace-with mappings - setting a property (set-property) to a specific value (this property having been set to a default value in your module) which would trigger different replace-with rules (all in the same module), e.g. your module contains (along with all the needed generate-with mappings) define-property name=use.optional.features values=true,false/set-property name=use.optional.features value=false/, and the developer opts in by adding this line to his module: set-property name=use.optional.features value=true/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Query posted with comma through sendRequest method of RequestBuilder results in 500 error
Hi, The query formed with comma through sendRequest method of RequestBuilder results in 500 internal server error. For instance consider the following query, test.do?param1=oneparam2=test,withcomma. Above URL when posted results in 500 error. I tried using encodeURI and encodeURIComponent APIs of javascript but in vain. Please clarify the following, 1) Is comma a reserved character in GWT ? 2) If question 1 answers yes, how should we handle the same ? Is there any API in GWT to handle it or should we write a customized solution .?? Please clarify ASAP. Thanks. --~--~-~--~~~---~--~~ 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.getModuleBaseURL()
Hello. I would like to use GWT.getModuleBaseURL(). But I can't do it. It is not working. How can I use it? -- Sincerely, Asif Hasanov aihasa...@gmail.com ahese...@rambler.ru ahese...@hotmail.com Tel: +994557007050 15/28, Yeni Ganja, Ganja, Azerbaijan. AZ-2024 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
applet class not found
hi, when i use a html-page with this applet-tag: APPLET CODE = applet.MosaicUploader ARCHIVE = ../applet/ MosaicUploader.jar WIDTH = 50 HEIGHT = 50 Here is the MosaicUploader Applet /APPLET the applet is displayed. But if i use the same html in a widget public class MosaicUploaderAppletWidget extends Composite { public MosaicUploaderAppletWidget() { if( GWT.isScript() ) { initWidget( getAppletHTML() ); }else{ initWidget( new Label( MosaicUploaderMock for embeded mode ) ); } } private HTML getAppletHTML() { StringBuilder sb = new StringBuilder(); sb.append( applet code=\applet.MosaicUploader\ codebase=\../ applet/MosaicUploader.jar\ width=50 height=50 ); sb.append( Here is the MosaicUploader Applet ); sb.append( /applet ); return new HTML( sb.toString() ); } } the java-console of firefox shows this class not found exception: Load: class applet.MosaicUploader not found java.lang.ClassNotFoundException: applet.MosaicUploader at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run (Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http:// localhost:8080/MosaicUpload/applet/MosaicUploader.jar/applet/ MosaicUploader.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Ausnahme: java.lang.ClassNotFoundException: applet.MosaicUploader Using the url http://localhost:8080/MosaicUpload/applet/MosaicUploader.jar ,i can download MosaicUploader.jar which contains a applet.MosaicUploader.class (in subfolder applet). The MosaicUploaderAppletWidget is heavily embeded in Panel-layes. Is that the problem? Regards, Stephan --~--~-~--~~~---~--~~ 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 GWT Widget Printing
Greetings, How about replacing DeferredCommand.add(printFrameCommmand); which is deprecated by DeferredCommand.addCommand(printFrameCommmand); Claude On Apr 5, 12:31 pm, Freller andre.frel...@gmail.com wrote: The beauty of open source! I haven't migrated to 1.5 yet, so this error is new to me. We will jump directly to 1.6. The Print class boil down to : public static void it(String html) { try { buildFrame(html); DeferredCommand.add(printFrameCommmand); } catch (Throwable exc) { Window.alert(exc.getMessage()); } } public static void it(String style, String it) { it(htmlhead+style+/head\nbody+it+/body/ html); } I did that so we could print both DOM elements and strings. Perhaps I should treat DOM elements diferently adding them to the DOM instead of using the toString method? Anybody know if this will render faster and/or more correct prints? Jay, does this work for both 1.4 and 1.5 or it'll only work on 1.5? Regards, Freller On Apr 3, 6:27 pm, jay jay.gin...@gmail.com wrote: It seems that prior to GWT 1.5, element.toString() did the right thing. When I moved to GWT 1.5.3, I had to switch to using DOM.toString( elem ); jay --~--~-~--~~~---~--~~ 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 and Accesebility
I'm making a website that I need to be accessible. I am designing this in JSP and I wonder if I can add any GWT Widget done with, so if you have Javascript enabled to load the page in GWT that no alternative load without Javascript. Thank you. --~--~-~--~~~---~--~~ 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: GWT import external jar
That is correct, if your external library is only used on the server side (Hibernate, axis, etc) then there is no need to reference it in your gwt.xml file. However, if you do need to use it in your client code then it must contain source (.java files) as well as have a gwt.xml file of its own, AND be translatable (not something that your average java lib is) -jason On Apr 4, 2009, at 7:18 AM, Qing wrote: You mean I don't need to add inherits name='FinancialFookit'/ to the OnlineBanker.gwt.xml? On Apr 4, 1:58 am, Vitali Lovich vlov...@gmail.com wrote: Wait, if you only have a dependancy in your server-side code, why are you trying to integrate the client code? On Sat, Apr 4, 2009 at 2:36 AM,Qingzq.zhangq...@gmail.com wrote: I added FinancialToolkit.gwt.xml into the jar. Doesn't work. do I need to put this file to the folder of OnlineBanker as well? On Apr 4, 12:16 am, Nicanor Babula nicanor.bab...@gmail.com wrote: Hi, It looks like you have to add to your jar file FinancialToolkit.gwt.xml. This may help:http://roberthanson.blogspot.com/2006/05/how-to-package-gwt-component .. On Saturday 04 April 2009 06:49:14Qingwrote: Hi, I'm now using gwt develop my web application. I create a gwt project 'OnlineBanker' in command line and import it into eclipse. The server side code of OnlineBanker need to use the class in another java project 'FinancialToolkit'. I export FinancialTookit as a jar file, and import it into OnlineBanker by following away: OnlineBanker-Properties-Java build path- libraries - Add external Jars and I add inherits name='FinancialFookit'/into OnlineBanker.gwt.xml I run it as OnlineBanker-shell, there's error [ERROR] Unable to find 'FinancialTookit.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? Any advice? --~--~-~--~~~---~--~~ 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: How to get internal widget to notify its parent widget when clicked (and have the parent execute something)
the easiest way is to create a click handler that holds a reference to the parent the simplest form would look something like: myWidget.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ parent.doSomething(); } }); no need to do any sink/unsink mucking about. -jason On Apr 4, 2009, at 8:51 PM, matttai wrote: As per the title :) How to get internal widget to notify its parent widget when clicked (and have the parent execute something)? I think it has something to do with sinking and unsinking events but I haven't been able to find a very good example of doing this. Any help would be appreciated! --~--~-~--~~~---~--~~ 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: GWT for Solaris
The GWT compiler should run just fine on any OS with a Java 1.5 JDK. the compiled code should run on any supported browse (no matter what the OS ... for instance it works fine on android and iPhone) As for the Hosted mode, well that is pretty much de-emphasized as it will be replaced with OOPHM in GWT 2.0, so I seriously doubt you'll gain any traction in getting someone to develop a solaris specific version. You could try using the OOPHM version in SVN and see how that works for you. Maybe the FF plugin works on solaris? -jason On Apr 5, 2009, at 10:02 AM, Peter Ondruška wrote: Hello, Are there any plans to provide GWT for Solaris? If not is it OK to request this by creating bug a let vote/star for it? Thanks, Peter --~--~-~--~~~---~--~~ 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: Search engine indexing
any alternative or solution to this ? On Mon, Apr 6, 2009 at 7:20 PM, djd alex.dobjans...@gmail.com wrote: Current crawl bots ignore flash and javascript. So if your web app is completely built in GWT (the default behavior when creating a project with projectCreator is to create a single HTML file with a single link to a .nocache.js files which is actually your entry point for entire app), all content will be discarded. On Apr 6, 4:11 pm, Prashant Gupta nextprash...@gmail.com wrote: does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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: Search engine indexing
There are discussions about this (SEO) on this list, have a search for them. But basically, you'll want to embed the information you want indexed into your host pages. This is not a GWT limitation but rather a limitation of any web application that uses DOM modification to present content. -jason On Apr 6, 2009, at 9:29 AM, Prashant Gupta wrote: any alternative or solution to this ? On Mon, Apr 6, 2009 at 7:20 PM, djd alex.dobjans...@gmail.com wrote: Current crawl bots ignore flash and javascript. So if your web app is completely built in GWT (the default behavior when creating a project with projectCreator is to create a single HTML file with a single link to a .nocache.js files which is actually your entry point for entire app), all content will be discarded. On Apr 6, 4:11 pm, Prashant Gupta nextprash...@gmail.com wrote: does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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: GWT and Accesebility
traditionally: script type=txt/javascript// if (javascript): do javascript here/script noscriptelse: put your static html here for no-script users/noscript but you could instead put the static html stuff in div id=gwtAttachPointhere/div so it either gets replaced by your gwt stuff, or is unaffected by noscript browsers? On Mon, Apr 6, 2009 at 3:49 PM, jamer jameragui...@gmail.com wrote: I'm making a website that I need to be accessible. I am designing this in JSP and I wonder if I can add any GWT Widget done with, so if you have Javascript enabled to load the page in GWT that no alternative load without Javascript. Thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Unable to extend TreeItem because of package level access
Hi all, I am trying to extend TreeItem class in the package com.google.gwt.user.client.ui. When I try to override the method setTree(Tree tree), I observe that the children instance variable is not accessible and some of the methods its calling on Tree instance are package access restricted. For example, tree.adopt(child) and tree.orphan(child). Can anyone please tell me why these functions are having package level access? Thanks Ganesh --~--~-~--~~~---~--~~ 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: Runasync feature of GWT
I haven't switched to the trunk for this yet, but I can tell you that I positively must start using runAsync soon. My site (langolab.com) has over 100kb of gzipped monolithic gwt javascript at this point, and it's growing quickly. The only way for us to avoid hitting a javascript size wall is to start breaking up the code. Adam On Mar 31, 9:19 am, Chris chrish...@gmail.com wrote: Adam/Anyone? We are thinking of moving to trunk for theRunAsyncfeature. What has been your experience with the quality/stability of the current trunk? Is your application in a production environment or still under development? Given the release schedule of GWT (looks like about 9-12 months between releases) it is going to be a while until the next release which containsRunAsync. Thanks, Chris On Mar 30, 3:56 pm, Adam T adam.t...@gmail.com wrote: Hi Ghostcoder, You need to grab the trunk and compile it to use theRunAsync feature. This is a useful guide:http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting I'm using it quite heavily in an application I'm building and whilst very useful it can be a little frustrating when your download doesn't split as you expect (I've not got the SOYC tool the article mentions up and running yet). Still, the results are pretty impressive. //Adam On 30 Mar, 20:35, Ghostcoder thanneer.ma...@gmail.com wrote: My application is very huge and the HTML file with script is huge ,so I like to split the script size into small chunks so that the load time is better. I have seen some post onrunasyncfeature in GWT ,I like to test that feature can someone suggest the correct stable revision which i can use to test this feature. Any usage document onRunasyncwould be really helpful. Do we need JAVA SDK 1.6 to build the source code in the trunk? I had posted a similar question in the forum a few days back but under a wrong thread so sorry for posting the query once again . http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... Thanks --~--~-~--~~~---~--~~ 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 Canvas setCoordSize
setCoordSize method... what exactly does this do? I've never had to do this in javascript, so I'm kinda lost on this one as it seems to really matter in GWT. --~--~-~--~~~---~--~~ 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: GWT.log doesn't generate messages to console
On Mar 30, 5:33 pm, Ian Bambury ianbamb...@gmail.com wrote: Mmm, Well, It works for me in 1.5 and 1.6 I'd suggest that you start again from scratch, or if you like, I can zip you up a copy which works for me. Ian, thanks very much for staying with this. I finally figured this out. After trying your suggestion with no change in results (still no log messages showing), I took a look at the default launch configuration. It has -logLevel=ERROR. changing this to INFO shows the output of GWT.log. I apologize for wasting your time. Hopefully, this email thread will help someone else. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Folks.. I need a direction
Hello All, My goal is to use a developed persistence layer where validation, fetch , add , update and delete operations are performed with GWT. This persistence is not EJB, Spring nor hibernate. They are simple objects doing validations and operations. I am looking for a mechanism to pass beans to the UI then making those beans triggering the persistence layer , pass updates and receive OK or errors based on the business validation rules. Something like bean property change fire etc... What would be the best direction to follow with GWT? Are there such examples? Any help is appreciated --~--~-~--~~~---~--~~ 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: A thought about GWT project structure
Nothing says that you do. But you will want to then have at least a 3rd project that contains the common types shared between client server. And you'll probably want to leave the RPC code in the client-side project to separate your front-end code from your back-end business logic. On Mon, Apr 6, 2009 at 10:03 AM, Ken kenxu...@yahoo.com wrote: If you're referencing server-only code from the client, then you have a fundamental problem in what you're trying to do. Same if you're referencing a Widget from the server. Your developers should already know that. If they don't, they need to be educated anyway. It's not rules and tricks but rather right and wrong ways to build an app. The wrong way is to mix client side and server side in one single project. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MenuBar Submenu Remove Border
Does anyone know of a way to completely remove the border on a popup submenu from a MenuBar? I've played around with the styles for a couple of hours, but I've only been able to change the style of the shadow for some reason. Thanks, Bill Davis. --~--~-~--~~~---~--~~ 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 GWT Widget Printing
I'm not sure what you're asking... If you're asking if you can pass a DOM element to your it method and have it work, then in 1.5 the answer is no...the implicit toString() call won't do what it does in 1.4. Which is why in 1.5 you need to use the DOM.toString() method... (If you're asking something else, then I apologize for not answering it.) jay On Apr 5, 9:31 am, Freller andre.frel...@gmail.com wrote: The beauty of open source! I haven't migrated to 1.5 yet, so this error is new to me. We will jump directly to 1.6. The Print class boil down to : public static void it(String html) { try { buildFrame(html); DeferredCommand.add(printFrameCommmand); } catch (Throwable exc) { Window.alert(exc.getMessage()); } } public static void it(String style, String it) { it(htmlhead+style+/head\nbody+it+/body/ html); } I did that so we could print both DOM elements and strings. Perhaps I should treat DOM elements diferently adding them to the DOM instead of using the toString method? Anybody know if this will render faster and/or more correct prints? Jay, does this work for both 1.4 and 1.5 or it'll only work on 1.5? Regards, Freller On Apr 3, 6:27 pm, jay jay.gin...@gmail.com wrote: It seems that prior to GWT 1.5, element.toString() did the right thing. When I moved to GWT 1.5.3, I had to switch to using DOM.toString( elem ); jay --~--~-~--~~~---~--~~ 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: iText Causing GWT-RPC callback to fail. Need to send to HttpServletResponse?
You can't send a PDF (or any other binary blob) to a GWT app over RPC. Well, you can, but you can't do anything useful with it on the client. You need to switch back to traditional servlets behind traditional URLs. It's the same problem as serving images over RPC and that's been discussed here before. Try searching the list's history if you get stuck. Ian --~--~-~--~~~---~--~~ 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 GWT Widget Printing
Hi Jay, It's working fine now with the DOM.toString() method you have suggested I was speaking about the deprecated method DeferredCommand.add... Sorry if I had been confusing! Thanks a lot for your great solution! Claude On Apr 6, 1:42 pm, jay jay.gin...@gmail.com wrote: I'm not sure what you're asking... If you're asking if you can pass a DOM element to your it method and have it work, then in 1.5 the answer is no...the implicit toString() call won't do what it does in 1.4. Which is why in 1.5 you need to use the DOM.toString() method... (If you're asking something else, then I apologize for not answering it.) jay On Apr 5, 9:31 am, Freller andre.frel...@gmail.com wrote: The beauty of open source! I haven't migrated to 1.5 yet, so this error is new to me. We will jump directly to 1.6. The Print class boil down to : public static void it(String html) { try { buildFrame(html); DeferredCommand.add(printFrameCommmand); } catch (Throwable exc) { Window.alert(exc.getMessage()); } } public static void it(String style, String it) { it(htmlhead+style+/head\nbody+it+/body/ html); } I did that so we could print both DOM elements and strings. Perhaps I should treat DOM elements diferently adding them to the DOM instead of using the toString method? Anybody know if this will render faster and/or more correct prints? Jay, does this work for both 1.4 and 1.5 or it'll only work on 1.5? Regards, Freller On Apr 3, 6:27 pm, jay jay.gin...@gmail.com wrote: It seems that prior to GWT 1.5, element.toString() did the right thing. When I moved to GWT 1.5.3, I had to switch to using DOM.toString( elem ); jay --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
add listener onpaste
how I can add this event in a textarea? thanks --~--~-~--~~~---~--~~ 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: iText Causing GWT-RPC callback to fail. Need to send to HttpServletResponse?
you are unlikely to get the pdf back from an RPC in any useful form. The RPC mechanism is expecting a particular format, and manually mucking about with the response object is going to upset that expectation. Even if you did manage to get the bytes back via the RPC's XHR, what would you plan on doing with them? basically, what you want to do is either use a form post to supply the generation parameters and target a new window where the receiving servlet could send the generated PDF, or use a 2 request system where you send your RPC with the parameters and cause the PDF to be generated, then a second request (new Window using a get request) to fetch the generated PDF. The 2 request method allows you to report any errors to the user via the Response or by throwing an exception. -jason On Apr 6, 2009, at 12:28 PM, Superman859 wrote: I want to use iText to generate a PDF file. Ideally, I can incorporate a generatePDF() method into my interface and my Servlet that is involved in GWT-RPC. When that method is called, I want it to generate a PDF file and either display it to the user in a new window or present a save dialog box or anything - something that leaves the GWT app as it was and allows the user to view / save / print the PDF. Generating the PDF is not a problem. I can generate one and write it to a file on the server without any trouble. However, I am having trouble presenting the user with it (I would rather NOT write them to files on the server, and just let the user save on their own machine if they wish to do so). Here is code for a sample Hello World public boolean generatePDF(ReportDO report, int id) { System.out.println(hello world to follow); // get request //HttpServletRequest request = getThreadLocalRequest(); // get response HttpServletResponse response = getThreadLocalResponse(); Document document = new Document(); // generate test PDF try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); //PdfWriter.getInstance(document, new FileOutputStream (HelloWorld.pdf)); PdfWriter.getInstance(document, baos); document.open(); document.add(new Paragraph(hello world)); document.close(); // setting some response headers response.setHeader(Expires, 0); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); response.setContentType(application/pdf); // content length is needed for MSIE response.setContentLength(baos.size()); // write ByteArrayOutputStream to ServletOutputStream ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } catch (Exception e) { System.out.println(generatePDF:Exception + e.getMessage()); } return true; } This code is in my GWT-RPC Servlet, which extends RemoteServiceServlet. Note if I use the currently commented line of FileOutputStream(HelloWorld.pdf) it will generate the file and work fine. However, if I try to send it to the browser, nothing appears, and the AsyncCallback for GWT-RPC calls the onFailure() method. Does anyone know where the problem might be? I'm assuming it has to do with response. RemoteServiceServlet has a method getThreadLocalResponse() which returns HttpServletResponse, which is what the iText examples use. I know very little about these response objects. But it seems that somehow there is some interference between that and GWT-RPC. The AsyncCallback is a success when writing to file. However, when attempting to send to browser, it fails. --~--~-~--~~~---~--~~ 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: opening new page
In general, you need a module file (.gwt.xml) for each GWT module (anything with onModuleLoad()). Perhaps it would be best at this point if you posted your code and described in more detail what you're doing. Which GWT version? Are you testing in hosted mode? With the embedded server? Tony --- Tony Strauss Designing Patterns, LLC http://www.designingpatterns.com http://blogs.designingpatterns.com On Apr 5, 3:34 am, bhanu baksh...@gmail.com wrote: Hi, Thanks sir for the reply.I need to use to use form.setAction (newpage); Because it has to bring the values from login page to newpage. when I used form.setAction(newpage) I got the the runtime error saying newpage-gwt.xml could not find in classpath. So my doubt is, for each page do I need to create the each module? Sir I am new to gwt. I read lots of articles, But i could not find out any article saying forwarding pages. So I request you I may make many mistakes and foolish questions. sorry for that. thanks Bhanu lakshmi. On Apr 5, 10:32 am, Tony Strauss tony.stra...@designingpatterns.com wrote: The Window.Location.assign() method allows you to move to a different page.http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g... --- Tony Strauss Designing Patterns, LLChttp://www.designingpatterns.comhttp://blogs.designingpatterns.com On Apr 4, 3:15 pm, bhanu baksh...@gmail.com wrote: Hi Friends, I am new to GWT. I have been going through some tutorials and some other stuffs. But I could not find out any thing regarding to open new different page. A Simple example is Login screen. Once the user successfully logged in, it should be able to open new page and should show his name like Welcome username. One I found out, using formpanel. form.setAction(\newpage); I tried to use. But i got some error when I tried to click login button regarding module name not found in classpath. My login screen has the entry point. when I click login button, it should go to the new page .so that new page should have a session details from the login screen. can you please help me? Thanks Bhanu lakshmi- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: add listener onpaste
Just listen for key events use a deferred command to invoke your action so that when you call getText it has the updated value. On Mon, Apr 6, 2009 at 2:52 PM, fother fot...@gmail.com wrote: how I can add this event in a textarea? thanks --~--~-~--~~~---~--~~ 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 Violates LGPL
LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. GWT/Google provides neither an offer or the source. Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. GWT package should include the source code for any LGPL components. How does one get Google GWT project managers to be aware of this issue? --~--~-~--~~~---~--~~ 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: GWT Violates LGPL
Last time i checked the source code is with the binary. everything is in the jar files. On Apr 6, 1:27 pm, allan allan1...@gmail.com wrote: LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. GWT/Google provides neither an offer or the source. Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. GWT package should include the source code for any LGPL components. How does one get Google GWT project managers to be aware of this issue? --~--~-~--~~~---~--~~ 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: iText Causing GWT-RPC callback to fail. Need to send to HttpServletResponse?
For itext just do a like to like a jsp page that will run the itext gen. Thats how i do it and it works great. On Apr 6, 11:55 am, Peter Ondruška peter.ondru...@gmail.com wrote: I think you should not use GWT RPC servlet, just use normal servlet. 2009/4/6, Superman859 russ.d.hollo...@gmail.com: I want to use iText to generate a PDF file. Ideally, I can incorporate a generatePDF() method into my interface and my Servlet that is involved in GWT-RPC. When that method is called, I want it to generate a PDF file and either display it to the user in a new window or present a save dialog box or anything - something that leaves the GWT app as it was and allows the user to view / save / print the PDF. Generating the PDF is not a problem. I can generate one and write it to a file on the server without any trouble. However, I am having trouble presenting the user with it (I would rather NOT write them to files on the server, and just let the user save on their own machine if they wish to do so). Here is code for a sample Hello World public boolean generatePDF(ReportDO report, int id) { System.out.println(hello world to follow); // get request //HttpServletRequest request = getThreadLocalRequest(); // get response HttpServletResponse response = getThreadLocalResponse(); Document document = new Document(); // generate test PDF try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); //PdfWriter.getInstance(document, new FileOutputStream (HelloWorld.pdf)); PdfWriter.getInstance(document, baos); document.open(); document.add(new Paragraph(hello world)); document.close(); // setting some response headers response.setHeader(Expires, 0); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); response.setContentType(application/pdf); // content length is needed for MSIE response.setContentLength(baos.size()); // write ByteArrayOutputStream to ServletOutputStream ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } catch (Exception e) { System.out.println(generatePDF:Exception + e.getMessage()); } return true; } This code is in my GWT-RPC Servlet, which extends RemoteServiceServlet. Note if I use the currently commented line of FileOutputStream(HelloWorld.pdf) it will generate the file and work fine. However, if I try to send it to the browser, nothing appears, and the AsyncCallback for GWT-RPC calls the onFailure() method. Does anyone know where the problem might be? I'm assuming it has to do with response. RemoteServiceServlet has a method getThreadLocalResponse() which returns HttpServletResponse, which is what the iText examples use. I know very little about these response objects. But it seems that somehow there is some interference between that and GWT-RPC. The AsyncCallback is a success when writing to file. However, when attempting to send to browser, it fails. --~--~-~--~~~---~--~~ 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: GWT Violates LGPL
On Apr 6, 4:27 pm, allan allan1...@gmail.com wrote: LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. No, this is true of works using the GPL, but not of works using the LGPL. You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. The LGPL does not require source, it is only one of a myriad of options to comply with it. GWT/Google provides neither an offer or the source. As they don't have to Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. No, you aren't. GWT package should include the source code for any LGPL components. It doesn't have to. If GWT was modifying the LGPL works, it would need to comply with other sections of the LGPL, but as it simply uses the works unmodified, it is only required to comply with section 6. See section 6 of LGPL 2.1 (which is the license for the LGPL components of GWT): 6. As an exception to the Sections above, you may also combine or link a work that uses the Library with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: ... b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. As GWT complies with section 6 (and is a work that uses the library), using option b (note it says you must do one of these things, not all of these things), there is no requirement they make an offer for source. HTH, Dan --~--~-~--~~~---~--~~ 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: GWT Violates LGPL
Isn't GWT released under the Apache license? I don't think it's possible for GWT to violate the GPL. Of course, I'm not a lawyer Ian On Mon, Apr 6, 2009 at 1:27 PM, allan allan1...@gmail.com wrote: LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. GWT/Google provides neither an offer or the source. Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. GWT package should include the source code for any LGPL components. How does one get Google GWT project managers to be aware of this issue? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How to check a login
Hello, I have a problem. When a user types in his usename and password, then hits a Validate button, i'd like to check whether the String couple he just typed matches anything in a database. I do that by calling execute() which is within the LoginCommand class which implements Command. However, it doesn't work, and I can't even run it as GWT hosted mode application, I get the following error : Failed to load module Errors in 'file:/home//command/LoginCommand.java' Line 42 : No source code is available for type .../LogonServiceImpl; did you forget to inherit a required module ? (Line 42 : LogonServiceImpl logservice = new LogonServiceImpl();) ___ ___ package com.enseirb.projecthandler.client.command; import java.util.List; import javax.servlet.http.HttpServletRequest; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.enseirb.projecthandler.server.servlet.LogonServiceImpl; import com.enseirb.projecthandler.client.object.SerializableUser; import com.enseirb.projecthandler.client.service.LogonService; import com.enseirb.projecthandler.client.service.LogonServiceAsync; import com.enseirb.projecthandler.client.view.Login; import com.enseirb.projecthandler.client.view.Menu; import com.enseirb.projecthandler.server.mapping.HibernateUtil; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; public class LoginCommand implements Command { private Login logSystem; public void execute(){ //Gets informations on an onclick event final String login = logSystem.getUsername(); final String pass = logSystem.getPassword(); //Gets the service and specifies its name LogonServiceAsync logonService = (LogonServiceAsync) GWT.create (LogonService.class); ServiceDefTarget endpoint = (ServiceDefTarget) logonService; String moduleRelativeURL = GWT.getModuleBaseURL() + logon; endpoint.setServiceEntryPoint(moduleRelativeURL); //Creates callback AsyncCallback callback = new AsyncCallback() { public void onFailure(Throwable caught) { Window.alert(Login process failed !); } public void onSuccess(Object result) { SerializableUser user = (SerializableUser) result; if (user!=null) { LogonServiceImpl logservice = new LogonServiceImpl(); user = logservice.checkLogin(login, pass); if(user.getStatus().equals(admin)){ logSystem.setLogin(); Command home = new ViewHomeCommand(); } else if(user.getStatus().equals(student)){ logSystem.setLogin(); Command cmd = new LogStudentCommand(); } else if(user.getStatus().equals(teacher)){ logSystem.setLogin(); Command cmd = new ShowCaseCommand(1); } } else {//Maybe useless... to be checked logSystem = null; Window.alert(Invalid login/password !); } } }; logonService.checkLogin(login, pass, callback); } public LoginCommand(Login login){ logSystem = login; } } _ _ package com.enseirb.projecthandler.server.servlet; import java.util.HashMap; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.hibernate.Session; import com.enseirb.projecthandler.client.object.SerializableUser; import com.enseirb.projecthandler.client.service.LogonService; import com.enseirb.projecthandler.server.mapping.HibernateUtil; import com.google.gwt.user.server.rpc.RemoteServiceServlet; /* * Implementation of our service interface with a server-side servlet */ public class LogonServiceImpl extends RemoteServiceServlet implements LogonService{ private HttpSession getSession() { // Get the current request and then return its session return this.getThreadLocalRequest().getSession(); } @Override public SerializableUser checkLogin(String login, String password) { // TODO Check login and password from a database // return user from
Re: GWT Violates LGPL
You've stated some very bold claims. How did you become so convinced of this violation and the need to address it? Are you the Beginning Rails author? On Mon, Apr 6, 2009 at 4:27 PM, allan allan1...@gmail.com wrote: LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. GWT/Google provides neither an offer or the source. Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. GWT package should include the source code for any LGPL components. How does one get Google GWT project managers to be aware of this issue? --~--~-~--~~~---~--~~ 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: GWT Violates LGPL
On Mon, Apr 6, 2009 at 4:58 PM, Ian Petersen ispet...@gmail.com wrote: Isn't GWT released under the Apache license? I don't think it's possible for GWT to violate the GPL. Of course, I'm not a lawyer Yes it s released as Apache. Of course it's possible for it to violate the GPL (it doesn't as far as OI'm aware, but it is possible). This is especially unlikely considering the amount of visibility of the GWT project I'm sure that lawyer's have vetted the licensing issues. Full source code access, BTW, is available at http://code.google.com/p/google-web-toolkit/. Ian On Mon, Apr 6, 2009 at 1:27 PM, allan allan1...@gmail.com wrote: LGPL/GPL have the obligation to provide source with any binary distributions. Source can be provided directly with the binaries or in an offer, made available to the public for 3 years. GWT is not LGPL or GPL so that doesn't apply. AFAIK, they also don't make use of any LGPL or GPL code - do you have any examples of this? You cannot fulfill the obligation by pointing to a 3rd party download site for the source. Go ask Cisco and others who have had to comply with this requirement. They are not pointing to a 3rd party download site anywhere - if you don't know, Google owns the copyright to GWT also hosts the GWT project on Google code (along with other projects). As the copyright owners of the code, they can do whatever they like (copyright holders can obviously violate the terms of their license since their not going to prosecute themselves). GWT/Google provides neither an offer or the source. GWT provides the source. Not only is Google in violation but I, or any one redistributing GWT, will be violating LGPL as well. I will have to separately provide the source any time I distribute GWT. Please explain to me how the LGPL applies here - in particular, what pieces of code are covered under this license. Not to mention that all of the user-distributable stuff comes with source in the jars by design because the compiler needs them for compilation , I don't even see how this applies unless you were trying to distribute the compiler (which again you still can even without the source). GWT package should include the source code for any LGPL components. Please enumarate any LGPL components, let alone the ones that don't come with source. BTW, if you don't modify the LGPL components, pointing to the original project is sufficient (IANAL, so I could very well be wrong on this). Not sure what the behaviour is with GPL (but I'm pretty sure there you would have to provide the original source as well - a link wouldn't be enough). How does one get Google GWT project managers to be aware of this issue? If there are any real issues, they can be made aware, but there's no point disturbing them with this nonsense (although they probably monitor this list anyways). --~--~-~--~~~---~--~~ 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: iText Causing GWT-RPC callback to fail. Need to send to HttpServletResponse?
There is a PDF generation demo using a GWT entrypoint on the DynamicJasper website (a wrapper for Jasper, which I think still uses iText deep inside). http://dynamicjasper.sourceforge.net/ Anyway you can look at the relevant servlet code there, and the hand-off from the GWT run report button. On Mon, Apr 6, 2009 at 4:55 PM, thebuz...@gmail.com thebuz...@gmail.comwrote: For itext just do a like to like a jsp page that will run the itext gen. Thats how i do it and it works great. On Apr 6, 11:55 am, Peter Ondruška peter.ondru...@gmail.com wrote: I think you should not use GWT RPC servlet, just use normal servlet. 2009/4/6, Superman859 russ.d.hollo...@gmail.com: I want to use iText to generate a PDF file. Ideally, I can incorporate a generatePDF() method into my interface and my Servlet that is involved in GWT-RPC. When that method is called, I want it to generate a PDF file and either display it to the user in a new window or present a save dialog box or anything - something that leaves the GWT app as it was and allows the user to view / save / print the PDF. Generating the PDF is not a problem. I can generate one and write it to a file on the server without any trouble. However, I am having trouble presenting the user with it (I would rather NOT write them to files on the server, and just let the user save on their own machine if they wish to do so). Here is code for a sample Hello World public boolean generatePDF(ReportDO report, int id) { System.out.println(hello world to follow); // get request //HttpServletRequest request = getThreadLocalRequest(); // get response HttpServletResponse response = getThreadLocalResponse(); Document document = new Document(); // generate test PDF try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); //PdfWriter.getInstance(document, new FileOutputStream (HelloWorld.pdf)); PdfWriter.getInstance(document, baos); document.open(); document.add(new Paragraph(hello world)); document.close(); // setting some response headers response.setHeader(Expires, 0); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); response.setContentType(application/pdf); // content length is needed for MSIE response.setContentLength(baos.size()); // write ByteArrayOutputStream to ServletOutputStream ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } catch (Exception e) { System.out.println(generatePDF:Exception + e.getMessage()); } return true; } This code is in my GWT-RPC Servlet, which extends RemoteServiceServlet. Note if I use the currently commented line of FileOutputStream(HelloWorld.pdf) it will generate the file and work fine. However, if I try to send it to the browser, nothing appears, and the AsyncCallback for GWT-RPC calls the onFailure() method. Does anyone know where the problem might be? I'm assuming it has to do with response. RemoteServiceServlet has a method getThreadLocalResponse() which returns HttpServletResponse, which is what the iText examples use. I know very little about these response objects. But it seems that somehow there is some interference between that and GWT-RPC. The AsyncCallback is a success when writing to file. However, when attempting to send to browser, it fails. --~--~-~--~~~---~--~~ 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: How to check a login
Please look at the tutorial http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=GettingStartedRPC. That should hopefully clear things up. There's two parts to the RPC (although 3 classes). Async - the client side class that serializes the objects sends out a request to the server. Impl - the server side class that gets called when the request is received deserialized. it then returns at which point the result gets serialized sent back. At this point, the callback given to the async invocation on the client side is invoked with the result. So on the client side, no references to the service implementation. 1 call to the async is enough On a side note, I dunno about what the recommended best practices are for GWT, but I prefer to throw a custom exception instead of returning null (that way onSuccess always has valid data onFailure is responsible for handling failure). Also, I recommend you provide template parameters for your AsyncCallback (makes your code neater so you don't have explicit casting everywhere). i.e. AsyncCallbackSerializableUser... onSuccess(SerializableUser user) So mainly, just delete the lines: LogonServiceImpl logservice = new LogonServiceImpl(); user = logservice.checkLogin(login, pass); On Mon, Apr 6, 2009 at 5:03 PM, Lorenzaccio thewiseo...@hotmail.com wrote: Hello, I have a problem. When a user types in his usename and password, then hits a Validate button, i'd like to check whether the String couple he just typed matches anything in a database. I do that by calling execute() which is within the LoginCommand class which implements Command. However, it doesn't work, and I can't even run it as GWT hosted mode application, I get the following error : Failed to load module Errors in 'file:/home//command/LoginCommand.java' Line 42 : No source code is available for type .../LogonServiceImpl; did you forget to inherit a required module ? (Line 42 : LogonServiceImpl logservice = new LogonServiceImpl();) ___ ___ package com.enseirb.projecthandler.client.command; import java.util.List; import javax.servlet.http.HttpServletRequest; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.enseirb.projecthandler.server.servlet.LogonServiceImpl; import com.enseirb.projecthandler.client.object.SerializableUser; import com.enseirb.projecthandler.client.service.LogonService; import com.enseirb.projecthandler.client.service.LogonServiceAsync; import com.enseirb.projecthandler.client.view.Login; import com.enseirb.projecthandler.client.view.Menu; import com.enseirb.projecthandler.server.mapping.HibernateUtil; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.ServiceDefTarget; public class LoginCommand implements Command { private Login logSystem; public void execute(){ //Gets informations on an onclick event final String login = logSystem.getUsername(); final String pass = logSystem.getPassword(); //Gets the service and specifies its name LogonServiceAsync logonService = (LogonServiceAsync) GWT.create (LogonService.class); ServiceDefTarget endpoint = (ServiceDefTarget) logonService; String moduleRelativeURL = GWT.getModuleBaseURL() + logon; endpoint.setServiceEntryPoint(moduleRelativeURL); //Creates callback AsyncCallback callback = new AsyncCallback() { public void onFailure(Throwable caught) { Window.alert(Login process failed !); } public void onSuccess(Object result) { SerializableUser user = (SerializableUser) result; if (user!=null) { LogonServiceImpl logservice = new LogonServiceImpl(); user = logservice.checkLogin(login, pass); if(user.getStatus().equals(admin)){ logSystem.setLogin(); Command home = new ViewHomeCommand(); } else if(user.getStatus().equals(student)){ logSystem.setLogin(); Command cmd = new LogStudentCommand(); } else if(user.getStatus().equals(teacher)){ logSystem.setLogin(); Command cmd = new ShowCaseCommand(1); } } else {//Maybe useless... to be checked logSystem = null;
Re: Starting Hosted Mode leads to java.lang.UnsatisfiedLinkError (Unable to load Mozilla for hosted mode)
Hi Steffen, Make sure that you have the libstdc++5 installed on your machine. Other developers who have experienced this issue found out that they were missing the library, or had a different version of the library installed (e.g. libstdc++6). Also, you might want to verify that the permissions are correctly set on the .so to make sure the hosted mode process can access it on startup. If you're using Debian, the following command may help: sudo apt-get install libstdc++5 Hope that helps, -Sumit Chandel On Tue, Mar 31, 2009 at 1:15 PM, stsch stsc...@schliwinski.de wrote: If I try to run the samples or a newly created GWT application in Hosted Mode I get the following error: ** Unable to load Mozilla for hosted mode ** java.lang.UnsatisfiedLinkError: /home/steffen/Desktop/gwt-linux-1.5.3/ mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1663) at java.lang.Runtime.load0(Runtime.java:787) at java.lang.System.load(System.java:1022) at com.google.gwt.dev.shell.moz.MozillaInstall.load (MozillaInstall.java:190) at com.google.gwt.dev.BootStrapPlatform.init(BootStrapPlatform.java: 49) at com.google.gwt.dev.GWTShell.main(GWTShell.java:354) My OS is Ubuntu 8.04 (Hardy Heron). Any idea what is going wrong here and how to fix this? -Steffen- --~--~-~--~~~---~--~~ 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 GWT applications on the fly
Hi All, I have an application which has 3 tabs.,.. the first tab is called user desktop while the other 2 are based on functional areas like general, payroll. Combined these 2 general and payroll have 17 widgets total. The user desktop is something where user can select 10 widgets to be shown.. its all configured and stored in database.. Now i am trying to read that and send JSON data with the module names to the user desktop now question is how do i load those on the fly? I have a complexPanel and planning to load them in that.. how do i load and refresh widgets on the fly? any help is appreciated... --~--~-~--~~~---~--~~ 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: MenuBar Submenu Remove Border
http://www.w3schools.com/CSS/pr_class_visibility.asp css attribute name visibility set to hidden. To find the class that you need to apply it to, use something like firebug. It might not have an explicit class assigned, so you'll want to use css selectorshttp://www.w3.org/TR/CSS2/selector.htmlor provide an explicit class in the GWT code. On Mon, Apr 6, 2009 at 2:07 PM, Bill Davis bdav...@gmail.com wrote: Does anyone know of a way to completely remove the border on a popup submenu from a MenuBar? I've played around with the styles for a couple of hours, but I've only been able to change the style of the shadow for some reason. Thanks, Bill Davis. --~--~-~--~~~---~--~~ 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: Folks.. I need a direction
There is no framework for this. There is some validation stuff in incubator other projects though. You'll have write your own classes to do this. On Mon, Apr 6, 2009 at 11:32 AM, ammours amer.saifedd...@gmail.com wrote: Hello All, My goal is to use a developed persistence layer where validation, fetch , add , update and delete operations are performed with GWT. This persistence is not EJB, Spring nor hibernate. They are simple objects doing validations and operations. I am looking for a mechanism to pass beans to the UI then making those beans triggering the persistence layer , pass updates and receive OK or errors based on the business validation rules. Something like bean property change fire etc... What would be the best direction to follow with GWT? Are there such examples? Any help is appreciated --~--~-~--~~~---~--~~ 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: MenuBar Submenu Remove Border
Thanks, that seems pretty obvious now that I'm at home :) Unfortunately at work, I don't have any tools like that and we're not allowed to download software without going thru a lot of red tape, so sometimes I don't think about that method. Thanks, Bill. --~--~-~--~~~---~--~~ 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: MenuBar Submenu Remove Border
Wow - you can't even install a firefox plugin? That sucks. But even still, you could have manually iterated over the DOM (or used DOM.toString() at the appropriate time to get the DOM structure at a specific point in time). All widgets have a getElement method that returns the DOM element. On Mon, Apr 6, 2009 at 9:11 PM, Bill Davis bdav...@gmail.com wrote: Thanks, that seems pretty obvious now that I'm at home :) Unfortunately at work, I don't have any tools like that and we're not allowed to download software without going thru a lot of red tape, so sometimes I don't think about that method. Thanks, Bill. --~--~-~--~~~---~--~~ 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: iText Causing GWT-RPC callback to fail. Need to send to HttpServletResponse?
Thanks for all the responses. I had (and still do) little understanding of responses and requests as I rarely work directly with them. However, I now see that GWT-RPC is not the way to go. From what I've read and what I saw using Firebug, GWT-RPC sets up the response variable for it's own purposes as part of GWT-RPC, so by going in and modifying it myself I caused problems with GWT-RPC. Instead of extending RemoteServiceServlet, I extended HttpServlet and have been able to get a result. However, I was not able to get a result from the GWT app yet using RequestBuilder. I attempted to do so, and the function ran (I had some print statements which showed up in the log) successfully and the RequestCallback received a response. However, nothing happened. Is it possible to do this using RequestBuilder? Using Firebug, I saw a response was generated and it seemed to have the correct headers as I had set. However, no PDF file opened, was offered, etc. and it appeared as if nothing happened. I was able to get it to generate a PDF by simply typing the URL into my browser... www.site.com/app-name/PDFServlet that URL displayed a Hello World example PDF as expected. Ideally, this would open by clicking from GWT app. I suppose I could create a standard HTML link in the GWT app and that may work, but I wonder why the RequestBuilder did not work, even though response was returned. And finally - does anyone have any tips on ways to make it more secure somehow? While there is a rare chance, and it probably wouldn't be anything serious, anyone could type in the URL in the browser and view the reports that will be generated, provided they pass in the report ID, etc. Is there a way that it would only work if accessed from the app (which is user protected) or are there any other tips on making it a bit more secure? Below is my current servlet code, followed by the RequestBuilder part of the app that failed to work as expected. public class PDFServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println(Hello World! to follow); Document document = new Document(); // generate test PDF try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); //PdfWriter.getInstance(document, new FileOutputStream (HelloWorld.pdf)); PdfWriter.getInstance(document, baos); document.open(); document.add(new Paragraph(Hello World!)); document.close(); // setting some response headers response.setHeader(Expires, 0); response.setHeader(Cache-Control, must-revalidate, post-check=0, pre-check=0); response.setHeader(Pragma, public); response.setContentType(application/pdf); // content length is needed for MSIE response.setContentLength(baos.size()); // write ByteArrayOutputStream to ServletOutputStream ServletOutputStream out = response.getOutputStream(); baos.writeTo(out); out.flush(); } catch (Exception e) { System.out.println(PDFServlet::doGet::Exception + e.getMessage ()); } } } /* * Code in GWT app - ultimately I will pass report type, ID to the servlet to generate the * appropriate report */ public void onRecordClick(RecordClickEvent event) { //need to add report ID, etc. to the request in the future RequestBuilder request = new RequestBuilder(RequestBuilder.GET, PDFService); request.setCallback(new RequestCallback() { public void onError(Request request, Throwable exception) { SC.say(onError); // this is just an alert } public void onResponseReceived(Request request, Response response) { SC.say(onResponseReceived); // alert } }); On Apr 6, 5:45 pm, Daniel Jue teamp...@gmail.com wrote: There is a PDF generation demo using a GWT entrypoint on the DynamicJasper website (a wrapper for Jasper, which I think still uses iText deep inside). http://dynamicjasper.sourceforge.net/ Anyway you can look at the relevant servlet code there, and the hand-off from the GWT run report button. On Mon, Apr 6, 2009 at 4:55 PM, thebuz...@gmail.com thebuz...@gmail.comwrote: For itext just do a like to like a jsp page that will run the itext gen. Thats
Help with Javascript Validation
I've been able to use the same piece of javascript code for form validation on several websites that I maintain. However, one site that I update for a nonprofit, doesn't function properly with the form validation code. Is there something in the code that I'm missing? The test page I'm working on is http://lauraliswood.org/contact2.htm I'm trying to use the following validation code: script type=text/javascript function validate_required(field,alerttxt) { with (field) { if (value==null||value==) {alert(alerttxt);return false;} else {return true} } } function validate_form(ContactForm) { with (ContactForm) { if (validate_required(FirstName,Please enter your First Name.) ==false) {FirstName.focus();return false;} if (validate_required(LastName,Please enter your Last Name.)==false) {LastName.focus();return false;} if (validate_required(Email,Please enter your email address.) ==false) {Email.focus();return false;} } } /script If anyone can help me out, I'd really appreciate it. This website was using FrontPage extensions for this form, but the server was getting rid of the extensions so I had to create a functioning form with a .pl script and now I'm trying to use javascript to create required fields. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
libswt error on 1.6 RC2
Hello, I just upgraded to 1.6 RC2, and converted my project to it. If I run hosted mode with ant hosted, it works, but when I run it from eclipse, I get this error: Exception in thread main java.lang.UnsatisfiedLinkError: Can't load library: /home/tt/ej/lib/libswt-pi-gtk-3235.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1677) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132) at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.clinit(Display.java:126) at com.google.gwt.dev.SwtHostedModeBase.clinit (SwtHostedModeBase.java:82) Could not find the main class: com.google.gwt.dev.HostedMode. Program will exit. I did not reference /home/tt/ej/lib anywhere in my project, neither could I find any reference to it anywhere in my project, not sure where it was added. I'm using jdk 1.6u13 and eclipse 3.4, all 32 bit, but on ubuntu 8.04 64 bit. If I run another gwt app from eclipse, such as the Hello sample, it runs fine! If anyone knows what's causing this, please help. Thank you very much. Tony --~--~-~--~~~---~--~~ 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: How to get internal widget to notify its parent widget when clicked (and have the parent execute something)
Ah that works only if the widget is nested in 1 object (eg. direct parent). The widget is dynamically added to various objects and can be nested at different levels. Currently i am using a VERY dodge way of this.getParent().getParent ().getParent().getParent().doSomething(); :) And in that doSomething() it would have something like. doSomething() { widget.someOtherwidget.widget1.widget2.widget3.widget4.doStuff(); } I am sure there is a better way to do this. Gregor's suggestion of an observer pattern sounds about right. Although there doesnt seem to be that much information that comes up around implementing patterns in google when dealing with events in objects unless you specifically look for it. I'll have a search and come back here if i still have issues. On Apr 7, 1:11 am, Jason Essington jason.essing...@gmail.com wrote: the easiest way is to create a click handler that holds a reference to the parent the simplest form would look something like: myWidget.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ parent.doSomething(); } }); no need to do any sink/unsink mucking about. -jason On Apr 4, 2009, at 8:51 PM, matttai wrote: As per the title :) How to get internal widget to notify its parent widget when clicked (and have the parent execute something)? I think it has something to do with sinking and unsinking events but I haven't been able to find a very good example of doing this. Any help would be appreciated! --~--~-~--~~~---~--~~ 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: GWT Portlets framework published
Looks great. What are the implications for the use of the LGPL? From my understanding LGPL + gwt = distribute source? Joe On Apr 7, 1:37 am, david.tin...@gmail.com david.tin...@gmail.com wrote: GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Robust (cross-browser) check for a specific keycode?
Hi, Can I reliably (cross-browser) check for a specific keycode using the following code: public void onKeyDown(Widget sender, char keyCode, int modifiers) { if ( 191 == (int)keyCode) { // question mark Window.alert(help); } } TIA, jec --~--~-~--~~~---~--~~ 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: How can I combine 2 projects into one with gwt 1.6+?
Yea, I want to reuse the submodules as most as possible, but I don't want to compile them into jars every time I make a change. I am trying to figure out how to configure the compiler to use the other projects as if it where one big project. Thanks for your help. Brandon On Mar 26, 2:00 pm, Sumit Chandel sumitchan...@google.com wrote: Hi Brandon, I'm not clear why you would need to compile the sub modules independently from the main module. The GWT compiler performs a monolithic compilation for each module it compiles, therefore the submodules would be completely independent from the main module if they were compiled separately. It seems like if you want to reuse those submodules, the best way would be to reference them from your main project (linking source in Eclipse, for example), and adding the submodules to your main GWT compilation target as shown in the ant snippet. If you have server-side classes that you want to compile separately and include in the main project, you should probably set up a build target that will javac those classes and copy them over to the main GWT project directory. The gwtc target would then be dependent on that step before being able to perform its own GWT compilation. Putting into context of your next goals, 3. would be solved by what was described in the last paragraph. 1. and 2. might not need to be explicit goals since compiling separately probably won't be of much value for what I think you're trying to do. Although I may have misundertstood the purposes for goals 1 2. Hope that helps, -Sumit Chandel On Sun, Mar 22, 2009 at 4:01 PM, branflake2267 branflake2...@gmail.comwrote: Hi Sumit Chandel, Thanks for taking the time to answer my questions! The Ant setup is heading in the right direction for me. I haven't figured out how to include other modules in ant. I have figured out how to include them in the debug configurations, and libraries in eclipse. I would prefer to use the jar, but I am building both modules actively, and compiling into a jar and including it would take longer to develop the project. http://code.google.com/p/gwt-examples/wiki/module_inherit- my docs so far in including gwt source modules/projects. Here are my projects I am experimenting on, and must figure out how to include them so I can move on. http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/Naviga...main project http://code.google.com/p/gwt-examples/source/browse/#svn/trunk/gwt-Sy... - common widgets My Goals: 1. configure ant to compile gwt like hosted mode - compile both the main module and the sub modules 2. copy the module to the main project 3. copy the compiled classes of the other project to the main module You guys are doing an excelent job with GWT!!! Thanks, Brandon On Mar 5, 1:34 am, Sumit Chandel sumitchan...@google.com wrote: Hi Brandon, I think the typical way to reuse an existing GWT module in another is to package that module into a JAR file (source included) and then refer to the module from main project in its module XML file, as you did above. You would then add that JAR to any launch or compilation scripts so that all references would be resolved while running hosted mode or the GWT compiler. In the same way, you would refer to this JAR in your ant build.xml file for gwtc or hosted mode startup targets. You could also refer to the GWT module's source folder and classpath directly, as you did in your Eclipse configurations. This should also work in Ant by defining the appropriate path element. Something like the snippet below should do the trick: path id=apple.class.path fileset dir=../Apple/src/com/gawkat/gwt/apple/client include name=**/*.java/ /fileset /path target name=gwtc depends=javac description=GWT compile to JavaScript java failonerror=true fork=true classname=com.google.gwt.dev.Compiler classpath pathelement location=src/ path refid=apple.class.path/ pathelement location=${gwt.home}/${gwt.dev.jar}/ /classpath jvmarg value=-Xmx256M/ arg value=com.gawkat.gwt.Test/ /java /target This would be in addition to other path elements you would need to define to build your project. Hope that helps, -Sumit Chandel On Wed, Mar 4, 2009 at 8:23 AM, branflake2267 branflake2...@gmail.com wrote: How do I include the classpath for another module so ant will build? - My main module com.gawkat.gwt.Test - In Text.gwt.xml file I include inherits name='com.gawkat.gwt.Apple'/ - I have added Apple projects classpath and src folder to Test Debug Configurations classpath and hosted mode will build the projects. So How can I get Ant to Compile it? Run As Build.xml in com.gawkat.gwt.Test : Buildfile: /home/branflake2267/workspace2/Test/build.xml libs:
Re: How to get internal widget to notify its parent widget when clicked (and have the parent execute something)
Still don't see the problem. public class MyParentClass extends Composite implements ClickHandler { public void add(Widget w) { super.add(w); if (w instanceof MyChildClass) { MyChildClass child = (MyChildClass) w; child.addClickHandler(this); } } public void onClick(ClickEvent e) { // whatever goes here - not sure what you mean - is the target widget a child of this class? } } public void MyChildClass extends Composite implements HasClickHandlers or public void MyChildClass extends ClassWithClickHandlers By the way, I'm pretty sure it's not allowed to add a single widget to multiple parents widgets because it will completely break the DOM AFAIK. Oh, and the above code has a memory leak since it never releases the handler when the child widget is removed - that is left as an exercise for the reader. On Mon, Apr 6, 2009 at 10:12 PM, matttai matt...@hotmail.com wrote: Ah that works only if the widget is nested in 1 object (eg. direct parent). The widget is dynamically added to various objects and can be nested at different levels. Currently i am using a VERY dodge way of this.getParent().getParent ().getParent().getParent().doSomething(); :) And in that doSomething() it would have something like. doSomething() { widget.someOtherwidget.widget1.widget2.widget3.widget4.doStuff(); } I am sure there is a better way to do this. Gregor's suggestion of an observer pattern sounds about right. Although there doesnt seem to be that much information that comes up around implementing patterns in google when dealing with events in objects unless you specifically look for it. I'll have a search and come back here if i still have issues. On Apr 7, 1:11 am, Jason Essington jason.essing...@gmail.com wrote: the easiest way is to create a click handler that holds a reference to the parent the simplest form would look something like: myWidget.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event){ parent.doSomething(); } }); no need to do any sink/unsink mucking about. -jason On Apr 4, 2009, at 8:51 PM, matttai wrote: As per the title :) How to get internal widget to notify its parent widget when clicked (and have the parent execute something)? I think it has something to do with sinking and unsinking events but I haven't been able to find a very good example of doing this. Any help would be appreciated! --~--~-~--~~~---~--~~ 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: GWT Portlets framework published
On Mon, Apr 6, 2009 at 10:21 PM, Joe Cole profilercorporat...@gmail.comwrote: Looks great. What are the implications for the use of the LGPL? From my understanding LGPL + gwt = distribute source? No - you only have to distribute the changes you make to the library (can't recall the fundamental differences between v2 v3 for LGPL, but this remains the same because that's the fundamental reason LGPL exists in parallel with GPL). Joe On Apr 7, 1:37 am, david.tin...@gmail.com david.tin...@gmail.com wrote: GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ 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: libswt error on 1.6 RC2
That's the hosted mode trying to launch your browser. That particular problem is caused by 1 of 2 issues (at least from my experience); 1. You are using a 64-bit JVM (which you aren't so this doesn't apply to you) 2. You either moved, or don't have, the full GWT installation simply added gwt-dev-linux.jar to your project. When launching, GWT launches the hosted browser that is in the same directory as gwt-dev-{platform}.jar. If you copied the jar into your project without also copying in the browser (or the library is missing), you will see this error. On Mon, Apr 6, 2009 at 10:01 PM, tony.p.. tony.t@gmail.com wrote: Hello, I just upgraded to 1.6 RC2, and converted my project to it. If I run hosted mode with ant hosted, it works, but when I run it from eclipse, I get this error: Exception in thread main java.lang.UnsatisfiedLinkError: Can't load library: /home/tt/ej/lib/libswt-pi-gtk-3235.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1677) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132) at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.clinit(Display.java:126) at com.google.gwt.dev.SwtHostedModeBase.clinit (SwtHostedModeBase.java:82) Could not find the main class: com.google.gwt.dev.HostedMode. Program will exit. I did not reference /home/tt/ej/lib anywhere in my project, neither could I find any reference to it anywhere in my project, not sure where it was added. I'm using jdk 1.6u13 and eclipse 3.4, all 32 bit, but on ubuntu 8.04 64 bit. If I run another gwt app from eclipse, such as the Hello sample, it runs fine! If anyone knows what's causing this, please help. Thank you very much. Tony --~--~-~--~~~---~--~~ 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: libswt error on 1.6 RC2
On a side note, I'd recommend just using OOPHM from trunk - I had far less problems with it than with hosted mode on 64-bit linux, it's compatible with the 1.6 project structure, and now that there's a wiki for it, it's very easy to set up. On Mon, Apr 6, 2009 at 11:08 PM, Vitali Lovich vlov...@gmail.com wrote: That's the hosted mode trying to launch your browser. That particular problem is caused by 1 of 2 issues (at least from my experience); 1. You are using a 64-bit JVM (which you aren't so this doesn't apply to you) 2. You either moved, or don't have, the full GWT installation simply added gwt-dev-linux.jar to your project. When launching, GWT launches the hosted browser that is in the same directory as gwt-dev-{platform}.jar. If you copied the jar into your project without also copying in the browser (or the library is missing), you will see this error. On Mon, Apr 6, 2009 at 10:01 PM, tony.p.. tony.t@gmail.com wrote: Hello, I just upgraded to 1.6 RC2, and converted my project to it. If I run hosted mode with ant hosted, it works, but when I run it from eclipse, I get this error: Exception in thread main java.lang.UnsatisfiedLinkError: Can't load library: /home/tt/ej/lib/libswt-pi-gtk-3235.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1677) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132) at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54) at org.eclipse.swt.widgets.Display.clinit(Display.java:126) at com.google.gwt.dev.SwtHostedModeBase.clinit (SwtHostedModeBase.java:82) Could not find the main class: com.google.gwt.dev.HostedMode. Program will exit. I did not reference /home/tt/ej/lib anywhere in my project, neither could I find any reference to it anywhere in my project, not sure where it was added. I'm using jdk 1.6u13 and eclipse 3.4, all 32 bit, but on ubuntu 8.04 64 bit. If I run another gwt app from eclipse, such as the Hello sample, it runs fine! If anyone knows what's causing this, please help. Thank you very much. Tony --~--~-~--~~~---~--~~ 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: Robust (cross-browser) check for a specific keycode?
Not always, this particular manifests itself for special keys like the cursor keys etc. I believe quirksmode has a good table/chart which tables keycodes. Perhaps a good future enhancement might be for GWT to normalize the differences so developers can code without being aware if these quirks. Unfortunately while most of the time the codes are the same across all browsers there will of course in the spirit of browser coding be exceptions to the rule often enough to make you angry:). On Apr 7, 12:26 pm, Jeff Chimene jchim...@gmail.com wrote: Hi, Can I reliably (cross-browser) check for a specific keycode using the following code: public void onKeyDown(Widget sender, char keyCode, int modifiers) { if ( 191 == (int)keyCode) { // question mark Window.alert(help); } } TIA, jec --~--~-~--~~~---~--~~ 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: Folks.. I need a direction
You are missing something here. and that is RPC. Calling get set on your beans will modify that value only in the client browser. You want to communicate this value back to the server. So you need to make an RPC call. Now, you can generate a bean that will make RPC calls in its get set methods... why not? However, there is no such library or framework currently that work this way. With little code, you can create this behaviour. However I will recommend that let a bean be bean. do a rpc when set is called on the bean. Send the entire bean to your service layer. In service layer make the db call. On Apr 6, 10:32 am, ammours amer.saifedd...@gmail.com wrote: Hello All, My goal is to use a developed persistence layer where validation, fetch , add , update and delete operations are performed with GWT. This persistence is not EJB, Spring nor hibernate. They are simple objects doing validations and operations. I am looking for a mechanism to pass beans to the UI then making those beans triggering the persistence layer , pass updates and receive OK or errors based on the business validation rules. Something like bean property change fire etc... What would be the best direction to follow with GWT? Are there such examples? Any help is appreciated --~--~-~--~~~---~--~~ 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: Help with Byte Array to PDF
Hi, You need to not use the embedded tomcat server and point the hosted mode to your real server (e.g. localhost:8080). You do this using the -noserver option passed to the GWTShell. See this reference: http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5s=google-web-toolkit-doc-1-5t=FAQ_HostedModeNoServer Regards, Carl. --~--~-~--~~~---~--~~ 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: Search engine indexing
As a mater of interest semi-relivent to this, Is it possible to burn out GWT webpages into static html? (obviously losing interaction...just taking a snapshot of the current state of the dom and expressing the html nesscery to reproduce it). I mean, I guess you could cut and paste out of firebug, but is there a better method? On Apr 6, 5:35 pm, Jason Essington jason.essing...@gmail.com wrote: There are discussions about this (SEO) on this list, have a search for them. But basically, you'll want to embed the information you want indexed into your host pages. This is not a GWT limitation but rather a limitation of any web application that uses DOM modification to present content. -jason On Apr 6, 2009, at 9:29 AM, Prashant Gupta wrote: any alternative or solution to this ? On Mon, Apr 6, 2009 at 7:20 PM, djd alex.dobjans...@gmail.com wrote: Current crawl bots ignore flash and javascript. So if your web app is completely built in GWT (the default behavior when creating a project with projectCreator is to create a single HTML file with a single link to a .nocache.js files which is actually your entry point for entire app), all content will be discarded. On Apr 6, 4:11 pm, Prashant Gupta nextprash...@gmail.com wrote: does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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: Search engine indexing
DOM.toString(RootPanel.get().getElement()) On Tue, Apr 7, 2009 at 1:45 AM, Darkflame darkfl...@gmail.com wrote: As a mater of interest semi-relivent to this, Is it possible to burn out GWT webpages into static html? (obviously losing interaction...just taking a snapshot of the current state of the dom and expressing the html nesscery to reproduce it). I mean, I guess you could cut and paste out of firebug, but is there a better method? On Apr 6, 5:35 pm, Jason Essington jason.essing...@gmail.com wrote: There are discussions about this (SEO) on this list, have a search for them. But basically, you'll want to embed the information you want indexed into your host pages. This is not a GWT limitation but rather a limitation of any web application that uses DOM modification to present content. -jason On Apr 6, 2009, at 9:29 AM, Prashant Gupta wrote: any alternative or solution to this ? On Mon, Apr 6, 2009 at 7:20 PM, djd alex.dobjans...@gmail.com wrote: Current crawl bots ignore flash and javascript. So if your web app is completely built in GWT (the default behavior when creating a project with projectCreator is to create a single HTML file with a single link to a .nocache.js files which is actually your entry point for entire app), all content will be discarded. On Apr 6, 4:11 pm, Prashant Gupta nextprash...@gmail.com wrote: does my GWT website gets indexed same as any other (non GWT) website..? --~--~-~--~~~---~--~~ 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-contrib] Re: Getting available TimeZones, Detecting Timezones?
And what in the case that the application is not running on the internet ? In banking software chances are very slim that the PC is connected. David On Sat, Apr 4, 2009 at 1:58 AM, Ray Cromwell cromwell...@gmail.com wrote: John, A google hosted service would be great, sounds like a good, valuable service, of use to everyone on the web. I don't mind asynchronously fetching this data, because you typically have to ask the user which TZ he's in anyway, unless you try to infer it from the browser's Date.toString() method, which isn't always reliable. (Some browsers report actual TZ Common names, others don't) -Ray On Fri, Apr 3, 2009 at 4:34 PM, John Tamplin j...@google.com wrote: On Fri, Apr 3, 2009 at 7:28 PM, Ray Cromwell cromwell...@gmail.comwrote: Am I missing something? There doesn't appear to be a way to query for all of the supported Common Timezones, which makes it problematic to construct a UI dialog that asks the user to specify a TimeZone without hard coding. Simple Timezones have the problem that they don't provide DST information, which makes the behavior of DateTimeFormat wrong in some TZs. I'm wondering if it makes sense to either 1) provide a default RPC service for obtaining TZ related info (localized), or revisit the issue of providing full TZ introspection using code splitting to reduce some of the inefficiency. Work is in progress to provide a JSONP service, either provided by Google or where you can run a servlet on your own infrastructure, and fetch the timezone data that way. It is too large in its current form to include in the compiled output (though we may be able to improve that for certain common cases in the future) and the async nature of the interface means it won't be transparent to user code, but it should be out for review shortly. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Getting available TimeZones, Detecting Timezones?
On Mon, Apr 6, 2009 at 2:40 AM, David david.no...@gmail.com wrote: And what in the case that the application is not running on the internet ? In banking software chances are very slim that the PC is connected. The data could be compiled into the application, but it would be large. It could also be stored in Gears or HTML5 databases. It seems hard to imagine a client application of much use without any connection to a server. If it is on a private network, the servlet could be run on private infrastructure as mentioned. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: weak listener in GWT?
Hi Hiho, Thanks for your reaction. I don't want to sound (too) arrogant, but your solution is way to simple in my case (I wish I could use it). Because of the complex requirements I have to meet, I have several layers on top of basic widgets. That is: on the level I want to do some cleanup, these widgets are way out of scope (and I have too many widgets below). That is also desired behavior as on the level I want to do some cleanup, I don't want to directly see these widgets anymore as I am in another problem scope. I did some more prototyping and even my above suggestion doesn't solve my problem entirely as I sometimes want to remove part of the listeners that belong to a category. What I will do now: Like explained above: I have my own Form that contains Form field (these are the ones that wrap the basic widgets). These form fields (general gwt things) contain all kind of default behavior: validation, dirty checking, resetting, validation handling, etc.. (I have all kind of general form field for strings, birthday, datepicker, group of checkboxes, etc...) I will add a method to the Form field beforeRemove () that will always called by his managing Form just before removing (detaching) the form field of the Form, that gives the form field a change to do some cleanup. That is: when removing widgets/form field of the Form, I always do this trhough the manging Form. I will then add an extra method to the form field: addRemover (HasDestroy destroy), such that I can add things that need to be called by the Form field when beforeRemove() is called. In my builder I can then add instances to the Form field that need to do some cleanup. I think this is an elegant and nice solution, don't you think ? Da, I do miss the Weak Listener from SWT/Swing in cases like this... (It's back to the stoneage to do everyting yourself. Btw: don't get me wrong, I am not blaming GWT for this it's simple javascript that doesn't support this all) I would love to hear experiences of other developers have bounced their head against this issue. -- Ed --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: JSO patch to use desiredAssertionStatus
Very close, but I think the Java optimizer won't be able to figure that out as early as we'd like. How about something like this? public final String toString() { return JavaScriptObject.class.desiredAssertionStatus() ? toStringVerbose()? : toStringSimple(); } On Mon, Apr 6, 2009 at 1:48 AM, Freeland Abbott fabb...@google.com wrote: Scott, is this what you were suggesting, to lighten JavaScriptObject.toString() for micro-apps? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: code review requested - allow OpenJDK to compile GWT
On Mon, Apr 6, 2009 at 9:07 AM, BobV b...@google.com wrote: Here is the patch which does what Scott suggested. Any objections? LGTM Thanks, committed with Scott's javadoc change at r5184. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Add StyleInjector to GWT trunk
StyleInjector committed to trunk at r5185. @RayC, I added an assertion that there is a head tag. @RayR, The line lengths seem to be ok according to the eclipse formatting rules checked into trunk. I added notes to the Javadoc indicating that not all StyleElements returned are necessarily unique and that setContents should be used with caution. -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5184 - Fix OpenJDK compatibility (a generic type inference bug) by removing the
Author: j...@google.com Date: Mon Apr 6 06:27:37 2009 New Revision: 5184 Modified: trunk/dev/core/src/com/google/gwt/core/ext/linker/ArtifactSet.java Log: Fix OpenJDK compatibility (a generic type inference bug) by removing the ability to return a different type than is requested. None of our code uses this ability, and it is easy enough to copy the returned list into a list of the supertype externally anyway. Issue: 3058 Patch by: jat Review by: scottb, bobv Modified: trunk/dev/core/src/com/google/gwt/core/ext/linker/ArtifactSet.java == --- trunk/dev/core/src/com/google/gwt/core/ext/linker/ArtifactSet.java (original) +++ trunk/dev/core/src/com/google/gwt/core/ext/linker/ArtifactSet.java Mon Apr 6 06:27:37 2009 @@ -61,35 +61,30 @@ return treeSet.containsAll(c); } + @Override public boolean equals(Object o) { return treeSet.equals(o); } /** * Find all Artifacts assignable to some base type. The returned value will be - * a snapshot of the values in the ArtifactSet. The following two examples - * result in an equivalent set: + * a snapshot of the values in the ArtifactSet. An example of how this could + * be used: * * pre - * SortedSetlt;EmittedArtifactgt; search = artifactSet.find(PublicResource.class); - * search.addAll(artifactSet.find(GeneratedResource.class); + * for (EmittedArtifact ea : artifactSet.find(EmittedArtifact.class)) { + * ... + * } * /pre * - * or - * - * pre - * SortedSetlt;EmittedArtifactgt; search = artifactSet.find(EmittedArtifact.class); - * /pre - * - * @param A a type bound possibly wider than the desired type of artifact * @param T the desired type of Artifact * @param artifactType the desired type of Artifact * @return all Artifacts in the ArtifactSet assignable to the desired type */ - public A extends Artifact?, T extends A SortedSetA find( + public T extends Artifact? super T SortedSetT find( ClassT artifactType) { // TODO make this sub-linear (but must retain order for styles/scripts!) -SortedSetA toReturn = new TreeSetA(); +SortedSetT toReturn = new TreeSetT(); for (Artifact? artifact : this) { if (artifactType.isInstance(artifact)) { toReturn.add(artifactType.cast(artifact)); @@ -113,6 +108,7 @@ } } + @Override public int hashCode() { return treeSet.hashCode(); } --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5186 - Edited wiki page through web user interface.
Author: b...@google.com Date: Mon Apr 6 07:41:16 2009 New Revision: 5186 Modified: wiki/ClientBundle.wiki Log: Edited wiki page through web user interface. Modified: wiki/ClientBundle.wiki == --- wiki/ClientBundle.wiki (original) +++ wiki/ClientBundle.wiki Mon Apr 6 07:41:16 2009 @@ -23,3 +23,4 @@ * `CssResource.enableMerge` to `CssResource.mergeEnabled` * `CssResource.forceStrict` to `CssResource.strictAccessors` * `CssResource.globalPrefix` to `CssResource.obfuscationPrefix` + * StyleInjector moved to `com.google.gwt.dom.client` package \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RR: shorten filenames for SOYC reports
I guess I should actually include the patch. Here it is: http://gwt-code-reviews.appspot.com/16802/show -Lex On Fri, Apr 3, 2009 at 6:30 PM, Lex Spoon sp...@google.com wrote: Bob, can you review this patch for me? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5187 - Edited wiki page through web user interface.
Author: b...@google.com Date: Mon Apr 6 08:51:55 2009 New Revision: 5187 Modified: wiki/ClientBundle.wiki Log: Edited wiki page through web user interface. Modified: wiki/ClientBundle.wiki == --- wiki/ClientBundle.wiki (original) +++ wiki/ClientBundle.wiki Mon Apr 6 08:51:55 2009 @@ -1,13 +1,110 @@ #summary Compile-time resource optimizations -TODO(bobv): Copy wiki articles from incubator to here; cross-link the pages +wiki:toc / -= Migrating from ImmutableResourceBundle = += Introduction = + + The resources in a deployed GWT application can be roughly categorized into resources to never cache `.nocache.js`, to cache forever `.cache.html`, and everything else `myapp.css`. The ClientBundle interface moves entries in the everything-else category into the cache-forever category. + += Goals = + + * No more uncertainty if your application is getting the right contents for program resources. + * Decrease non-determinism caused by intermediate proxy servers. + * Enable more aggressive caching headers for program resources. + * Eliminate mismatches between physical filenames and constants in Java code by performing consistency checks during the compile. + * Use 'data:' URLs, JSON bundles, or other means of embedding resources in compiled JS when browser- and size-appropriate to decrease the number of round-trips entirely. + * Provide an extensible design for adding new resource types. + * Ensure there is no penalty for having multiple ClientBundle resource functions refer to the same content. + += Non-Goals = + + * To provide a file-system abstraction + += Examples = + +To use the ClientBundle, add an inherits tag to your `gwt.xml` file: +{{{ +inherits name=com.google.gwt.resources.Resources / +}}} + +Interfaces: +{{{ +public interface MyResources extends ClientBundle { + public static final MyResources INSTANCE = GWT.create(MyResources.class); + + @Source(my.css) + public CssResource css(); + + @Source(config.xml) + public TextResource initialConfiguration(); + + @Source(manual.pdf) + public DataResource ownersManual(); +} +}}} + +You can then say: +{{{ + Window.alert(MyResources.INSTANCE.css().getText()); + new Frame(MyResources.INSTANCE.ownersManual().getURL()); +}}} + += I18N = + +ClientBundle is compatible with GWT's I18N module. + +Suppose you defined a resource: +{{{ +...@source(default.txt) +public TextResource defaultText(); +}}} + +For each possible value of the `locale` deferred-binding property, the ClientBundle generator will look for variations of the specified filename in a manner similar to that of Java's `ResourceBundle`. + +Suppose the `locale` were set to `fr_FR`. The generator would look for files in the following order: + # default_fr_FR.txt + # default_fr.txt + # default.txt + +This will work equally well with all resource types, which can allow you to provide localized versions of other resources, say `ownersManual_en.pdf` versus `ownersManual_fr.pdf`. + += Pluggable Resource Generation = + +Each subtype of `ResourcePrototype` must define a `...@resourcegenerator` annotation whose value is a concrete Java class that extends `ResourceGenerator`. The instance of the `ResourceGenerator` is responsible for accumulation (or bundling) of incoming resource data as well as a small degree of code generation to assemble the concrete implementation of the ClientBundle class. Implementors of `ResourceGenerator` subclasses can expect that only one `ResourceGenerator` will be created for a given type of resource within an ClientBundle interface. + +The methods on a `ResourceGenerator` are called in the following order + # `init` to provide the `ResourceGenerator` with a `ResourceContext` + # `prepare` is called for each `JMethod` the `ResourceGenerator` is expected to handle + # `createFields` allows the `ResourceGenerator` to add code at the class level + # `createAssignment` is called for each `JMethod`. The generated code should be suitable for use as the right-hand side of an assignment expression. + # `finish` is called after all assignments should have been written. + +`ResourceGenerators` are expected to make use of the `ResourceGeneratorUtil` class. + += Potential pitfalls = + * Changing the content of the resources will change the filenames (or data: encoding), thus forcing a recompile of the GWT application. To avoid this, the inlining and renaming features can be globally toggled off in your gwt.xml file during the development phase. + * Inlining files into the compiled JS may not make sense if those files are not always accessed by the program, thus inlining should be configurable on a per-resource or per-ClientBundle basis. + += Levers and knobs = + + * `ClientBundle.enableInlining` is a deferred-binding property that can be used to disable the use of `data:` URLs in browsers that would
[gwt-contrib] RFC : Adding deprecations to gwt.xml files
I'm in the process of migrating ClientBundle into trunk and it occurred to me that even if you remove the use of all deprecated types from your code, your module might still inherit an otherwise-unused module. What do you think about adding another tag to gwt.xml as follows? module deprecated href=http://google.com/more_info; This module has been replaced by blah-blah-blah./deprecated /module -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
Sounds pretty useful. We should lock its behavior down more, though. Maybe just deprecated superceded-by=othermodule/ where superceded-by is optional. It would be helpful to have consistent-looking deprecation messages, so we probably shouldn't leave the text open-ended. On Mon, Apr 6, 2009 at 11:57 AM, BobV b...@google.com wrote: I'm in the process of migrating ClientBundle into trunk and it occurred to me that even if you remove the use of all deprecated types from your code, your module might still inherit an otherwise-unused module. What do you think about adding another tag to gwt.xml as follows? module deprecated href=http://google.com/more_info; This module has been replaced by blah-blah-blah./deprecated /module -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: DOMImplIE6.getZoomMultiple() divide by zero error
LGTM And I agree with putting this on the 1.6 branch, but it's Bruce's call http://gwt-code-reviews.appspot.com/17801 --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
On Mon, Apr 6, 2009 at 1:28 PM, Bruce Johnson br...@google.com wrote: Sounds pretty useful. We should lock its behavior down more, though. Maybe Locking it down is just going to get in the way because we can't cover all of the types of messages that you'd necessarily want to be able to convey in tag attributes. Developers will just have to be judicious in their use of a free-form message; it more-or-less works for JavaDoc. (tangent: ModuleDoc?) If you want to lock it down, the most useful thing to be able to specify is a URL with additional information. -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: weak listener in GWT?
The solution that I suggest above, seem to work fine. BTW: I also had another look at the solution suggested by MiroSlav, but that is a technical soution that isn't correct in my case. His solution was to remove the global model listeners when the widget got detached. However, I can easily detach a widget/panel from one form and connect it to another form, which in my case is completely legal, but will result in correct behavior as the listeners are removed :(. So I solved it in a functional way by adding listeners to my Form Fields that are informed about form field removal/insertions. These listeners are added to the Form Field. I also have a Form listener that receives these kind of notifications, but couldn't be used in the form field builder as Form isn't know there, where as the Form field is. I hope it's of some use to others. -- Ed --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
On Mon, Apr 6, 2009 at 1:35 PM, BobV b...@google.com wrote: On Mon, Apr 6, 2009 at 1:28 PM, Bruce Johnson br...@google.com wrote: Sounds pretty useful. We should lock its behavior down more, though. Maybe Locking it down is just going to get in the way because we can't cover all of the types of messages that you'd necessarily want to be able to convey in tag attributes. I may not be thinking about the spectrum clearly enough. Do you have some examples in mind? It seems like the 99% case is people saying Don't use this anymore; use that instead. Developers will just have to be judicious in their use of a free-form message; it more-or-less works for JavaDoc. (tangent: ModuleDoc?) In javadoc, it has always seemed like an un-usefully underconstrained tag. Everbody says exactly the same things, phrased every-so-slightly differently. If you want to lock it down, the most useful thing to be able to specify is a URL with additional information. I don't think that handles the most common use case, though. Wouldn't the most common thing be, Don't use this; use that? Most people will go to the absolute minimum trouble necessary, so it's unlikely people would be included to create an actual URL to point to. (IMHO) --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5191 - Adds more bridge methods so as to simplify and make more robust
Author: sp...@google.com Date: Mon Apr 6 12:48:03 2009 New Revision: 5191 Modified: trunk/dev/core/src/com/google/gwt/core/ext/soyc/impl/StandardMethodMember.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/MakeCallsStatic.java trunk/user/test/com/google/gwt/dev/jjs/test/CompilerTest.java Log: Adds more bridge methods so as to simplify and make more robust virtual-method dispatch in the face of tricky generics cases. Fixes issue 3517. Patch by: scottb Review by: spoon Modified: trunk/dev/core/src/com/google/gwt/core/ext/soyc/impl/StandardMethodMember.java == --- trunk/dev/core/src/com/google/gwt/core/ext/soyc/impl/StandardMethodMember.java (original) +++ trunk/dev/core/src/com/google/gwt/core/ext/soyc/impl/StandardMethodMember.java Mon Apr 6 12:48:03 2009 @@ -51,6 +51,7 @@ sb.append(type.getJsniSignatureName()); } sb.append()); +sb.append(method.getOriginalReturnType().getJsniSignatureName()); this.sourceName = sb.toString(); SortedSetString aliases = new TreeSetString(); Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java Mon Apr 6 12:48:03 2009 @@ -47,6 +47,7 @@ private final boolean isStatic; private final String name; private ListJType originalParamTypes; + private JType originalReturnType; /** * References to any methods which this method overrides. This should be an @@ -102,7 +103,7 @@ for (JParameter param : params) { paramTypes.add(param.getType()); } -setOriginalParamTypes(paramTypes); +setOriginalTypes(returnType, paramTypes); } public JAbstractMethodBody getBody() { @@ -124,6 +125,10 @@ return originalParamTypes; } + public JType getOriginalReturnType() { +return originalReturnType; + } + /** * Returns the transitive closure of all the methods this method overrides. */ @@ -189,10 +194,11 @@ isFinal = true; } - public void setOriginalParamTypes(ListJType paramTypes) { + public void setOriginalTypes(JType returnType, ListJType paramTypes) { if (originalParamTypes != null) { throw new InternalCompilerException(Param types already frozen); } +originalReturnType = returnType; originalParamTypes = Lists.normalize(paramTypes); // Determine if we should trace this method. Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java Mon Apr 6 12:48:03 2009 @@ -124,6 +124,7 @@ sb.append(type.getJsniSignatureName()); } sb.append()); +sb.append(method.getOriginalReturnType().getJsniSignatureName()); return sb.toString(); } Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java Mon Apr 6 12:48:03 2009 @@ -156,6 +156,11 @@ return false; } +// original return type must be identical +if (method1.getOriginalReturnType() != method2.getOriginalReturnType()) { + return false; +} + // original parameter types must be identical ListJType params1 = method1.getOriginalParamTypes(); ListJType params2 = method2.getOriginalParamTypes(); Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaAST.java Mon Apr 6 12:48:03 2009 @@ -309,8 +309,8 @@ * /p */ public void addBridgeMethods(SourceTypeBinding clazzBinding) { - if (clazzBinding.isInterface() || clazzBinding.isAbstract()) { -// Only add bridges in concrete classes, to simplify matters. + if (clazzBinding.isInterface()) { +// Only add bridges in classes, to simplify matters. return; } @@ -322,7 +322,8 @@ */
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
I don't think that handles the most common use case, though. Wouldn't the most common thing be, Don't use this; use that? Most people will go to the absolute minimum trouble necessary, so it's unlikely people would be included to create an actual URL to point to. (IMHO) I'm thinking of the case that I have where transitioning from ImmutableResourceBundle to ClientBundle could use some documentation to indicate where there have been changes. So how about use this instead and more information here and lose the free-form data? -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
On Mon, Apr 6, 2009 at 4:17 PM, BobV b...@google.com wrote: I'm thinking of the case that I have where transitioning from ImmutableResourceBundle to ClientBundle could use some documentation to indicate where there have been changes. So how about use this instead and more information here and lose the free-form data? How does that manifest as XML? --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
How does that manifest as XML? deprecated superceded-by=othermodule href=http://google.com/something; / where both attributes are optional. The URL will be presented by using the AbstractTreeLogger.log() method that takes a HelpInfo object. -- Bob Vawter Google Web Toolkit Team --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: RFC : Adding deprecations to gwt.xml files
On Mon, Apr 6, 2009 at 4:26 PM, BobV b...@google.com wrote: How does that manifest as XML? deprecated superceded-by=othermodule href=http://google.com/something; / where both attributes are optional. The URL will be presented by using the AbstractTreeLogger.log() method that takes a HelpInfo object. superceded-by should probably accept a comma-separated list of modules in case the functionality gets split up. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---