Re: JDOObjectNotFound exception when using getObjectById
HI All, @ datanucleus yeah i missed that, it solved my problem.Thanks! @Alyxandor and others my category class look something like @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable=true) public class Category { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Long id; @Persistent private String primary_name; @Persistent private SetString names; @Persistent private SetLong childrens; @Persistent private Long parent; } I am using autoindexing, Do you see a problem with it? On Wed, May 13, 2009 at 7:46 PM, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Is that the whole Category class, or is there more? Because, if you have a persistent field with a null value, it gets skipped by index operations. The low-level query will succeed because an equality test on the primary key uses the default, built-in automatic index table, whilst all other queries use different index tables based on your index- definitions. ANY OBJECT WITH A NULL VALUE FOR A PERSISTENT FIELD IN ANY JDO / JPA QUERY WILL BE SKIPPED. Check your admin console, and post what the actual data listed there says. Are you using auto-indexing? What does your datastore-indexes.xml look like? How did you Annotate Category? ...I'm still fairly fresh with appengine, so take my advice with a couple grains of salt, hopefully a master of the arts will find this thread and tell you exactly what's wrong. --~--~-~--~~~---~--~~ 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: Empty object when returning from RPC call
Alyxandor Your advise about using doubles for identifiers is terrible. By definition double and float are approximations of a value and not necessarily the exact correct value. The reason gwt kings are slower is because they don't drop bits and change value for large values. Following this advice is just going to cause headaches when they try and use an id and things go wrong back on the server or worse yet return invalid data. Hth On May 15, 11:41 am, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Does User implement Serializable or IsSerializable? You have to use at least one to tell GWT that you want to send it over the wire. I'm having a little trouble understanding your situation, please post you file structure, and if possible, User.java or your .gwt.xml modules... /foo/bar/Common.gwt.xml /foo/bar/client/User.java /foo/bar/client/Save.java /foo/bar/client/SaveAsync.java /foor/bar/server/SaveImpl.java ...And so forth... Also, if you can, avoid Long. It's faster in Java, but MUCH slower in GWT... Because javascript has only one number type, and it's double. Long requires emulation and you {your users} pay for it every time you read a long value. If your datastore or whatever needs Long, just use a double and do the casting on your server... Clients are more important! --~--~-~--~~~---~--~~ 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: [google-appengine] Re: New bie question: import com.google.appengine cannot be resolved
Thanks Jason,As also pointed out by Shawn that we cannot simply use Key in client code we need write a super class instead. So now i have changed my implementation to use Long instead of key. On Tue, May 12, 2009 at 12:03 AM, Jason (Google) apija...@google.comwrote: Hi Vijay. I believe the issue here is that the GWT compiler cannot find the source code for the Key class, as detailed in the post at http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html . You should be able to follow the steps in that post, stubbing out the Key class, to get your application working. - Jason On Fri, May 8, 2009 at 3:04 PM, vijay mymail.vi...@gmail.com wrote: Hi, I am using GWT+ Appengine for building a simple web application and got stuck with a error. I am using JDO to save some objects in datastore, I have a created a service which returns a field of persistent class which is of type com.google.appengine.api.datastore.Key, i am calling this service from my main .java file and hence imported the required path. When running the application I got error as Line 6: The import com.google.appengine cannot be resolved The path com.google.appengine was auto completed and also it was not showing any error for files under .server package, the error are only for files under .client package. I think I am missing something very basic here. Is there any restriction that I cannot import appengine packages in .client package? Please let me know if my problem is not clear. Regards, Vijay --~--~-~--~~~---~--~~ 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: getClass().getName() performance?
If you use getClass().getName() in your class you will get the full name (not obfuscated). You can also see all these names stored in some kind of variable with firebug. But what is the performance/memory drawbacks ? -- Ed --~--~-~--~~~---~--~~ 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 overlay one grid over the other?
You don't have to use SplitterPanel - take two normal panels like vertical or horizontal and place them side by side. of course your table is then two tables - one with the first column, the other with the rest. It's tricky but you can make it work. On 15 Mai, 06:04, Suren nsurendi...@gmail.com wrote: Hi Chad, Thanks for the reply. I am interested to know about the first approach. You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible You actually mean here is that, place the header and data grid in a split panel side by side? In this case can I remove the splitter some how? so that it can look like a single grid? Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) Yes I do understand that, but that is my next ache anyway Thanks again Suren On May 14, 6:07 pm, Chad chad...@gmail.com wrote: Suren, You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible. Or create two grids where the first grid only has one column and the second grid has all but the first column and put them side by side. You would have better control over the second scenario. Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) HTH, Chad On May 14, 3:38 am, Suren nsurendi...@gmail.com wrote: Hi All, I want to overlay one grid over the other, so that I can create an impression that the first column can be a fixed/freeze when scrolling right. An anyone has any other solution for keeping the first column as fixed/ freeze when we scroll right the grid? Thanks Suren- 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 -~--~~~~--~~--~--~---
Question on GWT1.6
Hi, I created the applictaion using Google Plugin and got the default GreetingService. On progressing further i changed GreetingService name to Service, as GreetingService doesn't suits for business applications, and got the following exception. java.lang.ClassNotFoundException: com.edge.app.server.GreetingServiceImpl at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass (IsolatedAppClassLoader.java:142) at java.lang.ClassLoader.loadClass(Unknown Source) at org.mortbay.util.Loader.loadClass(Loader.java:91) Obviously somewhere some other configuration has to be done but as of now i am unable to figure out. I guess there should be a way to define multiple services as well in 1.6. Any clues please. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Initialisation
Hello, is it possible in GWT to do an initialisation? Before my Application will be loaded in the browser I need some data form the server. Is it possible to do an synchrone Call for this? Or something like this that is not so complicated like an RPC? Thanks, aemik --~--~-~--~~~---~--~~ 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 overlay one grid over the other?
Thanks Alex, I will try that out definitely..any idea about scrolling them together with single scrollbar on the right end ? like chad had mentioned it wuold be a problem still. thanks again Suren On May 15, 12:06 pm, alex.d alex.dukhov...@googlemail.com wrote: You don't have to use SplitterPanel - take two normal panels like vertical or horizontal and place them side by side. of course your table is then two tables - one with the first column, the other with the rest. It's tricky but you can make it work. On 15 Mai, 06:04, Suren nsurendi...@gmail.com wrote: Hi Chad, Thanks for the reply. I am interested to know about the first approach. You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible You actually mean here is that, place the header and data grid in a split panel side by side? In this case can I remove the splitter some how? so that it can look like a single grid? Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) Yes I do understand that, but that is my next ache anyway Thanks again Suren On May 14, 6:07 pm, Chad chad...@gmail.com wrote: Suren, You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible. Or create two grids where the first grid only has one column and the second grid has all but the first column and put them side by side. You would have better control over the second scenario. Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) HTH, Chad On May 14, 3:38 am, Suren nsurendi...@gmail.com wrote: Hi All, I want to overlay one grid over the other, so that I can create an impression that the first column can be a fixed/freeze when scrolling right. An anyone has any other solution for keeping the first column as fixed/ freeze when we scroll right the grid? Thanks Suren- Hide quoted text - - Show quoted text -- 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: Question on GWT1.6
Change in web.xml also did the trick. On May 15, 12:32 pm, Pints rohitvad...@gmail.com wrote: Hi, I created the applictaion using Google Plugin and got the default GreetingService. On progressing further i changed GreetingService name to Service, as GreetingService doesn't suits for business applications, and got the following exception. java.lang.ClassNotFoundException: com.edge.app.server.GreetingServiceImpl at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass (IsolatedAppClassLoader.java:142) at java.lang.ClassLoader.loadClass(Unknown Source) at org.mortbay.util.Loader.loadClass(Loader.java:91) Obviously somewhere some other configuration has to be done but as of now i am unable to figure out. I guess there should be a way to define multiple services as well in 1.6. Any clues please. --~--~-~--~~~---~--~~ 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: Communication error [INFO] java.net.ConnectException: Connection refused while compiling under 1.6
Hi, [ERROR] Communication error [INFO] java.net.ConnectException: Connection refused The connection was refused, so the server you're trying to communicate with is not accepting connections. You might want to check that. Without more details that's all I can guess. Hope that helps, Salvador On 15 mai, 03:23, BR benjamin.ren...@gmail.com wrote: I am getting this error while compiling with 1.6.4 under MacOSX 10.5.6 Anyone knows why? It seems to compile fine otherwise. [ERROR] Communication error [INFO] java.net.ConnectException: Connection refused [INFO] at java.net.PlainSocketImpl.socketConnect (Native Method) [INFO] at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:333) [INFO] at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:195) [INFO] at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:182) [INFO] at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:432) [INFO] at java.net.Socket.connect(Socket.java:520) [INFO] at java.net.Socket.connect(Socket.java:470) [INFO] at java.net.Socket.init(Socket.java:367) [INFO] at java.net.Socket.init(Socket.java:180) [INFO] at com.google.gwt.dev.CompilePermsServer.run (CompilePermsServer.java:242) [INFO] at com.google.gwt.dev.CompilePermsServer.main (CompilePermsServer.java:233) --~--~-~--~~~---~--~~ 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: Communication error [INFO] java.net.ConnectException: Connection refused while compiling under 1.6
Check that your firewall isn't blocking java. As far as I can tell, that's the more likely reason for that kind of exception. Hope that helps, Salvador On 15 mai, 03:23, BR benjamin.ren...@gmail.com wrote: I am getting this error while compiling with 1.6.4 under MacOSX 10.5.6 Anyone knows why? It seems to compile fine otherwise. [ERROR] Communication error [INFO] java.net.ConnectException: Connection refused [INFO] at java.net.PlainSocketImpl.socketConnect (Native Method) [INFO] at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:333) [INFO] at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:195) [INFO] at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:182) [INFO] at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:432) [INFO] at java.net.Socket.connect(Socket.java:520) [INFO] at java.net.Socket.connect(Socket.java:470) [INFO] at java.net.Socket.init(Socket.java:367) [INFO] at java.net.Socket.init(Socket.java:180) [INFO] at com.google.gwt.dev.CompilePermsServer.run (CompilePermsServer.java:242) [INFO] at com.google.gwt.dev.CompilePermsServer.main (CompilePermsServer.java:233) --~--~-~--~~~---~--~~ 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: Change font size on a DecoratedTabPanel
I think you're setting the font size in the wrong css classes. This is where you should be specifying the font size for the text in the tabs: .gwt-DecoratedTabBar .tabMiddleCenter { center of the tab, where the tab text or widget resides } The other classes apply style to parts of the tab bar where normally there isn't any text, that's why you're not seeing any differences whith your modifications. Take a look at the Showcase for styling of tabPanel: http://gwt.google.com/samples/Showcase/Showcase.html#CwTabPanel The only css rule that specifies font rules is the one I pointed to: .gwt-DecoratedTabBar .tabMiddleCenter { padding: 0px 4px 2px 4px; cursor: pointer; cursor: hand; color: black; font-weight: bold; text-align: center; background: #d0e4f6; } Hope that helps, Salvador On 15 mai, 03:51, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Use em units {0.5 em}... Percent can sometimes be wonky if your DecoratedTabPanel is the child of an object with font-size set in px or pt. A quick google shows: http://www.thesug.org/Blogs/kyles/archive/2009/04/17/CSS_FontSize_em_... If this doesn't work, just inspect your table in Firefox + Firebug, and check all of it's parent element's font-sizes. If you still can't get it, post a condensed outline of your dom structure, with font-size styles included. --~--~-~--~~~---~--~~ 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: Rpc Issue [ Server Push ]
Here, this should help you getting started: http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ Cheers, Salvador On 15 mai, 06:06, jagadesh jagadesh.manch...@gmail.com wrote: Hi guys , iam working on a mail sort of application . my requirement is i want to implement a server push sort of application. when ever a mail comes to the database server , the server should push the mail to client . i tried by creating a rpc in gwt. but when the response comes back to client , the connection is said to closed. now i want to implement in such a way as the connection should still remain open and i will write a thread onn server side that contineously check the database for a perticular period of time for any new mails , if there are new then it will throw to the client. but how can i implement that technology . i got to know about comet technology which needs a special server like glassfish . i am working on tomcat right now. i can write a timer on client side and can make a call to server contineously for new mails. but when ever iam making a call it is opening a new connection to server , what happens if a call response is still pending and a new call is made to server . may lead to memory leak IS THERE ANY ALTERNATE TO THE ABOVE THING ? Thanks For all the support --~--~-~--~~~---~--~~ 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: Strange horizontal scrollbar issue
What exactly is your widget structure ? You might have wrong sizes in one of your panels and that's hiding the srollbars (or something like that, can't really tell without looking at the code) Try looking at the compiled app with firebug on firefox (with the Inspect functionality), that should tell you what's going on exactly. Hope that helps, Salvador On 15 mai, 06:22, Suren nsurendi...@gmail.com wrote: Hi All, I am using a Grid to display 100 rows and 80 columns. I used FixedWidthGrid and put that in ScrollTable (using incubator widgets). I wanted to introduce a toolbar at the top of the Grid. so I placed 7 buttons with background image in place and put that in the Horizontal panel. Finally I added that panel to my RootPanel. The moment I 've done this, I lost my horizontal scorll bar in the scorll table (in IE). But firefox behaves differently. It has now two horizontal scrollbars, one for the browser and one for the scrolltable. Till before I add the horizontal Panel everything was perfect. What should I do in this case? Advance thanks many Suren --~--~-~--~~~---~--~~ 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: Get the httpparameter in the RPC
The RPC stub that you're talking about, is it the RPC implementation ? Because if it is, it's just a normal servlet (see http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/server/rpc/RemoteServiceServlet.html) and as such, you have access to generic servlet methods. Hope that helps; Salvador On 15 mai, 05:45, Francis francis@gmail.com wrote: hi, I'm new to GWT, I would like to ask if there anyway to get the http parameter in the RPC stub.? --~--~-~--~~~---~--~~ 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: Initialisation
Well, RPCs are as simple as it gets so I don't see how you could do something simpler. We do a first RPC in the onLoad method of our entry point to get some values from the server. In the onSuccess method of our callback we then call the initialization routines of our UI. What's the need for a synchronous call ? Hope that helps, Salvador On 15 mai, 09:59, aemik m...@emanuel-egger.de wrote: Hello, is it possible in GWT to do an initialisation? Before my Application will be loaded in the browser I need some data form the server. Is it possible to do an synchrone Call for this? Or something like this that is not so complicated like an RPC? Thanks, aemik --~--~-~--~~~---~--~~ 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 overlay one grid over the other?
Well, you could synchronize scrolling through scrollhandlers: add scrollhandler to one of your tables, and in the onScroll method, make the other table scroll to the desired position. Simple, isn't it ? Good luck, Salvador On 15 mai, 10:04, Suren nsurendi...@gmail.com wrote: Thanks Alex, I will try that out definitely..any idea about scrolling them together with single scrollbar on the right end ? like chad had mentioned it wuold be a problem still. thanks again Suren On May 15, 12:06 pm, alex.d alex.dukhov...@googlemail.com wrote: You don't have to use SplitterPanel - take two normal panels like vertical or horizontal and place them side by side. of course your table is then two tables - one with the first column, the other with the rest. It's tricky but you can make it work. On 15 Mai, 06:04, Suren nsurendi...@gmail.com wrote: Hi Chad, Thanks for the reply. I am interested to know about the first approach. You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible You actually mean here is that, place the header and data grid in a split panel side by side? In this case can I remove the splitter some how? so that it can look like a single grid? Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) Yes I do understand that, but that is my next ache anyway Thanks again Suren On May 14, 6:07 pm, Chad chad...@gmail.com wrote: Suren, You could just put two grids in a HorizontalSplitPanel and set the splitter bar so that only the left column is visible. Or create two grids where the first grid only has one column and the second grid has all but the first column and put them side by side. You would have better control over the second scenario. Of course, in either scenario, the trick will be getting them to scroll together, but I'll leave that small detail to you. ;) HTH, Chad On May 14, 3:38 am, Suren nsurendi...@gmail.com wrote: Hi All, I want to overlay one grid over the other, so that I can create an impression that the first column can be a fixed/freeze when scrolling right. An anyone has any other solution for keeping the first column as fixed/ freeze when we scroll right the grid? Thanks Suren- Hide quoted text - - Show quoted text -- 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: getClass().getName() performance?
Check your file sizes without the calls, then check them again with the calls. File size will be number of classes * average package name length. The performance issue will be basically none. The actually class in the prototypes is an integer, that just points to the name. Don't worry about speed, just file size down the wire {with gzip, all the repetiveness of package names should be cut down considerably} If you have lots of getClass().getName(), and you don't want to manually remove them, you COULD try to super-source the Class class to return for getName(), but I have a funny feeling this won't compile or work right, since the compiler uses the names to hook everything up... GWT will clean up the object list, so memory leaks aren't an issue. Cheers! --~--~-~--~~~---~--~~ 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: difficulties constructing reduced example of super-source
Good to hear. Sorry about the hack.java.io part, I don't sleep much, so I sometimes slip up ;-) Basically, there's nothing you can do about your IDE... I always have a couple errors now that I use super-source, but I like to think of them like, Error: GWT is too powerful for Java to handle, OVERLOAD! OVERLOAD! ...Hahahaha. --~--~-~--~~~---~--~~ 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 overlay one grid over the other?
@alex.d - The only way to make the two panel approach work would be to use Salvador's ScrollHandler linkage, plus a function to loop through each row of both tables, measure the max height of each row, and apply that height to an element inside each table; just beware browser differences when measuring cells that have padding or margins! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using a servlet in GWT project
Hi all, I'm working on a GWT-project, and I got stuck in the part where I need to send a file on the server-side to the browser, so a user can download the file. I've done some reading, and found out the best way to do this is to write a servlet which gets called from the project. I've found a piece of code for the servlet: [quote] import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class DownloadServlet extends HttpServlet { private static final long serialVersionUID = 1L; public DownloadServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } private void doDownload( HttpServletRequest req, HttpServletResponse resp, String filename, String original_filename ) throws IOException { File f= new File(filename); int length = 0; ServletOutputStream op = resp.getOutputStream(); ServletContext context = getServletConfig().getServletContext(); String mimetype = context.getMimeType( filename ); resp.setContentType( (mimetype != null) ? mimetype : application/ octet-stream ); resp.setContentLength( (int)f.length() ); resp.setHeader( Content-Disposition, attachment; filename=\ + original_filename + \ ); byte[] bbuf = new byte[0]; DataInputStream in = new DataInputStream(new FileInputStream(f)); while ((in != null) ((length = in.read(bbuf)) != -1)) { op.write(bbuf,0,length); } in.close(); op.flush(); op.close(); } } [/quote] Don't know if this is usefull code, it doesn't give any errors in Eclipse so that's a good start. Now for the main question: how do I integrate this servlet in my GWT-project? In other words: what kind of code do I have to place under the button so the servlet gets triggered? Trying to figure out for 3 days, so I hope someone knows the answer. --~--~-~--~~~---~--~~ 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: Strange horizontal scrollbar issue
Hi.. Please have a look at the code below and help me out in solving this scrollbar issue HorizontalPanel h1=new HorizontalPanel(); HorizontalPanel h2=new HorizontalPanel(); HorizontalPanel h3=new HorizontalPanel(); HorizontalPanel h4=new HorizontalPanel(); Button b1=new Button(); Button b2=new Button(); Button b3=new Button(); Button b4=new Button(); Button b5=new Button(); Button b6=new Button(); Button b7=new Button(); b1.addStyleName(buttonimage1); b2.addStyleName(buttonimage2); b3.addStyleName(buttonimage3); b4.addStyleName(buttonimage4); b5.addStyleName(buttonimage5); b6.addStyleName(buttonimage6); b7.addStyleName(buttonimage7); b1.setWidth(20px); b1.setHeight(20px); b2.setWidth(20px); b2.setHeight(20px); b3.setWidth(20px); b3.setHeight(20px); b4.setWidth(20px); b4.setHeight(20px); b5.setWidth(20px); b5.setHeight(20px); b6.setWidth(20px); b6.setHeight(20px); b7.setWidth(20px); b7.setHeight(20px); h1.addStyleName(PanelStyle); h2.addStyleName(PanelStyle); h3.addStyleName(PanelStyle); h4.addStyleName(PanelStyle); h1.add(b1); h1.setSpacing(7); h2.setSpacing(0); h2.add(b2); h2.add(b3); h2.add(b4); h3.setSpacing(0); h3.add(b5); h3.add(b6); h3.add(b7); h1.add(h2); h1.add(h3); h4.add(h1); h4.setBorderWidth(2); h4.setWidth(100%); h1.setHeight(15px); RootPanel.get().add(h4); //end FixedWidthGrid g = new FixedWidthGrid(100,100); FixedWidthFlexTable fx = new FixedWidthFlexTable(); fx.addStyleName(FlexTable); g.addStyleName(FlexTable); fx.setText(0, 0, Hi there); for (int i=0;i100;i++){ g.setText(i, i, a); } ScrollTable st = new ScrollTable(g,fx); st.setSize(100%, 100%); st.setResizePolicy(ScrollTable.ResizePolicy.FIXED_WIDTH); RootPanel.get().add(st); CSS .buttonimage1 { background-image: url(refresh.bmp); background-position: center; background-repeat: no-repeat; } .buttonimage2 { ... ... } .FlexTable { border: 1px solid gray; background-color: #FF; border-spacing: 0; border-collapse: collapse; margin: 0; color: #ff; font: bold; table-layout: fixed; } .PanelStyle { background-color: buttonface; } Thanks Suren On May 15, 1:41 pm, Salvador Diaz diaz.salva...@gmail.com wrote: What exactly is your widget structure ? You might have wrong sizes in one of your panels and that's hiding the srollbars (or something like that, can't really tell without looking at the code) Try looking at the compiled app with firebug on firefox (with the Inspect functionality), that should tell you what's going on exactly. Hope that helps, Salvador On 15 mai, 06:22, Suren nsurendi...@gmail.com wrote: Hi All, I am using a Grid to display 100 rows and 80 columns. I used FixedWidthGrid and put that in ScrollTable (using incubator widgets). I wanted to introduce a toolbar at the top of the Grid. so I placed 7 buttons with background image in place and put that in the Horizontal panel. Finally I added that panel to my RootPanel. The moment I 've done this, I lost my horizontal scorll bar in the scorll table (in IE). But firefox behaves differently. It has now two horizontal scrollbars, one for the browser and one for the scrolltable. Till before I add the horizontal Panel everything was perfect. What should I do in this case? Advance thanks many Suren- 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
Re: Dealing with html pages within your GWT application
Hm, I slogged through the code, but didn't really notice anything out of place... What I didn't see was any references to padding, try setting it to 0px as well. Then, inside the test page, do: Window.setMargin(0px 0px 0px 0px); and Window.enableScrolling (false);, in case it's your div making scrollbars inside the frame. I've noticed that you can get scrollbars using iframes when the content inside is exactly the size of the content outside... Some other hacks you can use {for various browsers} is setting margin to -1px, setting overflow: visible !important; or hidden !important, {- WILL work}. Setting overflow-x and overflow-y to anything but auto will always remove scrollbars... As for the white spaces, I could tell you exactly what it is, but my guess is it's the page body showing around your div. Is it possible to upload somewhere so I can inspect with Firebug? It makes css hacking soo easy! Just press F12, click the inspect button, and click on the element whose style you want to change. You can even get a bookmarklet that {kinda} works for IE7+, that's at http://getfirebug.com/lite.html ...But, I'd recommend downloading the js as per their instructions, the bookmarlet tends to freeze my app, but that could also be because IE is rendering my page, my graphics loop is constantly updating values, the IE toolbar is reading those values, and then firebug tries to weasle in there too... Speaking of which, what browsers do you notice this in? IE6 adds a complimentary 10px horizontal padding to divs; you know, cos you always want it, right? Look up clearing stylesheets for IE. Also, for css, quirksmode.org will save you many headaches. PS, forgive the strange hour of my reply I sleep during the day... --~--~-~--~~~---~--~~ 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: difficulties constructing reduced example of super-source
On 15 mai, 03:06, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Are you getting a wrong package error? Because if you aren't, you should! Actually, I'd rather say you shouldn't add your super to the projects build path (no need to compile the classes to Java .class, with the risk of having them used in place of the Java runtime's ones; only the source is needed, and only for the GWT Compiler, so what's needed is that the super is in the classpath, not the build path!) (however, adding it to the build path in Eclipse brings you better editing, with better code completion, etc.) Finally, it's more a matter of taste than a rule or even best practice; but you have to understand what it means when you add the super to the build path or not. Also, you've got to make your java.io hack-pack-age another level deeper... Not necessarily. GWT's Emul package uses super-source/, and so do I in GWT-in-the-AIR (cf. http://code.google.com/p/gwt-in-the-air/source/browse/trunk/super/net/ltgt/gwt/air/emul/ ) You don't need to make two different source folders, that's just to minimize IDE confusions My personal taste is the opposite (same as what's done in GWT's own 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: Using a servlet in GWT project
Hi, I answered this yesterday in this post: http://groups.google.com/group/Google-Web-Toolkit/msg/9456d6f4a8ba0574 So here's the servlet code I use: http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/main/java/fr/salvadordiaz/gwt/hellagwt/server/NzbUpload.java And here's the UI code: http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/main/java/fr/salvadordiaz/gwt/hellagwt/client/views/UploadPanel.java You could also check out the whole project and build-test it with maven. Hope that helps, Salvador On 15 mai, 11:37, Scientist ma...@gl-power.nl wrote: Hi all, I'm working on a GWT-project, and I got stuck in the part where I need to send a file on the server-side to the browser, so a user can download the file. I've done some reading, and found out the best way to do this is to write a servlet which gets called from the project. I've found a piece of code for the servlet: [quote] import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class DownloadServlet extends HttpServlet { private static final long serialVersionUID = 1L; public DownloadServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } private void doDownload( HttpServletRequest req, HttpServletResponse resp, String filename, String original_filename ) throws IOException { File f = new File(filename); int length = 0; ServletOutputStream op = resp.getOutputStream(); ServletContext context = getServletConfig().getServletContext(); String mimetype = context.getMimeType( filename ); resp.setContentType( (mimetype != null) ? mimetype : application/ octet-stream ); resp.setContentLength( (int)f.length() ); resp.setHeader( Content-Disposition, attachment; filename=\ + original_filename + \ ); byte[] bbuf = new byte[0]; DataInputStream in = new DataInputStream(new FileInputStream(f)); while ((in != null) ((length = in.read(bbuf)) != -1)) { op.write(bbuf,0,length); } in.close(); op.flush(); op.close(); }} [/quote] Don't know if this is usefull code, it doesn't give any errors in Eclipse so that's a good start. Now for the main question: how do I integrate this servlet in my GWT-project? In other words: what kind of code do I have to place under the button so the servlet gets triggered? Trying to figure out for 3 days, so I hope someone knows the answer. --~--~-~--~~~---~--~~ 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: Strange horizontal scrollbar issue
Aye aye! Firebug is key! You can right click an element in HTML tab, click add attribute, type style ENTER overflow-x:hidden ENTER, then in the right hand panel, you can add / edit styles w/ autocomplete. To add a new style in the css panel, just click on any entry, and press enter until you get a cursor. ...Of course, you probably know this already, I just love talkin' about how great Firebug is... If you're feeling lazy, try Window.enableScolling(false), which sets body.style.overflow: hidden; If you WANT vertical scrollbars, just do RootPanel.getBodyElement ().getStyle().setProperty(overflowX,hidden); Actually, I do: .xVerticalOverflow{overflow: hidden ! important;overflow-x: hidden !important;overflow-y: auto !important;}, as IE6 choked without overriding the both overflow and overflow-x/ y. Making the overflow hidden might force IE to give back your horizontal scrollbar, and it will definitely fix Firefox... RootPanel.getBodyElement().setClassName(xVerticalOverflow); ...Or, since you use incubator, define it in a CssResource for obfuscated class names... --~--~-~--~~~---~--~~ 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: Strange horizontal scrollbar issue
Hi salvador, Exactly you are right.. st.setSize(100%, 100%); The height of the ScrollTable is 100%, when I reduced to 90% I got the scrollbar in both IE and Firefox. Thanks for sheding some light on it Suren On May 15, 2:37 pm, Suren nsurendi...@gmail.com wrote: Hi.. Please have a look at the code below and help me out in solving this scrollbar issue HorizontalPanel h1=new HorizontalPanel(); HorizontalPanel h2=new HorizontalPanel(); HorizontalPanel h3=new HorizontalPanel(); HorizontalPanel h4=new HorizontalPanel(); Button b1=new Button(); Button b2=new Button(); Button b3=new Button(); Button b4=new Button(); Button b5=new Button(); Button b6=new Button(); Button b7=new Button(); b1.addStyleName(buttonimage1); b2.addStyleName(buttonimage2); b3.addStyleName(buttonimage3); b4.addStyleName(buttonimage4); b5.addStyleName(buttonimage5); b6.addStyleName(buttonimage6); b7.addStyleName(buttonimage7); b1.setWidth(20px); b1.setHeight(20px); b2.setWidth(20px); b2.setHeight(20px); b3.setWidth(20px); b3.setHeight(20px); b4.setWidth(20px); b4.setHeight(20px); b5.setWidth(20px); b5.setHeight(20px); b6.setWidth(20px); b6.setHeight(20px); b7.setWidth(20px); b7.setHeight(20px); h1.addStyleName(PanelStyle); h2.addStyleName(PanelStyle); h3.addStyleName(PanelStyle); h4.addStyleName(PanelStyle); h1.add(b1); h1.setSpacing(7); h2.setSpacing(0); h2.add(b2); h2.add(b3); h2.add(b4); h3.setSpacing(0); h3.add(b5); h3.add(b6); h3.add(b7); h1.add(h2); h1.add(h3); h4.add(h1); h4.setBorderWidth(2); h4.setWidth(100%); h1.setHeight(15px); RootPanel.get().add(h4); //end FixedWidthGrid g = new FixedWidthGrid(100,100); FixedWidthFlexTable fx = new FixedWidthFlexTable(); fx.addStyleName(FlexTable); g.addStyleName(FlexTable); fx.setText(0, 0, Hi there); for (int i=0;i100;i++){ g.setText(i, i, a); } ScrollTable st = new ScrollTable(g,fx); st.setSize(100%, 100%); st.setResizePolicy(ScrollTable.ResizePolicy.FIXED_WIDTH); RootPanel.get().add(st); CSS .buttonimage1 { background-image: url(refresh.bmp); background-position: center; background-repeat: no-repeat; } .buttonimage2 { ... ... } .FlexTable { border: 1px solid gray; background-color: #FF; border-spacing: 0; border-collapse: collapse; margin: 0; color: #ff; font: bold; table-layout: fixed; } .PanelStyle { background-color: buttonface; } Thanks Suren On May 15, 1:41 pm, Salvador Diaz diaz.salva...@gmail.com wrote: What exactly is your widget structure ? You might have wrong sizes in one of your panels and that's hiding the srollbars (or something like that, can't really tell without looking at the code) Try looking at the compiled app with firebug on firefox (with the Inspect functionality), that should tell you what's going on exactly. Hope that helps, Salvador On 15 mai, 06:22, Suren nsurendi...@gmail.com wrote: Hi All, I am using a Grid to display 100 rows and 80 columns. I used FixedWidthGrid and put that in ScrollTable (using incubator widgets). I wanted to introduce a toolbar at the top of the Grid. so I placed 7 buttons with background image in place and put that in the Horizontal panel. Finally I added that panel to my RootPanel. The moment I 've done this, I lost my horizontal scorll bar in the scorll table (in IE). But firefox behaves differently. It has now two horizontal scrollbars, one for the browser and one for the scrolltable. Till before I
Re: Using a servlet in GWT project
Take a look at the doGet method ;) I pointed out to the wrong UI class though, this one show a file browser and the user downloads any of the files by clicking on it: http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/main/java/fr/salvadordiaz/gwt/hellagwt/client/views/DownloadsPanel.java Hope that helps, Salvador On 15 mai, 11:59, Scientist ma...@gl-power.nl wrote: That's a piece of code to upload a file from client to server if I understand this correctly, in my case it needs to be the other way around. The system writes an XLS-file to the server, and the user needs to download that file to his laptop. Thanks anyway! On May 15, 11:52 am, Salvador Diaz diaz.salva...@gmail.com wrote: Hi, I answered this yesterday in this post:http://groups.google.com/group/Google-Web-Toolkit/msg/9456d6f4a8ba0574 So here's the servlet code I use:http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/ma... And here's the UI code:http://code.google.com/p/hellagwt/source/browse/trunk/hellagwt/src/ma... You could also check out the whole project and build-test it with maven. Hope that helps, Salvador On 15 mai, 11:37, Scientist ma...@gl-power.nl wrote: Hi all, I'm working on a GWT-project, and I got stuck in the part where I need to send a file on the server-side to the browser, so a user can download the file. I've done some reading, and found out the best way to do this is to write a servlet which gets called from the project. I've found a piece of code for the servlet: [quote] import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class DownloadServlet extends HttpServlet { private static final long serialVersionUID = 1L; public DownloadServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } private void doDownload( HttpServletRequest req, HttpServletResponse resp, String filename, String original_filename ) throws IOException { File f = new File(filename); int length = 0; ServletOutputStream op = resp.getOutputStream(); ServletContext context = getServletConfig().getServletContext(); String mimetype = context.getMimeType( filename ); resp.setContentType( (mimetype != null) ? mimetype : application/ octet-stream ); resp.setContentLength( (int)f.length() ); resp.setHeader( Content-Disposition, attachment; filename=\ + original_filename + \ ); byte[] bbuf = new byte[0]; DataInputStream in = new DataInputStream(new FileInputStream(f)); while ((in != null) ((length = in.read(bbuf)) != -1)) { op.write(bbuf,0,length); } in.close(); op.flush(); op.close(); }} [/quote] Don't know if this is usefull code, it doesn't give any errors in Eclipse so that's a good start. Now for the main question: how do I integrate this servlet in my GWT-project? In other words: what kind of code do I have to place under the button so the servlet gets triggered? Trying to figure out for 3 days, so I hope someone knows the answer.- 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: Help With Programmatic Events in 1.6
Wow, I'm a fool. The end. --~--~-~--~~~---~--~~ 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: Question on GWT1.6
If you change one file name, you must change all three; Service, ServiceAsync and ServiceImpl. Then, go to your web.xml in war/WEB-INF file, and make sure the classnames there have changed as well. --~--~-~--~~~---~--~~ 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 required
Hello, Thanks for ur reply... I followed what u told, but even then the project is not accepting any properties of the jar and performing validations. I am not understanding what to do further please help me I have included the jar in the projects library folder where all the jars required are kept. Also, included it in the build path.Even then it is not working. Please let me know if anything is remaining? Thanks once 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: Question on GWT1.6
There's a handy wizard in Eclipse that does this automatically. 1. Right click in the class you wish to modify. Choose Refactor Rename from the context menu 2. You should check the options 'Update textual occurrences in comments and strings' and 'Update fully-qualified named in non-java text files' (maybe restrict to *.xml) 3. ... 4. Profit ! Of course this will not automatically change the Async nor the interface name, but it will change the servlet declaration in web.xml Hope that helps, Salvador PS: A screenshot of step 2: http://bayimg.com/image/fapcoaabl.jpg On 15 mai, 12:14, Alyxandor a.revolution.ultra.b...@gmail.com wrote: If you change one file name, you must change all three; Service, ServiceAsync and ServiceImpl. Then, go to your web.xml in war/WEB-INF file, and make sure the classnames there have changed as well. --~--~-~--~~~---~--~~ 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: New bie question: import com.google.appengine cannot be resolved
Fred's methods are rock solid, look near the middle of the page for the super-source hack needed to make Key happy for the client side. There are very few restrictions on what can go into the client side, {file operations and bytecode enhancements, mainly}. To make life easier, don't try to use any appengine stuff except annotations in your client package; they are used by the gwt compiler, but never make it into the actual code. ...And be careful using Long keys, I hear that you can only retrieve data with long keys using queries, and not the persistence or entity managers... Something about private indexing and not being able to use them for root level getObjectById() s or something. I can't remember, and am too tired and new to appengine to tell you for sure. Just saying that if your getObjectById fails, it's because it wants a String or Key key. There's another problem I'm sure you're about to run into: Bytecode enhancement. The dataNucleus tool uses Bytecode enhancement to make objects that can be retrieved from the server, sent to the client, modified there and then returned to the server and persisted back without having to manually copy values. It's a sweet enhancement, but like I said before, these enhancements can fail on GWT {because it uses an Object[] with various datatypes in it, and GWT can't get access to it because it's an invisible field}. The solution is to make your entities non-detachable: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = false) public class Foo{} Of course, this will be a pain, because now you can send the data to gwt, but it can't put it back into the datastore. Luckily, the Timelord, Ray Cromwell, has fixed this for us: http://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-marriage.html I also posted a hack there to make his fix fully bean-compatible, in case you're using existing code. The code I use internally is a little different than the piece I posted there, but you get the drift. You don't need it if you make sure that, for all of your persistent objects, you define a getValue() setValue() pair, with identical names. Using isValue() for booleans requires my hack. If you want to get gwt + appengine datastore running, you have to use Fred's super-source method on Key, in the client side, and Ray's reflection-save method on the server-side. Also, if you want a little more security and smaller transfers across the wire, don't forget to mark any persistent fields that gwt won't need {like your Keys} with @Transient. It tells RPC to skip the field, so you can keep sensitive data where it belongs; out of the browser! {password fields, anyone?} --~--~-~--~~~---~--~~ 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: Empty object when returning from RPC call
Do your homework! http://openlandscape.wordpress.com/2008/02/24/google-web-toolkits-gwt-fake-long/ http://www.ongwt.com/post/2008/02/25/GWT-and-the-Java-long-data-type How hard is using (Long)? --~--~-~--~~~---~--~~ 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: JDOObjectNotFound exception when using getObjectById
Ya, having datanucleus around to solve all our problems is pretty sweet... You should worry whether your Long id will survive a trip through GWT http://openlandscape.wordpress.com/2008/02/24/google-web-toolkits-gwt... http://www.ongwt.com/post/2008/02/25/GWT-and-the-Java-long-data-type Also, detachable = true will tell the DataNucleus extension to add a hidden Object[] to your class so it can be put back into the server. The field is invisible, and contains multiple data types, so GWT does not, and likely will not support it anytime soon. Use @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = false) And then to put your data back in the datastore, use Ray Cromwell's mad reflection skills: http://timepedia.blogspot.com/2009/04/google-appengine-and-gwt-now-marriage.html --~--~-~--~~~---~--~~ 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 required
Does your jar have source attached? Also, try putting a copy in your war/WEB-INF/lib folder. What build method do you use? IDE? Ant? Cypal... Don't use Cypal anymore, the official GWT + Appengine plugin works like a dream, provided your source level and source compliance level are set to 1.6... For clarity, the IDE is happy, but the compiler isn't? If it comes right down to it, you can tarball your project directory and email it to me, and I can check it out, but I'd really rather not... Are you using Eclipse? If you aren't, download 3.4 Ganymede {Galileo is too new for the GWT plugin} and the Google Plugin, then make sure your jar is in the project build path, AND war/WEB-INF/lib ... If that fails, send your code and I'll try to get it to go. --~--~-~--~~~---~--~~ 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 Programmatic Events in 1.6
Ok, seriously, I'm here, trying to help, and you keep giving me terrible ratings for it? ...SHALLOW! Oh, and please give me another one-star for this post as well I know I'm not a doctor or anything, but I'm doing my best. --~--~-~--~~~---~--~~ 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: Compilation not renewing the files
Hm, I'm not sure what you're getting at... Which output? In the hosted mode browser? Just click refresh to update changes. If that doesn't work, close hosted mode and open it again {changing configuration files like web.xml require a restart}. Or do you mean the compiled output? Cos you have to press F5 to refresh that. Describe with a little more detail what you are doing, and what you expect to change. --~--~-~--~~~---~--~~ 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 overlay one grid over the other?
Hi, After placing two simple panels side by side, now I have fixed data Panel on the right and first column like panel on the left. Now I need to add these two panels to a ScrollTable, since I already have a fixed column header, by placing a FixedWidthFlexTable at the top. But the problem here is that, ScrollTable will only take an argument of FixedWidthGrid and FixedWidthFlexTable what I have now to achieve the fixed first column is two panels, and each panel contains a FixedWidthGrid. How can I combine these two panels in to a Grid form and pass that to a scrollTable? Any advise? Thanks Suren On May 15, 2:34 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: @alex.d - The only way to make the two panel approach work would be to use Salvador's ScrollHandler linkage, plus a function to loop through each row of both tables, measure the max height of each row, and apply that height to an element inside each table; just beware browser differences when measuring cells that have padding or margins! --~--~-~--~~~---~--~~ 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: parsing dates
thanks for your replay mike, what i need it's quite simple but i still couldn't do it. I need a Date variable (not a string) in the format 12/05/2009 for example. I thought that getting a format with DateTimeFormat as dd/MM/ and making a new date variable with that format i would have some dd/ mm/ but i don't i only have a date variable like Tue May 12 The only case that i have something like dd/mm/ is a string wich it anusefull for me. Could you please help me! On May 15, 12:00 am, mdwarne mike.wa...@gmail.com wrote: Hi sindroide, Are you trying to change a Text String date, into another Text String date? I'm not sure if I understand your needs. But, look at the static parse method in the Date class: Date d = Date.parse(Tue, xx); String newDate = DateTimeFormat.getFormat(dd/MM/).format(d); Mike. On May 12, 3:28 am, sindroide efectob...@gmail.com wrote: Hi, I can not get in anyway a Date value like 2009/05/12 from text like 'Tue May 12 00:00:00 ART 2009' The only way I can not get illegalArgumentexception es like Date f = new Date(); // this print like i want but it's text System.out.println(DateTimeFormat.getFormat(dd/MM/).format (f)); //this prints date but ... in words format System.out.println(DateTimeFormat.getFormat(dd/MM/).parse (DateTimeFormat.getFormat(dd.MM.).format(f))); cuold you please help me. Thanks for advance! --~--~-~--~~~---~--~~ 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: Communication error [INFO] java.net.ConnectException: Connection refused while compiling under 1.6
On 15 mai, 03:23, BR benjamin.ren...@gmail.com wrote: I am getting this error while compiling with 1.6.4 under MacOSX 10.5.6 Anyone knows why? It seems to compile fine otherwise. AFAICT, the Compiler tries 2 kind of factories for its compile workers (that allow compiling permutations in parallel, and make the whole compile faster), a thread-based factory and a socket-based one (that could even allows sharding a compile on multiple machines IIUC !). The initialisation of the socket-based factory fails with the below error, but the compilation continues with the remaining, thread-based, factory (if no factory could have been created, only then it would fail). So you can safely ignore this error. If you don't want it, from what I understand from the code, you should be able to tell the compiler to only use the thread-based factory by setting the gwt.jjs.permutationWorkerFactory system property to com.google.gwt.dev.ThreadedPermutationWorkerFactory, e.g. by passing the following to your java command line: - Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory [ERROR] Communication error [INFO] java.net.ConnectException: Connection refused [INFO] at java.net.PlainSocketImpl.socketConnect (Native Method) [INFO] at java.net.PlainSocketImpl.doConnect (PlainSocketImpl.java:333) [INFO] at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:195) [INFO] at java.net.PlainSocketImpl.connect (PlainSocketImpl.java:182) [INFO] at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:432) [INFO] at java.net.Socket.connect(Socket.java:520) [INFO] at java.net.Socket.connect(Socket.java:470) [INFO] at java.net.Socket.init(Socket.java:367) [INFO] at java.net.Socket.init(Socket.java:180) [INFO] at com.google.gwt.dev.CompilePermsServer.run (CompilePermsServer.java:242) [INFO] at com.google.gwt.dev.CompilePermsServer.main (CompilePermsServer.java:233) --~--~-~--~~~---~--~~ 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: AXIS I.P. camera
Anyone else have any ideas?? I'm fresh out, :(. --~--~-~--~~~---~--~~ 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: parsing dates
ahh... I can format date value in any way in client side with DateTimeFormat but always have a textual representation of date. wich can not be compare with the Date i use in postgres... at least in my poor knowledge On May 15, 9:28 am, Salvador Diaz diaz.salva...@gmail.com wrote: I need a Date variable (not a string) in the format 12/05/2009 for example. You're confusing things. A date is an object holding information about an instant in time (typically this is represented internally as a long), it has nothing to do with formats. Now, for a more thorough explanation, go read the javadocs for the Date object:http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html i only have a date variable like Tue May 12 If you're using eclipse I'm guessing that you're talking about the value that the Variables view in the Debug perspective shows for your date. That's the result of the toString method of the Date object, so it is only a specially formatted textual representation of that object. You can format a Date object in almost any way you want with a DateFormat instance in your server-side code (http:// java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html) or with a DateTimeFormat in client-side GWT code (http://google-web- toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/ DateTimeFormat.html) Would you mind describing exactly what you're trying to accomplish ? If it's doable in 2-3 lines of code somebody will eventually paste that 2-3 lines of code and you'll have what you need. Hope that helps, Salvador On 15 mai, 14:11, sindroide efectob...@gmail.com wrote: thanks for your replay mike, what i need it's quite simple but i still couldn't do it. I need a Date variable (not a string) in the format 12/05/2009 for example. I thought that getting a format with DateTimeFormat as dd/MM/ and making a new date variable with that format i would have some dd/ mm/ but i don't i only have a date variable like Tue May 12 The only case that i have something like dd/mm/ is a string wich it anusefull for me. Could you please help me! On May 15, 12:00 am, mdwarne mike.wa...@gmail.com wrote: Hi sindroide, Are you trying to change a Text String date, into another Text String date? I'm not sure if I understand your needs. But, look at the static parse method in the Date class: Date d = Date.parse(Tue, xx); String newDate = DateTimeFormat.getFormat(dd/MM/).format(d); Mike. On May 12, 3:28 am, sindroide efectob...@gmail.com wrote: Hi, I can not get in anyway a Date value like 2009/05/12 from text like 'Tue May 12 00:00:00 ART 2009' The only way I can not get illegalArgumentexception es like Date f = new Date(); // this print like i want but it's text System.out.println(DateTimeFormat.getFormat(dd/MM/).format (f)); //this prints date but ... in words format System.out.println(DateTimeFormat.getFormat(dd/MM/).parse (DateTimeFormat.getFormat(dd.MM.).format(f))); cuold you please help me. Thanks for advance! --~--~-~--~~~---~--~~ 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 Validation Library
thank you for your reply but it doesn't seems correct. i got this : [ERROR] Unable to find 'eu/maydu/gwt/validation/ ValidationLibrary .gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? i included the jar already.. does anyone else got this error? On May 13, 5:07 pm, Salvador Diaz diaz.salva...@gmail.com wrote: eu.maydu.gwt.validation.ValidationLibrary On 13 mai, 16:53,ytbryanytbr...@gmail.com wrote: hi all, I refer to this gwt validation library.http://gwt-vl.maydu.eu/ ValidationShowcase.html does anybody know what is the name of the inherited module? 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: Help With Programmatic Events in 1.6
Hej Alyxandor, I wouldn't get too disheartened by the star markings; anyone can click any value of stars - sometimes the stars can help guide between good/ helpful answers from those that are less, sometimes I've seen things 1- starred for no apparent reason (who really knows why 1 person clicked a 1 star) Personally, I think any answer can be useful if it moves the discussion forwards. In the case of the new event model, there's really not that much documented, so there are bound to be lots of problems/issues/questions - now between us all on this thread we've got some approaches and points down on paper that will hopefully help someone else in the future. //Adam On 15 Maj, 13:11, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Ok, seriously, I'm here, trying to help, and you keep giving me terrible ratings for it? ...SHALLOW! Oh, and please give me another one-star for this post as well I know I'm not a doctor or anything, but I'm doing my best. --~--~-~--~~~---~--~~ 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: parsing dates
We also use hibernate spring for that kinds of things. Here's an example (in a class extending HibernateDaoSupport): public ListEmpleado getObjects(Date startDate){ DetachedCriteria criteria = DetachedCriteria.forClass (Empleado.class); criteria.add(Restrictions.ge(desde, startDate));//desde must be the name of the field in your Empleado object ListEmpleado result = getHibernateTemplate().findByCriteria (criteria); return result; } That's my recommended solution in Hibernate (notice that there are no strings [besides the name of the field of course] just dates and Empleados ;) ) Cheers, Salvador On 15 mai, 15:28, sindroide efectob...@gmail.com wrote: thanks Salvador... what i trying to do is a query to postgres db in wich one of the parameters it's a date. And if i send the textual date of Date variable the query fails... because postgres can't compare the two dates. I solved my problem in query doing something like from Empleadosgrupos e where idgrupo =? and idempleado =? and desde =to_date('+fechadesde+', 'DD/mm/')) I'm using hibernate and spring but it's a bad solution for me.. don't know I'd like just to send the date as it is... a Date value with dd/mm/ ... in fact postgres has /mm/dd format but this difference seems doesn't mather for postgres I really appreciate your help! On May 15, 9:28 am, Salvador Diaz diaz.salva...@gmail.com wrote: I need a Date variable (not a string) in the format 12/05/2009 for example. You're confusing things. A date is an object holding information about an instant in time (typically this is represented internally as a long), it has nothing to do with formats. Now, for a more thorough explanation, go read the javadocs for the Date object:http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html i only have a date variable like Tue May 12 If you're using eclipse I'm guessing that you're talking about the value that the Variables view in the Debug perspective shows for your date. That's the result of the toString method of the Date object, so it is only a specially formatted textual representation of that object. You can format a Date object in almost any way you want with a DateFormat instance in your server-side code (http:// java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html) or with a DateTimeFormat in client-side GWT code (http://google-web- toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/ DateTimeFormat.html) Would you mind describing exactly what you're trying to accomplish ? If it's doable in 2-3 lines of code somebody will eventually paste that 2-3 lines of code and you'll have what you need. Hope that helps, Salvador On 15 mai, 14:11, sindroide efectob...@gmail.com wrote: thanks for your replay mike, what i need it's quite simple but i still couldn't do it. I need a Date variable (not a string) in the format 12/05/2009 for example. I thought that getting a format with DateTimeFormat as dd/MM/ and making a new date variable with that format i would have some dd/ mm/ but i don't i only have a date variable like Tue May 12 The only case that i have something like dd/mm/ is a string wich it anusefull for me. Could you please help me! On May 15, 12:00 am, mdwarne mike.wa...@gmail.com wrote: Hi sindroide, Are you trying to change a Text String date, into another Text String date? I'm not sure if I understand your needs. But, look at the static parse method in the Date class: Date d = Date.parse(Tue, xx); String newDate = DateTimeFormat.getFormat(dd/MM/).format(d); Mike. On May 12, 3:28 am, sindroide efectob...@gmail.com wrote: Hi, I can not get in anyway a Date value like 2009/05/12 from text like 'Tue May 12 00:00:00 ART 2009' The only way I can not get illegalArgumentexception es like Date f = new Date(); // this print like i want but it's text System.out.println(DateTimeFormat.getFormat(dd/MM/).format (f)); //this prints date but ... in words format System.out.println(DateTimeFormat.getFormat(dd/MM/).parse (DateTimeFormat.getFormat(dd.MM.).format(f))); cuold you please help me. Thanks for advance! --~--~-~--~~~---~--~~ 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: parsing dates
sorry guys ... the query just work fine with the textual date for postgres... sorry your time thanks again On May 15, 9:28 am, Salvador Diaz diaz.salva...@gmail.com wrote: I need a Date variable (not a string) in the format 12/05/2009 for example. You're confusing things. A date is an object holding information about an instant in time (typically this is represented internally as a long), it has nothing to do with formats. Now, for a more thorough explanation, go read the javadocs for the Date object:http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html i only have a date variable like Tue May 12 If you're using eclipse I'm guessing that you're talking about the value that the Variables view in the Debug perspective shows for your date. That's the result of the toString method of the Date object, so it is only a specially formatted textual representation of that object. You can format a Date object in almost any way you want with a DateFormat instance in your server-side code (http:// java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html) or with a DateTimeFormat in client-side GWT code (http://google-web- toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/ DateTimeFormat.html) Would you mind describing exactly what you're trying to accomplish ? If it's doable in 2-3 lines of code somebody will eventually paste that 2-3 lines of code and you'll have what you need. Hope that helps, Salvador On 15 mai, 14:11, sindroide efectob...@gmail.com wrote: thanks for your replay mike, what i need it's quite simple but i still couldn't do it. I need a Date variable (not a string) in the format 12/05/2009 for example. I thought that getting a format with DateTimeFormat as dd/MM/ and making a new date variable with that format i would have some dd/ mm/ but i don't i only have a date variable like Tue May 12 The only case that i have something like dd/mm/ is a string wich it anusefull for me. Could you please help me! On May 15, 12:00 am, mdwarne mike.wa...@gmail.com wrote: Hi sindroide, Are you trying to change a Text String date, into another Text String date? I'm not sure if I understand your needs. But, look at the static parse method in the Date class: Date d = Date.parse(Tue, xx); String newDate = DateTimeFormat.getFormat(dd/MM/).format(d); Mike. On May 12, 3:28 am, sindroide efectob...@gmail.com wrote: Hi, I can not get in anyway a Date value like 2009/05/12 from text like 'Tue May 12 00:00:00 ART 2009' The only way I can not get illegalArgumentexception es like Date f = new Date(); // this print like i want but it's text System.out.println(DateTimeFormat.getFormat(dd/MM/).format (f)); //this prints date but ... in words format System.out.println(DateTimeFormat.getFormat(dd/MM/).parse (DateTimeFormat.getFormat(dd.MM.).format(f))); cuold you please help me. Thanks for advance! --~--~-~--~~~---~--~~ 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: difficulties constructing reduced example of super-source
Hi all, Thanks again for the responses. See my replies below: On Fri, May 15, 2009 at 5:51 AM, Thomas Broyer t.bro...@gmail.com wrote: On 15 mai, 03:06, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Are you getting a wrong package error? Because if you aren't, you should! Actually, I'd rather say you shouldn't add your super to the projects build path (no need to compile the classes to Java .class, with the risk of having them used in place of the Java runtime's ones; only the source is needed, and only for the GWT Compiler, so what's needed is that the super is in the classpath, not the build path!) OK, that's very interesting! The distinction between the classpath and the build path was not something that was clear to me before. Now, I believe it is, but I'm not sure, how do you add a path to the classpath without adding it to the build path in Eclipse? The GWT module still needs to be found on the classpath. I took a look at the .classpath from gwt-in-the-air: http://www.google.com/codesearch/p?hl=en#7KCk1V3Al4I/trunk/.classpathq=.classpath%20package:http://gwt-in-the-air\.googlecode\.com It doesn't appear to reference super. Is this because .classpath sets the project build path in Eclipse? How do you then set the classpath so that the Emulation.gwt.xml module is finable, but not on the build path? (however, adding it to the build path in Eclipse brings you better editing, with better code completion, etc.) Finally, it's more a matter of taste than a rule or even best practice; but you have to understand what it means when you add the super to the build path or not. I still don't have a clear sense of this. What would you say it means to add super to the build path? Also, you've got to make your java.io hack-pack-age another level deeper... Not necessarily. GWT's Emul package uses super-source/, and so do I in GWT-in-the-AIR (cf. http://code.google.com/p/gwt-in-the-air/source/browse/trunk/super/net/ltgt/gwt/air/emul/ ) I still can't seem to get that to work :( Not sure why, but my use of the empty super-source/ tag always causes GWT to fail. This is unfortunate, as it seems like it would be the best way to make both GWT and the IDE happy. So, for example, with gwt-in-the-air, my approach would have been to add /super/net/ltgt/gwt/air/emul/ as a source folder (so, on the build path). Then the emulated packages would be of the form java.*, which would correspond to the declared package names in the *.java files. This makes the IDE happy, and in my mind, it seems like GWT shouldn't have a problem with it either. But, so far, this approach has always failed for me, and I cannot see the reason for this, or where the problem is originating. If someone can see it, and could point it out to me, I would be extremely grateful. Also, maybe if, as Thomas suggested, super wasn't on the build path, then GWT won't freak out. But then, as Thomas said, you don't get the IDE's help with these classes. I'll have to try this and see if it makes a difference, but I'd really like to understand why the above approach is failing. Thanks, Jake --~--~-~--~~~---~--~~ 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 Images loaded from GAE's Big Table
I am storing images as a BLOB in the GAE's Big Table and was wondering how I present the images in GWT. From looking at the GWT Image class, you have to set it up via an URL but I need to load it up via byte[]. How can I achieve this? I would persist the image data to the file system to get a URL but the sandbox restricts doing so. Best, JP. --~--~-~--~~~---~--~~ 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 Images loaded from GAE's Big Table
Create regular servlet which will accept parameter with image name and will write response consisting of your image (do not forget to set correct content type header). In GWT you would have just a Image with src being path to servlet plus parameter. On Fri, May 15, 2009 at 4:35 PM, Pez james.austin.pe...@gmail.com wrote: I am storing images as a BLOB in the GAE's Big Table and was wondering how I present the images in GWT. From looking at the GWT Image class, you have to set it up via an URL but I need to load it up via byte[]. How can I achieve this? I would persist the image data to the file system to get a URL but the sandbox restricts doing so. Best, JP. --~--~-~--~~~---~--~~ 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: difficulties constructing reduced example of super-source
On 15 mai, 16:06, Jake B otakuj...@gmail.com wrote: Hi all, Thanks again for the responses. See my replies below: On Fri, May 15, 2009 at 5:51 AM, Thomas Broyer t.bro...@gmail.com wrote: On 15 mai, 03:06, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Are you getting a wrong package error? Because if you aren't, you should! Actually, I'd rather say you shouldn't add your super to the projects build path (no need to compile the classes to Java .class, with the risk of having them used in place of the Java runtime's ones; only the source is needed, and only for the GWT Compiler, so what's needed is that the super is in the classpath, not the build path!) OK, that's very interesting! The distinction between the classpath and the build path was not something that was clear to me before. The classpath is what you need to build or launch a Java app (java, javac, the GWT's Compile, HostedMode, etc.). The buildpath is what you compile from *.java to *.class, and you MUST NOT compile your super-source classes to *.class or the Java runtime could use them instead of its own classes (and fail, quite obviously). Now, I believe it is, but I'm not sure, how do you add a path to the classpath without adding it to the build path in Eclipse? In your launch config, in the classpath tab, your can add a folder (select user entries then click the advanced button). The GWT module still needs to be found on the classpath. I took a look at the .classpath from gwt-in-the-air: http://www.google.com/codesearch/p?hl=en#7KCk1V3Al4I/trunk/.classpathgooglecode\.com It doesn't appear to reference super. Is this because .classpath sets the project build path in Eclipse? Yes. And it defines the default classpath for your launch configurations (hence the name). How do you then set the classpath so that the Emulation.gwt.xml module is finable, but not on the build path? As said above, in the launch config (Run menu, then Run configurations...; or replace Run with Debug, they're the same actually, at least in our case). (however, adding it to the build path in Eclipse brings you better editing, with better code completion, etc.) Finally, it's more a matter of taste than a rule or even best practice; but you have to understand what it means when you add the super to the build path or not. I still don't have a clear sense of this. What would you say it means to add super to the build path? See above, Eclipse would compile those *.java to *.class so your code is seen un run by the Java runtime when you launch, say, the GWT's Compiler (and the Compiler is then using your own OutputStream instead of the normal one) Also, you've got to make your java.io hack-pack-age another level deeper... Not necessarily. GWT's Emul package uses super-source/, and so do I in GWT-in-the-AIR (cf.http://code.google.com/p/gwt-in-the-air/source/browse/trunk/super/net... ) I still can't seem to get that to work :( Not sure why, but my use of the empty super-source/ tag always causes GWT to fail. This is unfortunate, as it seems like it would be the best way to make both GWT and the IDE happy. So, for example, with gwt-in-the-air, my approach would have been to add /super/net/ltgt/gwt/air/emul/ as a source folder (so, on the build path). Then the emulated packages would be of the form java.*, which would correspond to the declared package names in the *.java files. I'm personnally adding super as a source folder, and live with the error about the package declaration (which Alyxandor talked about earlier). This makes the IDE happy, and in my mind, it seems like GWT shouldn't have a problem with it either. That's where you're wrong, and where it hurts (see above for the explanation, GWT is then using your own java.io.OutputStream class) But, so far, this approach has always failed for me, and I cannot see the reason for this, or where the problem is originating. If someone can see it, and could point it out to me, I would be extremely grateful. Before launching GWT (Compiler or HostedMode), remove super from the build path. And make sure your launch configurations have super added in the classpath (therefore, GWT will be able to see the *.java files, but there wouldn't be corresponding *.class files to distract the Java runtime) --~--~-~--~~~---~--~~ 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 RPC DataStore
Hi @ all, i want to create object from a custom class, send them over rpc to the server and then store them into the google datastore. my problem is to send objects from a class which i created over the rpc to the server. i've generated a client interface which both classes were implementing. but i always got a exception that my interface is not seriazible but the interface extends the Serializable class. i don't know what else to try because the rpc works, if i transfer a String object. is there a tutorial how to transfer custom classes with rpc ? i don't found anything. thanks... chris --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Varargs are slow?
Hi I read the following lines about varargs on http://sinnema313.wordpress.com/2008/11/16/performance-tuning-a-gwt-application/ Variable argument lists are sometimes quite handy. However, we’ve found that they come at a severe performance penalty, because a JavaScript array needs to be created to wrap the arguments. So if at all possible, use fixed argument lists, even though this may be less convenient from a code writing/maintaining perspective. Is that correct? --~--~-~--~~~---~--~~ 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 Hibernate issue
Hello all, At present I am trying to integrate GWT Hibernate and MySQL in Tomcat5. I am using Hibernate to access my database in a servlet as public class DBConnectionImpl extends RemoteServiceServlet implements DBConnection { private Session session; public DBConnectionImpl() { try { session = HibernateUtil.getSessionFactory().openSession(); } catch (Exception ex) { ex.printStackTrace(); } } } I have configured all the necessary Hibernate requirements like hybernate.cfg.xml, web.xml, context.xml and all necessary java classes. But when I want to connect with my database through a rpc call it shows me error like: May 15, 2009 7:00:44 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.duke.irb.client.data.User com.duke.irb.client.dao.DBConnection.authenticateUser (java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection (BasicDataSource.java:899) at org.hibernate.connection.DatasourceConnectionProvider.getConnection (DatasourceConnectionProvider.java:89) at org.hibernate.jdbc.ConnectionManager.openConnection (ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection (ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin (JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java: 1353) at com.duke.irb.server.DBConnectionImpl.authenticateUser (DBConnectionImpl.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:527) ... 18 more Please help me out in solving this issue. I will provide more information further if needed. I am new to both GWT and Hibernate... :-) Thanks in advance Raul --~--~-~--~~~---~--~~ 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 Images loaded from GAE's Big Table
Ah, I was hoping I didn't have to do that but oh well. Thanks for the reply. Cheers, - JP On May 15, 3:50 pm, Peter Ondruška peter.ondru...@gmail.com wrote: Create regular servlet which will accept parameter with image name and will write response consisting of your image (do not forget to set correct content type header). In GWT you would have just a Image with src being path to servlet plus parameter. On Fri, May 15, 2009 at 4:35 PM, Pez james.austin.pe...@gmail.com wrote: I am storing images as a BLOB in the GAE's Big Table and was wondering how I present the images in GWT. From looking at the GWT Image class, you have to set it up via an URL but I need to load it up via byte[]. How can I achieve this? I would persist the image data to the file system to get a URL but the sandbox restricts doing so. Best, JP. --~--~-~--~~~---~--~~ 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.MenuBarImages
Salut est ce que vous prouver me trouver une bon exemple d'utilisation de l'interface MenuBar.MenuBarImages Merci d'avance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Enhancement to Tutorial on GWT-RPC
In section 2. Invoking the service from the client, in the paragraph titled Test the Remote Procedure Call, you might like to add that the StockPrice class should have a zero argument constructor. Forgetting this blocked me until I read the docs on serialization. As this is a tutorial, it might be a good idea to suggest using IsSerializable instead of java.io.Serializable by default. Thanks for the excellent tutorial. Alessandro --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Hosted mode servlets in GWT 1.6
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html says the following about servlet tag is the module.xml NOTE: as of GWT 1.6, this tag does no longer loads servlets in hosted mode, instead you must configure a WEB-INF/web.xml in your war directory to load any servlets needed. What I understand from this is that, I no longer need to supply the servlet tag in the module XML. Instead I can provide the mappig in war\WEB-INF\web.xml. But this does not work for me. If I remove the servlet tag from the module XML, my servlets are not hosted in hosted mode. I really do not want the servlet mapping in the module XML because these servlets are used only for JUnit tests. They are not shipped. Having to specify the mapping in module XML, I have to modify the module XML after I run the tests and before shipping. Any idea? --~--~-~--~~~---~--~~ 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: parsing dates
hey salvador just because you mention... i use gilead for treating my pojo's ... what about that HibernateDaoSupport... ? On May 15, 10:43 am, Salvador Diaz diaz.salva...@gmail.com wrote: We also use hibernate spring for that kinds of things. Here's an example (in a class extending HibernateDaoSupport): public ListEmpleado getObjects(Date startDate){ DetachedCriteria criteria = DetachedCriteria.forClass (Empleado.class); criteria.add(Restrictions.ge(desde, startDate));//desde must be the name of the field in your Empleado object ListEmpleado result = getHibernateTemplate().findByCriteria (criteria); return result; } That's my recommended solution in Hibernate (notice that there are no strings [besides the name of the field of course] just dates and Empleados ;) ) Cheers, Salvador On 15 mai, 15:28, sindroide efectob...@gmail.com wrote: thanks Salvador... what i trying to do is a query to postgres db in wich one of the parameters it's a date. And if i send the textual date of Date variable the query fails... because postgres can't compare the two dates. I solved my problem in query doing something like from Empleadosgrupos e where idgrupo =? and idempleado =? and desde =to_date('+fechadesde+', 'DD/mm/')) I'm using hibernate and spring but it's a bad solution for me.. don't know I'd like just to send the date as it is... a Date value with dd/mm/ ... in fact postgres has /mm/dd format but this difference seems doesn't mather for postgres I really appreciate your help! On May 15, 9:28 am, Salvador Diaz diaz.salva...@gmail.com wrote: I need a Date variable (not a string) in the format 12/05/2009 for example. You're confusing things. A date is an object holding information about an instant in time (typically this is represented internally as a long), it has nothing to do with formats. Now, for a more thorough explanation, go read the javadocs for the Date object:http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html i only have a date variable like Tue May 12 If you're using eclipse I'm guessing that you're talking about the value that the Variables view in the Debug perspective shows for your date. That's the result of the toString method of the Date object, so it is only a specially formatted textual representation of that object. You can format a Date object in almost any way you want with a DateFormat instance in your server-side code (http:// java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html) or with a DateTimeFormat in client-side GWT code (http://google-web- toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/ DateTimeFormat.html) Would you mind describing exactly what you're trying to accomplish ? If it's doable in 2-3 lines of code somebody will eventually paste that 2-3 lines of code and you'll have what you need. Hope that helps, Salvador On 15 mai, 14:11, sindroide efectob...@gmail.com wrote: thanks for your replay mike, what i need it's quite simple but i still couldn't do it. I need a Date variable (not a string) in the format 12/05/2009 for example. I thought that getting a format with DateTimeFormat as dd/MM/ and making a new date variable with that format i would have some dd/ mm/ but i don't i only have a date variable like Tue May 12 The only case that i have something like dd/mm/ is a string wich it anusefull for me. Could you please help me! On May 15, 12:00 am, mdwarne mike.wa...@gmail.com wrote: Hi sindroide, Are you trying to change a Text String date, into another Text String date? I'm not sure if I understand your needs. But, look at the static parse method in the Date class: Date d = Date.parse(Tue, xx); String newDate = DateTimeFormat.getFormat(dd/MM/).format(d); Mike. On May 12, 3:28 am, sindroide efectob...@gmail.com wrote: Hi, I can not get in anyway a Date value like 2009/05/12 from text like 'Tue May 12 00:00:00 ART 2009' The only way I can not get illegalArgumentexception es like Date f = new Date(); // this print like i want but it's text System.out.println(DateTimeFormat.getFormat(dd/MM/).format (f)); //this prints date but ... in words format System.out.println(DateTimeFormat.getFormat(dd/MM/).parse (DateTimeFormat.getFormat(dd.MM.).format(f))); cuold you please help me. Thanks for advance! --~--~-~--~~~---~--~~ 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
Error building trunk 1.6
Earlier this week (Monday, the 11th), I svn'ed the trunk and built 1.6. I did this because I need OOPHM. The build was successful and I've been running with it since then. I've since tried to update my build, but have been getting a failure all week: ... benchmark-viewer: wardir: javac: gwtc: [java] Compiling module com.google.gwt.benchmarks.viewer.ReportViewer [java] [ERROR] Unexpected [java] java.lang.NoSuchMethodError: com.google.gwt.dev.javac.CompilationState.getCompilationUnits()Ljava/ util/Set; [java] at com.google.gwt.dev.jdt.AbstractCompiler.compile (AbstractCompiler.java:473) [java] at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations (WebModeCompilerFrontEnd.java:132) [java] at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations (WebModeCompilerFrontEnd.java:57) [java] at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile (JavaToJavaScriptCompiler.java:393) [java] at com.google.gwt.dev.Precompile.precompile (Precompile.java:466) [java] at com.google.gwt.dev.Precompile.precompile (Precompile.java:387) [java] at com.google.gwt.dev.Compiler.run(Compiler.java:191) [java] at com.google.gwt.dev.Compiler$1.run(Compiler.java: 144) [java] at com.google.gwt.dev.CompileTaskRunner.doRun (CompileTaskRunner.java:84) [java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger (CompileTaskRunner.java:78) [java] at com.google.gwt.dev.Compiler.main(Compiler.java:151) BUILD FAILED /home/thad/jdevel/gwt-svn/trunk/build.xml:57: The following error occurred while executing this line: /home/thad/jdevel/gwt-svn/trunk/build.xml:31: The following error occurred while executing this line: /home/thad/jdevel/gwt-svn/trunk/tools/build.xml:24: The following error occurred while executing this line: /home/thad/jdevel/gwt-svn/trunk/tools/build.xml:10: The following error occurred while executing this line: /home/thad/jdevel/gwt-svn/trunk/tools/benchmark-viewer/build.xml:59: Java returned: 1 Total time: 1 minute 52 seconds Any ideas? Today's svn revision is 5383. I'm running on SuSE Linux 10.3 with Sun's JDK 1.5.0_17 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
errors in compiling mosaic client code version 0.1.9.1
Below are the errors trace from the Host window. I'm not using those classes but still all those red message quite annoying Any suggestion/fixes? [TRACE] Removing units with errors [ERROR] Errors in 'jar:file:/C:/wseclipse/iDirectWebNms/WebContent/WEB- INF/lib/gwt-mosaic-0.1.9.1.jar!/org/gwt/mosaic/core/client/util/ AbstractUnitConverter.java' [ERROR] Line 221: The method getScreenResolution() is undefined for the type DOM [ERROR] Errors in 'jar:file:/C:/wseclipse/iDirectWebNms/WebContent/WEB- INF/lib/gwt-mosaic-0.1.9.1.jar!/org/gwt/mosaic/core/client/ FontMetrics.java' [ERROR] Line 59: The method getStringBoxSize(Element, String) is undefined for the type DOM [ERROR] Errors in 'jar:file:/C:/wseclipse/iDirectWebNms/WebContent/WEB- INF/lib/gwt-mosaic-0.1.9.1.jar!/org/gwt/mosaic/ui/client/ Separator.java' [ERROR] Line 21: The import org.gwt.mosaic.ui.client.layout.BoxLayout.Alignment cannot be resolved [ERROR] Line 47: Alignment cannot be resolved -Sergey --~--~-~--~~~---~--~~ 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 Programmatic Events in 1.6
Thanks to everyone ... I think you've all helped a little in different ways, so much 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 Hibernate issue
You have to explicitly throw any exceptions in all service methods. Jim http://www.gwtorm.com For GWT ORM http://code.google.com/p/dreamsource-orm/downloads/list On May 15, 9:52 am, Raul raahoo...@gmail.com wrote: Hello all, At present I am trying to integrate GWT Hibernate and MySQL in Tomcat5. I am using Hibernate to access my database in a servlet as public class DBConnectionImpl extends RemoteServiceServlet implements DBConnection { private Session session; public DBConnectionImpl() { try { session = HibernateUtil.getSessionFactory().openSession(); } catch (Exception ex) { ex.printStackTrace(); } } } I have configured all the necessary Hibernate requirements like hybernate.cfg.xml, web.xml, context.xml and all necessary java classes. But when I want to connect with my database through a rpc call it shows me error like: May 15, 2009 7:00:44 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.duke.irb.client.data.User com.duke.irb.client.dao.DBConnection.authenticateUser (java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure (RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:546) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:166) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:689) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.UnsupportedOperationException: Not supported by BasicDataSource at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection (BasicDataSource.java:899) at org.hibernate.connection.DatasourceConnectionProvider.getConnection (DatasourceConnectionProvider.java:89) at org.hibernate.jdbc.ConnectionManager.openConnection (ConnectionManager.java:446) at org.hibernate.jdbc.ConnectionManager.getConnection (ConnectionManager.java:167) at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142) at org.hibernate.transaction.JDBCTransaction.begin (JDBCTransaction.java:85) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java: 1353) at com.duke.irb.server.DBConnectionImpl.authenticateUser (DBConnectionImpl.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:527) ... 18 more Please help me out in solving this issue. I will provide more information further if needed. I am new to both GWT and Hibernate... :-) Thanks in advance Raul --~--~-~--~~~---~--~~ 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
Re: Enhancement to Tutorial on GWT-RPC
This is a popular issue with most people including myself.Do a search for discussions on this in this group and you will find a lot of answers. On Fri, May 15, 2009 at 10:06 AM, alessandro alessandro.muzze...@gmail.comwrote: In section 2. Invoking the service from the client, in the paragraph titled Test the Remote Procedure Call, you might like to add that the StockPrice class should have a zero argument constructor. Forgetting this blocked me until I read the docs on serialization. As this is a tutorial, it might be a good idea to suggest using IsSerializable instead of java.io.Serializable by default. Thanks for the excellent tutorial. Alessandro -- -Pav --~--~-~--~~~---~--~~ 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 use MenuBar.MenuBarImages
Hi please if you can give me one exemple how to use MenuBar.MenuBarImages 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 -~--~~~~--~~--~--~---
Failed to import and run gwtrpc-spring example with Google plugin
Hi I'm having problem importing and run the gwtrpc-spring's example. Here are the steps I performed: 1) Download http://gwtrpc-spring.googlecode.com/files/GwtRpcSpringExample.zip and extract the file to C:\GwtRpcSpringExample 2) Open Eclipse 3.4.2 (with Google Plugin 1.0.1) 3) Import the project by selecting File-New-Java Project Create project from existing source (Directory: C:\GwtRpcSpringExample) 4) Enable the GWT SDK by right click GwtRpcSpringExample project, select Google-Web Toolkit Settings then, check the Use Google Web Toolkit box and click OK. 5) When run from Eclipse, it causes the following error: HTTP ERROR: 404 NOT_FOUND RequestURI=/GwtRpcSpringExample.html Well, I'm not sure if this could be the problem of the gwtrpc-spring example :-) -- Hez --~--~-~--~~~---~--~~ 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: Failed to import and run gwtrpc-spring example with Google plugin
Are any errors being logged to the GWT Hosted Mode main window? On Fri, May 15, 2009 at 12:57 PM, hezjing hezj...@gmail.com wrote: Hi I'm having problem importing and run the gwtrpc-spring's example. Here are the steps I performed: 1) Download http://gwtrpc-spring.googlecode.com/files/GwtRpcSpringExample.zip and extract the file to C:\GwtRpcSpringExample 2) Open Eclipse 3.4.2 (with Google Plugin 1.0.1) 3) Import the project by selecting File-New-Java Project Create project from existing source (Directory: C:\GwtRpcSpringExample) 4) Enable the GWT SDK by right click GwtRpcSpringExample project, select Google-Web Toolkit Settings then, check the Use Google Web Toolkit box and click OK. 5) When run from Eclipse, it causes the following error: HTTP ERROR: 404 NOT_FOUND RequestURI=/GwtRpcSpringExample.html Well, I'm not sure if this could be the problem of the gwtrpc-spring example :-) -- Hez -- Miguel --~--~-~--~~~---~--~~ 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: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the fully-qualified form, with forward slashes. The fact that it works for Windows when using backslashes is an accident of the implementation. Rajeev On Thu, May 14, 2009 at 12:46 PM, Igor Moochnick igor.moochn...@gmail.comwrote: This is the error I'm getting on the Jetty (hosted) server when opening my application: [DEBUG] Loading an instance of module 'mymodule' [DEBUG] Rebinding com.mymodule.Myclient.Images [DEBUG] Invoking generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [DEBUG] Analyzing method 'TopLeft' in type com.mymodule.Myclient.Images [ERROR] Unable to find image resource 'images/Dialogue_Corner.gif' [ERROR] Unable to load module entry point class com.mymodule.Myclient (see associated exception for details) [ERROR] Failure to load module 'mymodule' [ERROR] Deferred binding failed for 'com.mymodule.Myclient.Images'; expect subsequent failures On May 4, 5:21 pm, Rajeev Dayal rda...@google.com wrote: Actually, the documentation says that GWT uses ClassLoader.getResource(..) to locate images. As a result, the syntax that you use in the annotation *should* be OS-agnostic. You should always use forward slashes ( / ) to separate path components. Is that not working for you? On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick igor.moochn...@gmail.com wrote: I have a relative path use in the @Resource attribute on my image bundle. Apparently the direction of the slashes are important and depend on what OS I'm building my project. On Windows it has to be \ and on Linux - /. public interface Images extends ImageBundle { @Resource(images/Dialogue_Corner.gif) AbstractImagePrototype TopLeft(); } The documentation mentions that the GWT uses System.getResource method to locate the images. Any idea how to make it OS independent? BWT: if the application written correctly on the Windows, it should pick the Linux slash / with no problem, but, apparently, Java getResource is not the case. --~--~-~--~~~---~--~~ 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: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
Interesting ... In fact I was actually trying to use the relative path. The goal was to put the images (part of the application ImageBundles) with the classes/widgets that are using them and then extra /images folder (relative to the widget folder). Then, if I put a full path, what are the best practices in refactoring? When I move the whole folder - all the full pathes will be broken. Thanks for your responses. On May 15, 1:45 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the fully-qualified form, with forward slashes. The fact that it works for Windows when using backslashes is an accident of the implementation. Rajeev On Thu, May 14, 2009 at 12:46 PM, Igor Moochnick igor.moochn...@gmail.comwrote: This is the error I'm getting on the Jetty (hosted) server when opening my application: [DEBUG] Loading an instance of module 'mymodule' [DEBUG] Rebinding com.mymodule.Myclient.Images [DEBUG] Invoking generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [DEBUG] Analyzing method 'TopLeft' in type com.mymodule.Myclient.Images [ERROR] Unable to find image resource 'images/Dialogue_Corner.gif' [ERROR] Unable to load module entry point class com.mymodule.Myclient (see associated exception for details) [ERROR] Failure to load module 'mymodule' [ERROR] Deferred binding failed for 'com.mymodule.Myclient.Images'; expect subsequent failures On May 4, 5:21 pm, Rajeev Dayal rda...@google.com wrote: Actually, the documentation says that GWT uses ClassLoader.getResource(..) to locate images. As a result, the syntax that you use in the annotation *should* be OS-agnostic. You should always use forward slashes ( / ) to separate path components. Is that not working for you? On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick igor.moochn...@gmail.com wrote: I have a relative path use in the @Resource attribute on my image bundle. Apparently the direction of the slashes are important and depend on what OS I'm building my project. On Windows it has to be \ and on Linux - /. public interface Images extends ImageBundle { �...@resource(images/Dialogue_Corner.gif) AbstractImagePrototype TopLeft(); } The documentation mentions that the GWT uses System.getResource method to locate the images. Any idea how to make it OS independent? BWT: if the application written correctly on the Windows, it should pick the Linux slash / with no problem, but, apparently, Java getResource is not the case. --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
Could anyone elaborate on the setting the dependent project's output directory technique? Right now I have set my dependent project's output directory to be the war/WEB-INF/classes directory of my main project. Additionally, I have added the dependent projects source to MainProject/Properties/ Java Build Path/Source Tab via the Link Source button and to MainProject/Debug Configurations/My Main Configuration Name/Source Tab. I have also added my dependent project to my main project's build path just for good measure. However, I am still getting the No source code is available for type class.found.in.dependent.project.Name errors. This method doesn't seem like it would work anyway because all I am doing is including the class files in the project and not the java source code, which is what the error message claims it is missing in the first place. I am going to attempt the jar file technique since that is known to work. Lastly, is there any place I can check periodically to see if this bug has been fixed so that I will know when I can stop trying to workaround this bug? Thanks, John On Apr 17, 11:19 am, Jason Parekh jasonpar...@gmail.com wrote: Hey Joe, It looks like you're hitting an issue where the Eclipse plugin does not include a dependent project's compiled classes into the packaged WAR that is deployed to the server. We're aware of the issue and it will be fixed in a future release. There are a couple workarounds, one of which you've tried (package the dependent project into a JAR, and statically link that into the main project). The other is to set the dependent project's output directory to the main project's output directory. When the hosted mode server runs (or the app engine tools upload to app engine), all classes in this directory will be included (including the dependent project's). jason On Fri, Apr 17, 2009 at 8:31 AM, Joe Hudson joe...@gmail.com wrote: Thank you Salvador for your reply, I am have tried that (I think) and that was when I experience described above. Please let me explain how I am doing that because maybe I am doing something wrong: 1) Open the Run Configurations menu 2) Select my target under Web Application (with the google icon) 3) Go to the Classpath tab, select User Entries, click Add Project and select my project 4) Go to the Source tab, click Add, select Java Project and select my project 5) Click Apply So, this is what I have tried and I get errors when I start up the app that it can not find the source of the classes from my server project. Any ideas? Thanks Joe On Apr 17, 4:13 am, Salvador Diaz diaz.salva...@gmail.com wrote: Add the other project to the classpath instead of adding the jar On Apr 17, 7:10 am, Joe Hudson joe...@gmail.com wrote: Hi, I have a separate eclipse project containing code used on the server- side of the RPC. When I use the google plugin to recompile my GWT app, I get the error messages saying that the source code can't be found. I can get this to work by exporting the project to a jar (with source) and referencing the jar (as opposed to the project directly) in the classpath of the GWT project. This is do-able but I would really like to know if this is possible and if there is anything special that has to be done for the plugin to recognize the source from another project. I am pretty sure that the plugin sees the classpath as it is not giving an error that the imported gwt.xml file can not be found. Thank you very much for any help you might have to offer. Joe --~--~-~--~~~---~--~~ 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: No source code is available for type Error on Web Mode Compile
Yes, I have a source path=model/ element. I think the link in Alex's response explains my issue pretty well. On May 14, 9:34 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Does DbPojo.gwt.xml have source path=model/ element in it? Cos by default, gwt looks for source from /path/to/Module.gwt.xml /path/to/ client. You use source to change this {just be wary, I haven't done this since 1.4, and it was a little buggy about setting the source path back to client... Cheers! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Eclipse GWT: How to include source from other projects?
I have a GWT Web Application project (call it Client, package com.example.web) in Eclipse that needs to see some Java classes in another project (project Common in package com.example.shared). I can set the Eclipse project properties to include Common/bin as a class folder and link the source folder Common/bin as Client/common-bin, and Eclipse doesn't show errors. However, when I try to run the Client project in hosted mode, GWT spits out the message No source code is available for type com.example.shared.Foo; did you forget to inherit a required module? Shouldn't GWT be working with Eclipse's build path? Is there somewhere else I should be including the path to the Common source? It doesn't make sense to include com.shared.Common as an inherits in the GWT module file, since it's just a regular Java library. What is the right approach? (Eclipse 3.4.2, Ubuntu 8.10, GWT plugin 1.6.4, Sun Java 6) --~--~-~--~~~---~--~~ 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: Eclipse GWT: How to include source from other projects?
Hey Tim, There should probably be a FAQ entry about this. It's currently a use case that the plugin doesn't support very well, but it's on our list of things for upcoming versions. There was an earlier thread in which Jason discusses how to deal with this issue: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/951499c5773693c9 (this was brought up on a thread yesterday, actually) http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/46cf35719329b30 Hope this helps! On Fri, May 15, 2009 at 1:51 PM, Tim McCormack ti...@ccs.neu.edu wrote: I have a GWT Web Application project (call it Client, package com.example.web) in Eclipse that needs to see some Java classes in another project (project Common in package com.example.shared). I can set the Eclipse project properties to include Common/bin as a class folder and link the source folder Common/bin as Client/common-bin, and Eclipse doesn't show errors. -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
On May 15, 2:13 pm, John john.set...@gmail.com wrote: I am going to attempt the jar file technique since that is known to work. I'm encountering the same issue. Can you explain exactly what you are doing with the Jar file approach? - Tim McCormack --~--~-~--~~~---~--~~ 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: No source code is available for type Error on Web Mode Compile
Hi John, What version of the plugin are you currently using? We just released a new version of the plugin (1.0.1) a couple of days ago that may fix this problem. Here are the release notes: http://code.google.com/eclipse/docs/release_notes.html Although the problem that you're having is not explicitly mentioned in this list, I know that we had some issues with classpath computation for GWT Compiles. See http://code.google.com/eclipse/docs/updating_the_plugin.html for instructions on updating the plugin. However, the problem that Alex mentioned above still exists. That is, if you have a GWT, App Engine, or GWT + App Engine project (call it project A), and that project depends on another project (call it project B), the classes for project B are not automatically copied into project A's war directory. Now, suppose that project B only has GWT client source in it (no RPC) - then the new version of the plugin will handle this case - it will automatically pull the dependent project's source folders onto the classpath when compiling or running hosted mode. If it is the case that project B is using GWT but defines RPC interfaces and RPC data objects (which seems to be your case), then you'll have a problem, because you'll need the class files from the RPC data objects in project A's war directory. So, to make your situation work, I think you'll have to go with the workaround of exporting a jar from project B, and adding a reference to it on project A's classpath. Sorry about the inconvenience; we're planning on fixing this issue in the future. Rajeev On Fri, May 15, 2009 at 2:16 PM, John john.set...@gmail.com wrote: Yes, I have a source path=model/ element. I think the link in Alex's response explains my issue pretty well. On May 14, 9:34 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Does DbPojo.gwt.xml have source path=model/ element in it? Cos by default, gwt looks for source from /path/to/Module.gwt.xml /path/to/ client. You use source to change this {just be wary, I haven't done this since 1.4, and it was a little buggy about setting the source path back to client... Cheers! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
JSON, HTTP POST and Django - json contaminated with newlines
Hi all, I'm having some issues with json, http post and django. The issue is that the JSONObject.toString() or HTTP POST request builder contaminates the json string with newlines causing malformed javascript to be sent and a ValueError thrown in Djangos simplejson parser on the other side. Here's how I build the request: if(this.key != null) { JSONObject form = new JSONObject(); form.put(key, new JSONString(this.key)); form.put(content, new JSONString(getDocumentContent())); form.put(title, new JSONString(getDocumentTitle())); try { requestBuilder.sendRequest(json=+form.toString(), new JSONhandler ()); } catch (RequestException e) { Window.alert(e.getMessage()); e.printStackTrace(); } } Here's how I process the request in Django: def save_page(request): if(request.method == 'GET'): pass else: json = request.POST['json'] decoder = simplejson.JSONDecoder() props = decoder.decode(json) try: page_id = 1 page_alias = Start m_page = Page.objects.get(pk=page_id) except Page.DoesNotExist: m_page = Page(alias=page_alias, rev=0) m_page.save() title = props['title'] content = props['content'] title = test content=json revision = Revisions(page=m_page, rev=m_page.rev+1, title=title, content=content) revision.save() m_page.rev = m_page.rev + 1 m_page.save() return render_to_response(it works) I've determined that the newlines most likely added in the HTTP request builder, but I haven't been able to debug it. Has anyone here encountered and solved this problem before? --~--~-~--~~~---~--~~ 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: onModuleLoad is sometimes not called (Internet Explorer)
Steve, I can't seem to reproduce the problem on my end, but for what it's worth, latching with a timeout like that is going to be pretty brittle in practice. Here's an alternative formulation that won't be flaky: HTML: script function onGwtAppLoaded() { alert(w00t!); } /script Java: public void onModuleLoad() { setLoaded(); } public native void setLoaded() /*-{ if ($wnd.onGwtAppLoaded) { $wnd.onGwtAppLoaded(); } }-*/; This works because the GWT linkers all make the guarantee that onModuleLoad() will not be called until the DOM is ready (i.e. all the DOM elements, including the body, are fully-evaluated, including scripts). So there's no chance that onGwtAppLoaded() will *not* be defined when onModuleLoad() is called. Hope this helps, joel. On Thu, May 14, 2009 at 12:38 PM, Steve M ste...@emnico.com wrote: Hi, I am seeing a problem in Internet Explorer whereby it appears that onModeulLoad() does not get called. In the HTML ive added the following to highlight the problem... script var t=setTimeout(testLoaded(),3); function testLoaded() { if (window.Loaded==undefined) { alert(onload didnt run); } } /script My GWT code... public void onModuleLoad() { setLoaded(); ... now initialise the GWT } public native void setLoaded() /*-{ $wnd.Loaded = loaded; }-*/; Intermitently using Internet Explorer, it simply fails to call the onModuleLoad() method, and you get the onload didnt run method. Any ideas on this one? Seems quite a serious flaw. GWT version: 1.5.3 IE: 7.0.5730.11IC thanks, Steve M --~--~-~--~~~---~--~~ 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: Tree SelectionEvent fired twice
Hi meandi, Thanks for the repro code. I was able to reproduce what you're talking about. It seems like the double-fire only occurs if a TreeItem was in a previously open state, and has transitioned from open to close. The double-fire doesn't occur if instead the previous state was closed and the transition was from close to open. That said, I'm not sure why the double-fire occurs in the first case. As I see it, this is probably an issue that needs some fixing. I've opened Issue #3660 to track and investigate this issue. Issue #3660: http://code.google.com/p/google-web-toolkit/issues/detail?id=3660 In the meantime, here is an albeit messy workaround that should get you running for the time being. int comingFromSetState = 0; boolean prevOpenState = true; public void onSelection(SelectionEventTreeItem event) { TreeItem item = event.getSelectedItem(); if(item.getChildCount() == 0) { controller.navigationChanged(item); } else { if(comingFromSetState == 1 prevOpenState) { comingFromSetState++; } if(comingFromSetState != 2) { comingFromSetState++; item.setState(!item.getState()); prevOpenState = !item.getState(); } else { comingFromHere = 0; prevOpenState = true; } } } Hope that helps, -Sumit Chandel On Wed, May 13, 2009 at 3:18 AM, meandi mr-gu...@gmx.de wrote: Hello Sumit Chandel, it does not work in hosted mode, with IE7 and Firefox3. I added no widgets to the tree, only Strings in the Constructor of TreeItem, my implementation of setDefaults() looked like yours. So when I run the app (in hosted mode) I can click on root and the branch is opened. If I click on a leaf below the root item, the controller is called once and performs the Window.alert(item.getText ()); command. Clicking on moreitems performs the action like expected. But if I click once more on moreitems, the event is fired twice and the branch will be closed and opened again. This behavior seems weird to me. Greetings meandi I tried again in a new project, to ensure that no side effects appear. Here is the source code: NavigationView.java package de.jomawo.tree.client; import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Panel; import com.google.gwt.user.client.ui.Tree; import com.google.gwt.user.client.ui.TreeItem; import com.google.gwt.user.client.ui.VerticalPanel; public class NavigationView extends Composite implements SelectionHandlerTreeItem { // Attribute Panel panel = new VerticalPanel(); Tree tree = new Tree(); ApplicationController controller = null; public NavigationView(ApplicationController controller){ setDefaults(); panel.add(tree); tree.addSelectionHandler(this); initWidget(panel); this.controller = controller; } private void setDefaults(){ TreeItem root = new TreeItem(root); root.addItem(item0); root.addItem(item1); root.addItem(item2); TreeItem moreItems = new TreeItem(moreitems); moreItems.addItem(moreitems1); moreItems.addItem(moreitems2); moreItems.addItem(moreitems3); root.addItem(moreItems); tree.addItem(root); } public void onSelection(SelectionEventTreeItem event) { TreeItem item = event.getSelectedItem(); if(item.getChildCount() == 0) { controller.navigationChanged(item); } else { item.setState(!item.getState()); // Window.alert(item.getState()); } } } Tree.java package de.jomawo.tree.client; import com.google.gwt.core.client.EntryPoint; public class Tree implements EntryPoint { public void onModuleLoad() { ApplicationController controller = new ApplicationController(); RootPanel.get().add(new NavigationView(controller)); } } ApplicationController.java package de.jomawo.tree.client; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.TreeItem; public class ApplicationController { public void navigationChanged(TreeItem item){ Window.alert(item.getText()); } } On 12 Mai, 01:43, Sumit Chandel sumitchan...@google.com wrote: Hi meandi, I couldn't reproduce the issue you described using the code snippet you provided (along with the setDefault() method implementation below. private void setDefaults(){ // Building the tree ... TreeItem root = new TreeItem(root); root.addItem(item0); root.addItem(item1);
Re: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
You are correct - if you end up refactoring, you'll have to change the references in the @Resource annotation. The only other way around this is to place the images themselves in the same package as your ImageBundle, and then you can use relative references. You can file a Request for Enhancement to support relative paths in ImageBundle @Resource annotatios, if you'd like On Fri, May 15, 2009 at 1:53 PM, Igor Moochnick igor.moochn...@gmail.comwrote: Interesting ... In fact I was actually trying to use the relative path. The goal was to put the images (part of the application ImageBundles) with the classes/widgets that are using them and then extra /images folder (relative to the widget folder). Then, if I put a full path, what are the best practices in refactoring? When I move the whole folder - all the full pathes will be broken. Thanks for your responses. On May 15, 1:45 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the fully-qualified form, with forward slashes. The fact that it works for Windows when using backslashes is an accident of the implementation. Rajeev On Thu, May 14, 2009 at 12:46 PM, Igor Moochnick igor.moochn...@gmail.comwrote: This is the error I'm getting on the Jetty (hosted) server when opening my application: [DEBUG] Loading an instance of module 'mymodule' [DEBUG] Rebinding com.mymodule.Myclient.Images [DEBUG] Invoking generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [DEBUG] Analyzing method 'TopLeft' in type com.mymodule.Myclient.Images [ERROR] Unable to find image resource 'images/Dialogue_Corner.gif' [ERROR] Unable to load module entry point class com.mymodule.Myclient (see associated exception for details) [ERROR] Failure to load module 'mymodule' [ERROR] Deferred binding failed for 'com.mymodule.Myclient.Images'; expect subsequent failures On May 4, 5:21 pm, Rajeev Dayal rda...@google.com wrote: Actually, the documentation says that GWT uses ClassLoader.getResource(..) to locate images. As a result, the syntax that you use in the annotation *should* be OS-agnostic. You should always use forward slashes ( / ) to separate path components. Is that not working for you? On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick igor.moochn...@gmail.com wrote: I have a relative path use in the @Resource attribute on my image bundle. Apparently the direction of the slashes are important and depend on what OS I'm building my project. On Windows it has to be \ and on Linux - /. public interface Images extends ImageBundle { @Resource(images/Dialogue_Corner.gif) AbstractImagePrototype TopLeft(); } The documentation mentions that the GWT uses System.getResource method to locate the images. Any idea how to make it OS independent? BWT: if the application written correctly on the Windows, it should pick the Linux slash / with no problem, but, apparently, Java getResource is not the case. --~--~-~--~~~---~--~~ 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: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
You mean PACKAGE or MODULE? In fact I do use PACKAGEs. Because I'm actually using packages for my widgets and, in fact, that's what broken. This is how I've structured my code: com.myserver.client - all the usual client code com.myserver.client.widgets - here I put our custom widgets (and all the images related to them) com.myserver.client.widgets.images - this is where I WANT to put all the images so the upper level folder will be free Since, in Java, packages are directly related to the folder structure, the @Resource(images/Dialogue_Corner.gif) is broken and not working consistently across the OSes. Thanks. On May 15, 3:30 pm, Rajeev Dayal rda...@google.com wrote: You are correct - if you end up refactoring, you'll have to change the references in the @Resource annotation. The only other way around this is to place the images themselves in the same package as your ImageBundle, and then you can use relative references. You can file a Request for Enhancement to support relative paths in ImageBundle @Resource annotatios, if you'd like On Fri, May 15, 2009 at 1:53 PM, Igor Moochnick igor.moochn...@gmail.comwrote: Interesting ... In fact I was actually trying to use the relative path. The goal was to put the images (part of the application ImageBundles) with the classes/widgets that are using them and then extra /images folder (relative to the widget folder). Then, if I put a full path, what are the best practices in refactoring? When I move the whole folder - all the full pathes will be broken. Thanks for your responses. On May 15, 1:45 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the fully-qualified form, with forward slashes. The fact that it works for Windows when using backslashes is an accident of the implementation. Rajeev On Thu, May 14, 2009 at 12:46 PM, Igor Moochnick igor.moochn...@gmail.comwrote: This is the error I'm getting on the Jetty (hosted) server when opening my application: [DEBUG] Loading an instance of module 'mymodule' [DEBUG] Rebinding com.mymodule.Myclient.Images [DEBUG] Invoking generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [DEBUG] Analyzing method 'TopLeft' in type com.mymodule.Myclient.Images [ERROR] Unable to find image resource 'images/Dialogue_Corner.gif' [ERROR] Unable to load module entry point class com.mymodule.Myclient (see associated exception for details) [ERROR] Failure to load module 'mymodule' [ERROR] Deferred binding failed for 'com.mymodule.Myclient.Images'; expect subsequent failures On May 4, 5:21 pm, Rajeev Dayal rda...@google.com wrote: Actually, the documentation says that GWT uses ClassLoader.getResource(..) to locate images. As a result, the syntax that you use in the annotation *should* be OS-agnostic. You should always use forward slashes ( / ) to separate path components. Is that not working for you? On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick igor.moochn...@gmail.com wrote: I have a relative path use in the @Resource attribute on my image bundle. Apparently the direction of the slashes are important and depend on what OS I'm building my project. On Windows it has to be \ and on Linux - /. public interface Images extends ImageBundle { �...@resource(images/Dialogue_Corner.gif) AbstractImagePrototype TopLeft(); } The documentation mentions that the GWT uses System.getResource method to locate the images. Any idea how to make it OS independent? BWT: if the application written correctly on the Windows, it should pick the Linux slash / with no problem, but, apparently, Java getResource is not the case. --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
Tim, Jar Method: 1. Remove any Buid Path references between your two projects. 2. Build a jar file from your project that is a dependency. Make sure to check the boxes that say Add directory entries and Add Java Source 3. Add this jar file to your main projects build path. 4. Try to compile GWT. On May 15, 2:52 pm, Tim McCormack ti...@ccs.neu.edu wrote: On May 15, 2:13 pm, John john.set...@gmail.com wrote: I am going to attempt the jar file technique since that is known to work. I'm encountering the same issue. Can you explain exactly what you are doing with the Jar file approach? - Tim McCormack --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
Disregard my previous post I figured out what was wrong. Both Jason's jar method and the output folder method work. I have two different modules in my main project only one of them uses a java references to my dependent project. However in order to get GWT to compile I had to put inherits tags to my dependent project in both modules. When I reexamined the compile log I realized that the module I thought wasn't compile was and the module that shouldn't care about my dependent project was not compiling. On May 15, 2:13 pm, John john.set...@gmail.com wrote: Could anyone elaborate on the setting the dependent project's output directory technique? Right now I have set my dependent project's output directory to be the war/WEB-INF/classes directory of my main project. Additionally, I have added the dependent projects source to MainProject/Properties/ Java Build Path/Source Tab via the Link Source button and to MainProject/Debug Configurations/My Main Configuration Name/Source Tab. I have also added my dependent project to my main project's build path just for good measure. However, I am still getting the No source code is available for type class.found.in.dependent.project.Name errors. This method doesn't seem like it would work anyway because all I am doing is including the class files in the project and not the java source code, which is what the error message claims it is missing in the first place. I am going to attempt the jar file technique since that is known to work. Lastly, is there any place I can check periodically to see if this bug has been fixed so that I will know when I can stop trying to workaround this bug? Thanks, John On Apr 17, 11:19 am, Jason Parekh jasonpar...@gmail.com wrote: Hey Joe, It looks like you're hitting an issue where the Eclipse plugin does not include a dependent project's compiled classes into the packaged WAR that is deployed to the server. We're aware of the issue and it will be fixed in a future release. There are a couple workarounds, one of which you've tried (package the dependent project into a JAR, and statically link that into the main project). The other is to set the dependent project's output directory to the main project's output directory. When the hosted mode server runs (or the app engine tools upload to app engine), all classes in this directory will be included (including the dependent project's). jason On Fri, Apr 17, 2009 at 8:31 AM, Joe Hudson joe...@gmail.com wrote: Thank you Salvador for your reply, I am have tried that (I think) and that was when I experience described above. Please let me explain how I am doing that because maybe I am doing something wrong: 1) Open the Run Configurations menu 2) Select my target under Web Application (with the google icon) 3) Go to the Classpath tab, select User Entries, click Add Project and select my project 4) Go to the Source tab, click Add, select Java Project and select my project 5) Click Apply So, this is what I have tried and I get errors when I start up the app that it can not find the source of the classes from my server project. Any ideas? Thanks Joe On Apr 17, 4:13 am, Salvador Diaz diaz.salva...@gmail.com wrote: Add the other project to the classpath instead of adding the jar On Apr 17, 7:10 am, Joe Hudson joe...@gmail.com wrote: Hi, I have a separate eclipse project containing code used on the server- side of the RPC. When I use the google plugin to recompile my GWT app, I get the error messages saying that the source code can't be found. I can get this to work by exporting the project to a jar (with source) and referencing the jar (as opposed to the project directly) in the classpath of the GWT project. This is do-able but I would really like to know if this is possible and if there is anything special that has to be done for the plugin to recognize the source from another project. I am pretty sure that the plugin sees the classpath as it is not giving an error that the imported gwt.xml file can not be found. Thank you very much for any help you might have to offer. Joe --~--~-~--~~~---~--~~ 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: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
Hi Igor, Responses inline: On Fri, May 15, 2009 at 3:47 PM, Igor Moochnick igor.moochn...@gmail.comwrote: You mean PACKAGE or MODULE? In fact I do use PACKAGEs. I mean package. Because I'm actually using packages for my widgets and, in fact, that's what broken. This is how I've structured my code: com.myserver.client - all the usual client code com.myserver.client.widgets - here I put our custom widgets (and all the images related to them) com.myserver.client.widgets.images - this is where I WANT to put all the images so the upper level folder will be free Since, in Java, packages are directly related to the folder structure, the @Resource(images/Dialogue_Corner.gif) is broken and not working consistently across the OSes. I know that if you use a backslash, that this works on Windows. However, have you tested to see if this would work as-is in its current formulation on Mac or Linux? The reason that I ask is that I suspect it would not. Even though changing the forward slash to a backslash appears to fix the problem on windows, it is an accident of the implementation of ImageBundleGenerator. Here is the relevant chunk of code in ImageBundleGenerator: // If the name has no slashes (that is, it isn't a fully-qualified resource // name), then prepend the enclosing package name automatically, being // careful about the default package. if (imgFileName.indexOf(/) == -1) { String pkgName = method.getPackageName(); if (!.equals(pkgName)) { imgFileName = pkgName.replace('.', '/') + / + imgFileName; } } So, you see, the code basically assumes that if there are any forward slashes in the image name (where the image name is taken verbatim as the value of the resource annotation), then it is assumed to be an absolute reference. When you changed the slash to a backslash, the code here determined that there were no forward slashes in the resource name, and pre-pended the package name to the image file name. So, the fact that a relative reference worked was accidental. Does that make sense? Thanks. On May 15, 3:30 pm, Rajeev Dayal rda...@google.com wrote: You are correct - if you end up refactoring, you'll have to change the references in the @Resource annotation. The only other way around this is to place the images themselves in the same package as your ImageBundle, and then you can use relative references. You can file a Request for Enhancement to support relative paths in ImageBundle @Resource annotatios, if you'd like On Fri, May 15, 2009 at 1:53 PM, Igor Moochnick igor.moochn...@gmail.comwrote: Interesting ... In fact I was actually trying to use the relative path. The goal was to put the images (part of the application ImageBundles) with the classes/widgets that are using them and then extra /images folder (relative to the widget folder). Then, if I put a full path, what are the best practices in refactoring? When I move the whole folder - all the full pathes will be broken. Thanks for your responses. On May 15, 1:45 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the fully-qualified form, with forward slashes. The fact that it works for Windows when using backslashes is an accident of the implementation. Rajeev On Thu, May 14, 2009 at 12:46 PM, Igor Moochnick igor.moochn...@gmail.comwrote: This is the error I'm getting on the Jetty (hosted) server when opening my application: [DEBUG] Loading an instance of module 'mymodule' [DEBUG] Rebinding com.mymodule.Myclient.Images [DEBUG] Invoking generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [DEBUG] Analyzing method 'TopLeft' in type com.mymodule.Myclient.Images [ERROR] Unable to find image resource 'images/Dialogue_Corner.gif' [ERROR] Unable to load module entry point class com.mymodule.Myclient (see associated exception for details) [ERROR] Failure to load module 'mymodule' [ERROR] Deferred binding failed for 'com.mymodule.Myclient.Images'; expect subsequent failures On May 4, 5:21 pm, Rajeev Dayal rda...@google.com wrote: Actually, the documentation says that GWT uses ClassLoader.getResource(..) to locate images. As a result, the syntax that you use in the annotation *should* be OS-agnostic. You should always use forward slashes ( / ) to separate path components. Is that not working for you? On Fri, May 1, 2009 at 6:20 PM, Igor Moochnick igor.moochn...@gmail.com wrote:
Re: JSON, HTTP POST and Django - json contaminated with newlines
I think I was wrong. This problem does not happen unless the json string contains quotes (escaped automatically by GWT like this: this is a string that contains \quotes\ ), even when URL.encoded. I'm not sure if this is a GWT or Django issue. Does anyone have any ideas? --~--~-~--~~~---~--~~ 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: can gwt be used with a templete languge sush as Django
Yes it can. To do this you need to create a new EntryPoint class that creates an instance of your widget/app and adds it onto the RootPanel. Example: class MyEntryPoint implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { RichTextArea editor = new RichTextArea(); RootPanel.get(RTA-wrapper).add(editor); } } Now you can create a template in your favorite language/framework. Start by copying the details of the default HTML from gwt such as the CSS, script tags, etc... and paste it into your new template. Create a DIV with the ID RTA-wrapper (div id=RTA-wrapper/div) for your widget or application to load into. Example template for Django: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head title{{title}} - Editing/title {% include default_css.html %} meta http-equiv=content-type content=text/html; charset=UTF-8 link type=text/css rel=stylesheet href=/static/Sites.css {% include preprepJS.html %} script type=text/javascript language=javascript src=/static/ sites/sites.nocache.js/script /head body {% include head.html %} div id=main {% include sidebar.html %} div id=content div id=RTA-wrapper/div /div /div !-- OPTIONAL: include this if you want history support -- iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe /body /html --~--~-~--~~~---~--~~ 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: Migrated GWT Netbeans project to GWT 1.6 latest trunk version + oophm -- StackOverflowError
ok, I increased the size to -Xss4096k and now it works. However, the compile button on the hosted browser doesn't work because I think it uses the original stack size. Does anyone know how to change that? thanks... On May 15, 12:49 pm, Soren Johnson soren.john...@gmail.com wrote: what is the default size? does anyone know? (I am having theStackOverflowErroras well...) On May 13, 2:49 pm, Jason Essington jason.essing...@gmail.com wrote: you could try increasing the jvm stack size with the -Xss switch and see if that doesn't help -jason On May 13, 2009, at 12:56 PM, stefan asseg wrote: hi, i am migrating our open source web desktop framework http://code.google.com/p/hetras-gwt-framework/to1.6 and it works fine with the official 1.6.4 release jars. as we definitely want to use oophm, i checked out the latest gwt trunk and built it but when i use the built jars including the gwt-dev-oophm.jar i get a StackOverflowErrorwhen compiling. our project uses a (slightly modified) gwt4nb build file. a newly created empty gwt4nb project does work with oophm, though. does anybody have the same problem or know what the problem could be? i still use com.google.gwt.dev.GWTCompiler instead of the new com.google.gwt.dev.Compiler, could that be the problem? compiling the project with the official 1.6.4 release jars and the GWTCompiler works, though. thanks for your help and input in advance. kind regards, stefan --~--~-~--~~~---~--~~ 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: No source code is available for type Error on Web Mode Compile
Rajeev, The update seems to have fixed my issue because I was only using project B's code on the UI and as parameters of the RPC. Thanks, John On May 15, 3:00 pm, Rajeev Dayal rda...@google.com wrote: Hi John, What version of the plugin are you currently using? We just released a new version of the plugin (1.0.1) a couple of days ago that may fix this problem. Here are the release notes: http://code.google.com/eclipse/docs/release_notes.html Although the problem that you're having is not explicitly mentioned in this list, I know that we had some issues with classpath computation for GWT Compiles. Seehttp://code.google.com/eclipse/docs/updating_the_plugin.htmlfor instructions on updating the plugin. However, the problem that Alex mentioned above still exists. That is, if you have a GWT, App Engine, or GWT + App Engine project (call it project A), and that project depends on another project (call it project B), the classes for project B are not automatically copied into project A's war directory. Now, suppose that project B only has GWT client source in it (no RPC) - then the new version of the plugin will handle this case - it will automatically pull the dependent project's source folders onto the classpath when compiling or running hosted mode. If it is the case that project B is using GWT but defines RPC interfaces and RPC data objects (which seems to be your case), then you'll have a problem, because you'll need the class files from the RPC data objects in project A's war directory. So, to make your situation work, I think you'll have to go with the workaround of exporting a jar from project B, and adding a reference to it on project A's classpath. Sorry about the inconvenience; we're planning on fixing this issue in the future. Rajeev On Fri, May 15, 2009 at 2:16 PM, John john.set...@gmail.com wrote: Yes, I have a source path=model/ element. I think the link in Alex's response explains my issue pretty well. On May 14, 9:34 pm, Alyxandor a.revolution.ultra.b...@gmail.com wrote: Does DbPojo.gwt.xml have source path=model/ element in it? Cos by default, gwt looks for source from /path/to/Module.gwt.xml /path/to/ client. You use source to change this {just be wary, I haven't done this since 1.4, and it was a little buggy about setting the source path back to client... Cheers! --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
Version 1.0.1 released two days ago partially fixes this issue. Check out Rajeev's post on this thread http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/46cf35719329b30 On May 15, 3:58 pm, John john.set...@gmail.com wrote: Tim, Jar Method: 1. Remove any Buid Path references between your two projects. 2. Build a jar file from your project that is a dependency. Make sure to check the boxes that say Add directory entries and Add Java Source 3. Add this jar file to your main projects build path. 4. Try to compile GWT. On May 15, 2:52 pm, Tim McCormack ti...@ccs.neu.edu wrote: On May 15, 2:13 pm, John john.set...@gmail.com wrote: I am going to attempt the jar file technique since that is known to work. I'm encountering the same issue. Can you explain exactly what you are doing with the Jar file approach? - Tim McCormack --~--~-~--~~~---~--~~ 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: RPC Issues - Lifespan of Data from a RPC
Thank you for your input, what was happening is once the RPC was complete the data that I was adding to the ArrayList would disappear. So I decided to do something ugly, but it works. I am writing the data onto a invisible div on the page then getting it then adding it to the ArrayList. It seems to work just fine. I am new to GWT but I am starting to get a basic understanding on how these things work. I was wondering if anyone knows of a way to run a function after the RPC is complete. Thanks! John On May 9, 7:44 am, Salvador Diaz diaz.salva...@gmail.com wrote: Well, the indexOutOfBoundsException can't possibly be thrown by the method add of an ArrayList (that's the type of productArrayList, isn't it?). In fact there's nothing in your snippets that'll throw that exception. Did you debug the method call on the server side ? Somewhere in your Eclipse or HostedMode console you'll have a complete stack trace that'll tell you the exact line of code that's throwing that exception. I suggest you read it carefully. As for the lifecycle of your RPCs, it is the normal lifecycle of a servlet. Hope that helps, Salvador On May 8, 10:46 pm, JohnofLong johnlonganec...@gmail.com wrote: I tried to find this topic already on the discussions but could not find it. Currently using GWT 1.5.3 I am making a RPC to call to read XML and call a function that loads the data into an ArrayList of classes. I have made a class that implements RequestCallback(LoadData) and takes in my mainClass example: LoadData loadData = new LoadData(this); String url = xmlString; RequestBuilder requestBuilder = new RequestBuilder (RequestBuilder.GET, url); try { requestBuilder.sendRequest(null, loadData); } catch (RequestException ex) { //Window.alert(exception); } Inside the RPC class: mainClass.addProducts(id, sku, name, catagory) ; inside my main class: public addProducts(int id, int sku, String name, String catagory) { productArrayList.add(new product(id, sku, name, catagory); } But when I call a method on my productArray it just says index out of bound (basically the arrayList is empty) but I know it is calling the addProduct method I am guessing the lifespan of the data is tied to the lifespan of the RPC call. What sort of things can I do to get around this(assuming my assumptions are correct)? I greatly appreciate the help and apologize if this topic is covered somewhere already. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
naive 1.6 Web App creator question
Hi, I am *just* trying out 1.6. I have created a couple of test projects using the Web App creator thing but i have a question. I may have to create a project called Foo but the resulting GWT html items should be named .../index... The web server is configured to deal with index.html by default not Foo.html. Is there a way to use the app creator to name the resulting files index. whatever? If not, then what all do I have to change in the default 1.6 project dir to enable this? I know to change the projecyName.java file in the src dirs. I am less sure about entries in the various xml files or other configuration settings. --~--~-~--~~~---~--~~ 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 make gwt eclipse plugin compiler see other projects
On May 15, 3:58 pm, John john.set...@gmail.com wrote: Jar Method: 1. Remove any Buid Path references between your two projects. 2. Build a jar file from your project that is a dependency. Make sure to check the boxes that say Add directory entries and Add Java Source 3. Add this jar file to your main projects build path. 4. Try to compile GWT. Thanks for the walkthrough, John, but compile still fails with the same errors as before: No source code is available for type com.example.shared.Foo; did you forget to inherit a required module? Maybe GWT can only see other GWT projects? - Tim McCormack --~--~-~--~~~---~--~~ 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: Eclipse GWT: How to include source from other projects?
Thanks for the response, Alex. I've tried those approaches (Jar, shared output folder, including in run-config classpath), and I always get the same result: No source code is available for type com.example.shared.Foo; did you forget to inherit a required module? - Tim McCormack --~--~-~--~~~---~--~~ 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: naive 1.6 Web App creator question
Hey Seven, The simplest solution is just to rename the generated HTML file to index.html, if that's a filename that would work better for you. If you want to get a little fancier (and you're using a servlet container like Tomcat or App Engine), then you could look into having a welcome-file-list element in your web.xml. There's an example of how to do that in the web.xml that gets generated if you make a new GWT/App Engine project with the Eclipse plugin. Hope this helps! On Fri, May 15, 2009 at 4:52 PM, seven.reeds seven.re...@gmail.com wrote: Hi, I am *just* trying out 1.6. I have created a couple of test projects using the Web App creator thing but i have a question. I may have to create a project called Foo but the resulting GWT html items should be named .../index... The web server is configured to deal with index.html by default not Foo.html. Is there a way to use the app creator to name the resulting files index. whatever? If not, then what all do I have to change in the default 1.6 project dir to enable this? I know to change the projecyName.java file in the src dirs. I am less sure about entries in the various xml files or other configuration settings. -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ 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: No source code is available for type Error on Web Mode Compile
Hey Tim, Can you give me a bit more detail on what you're trying to accomplish? For example, what code is in the dependent project, and what code is in your main project? It sounds like there is no GWT-related code in your dependent project. Does your main project have GWT code? Thanks, Rajeev On Fri, May 15, 2009 at 4:45 PM, Tim McCormack ti...@ccs.neu.edu wrote: On May 15, 3:00 pm, Rajeev Dayal rda...@google.com wrote: Now, suppose that project B only has GWT client source in it (no RPC) - then the new version of the plugin will handle this case - it will automatically pull the dependent project's source folders onto the classpath when compiling or running hosted mode. What if B is not a GWT project, but instead a regular Java project? I can't have it compile into A's output folder, because it won't output GWT classes. That's the situation I have right now, and I can't seem to get GWT to compile with outside libraries. How is it done? - Tim McCormack --~--~-~--~~~---~--~~ 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: Eclipse GWT: How to include source from other projects?
Ah, I see on this thread that you've provided more details about your project in this thread. Disregard my request for more details in the other thread. So, it seems that you client project needs access to classes in your Java-only project (the shared classes). Why is this? Are these classes that need to be used for GWT RPC? On Fri, May 15, 2009 at 5:01 PM, Tim McCormack ti...@ccs.neu.edu wrote: Thanks for the response, Alex. I've tried those approaches (Jar, shared output folder, including in run-config classpath), and I always get the same result: No source code is available for type com.example.shared.Foo; did you forget to inherit a required module? - Tim McCormack --~--~-~--~~~---~--~~ 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: No source code is available for type Error on Web Mode Compile
Tim, In order to get something to work in GWT you have to have the Java source, and as far as I know you have to put a module file in the same package hierarchy with a source path='relative.package.path' / element. So you may as well make your project B a gwt project without any entry points anyway. I think you will find that the path='X' attribute isn't as flexible as you would like it to be. For example, I don't think it supports things like .. for previous package, and I just tried and failed to get a compile to work with a module that had path=source in another project or a single module that is defined in package com.domain.packageA with an element like source path='com.domain.packageB / -John On May 15, 4:45 pm, Tim McCormack ti...@ccs.neu.edu wrote: On May 15, 3:00 pm, Rajeev Dayal rda...@google.com wrote: Now, suppose that project B only has GWT client source in it (no RPC) - then the new version of the plugin will handle this case - it will automatically pull the dependent project's source folders onto the classpath when compiling or running hosted mode. What if B is not a GWT project, but instead a regular Java project? I can't have it compile into A's output folder, because it won't output GWT classes. That's the situation I have right now, and I can't seem to get GWT to compile with outside libraries. How is it done? - Tim McCormack --~--~-~--~~~---~--~~ 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: naive 1.6 Web App creator question
well, now, that was simpler than I was expecting. Thanks I am not doing servlets... yet. Cheers, Dean...K... On May 15, 4:07 pm, Alex Rudnick a...@google.com wrote: Hey Seven, The simplest solution is just to rename the generated HTML file to index.html, if that's a filename that would work better for you. If you want to get a little fancier (and you're using a servlet container like Tomcat or App Engine), then you could look into having a welcome-file-list element in your web.xml. There's an example of how to do that in the web.xml that gets generated if you make a new GWT/App Engine project with the Eclipse plugin. Hope this helps! On Fri, May 15, 2009 at 4:52 PM, seven.reeds seven.re...@gmail.com wrote: Hi, I am *just* trying out 1.6. I have created a couple of test projects using the Web App creator thing but i have a question. I may have to create a project called Foo but the resulting GWT html items should be named .../index... The web server is configured to deal with index.html by default not Foo.html. Is there a way to use the app creator to name the resulting files index. whatever? If not, then what all do I have to change in the default 1.6 project dir to enable this? I know to change the projecyName.java file in the src dirs. I am less sure about entries in the various xml files or other configuration settings. -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ 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: @Resource path is OS-gnostic ( \ or / depending on the Win/Linux). What is a workaround?
This would work, except for backwards compatibility. If we put in this change, then all of those people that were using fully-qualified names without the leading slash would run into problems. Another way to handle this might be to add another piece data to the annotation to indicate that the path is relative as opposed to absolute. Or, we could maybe go with your suggestion, but then have a fallback algorithm - if there is no leading slash, assume that the path is relative to the package. If no resource can be found, assume that it's absolute. On Fri, May 15, 2009 at 4:11 PM, Igor Moochnick igor.moochn...@gmail.comwrote: It does, actually, makes scene. If I may, I'd like to suggest the way to fix it. Usually when the path starts with / (slash) it considered to be an ABSOLUTE path, but, if it does't, it considered to be a RELATIVE one. So the code can be changed like this [pseudocode]: if (imgFileName.starts_with(/)) { // USE THE PATH AS AN ABSOLUTE ONE } else // RELATIVE PATH IN ANY OTHER CASE { String pkgName = method.getPackageName(); if (!.equals(pkgName)) { imgFileName = pkgName.replace('.', '/') + / + imgFileName; } } How about this? On May 15, 4:03 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, Responses inline: On Fri, May 15, 2009 at 3:47 PM, Igor Moochnick igor.moochn...@gmail.comwrote: You mean PACKAGE or MODULE? In fact I do use PACKAGEs. I mean package. Because I'm actually using packages for my widgets and, in fact, that's what broken. This is how I've structured my code: com.myserver.client - all the usual client code com.myserver.client.widgets - here I put our custom widgets (and all the images related to them) com.myserver.client.widgets.images - this is where I WANT to put all the images so the upper level folder will be free Since, in Java, packages are directly related to the folder structure, the @Resource(images/Dialogue_Corner.gif) is broken and not working consistently across the OSes. I know that if you use a backslash, that this works on Windows. However, have you tested to see if this would work as-is in its current formulation on Mac or Linux? The reason that I ask is that I suspect it would not. Even though changing the forward slash to a backslash appears to fix the problem on windows, it is an accident of the implementation of ImageBundleGenerator. Here is the relevant chunk of code in ImageBundleGenerator: // If the name has no slashes (that is, it isn't a fully-qualified resource // name), then prepend the enclosing package name automatically, being // careful about the default package. if (imgFileName.indexOf(/) == -1) { String pkgName = method.getPackageName(); if (!.equals(pkgName)) { imgFileName = pkgName.replace('.', '/') + / + imgFileName; } } So, you see, the code basically assumes that if there are any forward slashes in the image name (where the image name is taken verbatim as the value of the resource annotation), then it is assumed to be an absolute reference. When you changed the slash to a backslash, the code here determined that there were no forward slashes in the resource name, and pre-pended the package name to the image file name. So, the fact that a relative reference worked was accidental. Does that make sense? Thanks. On May 15, 3:30 pm, Rajeev Dayal rda...@google.com wrote: You are correct - if you end up refactoring, you'll have to change the references in the @Resource annotation. The only other way around this is to place the images themselves in the same package as your ImageBundle, and then you can use relative references. You can file a Request for Enhancement to support relative paths in ImageBundle @Resource annotatios, if you'd like On Fri, May 15, 2009 at 1:53 PM, Igor Moochnick igor.moochn...@gmail.comwrote: Interesting ... In fact I was actually trying to use the relative path. The goal was to put the images (part of the application ImageBundles) with the classes/widgets that are using them and then extra /images folder (relative to the widget folder). Then, if I put a full path, what are the best practices in refactoring? When I move the whole folder - all the full pathes will be broken. Thanks for your responses. On May 15, 1:45 pm, Rajeev Dayal rda...@google.com wrote: Hi Igor, The problem is that the resource annotation will only understand either: 1) A file name relative to the package. This must only be a file name, not a path 2) A fully qualified path The problem is that you're using a relative path for the file, which will not work. You have to use the
Re: [ERROR] Not enough arguments (2) passed to external.gwtOnLoad(), expected (3); error
Hi darkflame, That error message is certainly a rare find - whatever is causing it is likely to be one of those edge cases that are hit when there is a full blue moon and the planets are aligned. The hosted.html file is typically not generated in the .gwt-tmp dir, but just in case, could you try deleting that directory to make sure there aren't any stale files there that might be triggering that error message? Regarding switching to the new com.google.gwt.dev.HostedMode, you would be required to change the directory layout for your project to the WAR convention adopted in GWT 1.6. If you do want to go this route, the process is fairly straightforward and should be painless. You can check out details steps to do this in the 1.6 upgrade guide (link below). GWT 1.6 upgrade guide: http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html#Upgrading Hope that helps, -Sumit Chandel On Tue, May 12, 2009 at 3:04 AM, darkflame darkfl...@gmail.com wrote: I'm getting a; [ERROR] Not enough arguments (2) passed to external.gwtOnLoad(), expected (3); your hosted mode bootstrap file may be out of date; if you are using -noserver try recompiling and redeploying your app Error in the development shell when I run my project. This error has only just appeared despite working on my project for weeks without even touching the run or compiling configurations. It seems to have appeared after introducing another Frame element, sometimes setting the url seems to trigger it but I cant find any logic to this error appearing. This may be tied to me still using com.google.gwt.dev.GWTShell to compile, despite the deprecated warning I get in eclipse. (I'm using the default 1.5 directory layout still, changing to 'com.google.gwt.dev.HostedMode' would mean having to change that right?) --~--~-~--~~~---~--~~ 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: JSON, HTTP POST and Django - json contaminated with newlines
On 15 mai, 22:14, Hannson hann...@gmail.com wrote: I think I was wrong. This problem does not happen unless the json string contains quotes (escaped automatically by GWT like this: this is a string that contains \quotes\ ), even when URL.encoded. I'm not sure if this is a GWT or Django issue. Does anyone have any ideas? Have you tried URL.encodeComponent() on your JSON before sendRequest (json= + json, ...) ? I believe GWT is right on both JSON serialization and URL.encodeComponent() (this one is deferred to the browser); RequestBuilder is OK too (and let's hope your browser's XMLHttpRequest too). So I'd say that either your code is buggy, or PHP, or Django (PHP being buggy in many ways isn't a scoop). You should first have a look at the request's content that goes on the wire (use Firebug or a similar tool, or Fiddler or similar network debugger), and if it looks OK, then the problem is on the server side. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---