How to exclude server-side jar file from GWT compile / validation
In my GWT app my RemoteService implementation executes code from abc.jar that has server-side only Java code. I have included abc.jar in my project's class path, but it does not belong to any module inherited by this project's module. When I run this app in Hosted Mode I get tons of Error messages in the console for classes in abc.jar, such as: Validating newly compiled units ... No source code is available for type ...; did you forget to inherit a required module? Since these classes are server-side only the GWT compiler should not be considering them at all. What is curious is that on the server side also I'm using some Spring jar files and GWT does not complain about these. The application runs in spite of these errors, but writing them to the console really slows down debugging. My environment: GWT 2.0, Eclipse 3.5 (SpringSource Tool Suite), JDK 1.5 Thanks for any guidance you can give me. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to exclude server-side jar file from GWT compile / validation
The abc.jar does not include any client packages as far as I can tell. Since the above post I've changed this project so that a few files from abc.jar now implement IsSerializable so they can be passed to the client. As a result, abc is now a GWT module which I import into my GWT app. Most of the functionality in abc.jar, however, is strictly server side. When I try to GWT compile my GWT app (using mvn gwt:compile) I now get lots of import errors such as: No source code is available for type java.io.InputStream; did you forget to inherit a required module? This problem just became more urgent now as I cannot deploy to Tomcat to test there. Any help on this would be greatly appreciated. On Jan 6, 11:03 am, Rohit Bansal wrote: > Hi > > I think there are client packages in your abc.jar. And GWT is giving > you warning about these client packages as on server there should not > be client packages. > > Regards > > Rohit > > On Jan 6, 9:23 am, Rob Wood wrote: > > > > > In my GWT app my RemoteService implementation executes code from > > abc.jar that has server-side only Java code. I have included abc.jar > > in my project's class path, but it does not belong to any module > > inherited by this project's module. When I run this app in Hosted > > Mode I get tons of Error messages in the console for classes in > > abc.jar, such as: Validating newly compiled units ... No source code > > is available for type ...; did you forget to inherit a required > > module? > > > Since these classes are server-side only the GWT compiler should not > > be considering them at all. What is curious is that on the server > > side also I'm using some Spring jar files and GWT does not complain > > about these. The application runs in spite of these errors, but > > writing them to the console really slows down debugging. > > My environment: GWT 2.0, Eclipse 3.5 (SpringSource Tool Suite), JDK > > 1.5 > > > Thanks for any guidance you can give me. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to exclude server-side jar file from GWT compile / validation
OK, I see I mispoke, causing some confusion. The classes that are passed to the client are not in the client package, but in abc's gwt.xml I use the tag to tell GWT where to find them. These classes are passing through to the client just fine when I run in Hosted Mode. The problem is when I run gwt:compile to deploy to Tomcat (running in production, for instance) I get errors due to external dependencies which are server-side only: dependencies on java.io.InputStream, and SimpleDateFormat. How can I get GWT compiler to ignore these? On Jan 6, 2:58 pm, Open eSignForms wrote: > On Wed, Jan 6, 2010 at 1:10 PM, Rob Wood wrote: > > The abc.jar does not include any client packages as far as I can > > tell. > > > Since the above post I've changed this project so that a few files > > from abc.jar now implement IsSerializable so they can be passed to the > > client. As a result, abc is now a GWT module which I import into my > > GWT app. Most of the functionality in abc.jar, however, is strictly > > server side. > > If you can "pass to the client" then it should be in the client package. > All classes referenced by code in the client classes must be available to > the client, and thus must be translated to javascript, etc. The fact that > you didn't put it in the client package is why it's complaining it can't > find the code. > > So I'd recommend putting anything with IsSerializable (or otherwise is > referenced by client code -- even if you just pass the object into a client > constructor and otherwise don't send it directly) in the client package so > it can be compiled. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to exclude server-side jar file from GWT compile / validation
I've done some further analysis: I'm only getting errors for server side classes that have a reference to one of the classes implementing IsSerializable (either directly or through inheritance). GWT Compiler does not complain about the classes implementing IsSerializable (or their child classes) or classes with no references to a class implementing IsSerializable. Meanwhile, I've confirmed that the only classes the the client code sees are the few classes implementing IsSerializable. The fact that this runs successfully in Hosted Mode verifies that as well. Perhaps there is some kind of compiler configuration that is set too aggressively. I'm pretty confident that I was able to GWT compile this project using GWT 1.7.1 because I successfully deployed to Tomcat. Was there a change from GWT 1.7.1 to 2.0 that might explain this? On Jan 6, 4:10 pm, Open eSignForms wrote: > Without knowing your code, I cannot be sure, but somehow those classes are > being referenced directly or as parameters something in your client > classes. All references in the client code must be translatable, and most > likely neither InputStream nor SimpleDateFormat are. So your client classes > must not have any references to them. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RichTextArea with non-editable hyperlinks
I'm porting an application from Eclipse RCP to GWT. One of the features I have are links embedded in text which the users can't edit directly -- only through menu options. As far as I can see, the best way to implement this in GWT is through hyperlinks in the RichTextArea widget, but there is no way I've figured out to protect users from editing the hyperlinks as if they were regular text. I was hopeful I could use addKeyPressHandler() to check if a key press was in the hyperlink text and disable it, but I can find no useful information telling which location in the text the key press came from. I thought embedding a simple widget in the text displaying the hyperlink alias my work (like a gadget in a Google Wave) but can't find any support for such a device. Any suggestions you might have for solving this problem would be greatly 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 -~--~~~~--~~--~--~---
Access to WavePanel source code
Is it possible to get access to WavePanel's source code to extend behaviors? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---