Re: conversion to JavaScriptObject fails with cross site communication
Hi Dale, Could be a couple of things... 1) Your asBasicComputerInfo() method takes a variable jso and you try and return a reference to a variable json - though maybe that's just a typo in your message? 2) Your JSON response from server doesn't appear to be an array, so ignoring any potential typo above, your asBasicComputerInfo() could be failing when trying to cast a simple JavaScriptObject into a JsArray - I'd suggest either returning an array from the server, or altering your code so you don't use a JsArray. Also, the data in your JSON is all strings, therefore methods like public final native int RAM() will possibly fail later in your code - you could create a new method in the BasicComputerInfo class that does the conversion for you, e.g. public int getRAM(){Integer.parseInt(RAM ());} and change RAM() to return the String in the JSON. Hope some of that helps! //Adam On 28 Juli, 23:57, dale fortiscont...@gmail.com wrote: I am creating my first GWT app and have hit a snag. I suspect that the problem is one things below. I can see in the server logs that the server returns ok. This is the method that fails, there is no error ... that I can see :) private final native JsArrayBasicComputerInfo asBasicComputerInfo (JavaScriptObject jso) /*-{ return json; }-*/; I am calling it in the handleJsonResonse method and execution never makes it to the UpdateDetailPanel Method. public void handleJsonResponse(JavaScriptObject jso) { if (jso == null) { displayError(Couldn't retrieve JSON); return; } updateDetailPanel(asBasicComputerInfo (jso));//--After the breakpoint here it never gets to updateDetailPanel } This is the response from the server looks like this when I get it from a browser. callback0( { LastBootTime: 7/27/2009 8:46:25 AM, UserName: aUser, OS: xp, OSVersion: 5.1.2600, BuildDate: 5/6/2008 3:18:06 PM, RAM: 1063329792, HDCapasity: 2676800, HDFree: 7487799296, NumProcessors: 1, PowerState: Unknown, Site: NA, Office: NA, IPAddress: NA, IPAddress: Dell Inc., Model: OptiPlex GX620} ); here is the BasicComputerInfo Class: public class BasicComputerInfo extends JavaScriptObject { protected BasicComputerInfo(){} // JSNI methods to get stock data. public final native String LastBootTime() /*-{ return this.LastBootTime; }-*/; public final native String UserName() /*-{ return this.UserName; }- */; public final native String OS() /*-{ return this.OS; }-*/; public final native String OSVersion() /*-{ return this.OSVersion; }-*/; public final native String BuildDate() /*-{ return this.BuildDate; }-*/; public final native int RAM() /*-{ return this.RAM; }-*/; public final native Long HDCapasity() /*-{ return this.HDCapasity; }-*/; public final native Long HDFree() /*-{ return this.HDFree; }-*/; public final native int NumProcessors() /*-{ return this.NumProcessors; }-*/; public final native String PowerState() /*-{ return this.PowerState; }-*/; public final native String Site() /*-{ return this.Site; }-*/; public final native String Office() /*-{ return this.Office; }-*/; public final native String IPAddress() /*-{ return this.IPAddress; }-*/; public final native String Manufacturer() /*-{ return this.Manufacturer; }-*/; public final native String Model() /*-{ return this.Model; }-*/; } --~--~-~--~~~---~--~~ 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: Several simple questions from a newbie
Can we add element of Horizontal panel instead of Image to catch mouse event. On Thu, Aug 2, 2007 at 8:12 PM, krispy cplum...@integrity-apps.com wrote: Hey Budric - comments inline. 1. I'm using it in NetBeans through GWT4NB plugin. I'm trying to add a style sheet to the project. How is that done? I see DynaTable sample links the style sheet into HTML. The KitchenSink puts it in *.gwt.xml file as stylesheet. This option doesn't work for me. The style isn't applied and I don't know why. I don't know if the compiler is not seeing it or it's invalid or what...I'm under the impression that the *.js file should contain the reference to the css file and write it into the document. You're supposed to be able to do the stylesheet thing in the module file - I don't know, I've never tried. Usually the stylesheet goes into the head of your HTML document. Put the following line in: link rel='stylesheet' href='MyStyleSheet.css'/ 2. How can I add my package to a module? So far it seems any classes outside *.client package that you import aren't compiled. Makes sense, but this is my own package I'm writing just to separate the code a bit and I want to be able to import that package. You can do a couple of things - if I remember rightly, one is to set up a separate gwt.xml file that contains definitions for your other packages, then inherit it in your other modules that need it. The simplest thing to do, IMO, is to change the source tag in your current gwt.xml file to point at other packages. It defaults to looking at /client only for client side source: http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.ModuleXml.html If you have a structure like this: /com/mycompany/gwt/client /com/mycompany/gwt/otherstuff /com/mycompany/gwt/otherstuff/morestuff then what you would add to your gwt.xml file is: source path=client/ source path=otherstuff/ If you have something like this: /com/mycompany/gwt/client /com/mycompany/otherstuff Then you would have to set up another gwt.xml file at com/mycompany, or else move your current one com/mycompany and use source path=gwt/ source path=otherstuff/ since the module loads source relative to your gwt.xml file. 3. I'm using Image.setUrl() to scroll through some images hosted by the server. It seems that these images are not cached by the client's browser (IE/Firefox). Anyone know why? You might need to change your browser settings, but more likely you need to make sure your web server is configured correctly and sending the right headers. It depends greatly on what your response headers look like, really - but I'm not sure if it's possible to have a browser setting that ignores those headers and doesn't cache anything? Search these forums more for cache response to find the right headers. 4. I'm trying to capture some dragging events on an image. This doesn't work. The mouse down is captured, then as you start to drag the mouse cursor changes, and mousemove, mouse up (most important) are not reported. Note that the image would not be moving with the mouse cursor. Anyone know a solution to this? Overlaying some sort of a control on top of an image to capture the events may solve the problem, but I don't know how to layer one control on top of another (especially since I can't get my css to work!). Make sure that your image is set as the capture element with DOM.setCapture(Element). Otherwise, when you move the mouse too fast it'll lose the events (b/c it'll do a mouse leave, I think). It's hard to know if this is actually the problem until we see some source as to how you're catching events and responding to them. Thanks a lot for any help. Anytime - that's what we're here for. -krispy --~--~-~--~~~---~--~~ 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: Setting Background image on panel
Do you know how to set the background-image of any html tag, like a DIV through CSS? 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). 2) If not: please have a look at some HTML book how to do this and go back to 1)... Extra info: go through a a tutorial of GWT, as it's basically the first thing they explain.. --~--~-~--~~~---~--~~ 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: Setting Background image on panel
Hi Ed at first thanks for your answer. 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). it's the first thing i tried. But it didn't work at all. here is a listing of the involved part in my css file: *.rightPanelReservedZone {* * **background-image: url(images/bgleer.jpg);* * **background-repeat: no-repeat;* * **background-attachment: fixed;* * **font-family: Arial, Helvetica, sans-serif;* * **font-size: 12px;* * **font-style: normal;* * **font-weight: normal;* * **height: 90%;* * **width: 85%;** * *}* and i then add a new style by calling: *//rightPanel.addStyleName(rightPanelReservedZone);* * **rightPanel.setStyleName(rightPanelReservedZone);* * * Like you can see, i tried the both methods, but without success. I thought it could be a problem with the image's path. But to my surprise, i the image was found as i try the following *panel.add(new Image(images/pic.jpg))*. On Wed, Jul 29, 2009 at 9:38 AM, Ed post2edb...@hotmail.com wrote: Do you know how to set the background-image of any html tag, like a DIV through CSS? 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). 2) If not: please have a look at some HTML book how to do this and go back to 1)... Extra info: go through a a tutorial of GWT, as it's basically the first thing they explain.. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
CSS-ToolBar
hi all the buttons in the grid panel does not have frame when the mouse is not over them, but when we put the mouse over the button the frame appears. i need to make the frame visible all the time even if the mouse is not over the button like the regular button. does anybody have an idea and can help me... thanks Muhannad --~--~-~--~~~---~--~~ 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: conversion to JavaScriptObject fails with cross site communication
Thanks Adam, You were right about all 3 things, although I'm not sure which actually fixed it. probably combo of all of them :) . I changed the problem method to be: private final native BasicComputerInfo asBasicComputerInfo (JavaScriptObject json) /*-{ return json; }-*/; Fixing the variable to json and making it not return an array. I also changed everything to strings for now just to see if I can get it to work. And it is working!!! thanks again dale On Jul 29, 1:08 am, Adam T adam.t...@gmail.com wrote: Hi Dale, Could be a couple of things... 1) Your asBasicComputerInfo() method takes a variable jso and you try and return a reference to a variable json - though maybe that's just a typo in your message? 2) Your JSON response from server doesn't appear to be an array, so ignoring any potential typo above, your asBasicComputerInfo() could be failing when trying to cast a simple JavaScriptObject into a JsArray - I'd suggest either returning an array from the server, or altering your code so you don't use a JsArray. Also, the data in your JSON is all strings, therefore methods like public final native int RAM() will possibly fail later in your code - you could create a new method in the BasicComputerInfo class that does the conversion for you, e.g. public int getRAM(){Integer.parseInt(RAM ());} and change RAM() to return the String in the JSON. Hope some of that helps! //Adam On 28 Juli, 23:57, dale fortiscont...@gmail.com wrote: I am creating my first GWT app and have hit a snag. I suspect that the problem is one things below. I can see in the server logs that the server returns ok. This is the method that fails, there is no error ... that I can see :) private final native JsArrayBasicComputerInfo asBasicComputerInfo (JavaScriptObject jso) /*-{ return json; }-*/; I am calling it in the handleJsonResonse method and execution never makes it to the UpdateDetailPanel Method. public void handleJsonResponse(JavaScriptObject jso) { if (jso == null) { displayError(Couldn't retrieve JSON); return; } updateDetailPanel(asBasicComputerInfo (jso));//--After the breakpoint here it never gets to updateDetailPanel } This is the response from the server looks like this when I get it from a browser. callback0( { LastBootTime: 7/27/2009 8:46:25 AM, UserName: aUser, OS: xp, OSVersion: 5.1.2600, BuildDate: 5/6/2008 3:18:06 PM, RAM: 1063329792, HDCapasity: 2676800, HDFree: 7487799296, NumProcessors: 1, PowerState: Unknown, Site: NA, Office: NA, IPAddress: NA, IPAddress: Dell Inc., Model: OptiPlex GX620} ); here is the BasicComputerInfo Class: public class BasicComputerInfo extends JavaScriptObject { protected BasicComputerInfo(){} // JSNI methods to get stock data. public final native String LastBootTime() /*-{ return this.LastBootTime; }-*/; public final native String UserName() /*-{ return this.UserName; }- */; public final native String OS() /*-{ return this.OS; }-*/; public final native String OSVersion() /*-{ return this.OSVersion; }-*/; public final native String BuildDate() /*-{ return this.BuildDate; }-*/; public final native int RAM() /*-{ return this.RAM; }-*/; public final native Long HDCapasity() /*-{ return this.HDCapasity; }-*/; public final native Long HDFree() /*-{ return this.HDFree; }-*/; public final native int NumProcessors() /*-{ return this.NumProcessors; }-*/; public final native String PowerState() /*-{ return this.PowerState; }-*/; public final native String Site() /*-{ return this.Site; }-*/; public final native String Office() /*-{ return this.Office; }-*/; public final native String IPAddress() /*-{ return this.IPAddress; }-*/; public final native String Manufacturer() /*-{ return this.Manufacturer; }-*/; public final native String Model() /*-{ return this.Model; }-*/; } --~--~-~--~~~---~--~~ 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: save form data in database
I added the jar to the build path and built the project but still get the error: C3P0Registry cannot be resolved. On Jul 29, 2:50 am, brett.wooldridge brett.wooldri...@gmail.com wrote: You have to add the CP30 jar to your project's Build Path. Right- click on project- Properties - Java Build Path - Libraries. -Brett On Jul 29, 1:34 am, Tobe tobias.jungnic...@googlemail.com wrote: @Brett I'm using Eclipse and did the things you've posted. I also added the 2 jars in the run configurations, but by compiling the source I get errors for C3P0Registry. On Jul 28, 2:09 pm, brett.wooldridge brett.wooldri...@gmail.com wrote: I run MySQL with a C3P0 connection pool in front of it. This is what I did [almost] verbatim. This is assuming you're running Jetty and servlets/RPC. 1. In your war/WEB-INF/lib put the c3p0 jar. Get C3P0 from herehttp://sourceforge.net/projects/c3p0. 2. In your war/WEB-INF/lib put the mysql-connector JDBC jar. Get from herehttp://www.mysql.com/products/connector. 3. In war/WEB-INF create a file called jetty-web.xml with these contents: ?xml version=1.0? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext New id=yourDS class=com.mchange.v2.c3p0.ComboPooledDataSource Set name=driverClasscom.mysql.jdbc.Driver/Set Set name=jdbcUrljdbc:mysql://localhost:3306/yourdb? cacheResultSetMetadata=true/Set Set name=userroot/Set Set name=password/Set Set name=initialPoolSize10/Set Set name=minPoolSize50/Set Set name=maxPoolSize500/Set Set name=idleConnectionTestPeriod300/Set Set name=maxIdleTime1800/Set Set name=maxIdleTimeExcessConnections600/Set Set name=maxConnectionAge1800/Set Set name=maxStatementsPerConnection50/Set Set name=preferredTestQuerySELECT 1/Set Set name=acquireRetryAttempts3/Set Set name=acquireRetryDelay10/Set Set name=checkoutTimeout2/Set Set name=numHelperThreads4/Set Set name=dataSourceNameyourDS/Set /New /Configure 4. Somewhere in your code where you manage the JDBC DataSource do: DataSource myDS = C3P0Registry.pooledDataSourceByName(yourDS); I've led you to the water, now it's time to drink. The rest is up to you. Brett --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Application Integration
Hello all, I would like to integrate an application into my GWT-Site(similar to integrating an applet). Is this possible? Another option would be to open an application on the client machine (but I don't think this is possible because of browser restictions and security reasons) or at least communicate with an application that is running on the client machine. The last point would also be perfect. But can I do that with GWT? Or is there a library that offers this functionality? Grettings and TIA, NeMeSiS --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Multiple pages question
Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ 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: Application Integration
Thanks for that fast answer! I need to use an XML-Editor. Which one exactly is not specified. I think I will use something opensource. So can I use an activeX control and show the editor inside? Can I also send and recieve commands and data to the editor? How is that done? Greetings, NeMeSiS On 29 Jul., 12:34, makoki iagoto...@gmail.com wrote: What sort of application, which type of integration are you talking about. I'm sure, although never tried, it's feasible to do it, either creating an activeX control or similar. On 29 jul, 12:32, NeMeSiS m.weish...@web.de wrote: Hello all, I would like to integrate an application into my GWT-Site(similar to integrating an applet). Is this possible? Another option would be to open an application on the client machine (but I don't think this is possible because of browser restictions and security reasons) or at least communicate with an application that is running on the client machine. The last point would also be perfect. But can I do that with GWT? Or is there a library that offers this functionality? Grettings and TIA, NeMeSiS --~--~-~--~~~---~--~~ 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 line to break from textarea
How about simply using String's replaceAll() method? String html = textArea.getText().replaceAll((\r\n|\r|\n), br/); On Jul 28, 5:04 pm, Tobe tobias.jungnic...@googlemail.com wrote: Hi, how can I activate that new lines in a TextArea become breaks directly on the web page? In short I need the nl2br() function from PHP in GWT. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
regex escape characters with Messages
Hi, I want to store some regex expressions in my own Messages instance. Unfortunately, the {0} brace/number syntax seems strictly reserved for text replacement i.e. key=blah blah {0} blah public interface MyMessages extends Messages { @DefaultMessage(blah blah {0} blah) String key(int num); } I want to put something like this in: @DefaultMessage([\\w]{12}) String myRegex(); but the compiler croaks on that b/c the interface method does not take 12 arguments. Is there a way to escape this? --~--~-~--~~~---~--~~ 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: Gadgets Docs
http://code.google.com/intl/en/webtoolkit/overview.html The link is located at the left menu, expanding the Tutorials tree. Getting Started Tutorials GWT Gadgets 404 ! On 28 jul, 15:54, Eric Ayers zun...@google.com wrote: Hi Lucas, What page is the source of that link? -Eric. On Tue, Jul 28, 2009 at 2:16 PM, Lucas Neves Martinssnown...@gmail.com wrote: Whoops, here it goes: http://code.google.com/intl/en/webtoolkit/tutorials/1.6/gadgets.html On 28 jul, 15:14, Lucas Neves Martins snown...@gmail.com wrote: The link is broken, /intl/en/webtoolkit/tutorials/1.6/gadgets.html Bridges are falling, and buidings are crashing here, somebody help! -- Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ 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: Application Integration
I saw some guys doing that with iframes, I do not like iframes, but it works, give it a try. If you know how to use an iframe you already figured out what to do, but if not : [code] iframe src=myapp/MyGwtApplication.html name=MyAppFrame width=600 height=400 scrolling=noAn integrated App/iframe [/code] The tag src should point to your app entry point, if you are running the app on hosted mode, click on the Compile/Browse button, you app will open up on your default browser, copy the location and use it as the src of yout iframe. I don't have practice on explaining things, so if you don't get it, ask again, I will be pleased to help. Good luck! On 29 jul, 08:20, NeMeSiS m.weish...@web.de wrote: Thanks for that fast answer! I need to use an XML-Editor. Which one exactly is not specified. I think I will use something opensource. So can I use an activeX control and show the editor inside? Can I also send and recieve commands and data to the editor? How is that done? Greetings, NeMeSiS On 29 Jul., 12:34, makoki iagoto...@gmail.com wrote: What sort of application, which type of integration are you talking about. I'm sure, although never tried, it's feasible to do it, either creating an activeX control or similar. On 29 jul, 12:32, NeMeSiS m.weish...@web.de wrote: Hello all, I would like to integrate an application into my GWT-Site(similar to integrating an applet). Is this possible? Another option would be to open an application on the client machine (but I don't think this is possible because of browser restictions and security reasons) or at least communicate with an application that is running on the client machine. The last point would also be perfect. But can I do that with GWT? Or is there a library that offers this functionality? Grettings and TIA, NeMeSiS --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Creating and Importing GWT Independent Modules
I looked it up all over the internet, but I only found this link : http://developerlife.com/tutorials/?p=229 I need to create a .jar with gwt views (those .java in the client package) and then import it to other gwt project, much like they do with the SmartGwt api. How they did the SmartGwt api? Where is the Docs/Tutorial/Whitepapers on how to create and export GWT modules? I follow the instructions on this link above, but it just doesn't work, when I try to compile it, I get an error telling me that the compiler couldn't find the class I am using, even the class is on the / lib dir, and in my buildpath, and in the .xml with a declared inherit. Does anybody know how do I do that? --~--~-~--~~~---~--~~ 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: Gadgets Docs
Thanks for reporting the broken link, I'm looking into it. I should have mentioned this upfront, but there is a tutorial for using Gadgets with GWT 1.5 in http://code.google.com/p/gwt-google-apis YMMV with GWT 1.6 and above. The docs need some work, and there have been bugs reported in Gadgets and Gears due to the new war project style layout. On Wed, Jul 29, 2009 at 8:45 AM, Lucas Neves Martinssnown...@gmail.com wrote: http://code.google.com/intl/en/webtoolkit/overview.html The link is located at the left menu, expanding the Tutorials tree. Getting Started Tutorials GWT Gadgets 404 ! On 28 jul, 15:54, Eric Ayers zun...@google.com wrote: Hi Lucas, What page is the source of that link? -Eric. On Tue, Jul 28, 2009 at 2:16 PM, Lucas Neves Martinssnown...@gmail.com wrote: Whoops, here it goes: http://code.google.com/intl/en/webtoolkit/tutorials/1.6/gadgets.html On 28 jul, 15:14, Lucas Neves Martins snown...@gmail.com wrote: The link is broken, /intl/en/webtoolkit/tutorials/1.6/gadgets.html Bridges are falling, and buidings are crashing here, somebody help! -- Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ -- Eric Z. Ayers - GWT Team - Atlanta, GA USA http://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ 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: Creating and Importing GWT Independent Modules
you dont need to do much thing for this... just create your gwt library project, you dont need to define any entrypoints. after, just click with your right button on your project, then export, then select java package after you only need to import this jar on the other project you want to use it, and on the module xml make reference to the xml of the library. you can find an example on my blog. http://tcninja.blogspot.com On Wed, Jul 29, 2009 at 10:10 AM, Lucas Neves Martins snown...@gmail.comwrote: I looked it up all over the internet, but I only found this link : http://developerlife.com/tutorials/?p=229 I need to create a .jar with gwt views (those .java in the client package) and then import it to other gwt project, much like they do with the SmartGwt api. How they did the SmartGwt api? Where is the Docs/Tutorial/Whitepapers on how to create and export GWT modules? I follow the instructions on this link above, but it just doesn't work, when I try to compile it, I get an error telling me that the compiler couldn't find the class I am using, even the class is on the / lib dir, and in my buildpath, and in the .xml with a declared inherit. Does anybody know how do I do that? -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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: Gadgets Docs
OK, Thanks! On 29 jul, 10:17, Eric Ayers zun...@google.com wrote: Thanks for reporting the broken link, I'm looking into it. I should have mentioned this upfront, but there is a tutorial for using Gadgets with GWT 1.5 in http://code.google.com/p/gwt-google-apis YMMV with GWT 1.6 and above. The docs need some work, and there have been bugs reported in Gadgets and Gears due to the new war project style layout. On Wed, Jul 29, 2009 at 8:45 AM, Lucas Neves Martinssnown...@gmail.com wrote: http://code.google.com/intl/en/webtoolkit/overview.html The link is located at the left menu, expanding the Tutorials tree. Getting Started Tutorials GWT Gadgets 404 ! On 28 jul, 15:54, Eric Ayers zun...@google.com wrote: Hi Lucas, What page is the source of that link? -Eric. On Tue, Jul 28, 2009 at 2:16 PM, Lucas Neves Martinssnown...@gmail.com wrote: Whoops, here it goes: http://code.google.com/intl/en/webtoolkit/tutorials/1.6/gadgets.html On 28 jul, 15:14, Lucas Neves Martins snown...@gmail.com wrote: The link is broken, /intl/en/webtoolkit/tutorials/1.6/gadgets.html Bridges are falling, and buidings are crashing here, somebody help! -- Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ -- Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ --~--~-~--~~~---~--~~ 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: Setting Background image on panel
but you may be setting the wrong path... unless your css file is located on the same page as the html... otherwise you would be looking at: blablabal/*css*/images/bgleer.jpg from your css * * *and * blablabal/images/bgleer.jpg from your GWT/html code On Wed, Jul 29, 2009 at 5:22 AM, Rodrigue Lagoue rlag...@googlemail.comwrote: Hi Ed at first thanks for your answer. 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). it's the first thing i tried. But it didn't work at all. here is a listing of the involved part in my css file: *.rightPanelReservedZone {* * **background-image: url(images/bgleer.jpg);* * **background-repeat: no-repeat;* * **background-attachment: fixed;* * **font-family: Arial, Helvetica, sans-serif;* * **font-size: 12px;* * **font-style: normal;* * **font-weight: normal;* * **height: 90%;* * **width: 85%;** * *}* and i then add a new style by calling: *//rightPanel.addStyleName(rightPanelReservedZone);* * **rightPanel.setStyleName(rightPanelReservedZone);* * * Like you can see, i tried the both methods, but without success. I thought it could be a problem with the image's path. But to my surprise, i the image was found as i try the following *panel.add(new Image(images/pic.jpg))*. On Wed, Jul 29, 2009 at 9:38 AM, Ed post2edb...@hotmail.com wrote: Do you know how to set the background-image of any html tag, like a DIV through CSS? 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). 2) If not: please have a look at some HTML book how to do this and go back to 1)... Extra info: go through a a tutorial of GWT, as it's basically the first thing they explain.. -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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 line to break from textarea
looks good, but if I used it I got br /s written on the web page. I used the following code: RootPanel.get(textNews).getElement().setInnerText (textareaNews.getText().replaceAll((\r\n|\r|\n), br /)); By changing setInnerText to setInnerHTML all works fine thanks On Jul 29, 1:56 pm, Phil couch...@googlemail.com wrote: How about simply using String's replaceAll() method? String html = textArea.getText().replaceAll((\r\n|\r|\n), br/); On Jul 28, 5:04 pm, Tobe tobias.jungnic...@googlemail.com wrote: Hi, how can I activate that new lines in a TextArea become breaks directly on the web page? In short I need the nl2br() function from PHP in GWT. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Save form data
Hi I want to save some form data into my database my forms are generated using GWT and i already have code that interacts with my database, now my question is how do i interact with this code ... is RPC the only way to do it in GWT or is there any other way to integrate my gwt UI to this my existing code can save to the database and retrive information so all i need to do is send the info to it using the form generated in GWT any examples with regards to this are welcome thanks Jeremiah Moses --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[ERROR] Line 3: The import java.math cannot be resolved
Hi Folks, I am using GWT as a beginner and at the time of using java.math.BigDecimal it gives me exception. Compiling module com.techjini.app.SwordFish Refreshing module from source Validating newly compiled units Removing units with errors [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/InvoiceService.java' [ERROR] Line 3: The import java.math cannot be resolved [ERROR] Line 13: BigDecimal cannot be resolved to a type Removing units with errors [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/invoice/CreateInvoice.java' [ERROR] Line 341: No source code is available for type java.math.BigDecimal; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/InvoiceServiceAsync.java' [ERROR] Line 10: No source code is available for type java.math.BigDecimal; did you forget to inherit a required module? Removing invalidated units [WARN] Compilation unit 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/invoice/InvoiceScreen.java' is removed due to invalid reference(s): [WARN] file:/D:/dev/GWT/gwt_workspace/SwordFish/src/com/ techjini/app/client/invoice/CreateInvoice.java [WARN] Compilation unit 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/SwordFish.java' is removed due to invalid reference(s): [WARN] file:/D:/dev/GWT/gwt_workspace/SwordFish/src/com/ techjini/app/client/invoice/InvoiceScreen.java Computing all possible rebind results for 'com.techjini.app.client.SwordFish' Rebinding com.techjini.app.client.SwordFish Checking rule generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [ERROR] Unable to find type 'com.techjini.app.client.SwordFish' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Following is the code : Model class : import java.math.BigDecimal; import java.util.Date; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.google.appengine.api.datastore.Blob; import com.techjini.app.server.util.DateUtil; @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Invoice { public static final Short ACTIVE_STATUS = 1; public static final Short INACTIVE_STATUS = 2; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long invoiceId; @Persistent private ClientCustomer clientCustomer; @Persistent private InvoiceTemplate invoiceTemplate; @Persistent private InvoiceSetting invoiceSetting; @Persistent private Date dueDate; @Persistent private Date invoiceDate; @Persistent private BigDecimal amount; @Persistent private Short InvoiceStatus; @Persistent private Blob invoiceContent; @Persistent private Date createdAt; @Persistent private Long createdBy; @Persistent private Date lastUpdatedAt; @Persistent private Long lastUpdatedBy; @Persistent private boolean isDeleted; @Persistent private Integer version; public Invoice(Long clientCustomerId, Date dueDate, Date invoiceDate, BigDecimal amount, Short invoiceStatus) { this.amount = amount; this.createdAt = DateUtil.getCurrentDate(); this.dueDate = dueDate; this.invoiceDate = invoiceDate; this.lastUpdatedAt = DateUtil.getCurrentDate(); this.InvoiceStatus = invoiceStatus; } // and getter setter of the fields } Interface : import java.math.BigDecimal; import java.util.Date; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath(createInvoice) public interface InvoiceService extends RemoteService { String createInvoice(String invoiceNo, Long clientCustomerId, Date dueDate, Date invoiceDate, BigDecimal amount ) throws Throwable; } import java.math.BigDecimal; import java.util.Date; import com.google.gwt.user.client.rpc.AsyncCallback; public interface InvoiceServiceAsync { String createInvoice(String invoiceNo, Long clientCustomerId, Date dueDate, Date invoiceDate, BigDecimal amount,
RemoteService - how to get http status of the response
Hi I have implemented RemoteService and when I'm getting response in the callback - in methods onFailure and onSuccess - how can I get Http Status (like 200, 302 or 404) of the response. Thanks - Piotr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Please tell me a way to clear this problem
I am a newbye to GWT. I go thro' a referrence book from Packtpub publications named Google Web Toolkit GWT Java ajax programming. In chapter 2 i tried an example application. I done as they said in the book material step by step. But it ends up in error as Unable to load module entry point class com.packtpub.gwtbook.hellogwt.client.HelloGWT(see associated exception for details) Failure to load module com.packtpub.gwtbook.hellogwt.HelloGWT I downloaded the codes from packpub publications site http:// www.packtpub.com/support , and used that codes. will any one help me ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Can I invoke RPC Methods from Java
Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Google Calendar API: NoClassDefFoundError AuthenticationException
Hi! I'm trying to get feed data from the Google Calendar API. To the Eclipse project I have added the following libs (Java Build Path) gdata-calendar-2.0.jar gdata-calendar-meta-2.0.jar gdata-client-1.0.jar gdata-client-meta-1.0.jar gdata-core-1.0.jar google-collect-1.0-rc1.jar Google Data Plugin GWT 1.7.0 App Engine 1.2.2 Code: == ... ... // Create a new Calendar service myService = new CalendarService(My Application); myService.setUserCredentials(sUserName, sPassword); URL feedUrl = null; try { feedUrl = new URL( http://www.google.com/calendar/feeds/default/allcalendars/ full); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } CalendarFeed resultFeed = null; try { resultFeed = myService.getFeed(feedUrl, CalendarFeed.class); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } for (int i = 0; i resultFeed.getEntries().size(); i++) { CalendarEntry entry = resultFeed.getEntries().get(i); if (entry.getTitle().getPlainText().startsWith (sCalendarStartsWith)) { System.out.println(\t + entry.getTitle().getPlainText()); ListLink links = entry.getLinks(); for (Link link : links) { System.out.println(\t + link.getRel()); System.out.println(\t + link.getHref()); } setCalendarUrl(links.get(0).getHref()); } } ... Error: == The server is running at http://localhost:8080/ 29-Jul-2009 14:12:35 com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Nested in javax.servlet.ServletException: init: java.lang.NoClassDefFoundError: com/google/gdata/util/ AuthenticationException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) at org.mortbay.jetty.servlet.ServletHolder.getServlet (ServletHolder.java:339) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 463) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1093) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter (TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at com.google.appengine.tools.development.StaticFileFilter.doFilter (StaticFileFilter.java:124) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle (SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle (SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle (DevAppEngineWebAppContext.java:54) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at com.google.appengine.tools.development.JettyContainerService $ApiProxyHandler.handle(JettyContainerService.java:313) at org.mortbay.jetty.handler.HandlerWrapper.handle (HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506) at org.mortbay.jetty.HttpConnection$RequestHandler.content (HttpConnection.java:844) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run
Re: Google Calendar API: NoClassDefFoundError AuthenticationException
Forgot to say... Using the same code in a general Java application works perfect. --~--~-~--~~~---~--~~ 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: Setting Background image on panel
hi Nuno! no the path .../pic.jpg was just an example. i found out that the problem could be that the panel who supposed to have the image background is empty. If i put some widgets on this panel, the image background become visible. I cannot explain why. thanks On Wed, Jul 29, 2009 at 4:25 PM, Nuno brun...@gmail.com wrote: but you may be setting the wrong path... unless your css file is located on the same page as the html... otherwise you would be looking at: blablabal/*css*/images/bgleer.jpg from your css * * *and * blablabal/images/bgleer.jpg from your GWT/html code On Wed, Jul 29, 2009 at 5:22 AM, Rodrigue Lagoue rlag...@googlemail.comwrote: Hi Ed at first thanks for your answer. 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). it's the first thing i tried. But it didn't work at all. here is a listing of the involved part in my css file: *.rightPanelReservedZone {* * **background-image: url(images/bgleer.jpg);* * **background-repeat: no-repeat;* * **background-attachment: fixed;* * **font-family: Arial, Helvetica, sans-serif;* * **font-size: 12px;* * **font-style: normal;* * **font-weight: normal;* * **height: 90%;* * **width: 85%;** * *}* and i then add a new style by calling: *//rightPanel.addStyleName(rightPanelReservedZone);* * **rightPanel.setStyleName(rightPanelReservedZone);* * * Like you can see, i tried the both methods, but without success. I thought it could be a problem with the image's path. But to my surprise, i the image was found as i try the following *panel.add(new Image(images/pic.jpg))*. On Wed, Jul 29, 2009 at 9:38 AM, Ed post2edb...@hotmail.com wrote: Do you know how to set the background-image of any html tag, like a DIV through CSS? 1) If yes: then you have your solution as you only have to set the CSS name on your widget/panel through for example setStyleName(String). 2) If not: please have a look at some HTML book how to do this and go back to 1)... Extra info: go through a a tutorial of GWT, as it's basically the first thing they explain.. -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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: ImageBundle question
Sorry let me rephrase the question The images are not actually stored in a folder but we store them as binary data in database. In that case i am assuming image bundle will not work right? Thanks, On Jul 22, 5:28 am, David david.no...@gmail.com wrote: Hi Parag, An com.google.gwt.user.client.ui.ImageBundlewould be the best solution for your problem - as your own title suggests. The GWT docs contain a good explanation on how to use them David On Wed, Jul 22, 2009 at 4:47 AM, myapplicationquestionsparag.bhag...@cgi.com wrote: Hi All, I am creating an Org tree which will consist of @500 nodes, for each node i want to show an image as well. What is the best way to get all these images loaded? I was thinking of adding an http request in the src tag of the image but wanted tio know if GWT provides anyway so that i can combine all the images as 1 send it to the orgtree and have GWT parse teh image to show individual thumbnails? any help is appreciated. Thanks, Parag- 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: Google Calendar API: NoClassDefFoundError AuthenticationException
After some debugging i found where the Exception is thrown: com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(Object, Method, Object[], SerializationPolicy) --~--~-~--~~~---~--~~ 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 class on both client and server sides
Hello, I'm trying to use a class (let's say Contact) on both client and server sides (packages: com.app.client and com.app.server). For that purpose I created a shared package (com.app.shared) in which to put the Contact class. But gwt (client side) only sees classes in com.app.client package. How can I use the Contact class on client side for the com.app.shared package? Do I have to add a inherits tag in my .gwt.xml file ? 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 -~--~~~~--~~--~--~---
Client or server?
Hi, I'm experimenting with GWT for a couple of weeks now and ran into another question. The question relates where to put a certain class. Classes in the client package are translated into javascript. Classes in the server package are executed as java (I'm using App Engine too). Say I'm building an app with a little game. I can write the game class at client side so that that code can be run at the client, what seems to be correct here. At the end of the game, the game should be persisted into the datastore. So I make it persistence capable but than the class is needed at the server side. What should I do now? Put it at server side and use it at client side too? In that case, the class needs to be inherited in the .gwt.xml, no? Or should I build two seperate classes: just send the data of the game to the server and build the data store element from that data to store it? Some advice would be appreciated :) Maarten Decat --~--~-~--~~~---~--~~ 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 class on both client and server sides
You want this in your gwt.xml file: source path=client/ source path=shared/ Note that if any source... element appears in your gwt.xml, then the implied client source path is not added for you - so you will need both of the above. Paul Ice13ill wrote: Hello, I'm trying to use a class (let's say Contact) on both client and server sides (packages: com.app.client and com.app.server). For that purpose I created a shared package (com.app.shared) in which to put the Contact class. But gwt (client side) only sees classes in com.app.client package. How can I use the Contact class on client side for the com.app.shared package? Do I have to add a inherits tag in my .gwt.xml file ? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Can I invoke RPC Methods from Java
I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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_historyFrame and W3C validation
iframe src=javascript:'' id=__gwt_historyFrame style=width: 0; height: 0; It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit. gwt recomend use this !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN but the id dont pass in W3C validation... should be a different id? what the community think about this? --~--~-~--~~~---~--~~ 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: Client or server?
a class in the client sive can also be used in the server side...just make it implements Serializable and send it back to the server with the RPC services. Also note that as the classes in the client package are going to become javascript, they don't implement all of the JRE. That may be also a factor to know if you should put this on the client package. On Wed, Jul 29, 2009 at 12:07 PM, maarten.de...@gmail.com maarten.de...@gmail.com wrote: Hi, I'm experimenting with GWT for a couple of weeks now and ran into another question. The question relates where to put a certain class. Classes in the client package are translated into javascript. Classes in the server package are executed as java (I'm using App Engine too). Say I'm building an app with a little game. I can write the game class at client side so that that code can be run at the client, what seems to be correct here. At the end of the game, the game should be persisted into the datastore. So I make it persistence capable but than the class is needed at the server side. What should I do now? Put it at server side and use it at client side too? In that case, the class needs to be inherited in the .gwt.xml, no? Or should I build two seperate classes: just send the data of the game to the server and build the data store element from that data to store it? Some advice would be appreciated :) Maarten Decat -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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 I invoke RPC Methods from Java
Just to correct something...i dont know if you can call these rpc services from another java application, but GWT does not use JSON on their RPC calls. it is possible to work with json, but the default value are serialized objects. On Wed, Jul 29, 2009 at 12:11 PM, Trevis trevistho...@gmail.com wrote: I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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: Not able to use 2 different sessions of different users
Then you have to put the session ID into the URL when the browser is making a request on behalf of you - for example, you want your user to display a private (password protected) image, or download a private document. Other than that, your f) is my c) without using the cookies as persistent storage. On Jul 28, 5:02 pm, brett.wooldridge brett.wooldri...@gmail.com wrote: Option f) don't use session cookies (or servlet sessions). 1) Login to the server via RPC call. 2) Successful login RPC returns a session ID, put the session ID in a Java static or JS global variable. 3) Pass the session ID in all RPC calls where it matters. 4) Profit. Your server should be as stateless (session-less) as possible anyway. -Brett On Jul 25, 6:06 pm, Juraj Vitko juraj.vi...@gmail.com wrote: a) start your FF with -P and create different profiles, then start it with -P --no-remote and pick a profile - profiles don't share session cookies. (PITA, only FF) b) use virtualization and run one FF and one IE8 in each instance (requires RAM) c) bake your own session cookies - when your app starts, pull the cookie inside javascript, then use the cookie from there when communicating with the server. When you open another browser window and log out/in, the cookie changes, but your app in previous window will use the javascript one. (Dirty) d) log out / log in always to test different sessions (PITA) e) perhaps there are some browser extensions for IE and FF that can handle session cookie dynamic alternation (Weird) My app uses c), but I don't rely on it, I use d) when developing for one user role, then for heavier multi-role testing I use b). J. On Jul 24, 8:20 am, vkm veerareddykiranm...@gmail.com wrote: Hi, I have a problem with GWT and Firefox 3 and IE 8 browsers. I have an application developed in GWT. 1. I open Firefox / IE browser and login with valid credentials and it works fine. 2. I keep this session open and open other new Firefox / IE Browser window and i login with different valid credentials. Now in the browser opened in #1 takes the credentials of the #2 browser. Note 1: I donot see this issue if I run my application with 2 different ports in hosted mode from Eclipse. Note 2: This issues is not Observer in IE 6. can you please let me know how to solve this issue or do we have any workaround for this issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Using class on both client and server sides
That worked... thanks a lot :) On Jul 29, 6:10 pm, Paul Robinson ukcue...@gmail.com wrote: You want this in your gwt.xml file: source path=client/ source path=shared/ Note that if any source... element appears in your gwt.xml, then the implied client source path is not added for you - so you will need both of the above. Paul Ice13ill wrote: Hello, I'm trying to use a class (let's say Contact) on both client and server sides (packages: com.app.client and com.app.server). For that purpose I created a shared package (com.app.shared) in which to put the Contact class. But gwt (client side) only sees classes in com.app.client package. How can I use the Contact class on client side for the com.app.shared package? Do I have to add a inherits tag in my .gwt.xml file ? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Using class on both client and server sides
Also, if you class is just a pojo you dont really need to create it in two places... the server code can access all of your client code. You just need to make the classes you want to transport from client to server or vice versa. In your example Contact may stay in the client package, and if you need to send a Contact object to the server, or make the server send it to you, just make this class Serializable. On Wed, Jul 29, 2009 at 12:10 PM, Paul Robinson ukcue...@gmail.com wrote: You want this in your gwt.xml file: source path=client/ source path=shared/ Note that if any source... element appears in your gwt.xml, then the implied client source path is not added for you - so you will need both of the above. Paul Ice13ill wrote: Hello, I'm trying to use a class (let's say Contact) on both client and server sides (packages: com.app.client and com.app.server). For that purpose I created a shared package (com.app.shared) in which to put the Contact class. But gwt (client side) only sees classes in com.app.client package. How can I use the Contact class on client side for the com.app.shared package? Do I have to add a inherits tag in my .gwt.xml file ? Thanks. -- Quer aprender a programar? acompanhe: Wants to learn GWT? Follow this blog - http://tcninja.blogspot.com --~--~-~--~~~---~--~~ 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: Stack overflow at line :0 (Hosted mode memory error)
Yeah, it doesn't seem to cause any problems but it sure is annoying. I guess using the trunk build would be less traumatic than switching to linux. Someday hopefully we'll all be on linux but we're not quit there yet. Trevis On Jul 28, 12:24 pm, Paul Robinson ukcue...@gmail.com wrote: You could use trunk instead of GWT 1.7, and then use OOPHM so you can use firefox for hosted mode.http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHM Apart from being annoying, I found that error message didn't cause any problems. I stopped using windows though, so the problem went away :) HTH Paul Trevis wrote: I've been developing in GWT for about 3 weeks now. At first i just wanted to get my feet wet and maybe port a minor dynamic piece of my site to GWT but i'm so blown away by the technology that i'm considering a full UI port. So far the one issues that i can not seem to resolve is this Stack overflow at line :0 popup message that happens when i launch the code in hosted mode. I know that i'm not the only one who has the problem and i've seen blog posts where people talk about having resolved it by modifying the memory settings that it uses but nothing seems to work for me. I'm using Eclipse and have seen this message with GWT 1.6 and 1.7. The hosted browser takes a long time to render my content and then i get that popup. It works fine if i compile it and hit it with a real browser. It seems strange to me that the popup says Microsoft Internet Explorer but i guess that's what's being launched internally. How do i make this go away? --~--~-~--~~~---~--~~ 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 analytics integration
I have not implemented Analytics in GWT yet, but it seems that unless you want to track dynamic pages inside your GWT app, you may just include the urchin.js script plus the trigger scriptlet (possibly wrapped in try { } catch) in you host HTML page. On Jul 28, 7:22 pm, makoki iagoto...@gmail.com wrote: We had recently discovered a bug in our application that came out to be a problem with google analytics integration and liked to know if someone had any idea for a better way to integrate GA with GWT. We've been using GA in out GWT application for quite a time (nearly a year) without a problem but today we discovered that there's a problem with IE6 and GA when we browse the application through localhost or any hostname that hasn't a complete domain (i.e. example.com) so browsing our app throughhttp://localhost/myapporhttp://netbiosname/myapp raises the problem otherwise the integration works seamlesly, if we use the IP or the public domain. We've been tracking down the problem until we found it was the _trackEvent(c,v,d,b) method of GA that was causing the problem (we've found it empirically :P) We've used this explanation to integrate google analyticshttp://code.google.com/p/gwt-examples/wiki/project_UrchinTracker The ga.js script we downloaded directly from google last november more or less and we're currently using GWT 1.7.0 , all is working fine except in the case explained above. Any idea what's happening? Any alternative to integrate GA? Thks --~--~-~--~~~---~--~~ 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 I invoke RPC Methods from Java
Thanks for the quick reply. Unfortunately I'm in a situation where I can't/shouldn't mess with the GWT application that I'm trying to call remotely. It is a 3rd party app that is distributed in WAR form. I'd rather not have to crack it open and add a SOAP interface into it. Do you know of any documentation that details how I can format a POST request to a GWT RPC service? Thanks On Jul 29, 10:11 am, Trevis trevistho...@gmail.com wrote: I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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: declarative way to build/layout UI
Hi Brett, I've already designed, implemented and used a similar framework - use XML to configure and drive Java components into an UI (not related to GWT). In the end, you may come to an conclusion, that configuring Java with XML is not the right thing to do, because you are losing the static typing and the self awarenness of the Java language, so well supported by tools like Ecplise. Imagine the XML reaching sizable proportions - how manageable will it be? In Eclipse, you do Ctrl+T on a type or function, Ctrl+Alt+H on a function, or a Java-search on a type and you know everything. You can also refactor, etc. Whith XML approach, you first need to evolve the supporting tools, and it could be a long path. This is not to discourage you, just to (possibly) provide some insight I've learned by experience. I currently use java annotations where possible, altough they are a bit limited, mainly because they don't support inheritance, and cannot be instantiated. But annotations stay glued to the Java code, so if it changes, the annotations adapt (or break visibly). J. On Jul 15, 5:40 am, brett.wooldridge brett.wooldri...@gmail.com wrote: On second reading, what is that UIBinder doesn't do that you want it to do? It can do layout: ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' g:HTMLPanel Hello, g:ListBox ui:field='listBox'/. /g:HTMLPanel /ui:UiBinder And even raw layout: ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' div Hello, span ui:field='nameSpan'/. /div /ui:UiBinder It instantiates the controls (ListBox in this case), and automatically binds them to annotated fields: @UiField ListBox listBox; Certainly because nobody outside of Google has seen UIBinder it is early to say what it is or is not capable of, but from my reading of the proposal it would seem the basics of layout, instantiation, and initialization are covered. If you want code-generation and the ability to intermingle layout with code in the same file, certainly UIBinder isn't the tool, but I would argue that's because doing so isn't best practice. On Jul 15, 12:27 pm, brett.wooldridge brett.wooldri...@gmail.com wrote: If that's what you're after, I would suggest looking at Kiyaa. It seems the most robust implementation out there. On Jul 14, 11:28 pm, Ainata-Leb kassem.alsayed@gmail.com wrote: Thanks for the info guys, but with the UIBinder it looks like we are going back to html. What about instantiation/initialization/laying out GWT widgets? Thanks. On Jul 13, 8:50 am, brett.wooldridge brett.wooldri...@gmail.com wrote: I'm waiting for UIBinder as well, but this project seems full featured and was used on a large project: http://code.google.com/p/kiyaa/ If the Google guys can't surface UIBinder soon, I may bite the bullet and use Kiyaa now and convert later. The markup looks fairly similar between them. Brett On Jul 13, 5:52 pm, mars1412 martin.trum...@24act.at wrote: maybe UI-binder is what you are looking for:http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder On Jul 12, 4:38 pm, Ainata-Leb kassem.alsayed@gmail.com wrote: Is the GWT team working on a declarative way to build/layout UI? Some XML based way similar to Flex MXML. Or does anyone know if there is a GWT lib that does that? --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
If you're using RPC, then you should make sure that your server will only throw exceptions that are declared in the throws cause of the service interface method (or exceptions that are a subtype of whatever is declared). This means catching exceptions server-side and re-throwing an appropriate exception, as well as making sure there's a throws clause on your service interface methods. Gerasimos Tzoganis wrote: No one has an answer to this? It is part of my application to show to the user exactly the error, eg because perhaps he has submitted a misformed query, like in the error log I have atached. Can't I get this somehow to te client side? Date: Tue, 28 Jul 2009 16:00:45 -0700 Subject: Handling servre side exceptions and displaying precise error messages on the client From: geras...@hotmail.com To: Google-Web-Toolkit@googlegroups.com I am trying to create an application using jena API and gwt. How can I get an exception from the server log displayed on the client? To be more specific: Right now I get on the client the standard message of unexpected exceptions com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details. On the server log: [WARN] StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.diplomatiki.mypackage.client.MyService.myMethod2 (java.lang.String,java.lang.String)' threw an unexpected exception: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS ... ... Caused by: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java: 95) at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java: 39) at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:129) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31) I want to display the actual error on the client side (or even better a description of my own), is that possible? I have read the documentation and found no way to do this. I searched the forum and there was a solution based on serializableexception, which is deprecated now. Please help me with this one, I would appreciate it much. Thanks, Gerasimos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Problem with serializing Date in map
The problem with 'Object' stuffed into a type you send via RPC is, that you can then use this 'Object' to transfer only types otherwise found and thus known by the RPC registry. You can create a dummy function in your RPC service, give it a parameter class Dummy, and in this class you can enumerate (by a simple field member declaration) all the types of objects you want to be able to carry in the 'Object' reference above. That way the RPC registry will learn about them. On Jul 25, 7:24 am, ramraj sriramaraju2...@gmail.com wrote: Hi all, I am new to this rpc,i facing a problem with Date type,I have one methods that takes MapString,Object argument,when i am trying to send to Date as value for that map i am getting exception like java.lang.reflect.InvocationTargetException java.lang.AssertionError: Not enough methods, expecting 3 saw 2 If a change to MapString,Date it is working fine please give suggessions, --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
declare you own IsSerializable exception type, catch exceptions in server code, and then throw this exception with a message for the client (catch it on the client side). I am currently thinking about how to best transfer exceptions from client code into the server - one can't rely on users to report all the client problems. On Jul 29, 1:00 am, gerry geras...@hotmail.com wrote: I am trying to create an application using jena API and gwt. How can I get an exception from the server log displayed on the client? To be more specific: Right now I get on the client the standard message of unexpected exceptions com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details. On the server log: [WARN] StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.diplomatiki.mypackage.client.MyService.myMethod2 (java.lang.String,java.lang.String)' threw an unexpected exception: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS ... ... Caused by: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java: 95) at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java: 39) at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:129) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31) I want to display the actual error on the client side (or even better a description of my own), is that possible? I have read the documentation and found no way to do this. I searched the forum and there was a solution based on serializableexception, which is deprecated now. Please help me with this one, I would appreciate it much. Thanks, Gerasimos --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
Thanks a lot. The problem is that I can't put a throw clause in the service interface method (on the client side), because the exceptions I am interesting in are not part of gwt, but of the jena API (so there will be the error : [ERROR] Line 19: No source code is available for type com.hp.hpl.jena.query.QueryParseException; did you forget to inherit a required module?) But I threw the exception only on the service implementation method, without prior declaration in the interface method) and that seems to work so far. I hope this will do. Date: Wed, 29 Jul 2009 16:36:57 +0100 From: ukcue...@gmail.com To: Google-Web-Toolkit@googlegroups.com Subject: Re: Handling servre side exceptions and displaying precise error messages on the client If you're using RPC, then you should make sure that your server will only throw exceptions that are declared in the throws cause of the service interface method (or exceptions that are a subtype of whatever is declared). This means catching exceptions server-side and re-throwing an appropriate exception, as well as making sure there's a throws clause on your service interface methods. Gerasimos Tzoganis wrote: No one has an answer to this? It is part of my application to show to the user exactly the error, eg because perhaps he has submitted a misformed query, like in the error log I have atached. Can't I get this somehow to te client side? Date: Tue, 28 Jul 2009 16:00:45 -0700 Subject: Handling servre side exceptions and displaying precise error messages on the client From: geras...@hotmail.com To: Google-Web-Toolkit@googlegroups.com I am trying to create an application using jena API and gwt. How can I get an exception from the server log displayed on the client? To be more specific: Right now I get on the client the standard message of unexpected exceptions com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details. On the server log: [WARN] StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.diplomatiki.mypackage.client.MyService.myMethod2 (java.lang.String,java.lang.String)' threw an unexpected exception: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS ... ... Caused by: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java: 95) at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java: 39) at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:129) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31) I want to display the actual error on the client side (or even better a description of my own), is that possible? I have read the documentation and found no way to do this. I searched the forum and there was a solution based on serializableexception, which is deprecated now. Please help me with this one, I would appreciate it much. Thanks, Gerasimos _ Έχετε Messenger; Έχετε και Windows Live. Μάθετε περισσότερα. http://microsoft.com/windows/windowslive --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
Thanks for your help, it works now. I didn't throw the exception in the client's interface service method as this would cause an error, I threw it only in the implemented method on the server and returned the message to the client. It seems to work. I don't actually want users to report all the client problems, I just want them to give an error report like your query was misformed, type it again correctly. Thanks! Date: Wed, 29 Jul 2009 08:44:21 -0700 Subject: Re: Handling servre side exceptions and displaying precise error messages on the client From: juraj.vi...@gmail.com To: Google-Web-Toolkit@googlegroups.com declare you own IsSerializable exception type, catch exceptions in server code, and then throw this exception with a message for the client (catch it on the client side). I am currently thinking about how to best transfer exceptions from client code into the server - one can't rely on users to report all the client problems. On Jul 29, 1:00 am, gerry geras...@hotmail.com wrote: I am trying to create an application using jena API and gwt. How can I get an exception from the server log displayed on the client? To be more specific: Right now I get on the client the standard message of unexpected exceptions com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details. On the server log: [WARN] StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.diplomatiki.mypackage.client.MyService.myMethod2 (java.lang.String,java.lang.String)' threw an unexpected exception: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS ... ... Caused by: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java: 95) at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java: 39) at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:129) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31) I want to display the actual error on the client side (or even better a description of my own), is that possible? I have read the documentation and found no way to do this. I searched the forum and there was a solution based on serializableexception, which is deprecated now. Please help me with this one, I would appreciate it much. Thanks, Gerasimos _ Με το Windows Live, μπορείτε να οργανώνετε, να επεξεργάζεστε και να μοιράζεστε τις φωτογραφίες σας. http://www.microsoft.com/hellas/windows/windowslive/products/photo-gallery-edit.aspx --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
Catch all exceptions in the server, and throw a new exception in its place that the client can handle. You might like to create an exception class, put that into the throws clause, then then only throw that class or subclasses of it. try { doSomething(); } catch (QueryParseException qpe) { throw new MyException(qpe.getMessage()); } Gerasimos Tzoganis wrote: Thanks a lot. The problem is that I can't put a throw clause in the service interface method (on the client side), because the exceptions I am interesting in are not part of gwt, but of the jena API (so there will be the error : [ERROR] Line 19: No source code is available for type com.hp.hpl.jena.query.QueryParseException; did you forget to inherit a required module?) But I threw the exception only on the service implementation method, without prior declaration in the interface method) and that seems to work so far. I hope this will do. Date: Wed, 29 Jul 2009 16:36:57 +0100 From: ukcue...@gmail.com To: Google-Web-Toolkit@googlegroups.com Subject: Re: Handling servre side exceptions and displaying precise error messages on the client If you're using RPC, then you should make sure that your server will only throw exceptions that are declared in the throws cause of the service interface method (or exceptions that are a subtype of whatever is declared). This means catching exceptions server-side and re-throwing an appropriate exception, as well as making sure there's a throws clause on your service interface methods. Gerasimos Tzoganis wrote: No one has an answer to this? It is part of my application to show to the user exactly the error, eg because perhaps he has submitted a misformed query, like in the error log I have atached. Can't I get this somehow to te client side? Date: Tue, 28 Jul 2009 16:00:45 -0700 Subject: Handling servre side exceptions and displaying precise error messages on the client From: geras...@hotmail.com To: Google-Web-Toolkit@googlegroups.com I am trying to create an application using jena API and gwt. How can I get an exception from the server log displayed on the client? To be more specific: Right now I get on the client the standard message of unexpected exceptions com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details. On the server log: [WARN] StandardContext[]Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.diplomatiki.mypackage.client.MyService.myMethod2 (java.lang.String,java.lang.String)' threw an unexpected exception: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS ... ... Caused by: com.hp.hpl.jena.query.QueryParseException: Lexical error at line 1, column 10. Encountered: EOF after : dfasfFSFS at com.hp.hpl.jena.sparql.lang.ParserSPARQL.perform(ParserSPARQL.java: 95) at com.hp.hpl.jena.sparql.lang.ParserSPARQL.parse(ParserSPARQL.java: 39) at com.hp.hpl.jena.query.QueryFactory.parse(QueryFactory.java:129) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:72) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:43) at com.hp.hpl.jena.query.QueryFactory.create(QueryFactory.java:31) I want to display the actual error on the client side (or even better a description of my own), is that possible? I have read the documentation and found no way to do this. I searched the forum and there was a solution based on serializableexception, which is deprecated now. Please help me with this one, I would appreciate it much. Thanks, Gerasimos --~--~-~--~~~---~--~~ 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: Handling servre side exceptions and displaying precise error messages on the client
I will raise a minor point relaying back EXACT exceptions, with all failure information, is not a good idea in a production environment. This is generally what we call Exception Information Leakage - it exposes the underlying implementation of your servers architecture, and certain errors are enough to give away potential sensitive information useful to compromise your system. One site I was using, when a DB access failed, the DB user and password in the exception!!! ;-) --~--~-~--~~~---~--~~ 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 I invoke RPC Methods from Java
I'm still pretty new to GWT but i'd probably start by watching the messages in firebug (the firefox plugin) to see exactly what's going back and forth. Trevis On Jul 29, 10:23 am, Steve stever...@gmail.com wrote: Thanks for the quick reply. Unfortunately I'm in a situation where I can't/shouldn't mess with the GWT application that I'm trying to call remotely. It is a 3rd party app that is distributed in WAR form. I'd rather not have to crack it open and add a SOAP interface into it. Do you know of any documentation that details how I can format a POST request to a GWT RPC service? Thanks On Jul 29, 10:11 am, Trevis trevistho...@gmail.com wrote: I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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: Save form data
I dont have an example handy but i have to imagine that there are plenty out there. Sounds like you already have GWT creating the forms, so i assume that you are setting the encoding type and post method already. I guess you have also created a FormHandler and added that to your FormPanel. Form there, GWT is (can be) out of the equation. The responding server can be anything. All you should have to do is call setName() on your form elements and your server should be none the wiser that you are using GWT on the front. (I have not implemented this yet myself as i am deeply in love with RPC, but i have been reading about using traditional forms with GWT because i need to implement image uploading which i plan to do with Apache Commons fileUpload) Trevis On Jul 29, 6:47 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote: Hi I want to save some form data into my database my forms are generated using GWT and i already have code that interacts with my database, now my question is how do i interact with this code ... is RPC the only way to do it in GWT or is there any other way to integrate my gwt UI to this my existing code can save to the database and retrive information so all i need to do is send the info to it using the form generated in GWT any examples with regards to this are welcome thanks Jeremiah Moses --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Admin Area protected by simple scripted password in GWT
Hello everyone, I'm trying to figure out how to create a small Admin Area protected by a password (that could be hardcoded or stored in a xml file, it doesn't matter) inside my application. My application is basically a TabbedPanel that contains 4 or 5 panels, some of them communicates with plain Java servlets and so on. Now, what i need to do is a simple form that can authenticate the admin and let him upload some files and do some other things. What i wanted to do is to create another GWT class with some widgets inside, but i don't know what is the best (or simply the easiest) way to do that. I read about using Basic or Form Tomcat Authentication, but in my case is not possible (is it?) due to the fact that if I add the Admin Area like a new Tab inside the TabbedPanel, with tomcat auth, every user that would like to use my app should authenticate himself (what i learned is that with tomcat auth you choose an entire page to protect). Yet, if i make another Module or try to set another Entry point (didn't understand well how), using the Admin Area like another application, would be more complex, and i'd prefer to create a unique application. I was wondering if i could use plain Java servlets, GWT servlets (async ones), because i know that with php it would be easy to make but i don't know how to mix php with gwt so i'd prefere to use another method. I hope i explained myself well, if you need any further explanation i will give you as soon as possible. Regards Nickelnext --~--~-~--~~~---~--~~ 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: onSubmitComplete is not working with GWT Showcase
Shot in the dark here but the first thing i would check is are you setting the method type on your form panel? Sounds like you need to set it to POST. (FromPanel.METHOD_POST constant is defined for doing this) Trevis On Jul 28, 10:15 pm, Simon choonchin...@gmail.com wrote: Hi all, I have a problem regarding FormPanel. Initially, i am working on default GWT application for submit text through textarea and upload file to server, all the events are handled by servlet, works pretty fine. However, when i switched to using the GWT Showcase framework (http://gwt.google.com/samples/Showcase/Showcase.html), all my FormPanel events having problem on onSubmitComplete, it is no respond at all. But if i try to send the request through URL, the servlet is responded and all the parameters displayed as predicted. Second thing, when i try compile and browse in the default IE browser (Chrome), i click the submit button, it popup a new page and show the correct servlet url, but the content is HTTP ERROR: 405 HTTP method Get is not supported by this url RequestURI=.readmesystem/textarea Powered by Jetty:// again, i try insert some parameters after textarea?Variable=Hello, servlet is just working fine. I try search the forum and i found this issue (http://code.google.com/ p/google-web-toolkit/issues/detail?id=528), i try to remove the history support in the Showcase.java History,addValueChangeHandler (historyHandler), it popop up more error, so i give up this method. Therefore, can someone give me guidance about this issue. Thanks in 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: Handling servre side exceptions and displaying precise error messages on the client
That's a good point. I think the previous solution of throwing a new customised exception when an exception is caught on the server handles with this issue. Besides, it is necessary for my application to inform the user that he has submitted a misformed query, and that he needs to reform it. So it is necessary to return an appropriate message to the client. Date: Wed, 29 Jul 2009 09:48:07 -0700 Subject: Re: Handling servre side exceptions and displaying precise error messages on the client From: deansjo...@gmail.com To: Google-Web-Toolkit@googlegroups.com I will raise a minor point relaying back EXACT exceptions, with all failure information, is not a good idea in a production environment. This is generally what we call Exception Information Leakage - it exposes the underlying implementation of your servers architecture, and certain errors are enough to give away potential sensitive information useful to compromise your system. One site I was using, when a DB access failed, the DB user and password in the exception!!! ;-) _ Έχετε Messenger; Έχετε και Windows Live. Μάθετε περισσότερα. http://microsoft.com/windows/windowslive --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
I take it that regular users for your application dont have to authenticate, but you want the admin to login and then show him or her a different view (a view with an admin tab)? The question is kind of broad, i mean allowing a user to login is pretty much nuts and bolts stuff. You put together a widget with text and password fields, give them a button to click (or respond to the enter key) and then make an RPC call to the server where you'd authenticate them (using a db, text file or hard coded value or whatever you want). Once the RPC call returns successfully you can rebuild the tabs or just add the admin tab. Should be pretty straight forward. Do you have a more specific problem? Trevis On Jul 29, 12:00 pm, Nickelnext nickeln...@gmail.com wrote: Hello everyone, I'm trying to figure out how to create a small Admin Area protected by a password (that could be hardcoded or stored in a xml file, it doesn't matter) inside my application. My application is basically a TabbedPanel that contains 4 or 5 panels, some of them communicates with plain Java servlets and so on. Now, what i need to do is a simple form that can authenticate the admin and let him upload some files and do some other things. What i wanted to do is to create another GWT class with some widgets inside, but i don't know what is the best (or simply the easiest) way to do that. I read about using Basic or Form Tomcat Authentication, but in my case is not possible (is it?) due to the fact that if I add the Admin Area like a new Tab inside the TabbedPanel, with tomcat auth, every user that would like to use my app should authenticate himself (what i learned is that with tomcat auth you choose an entire page to protect). Yet, if i make another Module or try to set another Entry point (didn't understand well how), using the Admin Area like another application, would be more complex, and i'd prefer to create a unique application. I was wondering if i could use plain Java servlets, GWT servlets (async ones), because i know that with php it would be easy to make but i don't know how to mix php with gwt so i'd prefere to use another method. I hope i explained myself well, if you need any further explanation i will give you as soon as possible. Regards Nickelnext --~--~-~--~~~---~--~~ 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: Save form data
...calling setName(foo) on things like TextBox will cause GWT to render an html input element with name=foo. On Jul 29, 11:59 am, Trevis trevistho...@gmail.com wrote: I dont have an example handy but i have to imagine that there are plenty out there. Sounds like you already have GWT creating the forms, so i assume that you are setting the encoding type and post method already. I guess you have also created a FormHandler and added that to your FormPanel. Form there, GWT is (can be) out of the equation. The responding server can be anything. All you should have to do is call setName() on your form elements and your server should be none the wiser that you are using GWT on the front. (I have not implemented this yet myself as i am deeply in love with RPC, but i have been reading about using traditional forms with GWT because i need to implement image uploading which i plan to do with Apache Commons fileUpload) Trevis On Jul 29, 6:47 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote: Hi I want to save some form data into my database my forms are generated using GWT and i already have code that interacts with my database, now my question is how do i interact with this code ... is RPC the only way to do it in GWT or is there any other way to integrate my gwt UI to this my existing code can save to the database and retrive information so all i need to do is send the info to it using the form generated in GWT any examples with regards to this are welcome thanks Jeremiah Moses --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
Hello You suggest that when the callback gets the Onsuccess and the user is valid, i can simply add a new tab or panele or whatever making the Admin Area visible? Your solution would be perfect, and i thought of it yet but my question is: isn't it easily hack-able? I mean, inside the javascript that gwt compiles there would be also the admin area, so a malicious user could, with some tricks, retrieve the content and do some ugly things with my app, couldn't he? What i mean is: is this easy and fast solution also secure? Would be the part of the admin area untouchable if the user doesn't authenticate himself or there should be a possibility? Because if i'm not wrong, the solution you suggest isn't like one with, for example, a PHP page that renders a new html page with the private content, but the content is himself into the Application, cause the Admin Area tab (or else) is in the client code (and so in whoever's open my app browser). Sorry for my bad bad english, hope you get the point. Thank you! Nickelnext --~--~-~--~~~---~--~~ 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: Multiple pages question
I think that the issue that you're running into here is one of mindset. Web developers think in terms of pages but a Swing/MFC/thick client developers dont. GWT is kind of a bridge between the two. From what i've seen, the GWT way of doing things is to clear out the visible components and render your new components to give the user a different view. (like you said) Now is your question how can i create these two views in separate java files (which is an architecture question) or how can i separate widget (element) composition from Java which is almost a philosophical question because GWT (at least as far as i've seen) is not designed to operate that way. (which i believe is a design feature, not an oversight) One other fly in the ointment that you may not have stumbled into yet which will blow your mind at first is using the back button. There is lots of documentation out there on using GWT History and it's really a different way of thinking coming from a web developer perspective. ...if you are asking the architecture question, so far i havent seen much yet on best practices for organizing your classes and widgets but you should start by searching for 'GWT Custom widgets' and specifically checking out the Composite class. That should get your started in how you can organize and compose your various views. Disclaimer... I've only been using GWT for about a month now but i've been doing Swing/Visual C++/VB gui's for a long time and to me GWT fits as naturally as anything i've ever seen from a web framework perspective. But it is very different from Swing, Spring MVC, JSF and the like. Trevis On Jul 29, 5:34 am, maarten.de...@gmail.com maarten.de...@gmail.com wrote: Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ 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 plugin for Eclipse 3.5 (Galileo)
On Jul 28, 10:14 pm, Juraj Vitko juraj.vi...@gmail.com wrote: If you know anything about software development, then you know that any and all development time estimation is just a wild guess. It is still a good practice to provide release estimates, whatever imprecise. I just finished one (not web oriented) project and would like to start a new one with GWT. I need to decide if to instal Eclipse 3.5 and wait for GWT plugin or go with Eclipse 3.4. As I want to read some literature before, waiting a week or more is not a problem. Not having this information, downgrading Eclipse to 3.4 and then upgrading it again within few days would be annoying. --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
Ah, I understand your concern. Hm. Maybe someone with more GWT experience can chime in on this but i'm thinking this. It's not like you have a simple hidden DIV in the browser that you're deciding to show dynamically. You have a javascript function that generates that div, which i'd imagine would be a lot tricker to hack (though probably not impossible if the hacker were properly motivated) Even still, what would the hacker have access to at that point? He'd see the admin tab... but what could he do with it? You should implement your security so that the admin RPC methods also require some kind of authentication. This way, a determined hacker may be able to see the tab but he still couldn't do anything with it. Not knowing your exact application, this may have other complications but that is the way that i'd probably be thinking of doing it. I'd love to hear some alternative solutions as i'm pretty much in the same boat as you are. I'm porting my first major application to GWT and i've been going with the assumption that server based security for the admin RPC's combined with obfuscated javascript will give me a similar level of security to what i would get by traditional means. (though arguably better since there will be no history trail to the admin pages left in the browser since gwt allows you to not cause any browser history footprint that you don't deliberately generate) On Jul 29, 12:27 pm, Nickelnext nickeln...@gmail.com wrote: Hello You suggest that when the callback gets the Onsuccess and the user is valid, i can simply add a new tab or panele or whatever making the Admin Area visible? Your solution would be perfect, and i thought of it yet but my question is: isn't it easily hack-able? I mean, inside the javascript that gwt compiles there would be also the admin area, so a malicious user could, with some tricks, retrieve the content and do some ugly things with my app, couldn't he? What i mean is: is this easy and fast solution also secure? Would be the part of the admin area untouchable if the user doesn't authenticate himself or there should be a possibility? Because if i'm not wrong, the solution you suggest isn't like one with, for example, a PHP page that renders a new html page with the private content, but the content is himself into the Application, cause the Admin Area tab (or else) is in the client code (and so in whoever's open my app browser). Sorry for my bad bad english, hope you get the point. Thank you! Nickelnext --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ This FAQ and the Security for GWT Applications article it links to should help. - Isaac On Wed, Jul 29, 2009 at 1:40 PM, Trevistrevistho...@gmail.com wrote: Ah, I understand your concern. Hm. Maybe someone with more GWT experience can chime in on this but i'm thinking this. It's not like you have a simple hidden DIV in the browser that you're deciding to show dynamically. You have a javascript function that generates that div, which i'd imagine would be a lot tricker to hack (though probably not impossible if the hacker were properly motivated) Even still, what would the hacker have access to at that point? He'd see the admin tab... but what could he do with it? You should implement your security so that the admin RPC methods also require some kind of authentication. This way, a determined hacker may be able to see the tab but he still couldn't do anything with it. Not knowing your exact application, this may have other complications but that is the way that i'd probably be thinking of doing it. I'd love to hear some alternative solutions as i'm pretty much in the same boat as you are. I'm porting my first major application to GWT and i've been going with the assumption that server based security for the admin RPC's combined with obfuscated javascript will give me a similar level of security to what i would get by traditional means. (though arguably better since there will be no history trail to the admin pages left in the browser since gwt allows you to not cause any browser history footprint that you don't deliberately generate) On Jul 29, 12:27 pm, Nickelnext nickeln...@gmail.com wrote: Hello You suggest that when the callback gets the Onsuccess and the user is valid, i can simply add a new tab or panele or whatever making the Admin Area visible? Your solution would be perfect, and i thought of it yet but my question is: isn't it easily hack-able? I mean, inside the javascript that gwt compiles there would be also the admin area, so a malicious user could, with some tricks, retrieve the content and do some ugly things with my app, couldn't he? What i mean is: is this easy and fast solution also secure? Would be the part of the admin area untouchable if the user doesn't authenticate himself or there should be a possibility? Because if i'm not wrong, the solution you suggest isn't like one with, for example, a PHP page that renders a new html page with the private content, but the content is himself into the Application, cause the Admin Area tab (or else) is in the client code (and so in whoever's open my app browser). Sorry for my bad bad english, hope you get the point. Thank you! Nickelnext --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
Some good info in that link, Isaac, thanks. Do NOT attempt to use the Cookie header to transfer the sessionID from GWT to the server; it is fraught with security issues that will become clear in the rest of this article. You MUST transfer the sessionID in the payload of the request. For an example of why this can fail, see CrossSiteRequestForgery. Hm. Well, ok then... i guess i should heed that warning. The article doesn't seem to directly address Nickelnext concern about having the admin content already in the browser though. I mean, once you compile the UI into javascript and the browser downloads it, everything that the view does is there in the browser. It seems pretty far out there that someone could use that obfuscated javascript mischievously but that's what hacking is all about, so i hear! Trevis On Jul 29, 12:46 pm, Isaac Truett itru...@gmail.com wrote: http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur... This FAQ and the Security for GWT Applications article it links to should help. - Isaac On Wed, Jul 29, 2009 at 1:40 PM, Trevistrevistho...@gmail.com wrote: Ah, I understand your concern. Hm. Maybe someone with more GWT experience can chime in on this but i'm thinking this. It's not like you have a simple hidden DIV in the browser that you're deciding to show dynamically. You have a javascript function that generates that div, which i'd imagine would be a lot tricker to hack (though probably not impossible if the hacker were properly motivated) Even still, what would the hacker have access to at that point? He'd see the admin tab... but what could he do with it? You should implement your security so that the admin RPC methods also require some kind of authentication. This way, a determined hacker may be able to see the tab but he still couldn't do anything with it. Not knowing your exact application, this may have other complications but that is the way that i'd probably be thinking of doing it. I'd love to hear some alternative solutions as i'm pretty much in the same boat as you are. I'm porting my first major application to GWT and i've been going with the assumption that server based security for the admin RPC's combined with obfuscated javascript will give me a similar level of security to what i would get by traditional means. (though arguably better since there will be no history trail to the admin pages left in the browser since gwt allows you to not cause any browser history footprint that you don't deliberately generate) On Jul 29, 12:27 pm, Nickelnext nickeln...@gmail.com wrote: Hello You suggest that when the callback gets the Onsuccess and the user is valid, i can simply add a new tab or panele or whatever making the Admin Area visible? Your solution would be perfect, and i thought of it yet but my question is: isn't it easily hack-able? I mean, inside the javascript that gwt compiles there would be also the admin area, so a malicious user could, with some tricks, retrieve the content and do some ugly things with my app, couldn't he? What i mean is: is this easy and fast solution also secure? Would be the part of the admin area untouchable if the user doesn't authenticate himself or there should be a possibility? Because if i'm not wrong, the solution you suggest isn't like one with, for example, a PHP page that renders a new html page with the private content, but the content is himself into the Application, cause the Admin Area tab (or else) is in the client code (and so in whoever's open my app browser). Sorry for my bad bad english, hope you get the point. Thank you! Nickelnext --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
The article doesn't seem to directly address Nickelnext concern about having the admin content already in the browser though. I mean, once you compile the UI into javascript and the browser downloads it, everything that the view does is there in the browser. It seems pretty far out there that someone could use that obfuscated javascript mischievously but that's what hacking is all about, so i hear! Right. Anything you write in client-side code is there, albeit obfuscated, for any user to see. So don't hard code the secret family recipe, write an RPC (or JSON, or whatever service) to request it from the server and send your session ID to the server in the request. And you'll probably want to do it all over a secure socket. On Wed, Jul 29, 2009 at 2:09 PM, Trevistrevistho...@gmail.com wrote: Some good info in that link, Isaac, thanks. Do NOT attempt to use the Cookie header to transfer the sessionID from GWT to the server; it is fraught with security issues that will become clear in the rest of this article. You MUST transfer the sessionID in the payload of the request. For an example of why this can fail, see CrossSiteRequestForgery. Hm. Well, ok then... i guess i should heed that warning. The article doesn't seem to directly address Nickelnext concern about having the admin content already in the browser though. I mean, once you compile the UI into javascript and the browser downloads it, everything that the view does is there in the browser. It seems pretty far out there that someone could use that obfuscated javascript mischievously but that's what hacking is all about, so i hear! Trevis On Jul 29, 12:46 pm, Isaac Truett itru...@gmail.com wrote: http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur... This FAQ and the Security for GWT Applications article it links to should help. - Isaac On Wed, Jul 29, 2009 at 1:40 PM, Trevistrevistho...@gmail.com wrote: Ah, I understand your concern. Hm. Maybe someone with more GWT experience can chime in on this but i'm thinking this. It's not like you have a simple hidden DIV in the browser that you're deciding to show dynamically. You have a javascript function that generates that div, which i'd imagine would be a lot tricker to hack (though probably not impossible if the hacker were properly motivated) Even still, what would the hacker have access to at that point? He'd see the admin tab... but what could he do with it? You should implement your security so that the admin RPC methods also require some kind of authentication. This way, a determined hacker may be able to see the tab but he still couldn't do anything with it. Not knowing your exact application, this may have other complications but that is the way that i'd probably be thinking of doing it. I'd love to hear some alternative solutions as i'm pretty much in the same boat as you are. I'm porting my first major application to GWT and i've been going with the assumption that server based security for the admin RPC's combined with obfuscated javascript will give me a similar level of security to what i would get by traditional means. (though arguably better since there will be no history trail to the admin pages left in the browser since gwt allows you to not cause any browser history footprint that you don't deliberately generate) On Jul 29, 12:27 pm, Nickelnext nickeln...@gmail.com wrote: Hello You suggest that when the callback gets the Onsuccess and the user is valid, i can simply add a new tab or panele or whatever making the Admin Area visible? Your solution would be perfect, and i thought of it yet but my question is: isn't it easily hack-able? I mean, inside the javascript that gwt compiles there would be also the admin area, so a malicious user could, with some tricks, retrieve the content and do some ugly things with my app, couldn't he? What i mean is: is this easy and fast solution also secure? Would be the part of the admin area untouchable if the user doesn't authenticate himself or there should be a possibility? Because if i'm not wrong, the solution you suggest isn't like one with, for example, a PHP page that renders a new html page with the private content, but the content is himself into the Application, cause the Admin Area tab (or else) is in the client code (and so in whoever's open my app browser). Sorry for my bad bad english, hope you get the point. Thank you! Nickelnext --~--~-~--~~~---~--~~ 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: Multiple pages question
You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Is there any performance advantage to Grid over FlexTable
If I know exactly how many rows and columns I need, is there any performance advantage to using the Grid widget over the FlexTable widget? Along the same lines, is there any advantage to using Grid over HorizontalPanel, or VerticalPanel? - - - - - - - - - - - - - - - - - - - - Pete Yorke Storke Brothers, LLC --~--~-~--~~~---~--~~ 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: Save form data
thanks for the response ... i have not made many of the forms made have been just playing around with gwt for the last couple of weeks ... been using simple forms ... and not got to point of writing a form handler yet ... been trying to find some example ... to make my job a bit easier ... specialy if it has maybe even a RPC implementation for a form ... thanks jeremiah On Wed, Jul 29, 2009 at 10:44 PM, Trevis trevistho...@gmail.com wrote: ...calling setName(foo) on things like TextBox will cause GWT to render an html input element with name=foo. On Jul 29, 11:59 am, Trevis trevistho...@gmail.com wrote: I dont have an example handy but i have to imagine that there are plenty out there. Sounds like you already have GWT creating the forms, so i assume that you are setting the encoding type and post method already. I guess you have also created a FormHandler and added that to your FormPanel. Form there, GWT is (can be) out of the equation. The responding server can be anything. All you should have to do is call setName() on your form elements and your server should be none the wiser that you are using GWT on the front. (I have not implemented this yet myself as i am deeply in love with RPC, but i have been reading about using traditional forms with GWT because i need to implement image uploading which i plan to do with Apache Commons fileUpload) Trevis On Jul 29, 6:47 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote: Hi I want to save some form data into my database my forms are generated using GWT and i already have code that interacts with my database, now my question is how do i interact with this code ... is RPC the only way to do it in GWT or is there any other way to integrate my gwt UI to this my existing code can save to the database and retrive information so all i need to do is send the info to it using the form generated in GWT any examples with regards to this are welcome thanks Jeremiah Moses --~--~-~--~~~---~--~~ 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: Project setup that allows working with both hosted mode and web mode side by side?
I solved the issue. This happened because I am using a different module for development to speed up compilation in web mode. Something like this: module rename-to='myModule' inherits name='my.company.gwt.MyModule'/ set-property name=user.agent value=gecko / set-property name=locale value=default / /module The problem was that in hosted mode I was still using the original module which lead to the exception I mentioned in the first post of this thread. Once I started hosted mode with this development module i.s.o. the original module the problem was resolved and I can now happily run hosted mode and web mode side by side. Rintcius --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mail Sample Code won't import.
I'm a noob. But I can read. I want to load the mail sample. I went to the readme.txt tried to follow the instructions... --- from readme.txt In Eclipse, go to the File menu and choose: File - Import... - Existing Projects into Workspace Browse to the directory containing this file, select Mail. Be sure to uncheck Copy projects into workspace if it is checked. Click Finish. --- nada. Try it. Let me know if it works for you. Because this doesn't make any sense to me. Help... Thanks, Howard --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Ext-GWT TreeGrid indirectly calls a GWT-RPC callback? Why?
I am using GWT-RPC to populate Ext-GWT TreeGrids with data from a server. I am using 4 callbacks to populate 6 TreeGrids. As the callback onSuccess function modifies the TreeGrid by inserting rows, the TreeGridView needs to render the rows. The callback class is called MainPnlSummaryTablesAsyncCallback. For some reason, when it needs to determine the TreeGridView's scroller's offsetHeight via JSNI, onSuccess or onFailure is called on another instance of the callback in the stack trace. A copy of the stack trace I encountered is below. Isn't this really weird? Why is this happening? FYI I am using Ext-GWT 2.0.1 and GWT 1.7.0 and I am using hosted mode browser to debug this, although I am pretty sure that this is an issue for web mode. PnlSummaryClientDebug_as10node6 [Java Application] com.google.gwt.dev.HostedMode at localhost:3595 Thread [main] (Suspended (breakpoint at line 403 in MainPage $MainPnlSummaryTablesAsyncCallback)) MainPage$8(MainPage $MainPnlSummaryTablesAsyncCallback).onSuccess (GWTPairAggregateStringGWTTable,AggregateStringGWTTable) line: 403 MainPage$8(MainPage $MainPnlSummaryTablesAsyncCallback).onSuccess(Object) line: 1 RequestCallbackAdapterT.onResponseReceived(Request, Response) line: 215 Request.fireOnResponseReceivedImpl(RequestCallback) line: 264 Request.fireOnResponseReceivedAndCatch(GWT $UncaughtExceptionHandler, RequestCallback) line: 236 Request.fireOnResponseReceived(RequestCallback) line: 227 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] [local variables unavailable] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 MethodAdaptor.invoke(Object, Object...) line: 103 IDispatchImpl.callMethod(CompilingClassLoader, Object, Variant[], MethodAdaptor) line: 126 IDispatchProxy.invoke(int, int, Variant[]) line: 155 IDispatchProxy(IDispatchImpl).Invoke(int, int, int, int, int, int, int, int) line: 294 IDispatchProxy(IDispatchImpl).method6(int[]) line: 194 COMObject.callback6(int[]) line: 117 COM.VtblCall(int, int, int, GUID, int, int, DISPPARAMS, int, EXCEPINFO, int[]) line: not available [native method] IDispatch.Invoke(int, GUID, int, int, DISPPARAMS, int, EXCEPINFO, int[]) line: 64 OleAutomation.invoke(int, int, Variant[], int[], Variant) line: 493 OleAutomation.invoke(int, Variant[]) line: 417 ModuleSpaceIE6.doInvokeOnWindow(OleAutomation, String, Variant[]) line: 68 ModuleSpaceIE6.doInvoke(String, Object, Class?[], Object []) line: 153 ModuleSpaceIE6(ModuleSpace).invokeNative(String, Object, Class?[], Object[]) line: 453 ModuleSpaceIE6(ModuleSpace).invokeNativeInt(String, Object, Class?[], Object[]) line: 207 JavaScriptHost.invokeNativeInt(String, Object, Class?[], Object[]) line: 75 Element$.getOffsetHeight$(Element) line: not available El.getHeight(boolean) line: 984 TreeGridView(BufferView).getVisibleRowCount() line: 313 TreeGridView(BufferView).doRender(ListColumnData, ListModelData, int, int, boolean, boolean) line: 189 TreeGridView(BufferView).doRender(ListColumnData, ListModelData, int, int, boolean) line: 181 TreeGridView(GridView).renderRows(int, int) line: 1559 TreeGridView(GridView).insertRows(ListStoreModelData, int, int, boolean) line: 1242 TreeGridView(GridView).onAdd(ListStoreModelData, ListModelData, int) line: 1293 GridView$5.storeAdd(StoreEventModelData) line: 1179 GridView$5(StoreListenerM).handleEvent(StoreEventM) line: 22 GridView$5(StoreListenerM).handleEvent(BaseEvent) line: 1 TreeGrid$2(BaseObservable).callListener (ListenerBaseEvent, BaseEvent) line: 176 TreeGrid$2(BaseObservable).fireEvent(EventType, BaseEvent) line: 96 TreeGrid$2(ListStoreM).insert(List? extends M, int, boolean) line: 467 TreeGrid$2(ListStoreM).insert(List? extends M, int) line: 266 TreeGridM.onAdd(TreeStoreEventM) line: 430 TreeGrid$1.storeAdd(StoreEventM) line: 123 TreeGrid$1(StoreListenerM).handleEvent(StoreEventM) line: 22 TreeGrid$1(StoreListenerM).handleEvent(BaseEvent) line: 1 TreeStoreM(BaseObservable).callListener (ListenerBaseEvent, BaseEvent) line: 176 TreeStoreM(BaseObservable).fireEvent(EventType, BaseEvent) line: 96 TreeStoreM.doInsert(TreeModel, ListTreeModel, int, boolean, boolean) line: 799 TreeStoreM.insert(ListM, int, boolean) line: 493 TreeStoreM.add(ListM, boolean) line: 163 TreeStoreM.add(M, boolean)
Re: could not add gin the project
No, I've got it there. And I'm sure I've done everything tutorial says I have to. What else cool be wrong? Could gin conflict with some other modules? My SearchModule.gwt.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE module PUBLIC -//Google Inc.//DTD Google Web Toolkit 1.7.0// EN http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro- source/core/src/gwt-module.dtd module rename-to='searchmodule' !-- Inherit the core Web Toolkit stuff.-- inherits name='com.google.gwt.user.User'/ !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines.-- inherits name='com.google.gwt.user.theme.standard.Standard'/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- !-- Other module inherits -- !-- Inherit GWTx -- inherits name='com.googlecode.gwtx.Java'/ inherits name='com.google.gwt.i18n.I18N'/ inherits name='com.google.gwt.inject.Inject'/ !-- Specify the app entry point class. -- entry-point class='ru.rchervot.sanasar.client.SearchModule'/ !-- Russian language, independent of country -- extend-property name=locale values=ru/ /module On Jul 28, 9:31 am, Norman Maurer nor...@apache.org wrote: You prolly missed to add the following line to your ProjectName.gwt.xml file: inherits name=com.google.gwt.inject.Inject/ Bye, Norman 2009/7/27 r...@n roman.chervot...@gmail.com: Hi, I've tried to add gin DI to the project, but have got an error below. I am using gwt 1.7.0 on linux + guice 2.0 + latest gin. I've followed all steps in gin tutorial, but when tried to run my app have got an exception. I could not understand what is wrong and where to look for a solution. Please help. Thanks in advance. [ERROR] Failed to create an instance of 'ru.rchervot.sanasar.client.SearchModule' via deferred binding java.lang.RuntimeException: Deferred binding failed for 'ru.rchervot.sanasar.client.MyWidgetGinjector' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java: 43) at com.google.gwt.core.client.GWT.create(GWT.java:91) at ru.rchervot.sanasar.client.SearchModule.init(SearchModule.java: 66) - SearchModule.java(SearchModule is my EntryPoint class) line 66: private final MyWidgetGinjector injector = GWT.create (MyWidgetGinjector.class); MyWidgetClientModule.java: public class MyWidgetClientModule extends AbstractGinModule { �...@override protected void configure() { bind(MainPresenter.Display.class).to(MainView.class); } } --~--~-~--~~~---~--~~ 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: Save form data
I think that you may be mixing things up a bit. RPC doesn't use true html forms. So what would look to a user to be a form in a typical GWT application would just be a group of input html elements and a button. The button doesnt submit a form, it has a click handler. The handler makes an RPC call to passing the user entered data to the server. GWT does have a FormPanel widget thought which allows you to make true HTML forms. Those can submit to any webserver configured to handle the http request. I think that these kinds of forms are included to support legacy back ends and to do things that GWT RPC cant like, oh say file upload. ymmv, i'm still pretty green with GWT but i'm coming up to speed. Trevis On Jul 29, 1:34 pm, Jeremiah Moses jeremiah.mo...@gmail.com wrote: thanks for the response ... i have not made many of the forms made have been just playing around with gwt for the last couple of weeks ... been using simple forms ... and not got to point of writing a form handler yet ... been trying to find some example ... to make my job a bit easier ... specialy if it has maybe even a RPC implementation for a form ... thanks jeremiah On Wed, Jul 29, 2009 at 10:44 PM, Trevis trevistho...@gmail.com wrote: ...calling setName(foo) on things like TextBox will cause GWT to render an html input element with name=foo. On Jul 29, 11:59 am, Trevis trevistho...@gmail.com wrote: I dont have an example handy but i have to imagine that there are plenty out there. Sounds like you already have GWT creating the forms, so i assume that you are setting the encoding type and post method already. I guess you have also created a FormHandler and added that to your FormPanel. Form there, GWT is (can be) out of the equation. The responding server can be anything. All you should have to do is call setName() on your form elements and your server should be none the wiser that you are using GWT on the front. (I have not implemented this yet myself as i am deeply in love with RPC, but i have been reading about using traditional forms with GWT because i need to implement image uploading which i plan to do with Apache Commons fileUpload) Trevis On Jul 29, 6:47 am, Jeremiah Moses jeremiah.mo...@gmail.com wrote: Hi I want to save some form data into my database my forms are generated using GWT and i already have code that interacts with my database, now my question is how do i interact with this code ... is RPC the only way to do it in GWT or is there any other way to integrate my gwt UI to this my existing code can save to the database and retrive information so all i need to do is send the info to it using the form generated in GWT any examples with regards to this are welcome thanks Jeremiah Moses --~--~-~--~~~---~--~~ 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: Stack overflow at line :0 (Hosted mode memory error)
Hi Trevis, If you're getting a stack overflow, you could try increasing the Java stack size using the -xss JVM argument. In Eclipse, open the launch configurations dialog (Run - Run Configurations...) and select your launch configuration from the tree on the left. Then switch to the Arguments tab and in the VM arguments field, add something like: -Xss512k This increases your stack size from the default (128k) to 512k. Let me know if that doesn't work for you... Keith On Tue, Jul 28, 2009 at 10:28 AM, Trevis trevistho...@gmail.com wrote: I've been developing in GWT for about 3 weeks now. At first i just wanted to get my feet wet and maybe port a minor dynamic piece of my site to GWT but i'm so blown away by the technology that i'm considering a full UI port. So far the one issues that i can not seem to resolve is this Stack overflow at line :0 popup message that happens when i launch the code in hosted mode. I know that i'm not the only one who has the problem and i've seen blog posts where people talk about having resolved it by modifying the memory settings that it uses but nothing seems to work for me. I'm using Eclipse and have seen this message with GWT 1.6 and 1.7. The hosted browser takes a long time to render my content and then i get that popup. It works fine if i compile it and hit it with a real browser. It seems strange to me that the popup says Microsoft Internet Explorer but i guess that's what's being launched internally. How do i make this go away? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Managing localized strings on both server and client
I have been extending the GWT Constants interface to manage my localized strings with great success on the client. However, there are strings on the server that must also be localized. It would be nice to share the constants between the client and server. Has anyone done this? If so, how? --~--~-~--~~~---~--~~ 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: CSS-ToolBar
Muhannad, Take a look at the CSS that is provided by the GWT team. They have 3 themes available. You can look at the rules they setup for the type button you are using (or want to model after). Look at the rules for the button-up-hover (or something similar to that). There you will find how the GWT team puts the borders on the buttons. Copy that to your button-up class and you should be all set. HTH, Chad On Jul 29, 3:47 am, Muhannad Nasser muhannadna...@gmail.com wrote: hi all the buttons in the grid panel does not have frame when the mouse is not over them, but when we put the mouse over the button the frame appears. i need to make the frame visible all the time even if the mouse is not over the button like the regular button. does anybody have an idea and can help me... thanks Muhannad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Add external java project to GWT project in Eclipse
Hello Brandon, I used the link source function in eclipse. I added all the projects this way. What exactly is your problem? Do you get any error message? What did you do to add the projects? On 29 Jul., 06:34, branflake2267 branflake2...@gmail.com wrote: Hi Martin, On including more than one project source into your gwt project, can you tell me what you did to get two projects to work together in GWT. I have been trying over and over to combine two projects up for some time, and have not been able to do it. Thanks, Brandon On Jul 21, 3:16 am, martinhansen martin.hanse...@googlemail.com wrote: Hello Jason, that did the trick! Thank you very much, it works fine now. Great! On 20 Jul., 23:43, Jason Parekh jasonpar...@gmail.com wrote: Hi Martin, For the Linked folder location, ensure you have the trailing src included. jason On Mon, Jul 20, 2009 at 4:35 PM, martinhansen martin.hanse...@googlemail.com wrote: Now I tried the link source function without Google App Engine. At first, it seems to work, and the project is added to my main project. The only problem is: The package declarations produce errors. Eclipse shows an error message: The declared package com.company.data does not match the expected package src.com.company.data What to do? On 20 Jul., 22:29, martinhansen martin.hanse...@googlemail.com wrote: Hello Donald, I already tried the Google App Engine approach, but it didn't work for me. And GAE adds a lot of stuff I don't need to my project. I really don't want to mess around with it, since I managed to kill my GWT app's configuration several times and I had to create a new project. Meanwhile, I tried the output folder approach. I tried to change the default output folder of DataProject, but I didn't manage successfully. Eclipse says: Path '/GwtApp/src' must denote location inside project 'DataProject'. Am I heading the wrong way there? On 20 Jul., 22:21, Donald W. Long donald.w.l...@gmail.com wrote: I looked at the linked source method and you have to have the linked source fully qualified. Thats nice if you always have your source in the same place. You could try using the linked variables but then thats also work. Do not see this as a real option forprojectsthat will be worked on by many developers at the same time. If I am wrong please let me know. Thanks Donald W. Long (donald.w.l...@thelongsfamily.com) On Jul 20, 1:34 pm, Jason Parekh jasonpar...@gmail.com wrote: Hi Martin, You may try using the link source option, as suggested by the thread athttp://groups.google.com/group/google-appengine-java/browse_thread/th.. .. If that doesn't work, you could set the output directory of your dependencies to be the GWT output folder. jason On Mon, Jul 20, 2009 at 12:14 PM, martinhansen martin.hanse...@googlemail.com wrote: Hello Sean, thank you very much. I've thought of that solution too, but it is not appropriate for my GWT project. I have to add 4 externalprojects to my GWT project, and all of these 4projectsare subject to change every day. It would be too much work to export them to a jar file every day. Is there some way to automatically add the external project sources to the GWT output folder? On 20 Jul., 18:03, Sean slough...@gmail.com wrote: You can export the non-GWT java files into a jar and drop those in the WEB-INF/lib folder. That's what I do. On Jul 20, 11:44 am, martinhansen martin.hanse...@googlemail.com wrote: Hello, my GWT server-side code needs an external java project. I have added the project under Configure build path /Projects. It works fine in hosted mode. But when I deploy my application on a server, I get lots of ClassNotFoundExceptions. Obviously, GWT cannot find the external java code. When I look at the war\WEB-INF\classes folder, I see that the external java classes have not been included. How can I get GWT to include the external classes?- 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: [ERROR] Line 3: The import java.math cannot be resolved
BigDecimal is not emulated in GWT and thus cannot be compiled to javascript. Have a look at what is available to you: http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html -jason On Jul 28, 2009, at 11:55 PM, akshi wrote: Hi Folks, I am using GWT as a beginner and at the time of using java.math.BigDecimal it gives me exception. Compiling module com.techjini.app.SwordFish Refreshing module from source Validating newly compiled units Removing units with errors [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/InvoiceService.java' [ERROR] Line 3: The import java.math cannot be resolved [ERROR] Line 13: BigDecimal cannot be resolved to a type Removing units with errors [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/invoice/CreateInvoice.java' [ERROR] Line 341: No source code is available for type java.math.BigDecimal; did you forget to inherit a required module? [ERROR] Errors in 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/InvoiceServiceAsync.java' [ERROR] Line 10: No source code is available for type java.math.BigDecimal; did you forget to inherit a required module? Removing invalidated units [WARN] Compilation unit 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/invoice/InvoiceScreen.java' is removed due to invalid reference(s): [WARN] file:/D:/dev/GWT/gwt_workspace/SwordFish/src/com/ techjini/app/client/invoice/CreateInvoice.java [WARN] Compilation unit 'file:/D:/dev/GWT/gwt_workspace/ SwordFish/src/com/techjini/app/client/SwordFish.java' is removed due to invalid reference(s): [WARN] file:/D:/dev/GWT/gwt_workspace/SwordFish/src/com/ techjini/app/client/invoice/InvoiceScreen.java Computing all possible rebind results for 'com.techjini.app.client.SwordFish' Rebinding com.techjini.app.client.SwordFish Checking rule generate-with class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/ [ERROR] Unable to find type 'com.techjini.app.client.SwordFish' [ERROR] Hint: Previous compiler errors may have made this type unavailable [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Following is the code : Model class : import java.math.BigDecimal; import java.util.Date; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.google.appengine.api.datastore.Blob; import com.techjini.app.server.util.DateUtil; @PersistenceCapable(identityType=IdentityType.APPLICATION) public class Invoice { public static final Short ACTIVE_STATUS = 1; public static final Short INACTIVE_STATUS = 2; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long invoiceId; @Persistent private ClientCustomer clientCustomer; @Persistent private InvoiceTemplate invoiceTemplate; @Persistent private InvoiceSetting invoiceSetting; @Persistent private Date dueDate; @Persistent private Date invoiceDate; @Persistent private BigDecimal amount; @Persistent private Short InvoiceStatus; @Persistent private Blob invoiceContent; @Persistent private Date createdAt; @Persistent private Long createdBy; @Persistent private Date lastUpdatedAt; @Persistent private Long lastUpdatedBy; @Persistent private boolean isDeleted; @Persistent private Integer version; public Invoice(Long clientCustomerId, Date dueDate, Date invoiceDate, BigDecimal amount, Short invoiceStatus) { this.amount = amount; this.createdAt = DateUtil.getCurrentDate(); this.dueDate = dueDate; this.invoiceDate = invoiceDate; this.lastUpdatedAt = DateUtil.getCurrentDate(); this.InvoiceStatus = invoiceStatus; } // and getter setter of the fields } Interface : import java.math.BigDecimal; import java.util.Date; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath(createInvoice) public interface InvoiceService extends RemoteService { String createInvoice(String invoiceNo, Long clientCustomerId, Date dueDate, Date invoiceDate, BigDecimal amount ) throws Throwable; } import
Re: Can I invoke RPC Methods from Java
I tried using firebug, unfortunately the POST request data has some unreadable characters, which doesn't really help me all that much. Anyone have any hints for deciphering the POST request? Thanks, Steve On Jul 29, 11:50 am, Trevis trevistho...@gmail.com wrote: I'm still pretty new to GWT but i'd probably start by watching the messages in firebug (the firefox plugin) to see exactly what's going back and forth. Trevis On Jul 29, 10:23 am, Steve stever...@gmail.com wrote: Thanks for the quick reply. Unfortunately I'm in a situation where I can't/shouldn't mess with the GWT application that I'm trying to call remotely. It is a 3rd party app that is distributed in WAR form. I'd rather not have to crack it open and add a SOAP interface into it. Do you know of any documentation that details how I can format a POST request to a GWT RPC service? Thanks On Jul 29, 10:11 am, Trevis trevistho...@gmail.com wrote: I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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 I invoke RPC Methods from Java
RPC data is not synchronous, meaning an object moving from the client to the server (javascript to java) looks different than one moving from the server to the client (java to javascript). This complicates attempting to perform a java to java type of scenario. That said, it is not impossible, but it is fragile. The RPC format is mostly undocumented primarily due to the fact that it is still being tweaked between releases. This means that anything you write now could very well not work in a newer version of GWT. This isn't an issue with GWT itself as the serializers are generated at compile time. if you want to see how it all works, you could add the -gen flag to the GWTCompiler and it'll store the generated serialization code, and you could perhaps use that to aid your development. -jason On Jul 29, 2009, at 9:23 AM, Steve wrote: Thanks for the quick reply. Unfortunately I'm in a situation where I can't/shouldn't mess with the GWT application that I'm trying to call remotely. It is a 3rd party app that is distributed in WAR form. I'd rather not have to crack it open and add a SOAP interface into it. Do you know of any documentation that details how I can format a POST request to a GWT RPC service? Thanks On Jul 29, 10:11 am, Trevis trevistho...@gmail.com wrote: I'm also pretty new to GWT and your scenario never occurred to me. Generally i think that it's probably not the greatest idea to try and call the GWT RPC's from a different front end and i've not come across anything that would give you a wsdl (or something like a wsdl) that you could use from non GWT java app. But, i cant think of any reason why you couldnt make it work. The RPC calls are just HTTP Post requests which receive a JSON response. Introducing JSON into a non web app seems like a red flag to me but if you really wanted to do it, you should be able to convert those into java objects. I *think* that a better solution might be to just rewrite a SOAP based webservice layer that uses the same code that the GWT services calls. That's not a great solution either since it introduces duplication but perhaps a better way to go would be to port the logic to a SOAP based webservice layer and then call the SOAP service from the GTW RPC server so that the logic only exists in one place. Just a thought, ymmv. On Jul 29, 9:38 am, Steve stever...@gmail.com wrote: Hello All, I'm new to GWT so please forgive me if there is some obvious answer to my problem. I googled around for this information and came up dry. Here is my problem. There is an existing GWT Application that I want to leverage in a new application that I am building. This GWT app uses RPC. I was hoping to find a way to call some of its RPCs from a seperate non-GWT Java application. I am more familiar with using SOAP services, which provides a way to generate a client from a service description (WSDL). Is there anything similar for GWT's RPC? If there isn't, does anyone know if it is possible to create the POSTs to the GWT servlet by hand? Are there any utilities for this? Thanks, Steve --~--~-~--~~~---~--~~ 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: Multiple pages question
Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ 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: API Document
Javadocs are included when you download the toolkit. http://code.google.com/p/google-web-toolkit/downloads/list On Tue, Jul 28, 2009 at 9:27 AM, Karthiseenukar...@gmail.com wrote: Hi where can I download API document for GWT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
ensureDebugId(String) doesn't set IDs
I, like many others am trying to use Selenium to test my GWT application. Unlike the others, though, I am having a much harder time using the ensureDebugId(String) method. What is funny is that I am succeeding in setting the ID in some places but not in others. My gwt.xml file includes the requisite statement: inherits name=com.google.gwt.user.Debug/, However, the following code doesn't set the ID of the TabPanel or the widget: TabPanel tabPanel = new TabPanel(); tabPanel.ensureDebugId(main-menu); widget.ensureDebugId(widget.getName() + -button); tabPanel.add(widget, widget.getName()); There is a lot more going on in my application than what is listed here, but I do not set IDs explicitly anywhere in my code. After compiling the application there are no IDs that exist in the generated source despite these statements in my code. However, for the following code: RootPanel MENU_PANEL = RootPanel.get(gwtMainMenu); menuPanel.ensureDebugId(menu-panel); The ID 'gwt-debug-menu-panel' appears as expected. I haven't tried definitively, but I think the same thing happens with setID(). So this may not be a problem only related to ensureDebugId (String), but the way I set my IDs in general. However, I am looking to use the ensureDebugId method--not the setID() when I create IDs for Selenium. Why the 'work-sometimes' behaviour? Is there an order that I should be worried about? Any help would be appreciated... Stephen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Visualization annotatedtimeline errors
I'm trying to add an annotated time line to a disclosure panel but I get the following error: [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (Error): number: 0 description: at com.google.gwt.visualization.client.visualizations.Visualization.draw (Native Method) at com.google.gwt.visualization.client.visualizations.Visualization.onLoad (Visualization.java:116) at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:264) at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java: 165) at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:259) at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java: 165) at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:259) at com.google.gwt.user.client.ui.Panel.doAttachChildren(Panel.java: 165) at com.google.gwt.user.client.ui.Widget.onAttach(Widget.java:259) at com.google.gwt.user.client.ui.Composite.onAttach(Composite.java: 102) at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:393) at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:119) at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java: 86) at com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java: 80) at edu.sccoos.gwt.piers.client.PiersGWT$1.run(PiersGWT.java:76) at com.google.gwt.ajaxloader.client.ExceptionHelper.runProtected (ExceptionHelper.java:36) Here is my code: package edu.sccoos.gwt.piers.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.DialogBox; import com.google.gwt.user.client.ui.DisclosurePanel; import com.google.gwt.user.client.ui.Grid; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.ListBox; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.visualization.client.AbstractDataTable; import com.google.gwt.visualization.client.DataTable; import com.google.gwt.visualization.client.AbstractDataTable.ColumnType; import com.google.gwt.visualization.client.VisualizationUtils; import com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine; import com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine.AnnotatedLegendPosition; import com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine.Options; /** * Entry point classes define codeonModuleLoad()/code. */ public class PiersGWT implements EntryPoint { /** * The message displayed to the user when the server cannot be reached or * returns an error. */ private static final String SERVER_ERROR = An error occurred while + attempting to contact the server. Please check your network + connection and try again.; /** * This is the entry point method. */ public void onModuleLoad() { Runnable onLoadCallback = new Runnable(){ public void run(){ final DisclosurePanel viewPlots = new DisclosurePanel(Click to view plots); final VerticalPanel plotPanels = new VerticalPanel(); final ListBox metsList = new ListBox(); metsList.addItem(Water Temperature,1); metsList.addItem(Chlorophyll,2); metsList.addItem(Water Pressure,3); plotPanels.add(metsList); final AnnotatedTimeLine myplot = new AnnotatedTimeLine(createTable (), createOptions(), 400,300); plotPanels.add(myplot); viewPlots.setAnimationEnabled(true); viewPlots.setContent(plotPanels); // Add the nameField and sendButton to the RootPanel // Use RootPanel.get() to get the entire body element RootPanel.get(waterform).add(viewPlots); } }; // Load the visualization api, passing the onLoadCallback to be called // when loading is
Event and Interrupt Questions
Hey i was coding a GWT App and a question came up: Does an event like MouseOver interrupt already running code or does it even fire? Or is it put on the top of a stack like Deferred Command? Is there a website where all this is explained? Thx in advanced --~--~-~--~~~---~--~~ 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: Multiple pages question
Yes, like I said. Do the layout in the HTML and the functionality in the java code. Why don't you give a simple example of what you are wanting to do. There are many ways to do this and many levels of control you can give to the people who do the layout. It's not really possible to give a one-size-fits-all solution. Ian http://examples.roughian.com 2009/7/29 Maarten Decat maarten.de...@gmail.com Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ 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: Admin Area protected by simple scripted password in GWT
First of all thank you both for helping. What the article suggests (i read it twice but without a big snippet code i don't understand everything) is to: - make a login box (user and pass) - Call the server with RPC. The server answer back with a boolean (Valid or NotValid) and a SessionID. - The Client get the two vars, and when tries to do something in Admin Mode (like uploading a file or something) sends also that sessionID. If is still valid on the Server, it goes well, else it sends back an error to the client. The Admin area is still attached like Trevis said: with a RootPanel.add (AdminArea) if the Callback got success. So, the SessionID would prevent the fact that a malicious user could reverse-eng the javascript code and use the admin area without any permission, right? If what i said is correct (or seems to be) then i'll try to write it down and i'll let you know! Nickelnext --~--~-~--~~~---~--~~ 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: onSubmitComplete is not working with GWT Showcase
Hi Trevis, thanks for reply. I need help urgently. On Jul 30, 1:05 am, Trevis trevistho...@gmail.com wrote: Shot in the dark here but the first thing i would check is are you setting the method type on your form panel? Sounds like you need to set it to POST. (FromPanel.METHOD_POST constant is defined for doing this) The following is the portion of my code, please check it out any problem on it. Eclipse 3.4 + GWT 1.7.+ Chrome (default browser) = CwTextArea.java = private FormPanel homeForm = new FormPanel(); private HorizontalPanel identifyPanel = new HorizontalPanel(); private TextArea identifyTextArea = new TextArea(); private VerticalPanel leftHomePanel = new VerticalPanel(); private VerticalPanel rightHomePanel = new VerticalPanel(); private Label titleInlineLabel = new Label(Enter text or a webpage URL); private Button identifyButton = new Button(Identify Language); private Label identifyResultLabel = new Label((result displayed here!)); private HTML h = new HTML(); /** * Initialize this example. */ @ShowcaseSource @Override public Widget onInitialize() { // Text and Web tab // Create a web page form homeForm.setAction(GWT.getModuleBaseURL()+textarea); homeForm.setMethod(FormPanel.METHOD_POST); // Create a panel to hold all of the form widgets. homeForm.setWidget(identifyPanel); // set the text area size. identifyTextArea.setCharacterWidth(40); identifyTextArea.setVisibleLines(10); identifyTextArea.setName(homeTextArea); // Assemble Home tab vertical panel of text area. leftHomePanel.setWidth(400px); leftHomePanel.add(titleInlineLabel); leftHomePanel.add(identifyTextArea); leftHomePanel.add(identifyButton); // Assemble identify result label into vertical result panel rightHomePanel.add(identifyResultLabel); // Assemble Home tab vertical panel. identifyPanel.setHeight(400px); identifyPanel.add(leftHomePanel); identifyPanel.add(rightHomePanel); /* * Listen for mouse events on the Add button of the text area. */ identifyButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (identifyTextArea.getText().length() == 0) { Window.alert(The text area must not be empty); identifyTextArea.selectAll(); return; } else homeForm.submit(); } }); homeForm.addFormHandler(new FormHandler() { public void onSubmit(FormSubmitEvent event) { System.out.println(event); identifyTextArea.setFocus(true); identifyResultLabel.setText(identifyTextArea.getText()); } public void onSubmitComplete(FormSubmitCompleteEvent event) { System.out.println(event); } }); return identifyPanel; } = TextAreaServlet.java = @SuppressWarnings(serial) public class TextAreaServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType(text/html); System.out.println(servlet respond!); String oriSource = req.getParameter(homeTextArea); //read from the form of text area System.out.println(oriSource); } // to override the doPost() @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doGet(req, resp); } } = web.xml = ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- Default page to serve -- welcome-file-list welcome-fileReadMeSystem.html/welcome-file /welcome-file-list servlet servlet-nametextareaServlet/servlet-name servlet-classcom.google.gwt.sample.showcase.server.TextAreaServlet/ servlet-class /servlet servlet-mapping servlet-nametextareaServlet/servlet-name
Something other than a Java object was returned from JSNI method when getting colspan
I have some very simple code String colspan = tdElement.getAttribute(colspan); it continually crash with Something other than a Java object was returned from JSNI method. also crashes with rowspan, but ok with some other attribute like id when I get its parent tr, then getting colspan and rowspan is no problem. this is on IE6. is this a known bug? --~--~-~--~~~---~--~~ 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 form.submit()??
Hello guys, I have a problem which I've created FormPanel using GWT and perform some java script method before submiting the form. So, I defined a native method which does the some job before submitting the form. document.form.submit() -- not working $wnd.document.form.submit() -- not working $wnd.document.getElementByTagName(form).submit() -- not working Is there any way I can fetch this form.submit() ? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Something other than a Java object was returned from JSNI method when getting colspan
I already try the fix public final native String getAttribute(Element element, String name) /*-{ return element.getAttribute(name, 2)|| ; }-*/; but the same exception. did I do something wrong in doing the fix? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Newbie question(File Permissions issue in GWT)
Is it possible that Barry isn't your account? On 28 Jul., 17:26, Rumpole6 barry.benow...@gmail.com wrote: This may not be the right place for this, but: I am using the gwt plugin in eclipse under Windows XP to write an small application and I am facing File Permission Errors trying to access files in the server code when I run my app in hosted mode. I suspect that there is an option to set somewhere which will allow me to access the files. The Files are located in C:\Documents and Settings \Barry\Application Data\Subversion. Thanks in advance. Barry --~--~-~--~~~---~--~~ 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 form.submit()??
I found the way to do it. :-) I called java method which include FormPanel Objcet to submit from native method. like this : th...@com.test.sample.server.web.client.ui.serverwidget::formSubmit() (); -- this placed inside of native method private void formSubmit(){ formPanel.submit(); } Hope this would help to someone like me! On Jul 30, 10:39 am, jlc488 jlc...@gmail.com wrote: Hello guys, I have a problem which I've created FormPanel using GWT and perform some java script method before submiting the form. So, I defined a native method which does the some job before submitting the form. document.form.submit() -- not working $wnd.document.form.submit() -- not working $wnd.document.getElementByTagName(form).submit() -- not working Is there any way I can fetch this form.submit() ? 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 -~--~~~~--~~--~--~---
Bundling Background Images defined in CSS
Ok, I am not getting a clear cut answer for this so I thought I would post this. ImageBundle - Neat concept. Awesome. Works great. Is there a way to automate the bundling of the background images defined in CSS? So whereever the CSS refers to a background image, I would like to put that in an ImageBundle and refer the CSS to a clipped image to a particular position. I understand I could create an image and clip them manually but is there an automated process? Or is GWT 2.0 have this feature? Thanks in 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: Passing an XML document to a Panel
See the Api http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/xml/client/XMLParser.html The XMLParser throws you an Document object with wich you can play around with Greetings On 29 Jul., 05:25, kavi kavielango...@gmail.com wrote: How can i pass a complete well formed XML document to panel or to a file in GWT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT events, image overlays, and GChart
The Image Object has a MouseMoveEvent-Listener, why not capture events on the Image on the foreground and the call a function on your Image in the background, giving the information you need? On 28 Jul., 21:52, bconoly bcon...@gmail.com wrote: Ok, this question may be confusing but I'll be as clear as possible. - Currently I have a Pie Chart rendered using GChart. - I would like to overlay a transparent image over the pie chart for a 3d effect. - I need that overlay image to pass along hover events and click events to the pie chart it's overlaying. My questions are: 1) Does anyone know of a way to make an image or a div with a background image ignore mouse events and let them propogate to the next layer? 2) If not, does anyone know how I could capture these events through the image and fire them off in the correct location of GChart? Thanks tremendously in 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: Passing a javascript object as parameter to java method
Hi, Great Idea. Thanks a lot. Bye --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Query: Multi-user environment and GWT RPC
Hi fellow members, I have been following examples found on the web to build my web application with RPC mechanism. My web application has quite a few services. By right, each service should have its own class files on both client and server side. But this way will result in a lot of class files, quite troublesome. So I'm grouping all the services into one union set of class files. It works for single-user usage, soon I have to test on multi-user environment and wonder if problem can arise. Say if users using different services concurrently and yet I have grouped the services together, will my web application crash (it can't tell which service for whom) ? Or I'm worrying too much as there will be individual instance of the class files for each user? Just want to get this right before I continue developing~ Thanks in advance :) Regards, style.x7 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] Re: GWTCanvas status?
Another crazy possibility is to use Brad Neuberg's SVGWeb ( http://code.google.com/p/svgweb/). He's implemented almost 100% of SVG and SMIL in Flash plus a JS wrapper, so as to enable HTML5 features in IE6. I have to say that the demos are very impressive. IMHO, IE6+VML is a lost cause for all but the most simple of graphical apps. The performance of the JS as well as VML is so gimped, that even if you get stuff working and looking the same, it'll likely be disappointing from a UI latency perspective. It's like writing a video game that has to simultaneously run on a 4-core 3Ghz x86 with latest GPU, and a Pentium3 system with VGA graphics. You either have to provide two rendering loops, one with the amount of stuff cut way way back, or make the lesser system unplayable. On Wed, Jul 29, 2009 at 7:52 AM, Joel Webber j...@google.com wrote: I agree that it's probably best to go ahead and fix the bugs in GWTCanvas that are likely to show up in any SVG/VML translation. And while I don't think anyone's actually worked out the performance of excanvas.js vs GWTCanvas, but I'm more concerned with getting a respectable SVG/VML layer implemented than with trying to chase the fool's errand of building the Canvas API on top of VML, where there will always be cases that perform horribly. @Jaime, Dan: What do you guys think? I know the ball's still in my court to help get Dan's work reviewed and ready for public consumption, but in the meantime taking fixes for GWTCanvas seems sensible. On Wed, Jul 29, 2009 at 2:05 AM, John Gunther johncurtisgunt...@yahoo.com wrote: I added a patch to fix the GWTCanvas bug that caused me the most grief: http://code.google.com/p/google-web-toolkit-incubator/issues/detail?id=293#c1 Turned out, this problem was a basic one with IE's VML support: right after you apply DOM.removeChild to remove a child that contains VML, the fill and stroke colors, as well as the stroke widths that you so laboriously constructed during various strokes and fills, are all simply dropped by IE, as I confirmed by inspecting the inner HTML before and after the removeChild call within Widget.removeFromParent. Do you think it is worthwhile to fix the remaining GWTCanvas bugs? My thinking is that it is on two levels: 1) because GWTCanvas is available now and 2) because any more advanced SVG + VML system will still have to fix such (mostly low-level VML-related stuff, is my guess) bugs, so these fixes should be useful in the new system, too. Couple of questions/observations obliquely related to this patch: o If it's just VML, features dropping out, fixing this within just GWT vector graphics Widgets makes sense. But what if IE drops non-VML stuff in removeChild? Just a thought: might be a good test case to check the innerHTML before and after removeChild with some omnibus HTML to assure IE doesn't drop any other important stuff off. The experience of seeing features respectably documented in the VML API (http://www.w3.org/TR/NOTE-VML) just dropping out more or less at random inspires paranoia. o Has anyone compared GWTCanvas, performance-wise, to excanvas.js? Better: line-for-line translation of excanvas.js to Java, gwt-compile, does it yield any performance boost? How much? A lot of Javascript gurus known excanvas.js so could be an interesting kind of benchmark. On Jul 19, 12:41 am, John Gunther johncurtisgunt...@yahoo.com wrote: Appreciate your replies, I now have a much better sense of where GWT vector graphics is heading. With my use of GWTCanvas, the fact that there was a per-pixel memory cost with the canvas tag (that does not exist with VML) forced me to do some extra work to shrink-wrap the canvas around each rendered curve. So, I can imagine how having everything sort of work like VML (element based rather than pixel based) could be a big consistency plus. I also found Ray's argument that many have tried to emulate canvas with VML and failed convincing. On the other hand: o The use of Flash would create a new proprietary dependency that does not exist with GWTCanvas at present. o Though my vector graphics needs were limited (I only required a canvas subset) I was able to do everything I wanted to using GWTCanvas (though working around the IE bugs was a pain). o Relative to other browsers, with the feature subset I used, IE's vector graphics rendering isn't nearly as slow as its HTML rendering. So, once I figured out I needed to minimize stroke count, I was happy with the IE rendering performance of GWTCanvas. From the perspective of a black-box user of GWTCanvas, except for the IE bugs (which I was able to work around) it met my application's needs well. Without it GChart would still be stuck in the visual getto of HTML-only rendering. So I hope any improved system will preserve GWTCanvas' many good features, such as being packaged as a Widget, and having a reasonably low cost per
[gwt-contrib] Re: GWTCanvas status?
Is VML performance really that bad? I'm quite sure you've done a lot more testing than I have :) My understanding has always been that it sucked miserably for implementing a direct-mode API like Canvas, largely because of the obvious and inherent abstraction-inversion problems. But if you're implementing a retained-mode SVG-like API, I thought it's performance was fairly reasonable. But that's largely assumption on my part, and could well be wrong. Brad's stuff looks great, and I really like the idea of using Flash's renderer, which does indeed not suck. My biggest concern, however, is that any interaction with the SVG DOM could be abysmally slow, as it would appear that it has to go back and forth between js and flash, which is really, really slow. Thoughts? On Wed, Jul 29, 2009 at 11:43 AM, Ray Cromwell cromwell...@gmail.comwrote: Another crazy possibility is to use Brad Neuberg's SVGWeb ( http://code.google.com/p/svgweb/). He's implemented almost 100% of SVG and SMIL in Flash plus a JS wrapper, so as to enable HTML5 features in IE6. I have to say that the demos are very impressive. IMHO, IE6+VML is a lost cause for all but the most simple of graphical apps. The performance of the JS as well as VML is so gimped, that even if you get stuff working and looking the same, it'll likely be disappointing from a UI latency perspective. It's like writing a video game that has to simultaneously run on a 4-core 3Ghz x86 with latest GPU, and a Pentium3 system with VGA graphics. You either have to provide two rendering loops, one with the amount of stuff cut way way back, or make the lesser system unplayable. On Wed, Jul 29, 2009 at 7:52 AM, Joel Webber j...@google.com wrote: I agree that it's probably best to go ahead and fix the bugs in GWTCanvas that are likely to show up in any SVG/VML translation. And while I don't think anyone's actually worked out the performance of excanvas.js vs GWTCanvas, but I'm more concerned with getting a respectable SVG/VML layer implemented than with trying to chase the fool's errand of building the Canvas API on top of VML, where there will always be cases that perform horribly. @Jaime, Dan: What do you guys think? I know the ball's still in my court to help get Dan's work reviewed and ready for public consumption, but in the meantime taking fixes for GWTCanvas seems sensible. On Wed, Jul 29, 2009 at 2:05 AM, John Gunther johncurtisgunt...@yahoo.com wrote: I added a patch to fix the GWTCanvas bug that caused me the most grief: http://code.google.com/p/google-web-toolkit-incubator/issues/detail?id=293#c1 Turned out, this problem was a basic one with IE's VML support: right after you apply DOM.removeChild to remove a child that contains VML, the fill and stroke colors, as well as the stroke widths that you so laboriously constructed during various strokes and fills, are all simply dropped by IE, as I confirmed by inspecting the inner HTML before and after the removeChild call within Widget.removeFromParent. Do you think it is worthwhile to fix the remaining GWTCanvas bugs? My thinking is that it is on two levels: 1) because GWTCanvas is available now and 2) because any more advanced SVG + VML system will still have to fix such (mostly low-level VML-related stuff, is my guess) bugs, so these fixes should be useful in the new system, too. Couple of questions/observations obliquely related to this patch: o If it's just VML, features dropping out, fixing this within just GWT vector graphics Widgets makes sense. But what if IE drops non-VML stuff in removeChild? Just a thought: might be a good test case to check the innerHTML before and after removeChild with some omnibus HTML to assure IE doesn't drop any other important stuff off. The experience of seeing features respectably documented in the VML API (http://www.w3.org/TR/NOTE-VML) just dropping out more or less at random inspires paranoia. o Has anyone compared GWTCanvas, performance-wise, to excanvas.js? Better: line-for-line translation of excanvas.js to Java, gwt-compile, does it yield any performance boost? How much? A lot of Javascript gurus known excanvas.js so could be an interesting kind of benchmark. On Jul 19, 12:41 am, John Gunther johncurtisgunt...@yahoo.com wrote: Appreciate your replies, I now have a much better sense of where GWT vector graphics is heading. With my use of GWTCanvas, the fact that there was a per-pixel memory cost with the canvas tag (that does not exist with VML) forced me to do some extra work to shrink-wrap the canvas around each rendered curve. So, I can imagine how having everything sort of work like VML (element based rather than pixel based) could be a big consistency plus. I also found Ray's argument that many have tried to emulate canvas with VML and failed convincing. On the other hand: o The use of Flash would create a new proprietary dependency that does not exist with GWTCanvas at