RPC Replacement
We have applications that are installed on mobile devices (i.e. playbook, ipad) that we can't guarantee will be updated every time we update our server (appstore delays). This means that if the objects sent over RPC change, or the RPC format itself changes, then the mobile clients will no longer be able to connect to the server (IncompatibleRemoteServiceException). We'd like to solve this with absolute minimal changes to our web version, (i.e. keep our current service definitions and rpc objects), but allows us to add fields to the rpc objects without throwing errors. The only changes that are ever made to objects that we are sending are additions (we are prepared to have tests enforcing this), so this may make our lives easier. We have quite complex objects being sent over RPC that are used on both client and server, and it would be ideal if no extra interfaces/annotations have to be added. I've looked at the following projects/ideas: - RestyGWT - seems like it could work - gwt-friendly-protobuf - protobuf-gwt - protostuff - rpc-plus - DeRPC - RequestFactory - Custom json messages (we have our own json serialization framework which we use for serializing to and from offline databases) - Custom Field Serializers (http://code.google.com/p/wogwt/wiki/ CustomFieldSerializer) - Hacking GWT RPC to allow field additions, and update this every time we upgrade gwt, but still will fail when RPC format changes. - Enforce no changes to the current classes sent by RPC using MD5's and rely on no changes to the RPC format (which we realise is a bad assumption). Ideally we would be able to plug in a custom transport on both the server and client side so that we can serialise the remote method name and it's parameters ourselves to json. I know rpc-plus claims to be able to do this, but it seems like a dormant/dead project. Does anyone have any suggestions or ideas that might help? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email 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 too many locales in a large scale real life app
What we do is have a test case that ensures that our interface and properties files are completely defined: // call this method for each properties file public void checkMessagesDefinedProperlyInBothInterfaceAndFile(String file) { Properties f2 = new Properties(); FileInputStream in = null; try { in = new FileInputStream(file); f2.load(in); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } finally { IO.safelyClose(in); } Assert.assertNotNull(f2); // check methods - properties for (Method m : YouMessagesClass.class.getDeclaredMethods()) { Assert.assertTrue(m.getName() + shoud not be empty, Is.entered(f2.getProperty(m.getName(; if (m.getParameterTypes().length 0) { Assert.assertTrue(m.getName() + should contain {, f2.getProperty(m.getName()).indexOf('{') -1); Assert.assertTrue(m.getName() + should contain {, f2.getProperty(m.getName()).indexOf('}') -1); } } // check properties - methods for (Object key : f2.keySet()) { String property = f2.getProperty((String) key); if (property.indexOf('}') == -1) continue; for (Method m : YourMessagesClass.class.getDeclaredMethods()) { if (m.getName().equals(key)) { Assert.assertTrue(key + should have at least 1 parameter, m.getParameterTypes().length 0); break; } } } } What we do is have critical tests like this run on save, in our .project file we have : buildCommand nameorg.eclipse.ui.externaltools.ExternalToolBuilder/name triggersauto,full,incremental,/triggers arguments dictionary keyLaunchConfigHandle/key valuelt;projectgt;/Autobuild.launch/value /dictionary /arguments /buildCommand This ensures that we don't have to remember to add keys, servlet definitions in web.xml etc - all the critical things that can go wrong, but are easy to forget. Joe -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Reusing GWT Localization in Server Side Code
What we do is use this code pattern: public interface IMessages { public MyMessages get(); // your messages interface } public class Messages { private static IMessages messages; public static MyMessages get() { return messages.get(); } public static void set(IMessages messages) //etc } Then in our server side initialisation we use: ServerMessages implements IMessages { public MyMessages get(){ // note, basically pseudocode Properties properties = new Properties(); InputStream in = // find yours properties.load(in); return (MyMessages) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] { MyMessages.class }, new GWTMessageProxy(properties)); } } public class GWTMessageProxy implements InvocationHandler { private final Properties properties; public GWTMessageProxy(Properties properties) { super(); this.properties = properties; } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String property = String.valueOf(properties.get(method.getName())); if (args != null args.length 0) { // we have a messages class... return MessageFormat.format(property, args); } return property; } } When you initialize your client side system, simply initialize your messages with a client-side-only version that uses gwt localization. Similarly, your tests probably need a different setup method, so just initialise a custom class for that as well. It's kind of like manual guice, but it doesn't have to be done that often so isn't a big deal. This pattern works for everything, so we use it for NumberFormats DateFormatting and all sorts of other code that need to be shared between client, server, tests etc. If anyone has any better ideas please sing out! Joe On Aug 17, 7:20 am, Casey j.casey.one...@gmail.com wrote: Does anyone know if with Google Web Toolkit there is an easy way to reuse your client size localization files (constants and messages) in the server side code? I think in GWT 1.6 or 1.8 you could actually call the same GWT localization code on the server side that you called on the client side. I just upgraded from 1.6 to 2.0 and all of a sudden I'm receiving the following message: ERROR: GWT.create() is only usable in client code! That makes sense to me but there must be an easy way to reuse your Constant and Message files on the server. It's been awhile since I've opened this project but I'm pretty sure that this was working before. 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Reusing GWT Localization in Server Side Code
Because we don't want to have different code for different places. E.g. String text = GWT.create(MyMessages.class).myText(); This code fails if you run it on the server side. What we want is something like Messages.get().myText() which runs on both the client, server and test cases, but uses the appropriate method of getting the messages, e.g. GWT.create, a Proxy or ResourceBundle or whatever. Unless I'm missing something? Joe On Aug 18, 1:22 am, KenJi_getpowered mikael.k...@gmail.com wrote: Why can't you just use resource bundle to get messages? On 17 août, 10:49, Joe Cole profilercorporat...@gmail.com wrote: What we do is use this code pattern: public interface IMessages { public MyMessages get(); // your messages interface} public class Messages { private static IMessages messages; public static MyMessages get() { return messages.get(); } public static void set(IMessages messages) //etc } Then in our server side initialisation we use: ServerMessages implements IMessages { public MyMessages get(){ // note, basically pseudocode Properties properties = new Properties(); InputStream in = // find yours properties.load(in); return (MyMessages) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] { MyMessages.class }, new GWTMessageProxy(properties)); } } public class GWTMessageProxy implements InvocationHandler { private final Properties properties; public GWTMessageProxy(Properties properties) { super(); this.properties = properties; } public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { String property = String.valueOf(properties.get(method.getName())); if (args != null args.length 0) { // we have a messages class... return MessageFormat.format(property, args); } return property; } } When you initialize your client side system, simply initialize your messages with a client-side-only version that uses gwt localization. Similarly, your tests probably need a different setup method, so just initialise a custom class for that as well. It's kind of like manual guice, but it doesn't have to be done that often so isn't a big deal. This pattern works for everything, so we use it for NumberFormats DateFormatting and all sorts of other code that need to be shared between client, server, tests etc. If anyone has any better ideas please sing out! Joe On Aug 17, 7:20 am, Casey j.casey.one...@gmail.com wrote: Does anyone know if with Google Web Toolkit there is an easy way to reuse your client size localization files (constants and messages) in the server side code? I think in GWT 1.6 or 1.8 you could actually call the same GWT localization code on the server side that you called on the client side. I just upgraded from 1.6 to 2.0 and all of a sudden I'm receiving the following message: ERROR: GWT.create() is only usable in client code! That makes sense to me but there must be an easy way to reuse your Constant and Message files on the server. It's been awhile since I've opened this project but I'm pretty sure that this was working before. 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT RPC with Adobe AIR 2
On Jul 11, 1:39 pm, nino ekambi jazzmatad...@googlemail.com wrote: Why dont just use the RequestBuilder and send the response back as JSON or XML ? Because you have to write some of the conversion process manually which is automated with GWT. Unless you know of a project that is a drop-in replacement for RPC with no extra code required? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT RPC with Adobe AIR 2
We have a very large app that uses air extensively (both online and offline modes). We had to jump through many hoops to get RPC working. For AIR compiles, we replace the following class with this method: public final class ClientSerializationStreamReader extends AbstractSerializationStreamReader { private static native JavaScriptObject eval(String encoded) /*-{ return $wnd.parseGwtRpc(encoded); }-*/; ... etc } Air is unable to eval gwt returned responses over a certain length, as they are turned into arrays on the server. So we decode them if they are this type... // in your js file which is included... String.prototype.endsWith = function (s) { return this.length = s.length this.substr(this.length - s.length) == s; } function decodeGWT(s) { if( ! s.endsWith(])) ) return s; var end = s.indexOf(].concat(); var first = s.substring(0, end+1); var second = s.substring(end+].concat(.length); var arr = eval(first); var middle = second.indexOf(],[); var current = 0; while( middle != -1 ) { var x = second.substring(current, middle+1); var arr2 = eval(x); arr = arr.concat(arr2); current = middle + 2; middle = second.indexOf(],[, middle+1); } var y = second.substring(current, second.length-1); var arr3 = eval(y); return arr.concat(arr3); } function parseGwtRpc(encoded){ return eval(decodeGWT(encoded)); } If you need any help feel free to email me. Joe -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Get date and time from java-javascript compilation
We just have ant increment build numbers and build dates in our *Constants and associated properties files. Joe On May 22, 12:27 am, Matheus Garcia garcia.figueir...@gmail.com wrote: Hi all! I'd like to have an about dialog which would show users the date and time the web application was compiled. Is there any way to get that in GWT? I know that I could do that with ant tasks like inhttp://coding.derkeiler.com/Archive/Java/comp.lang.java.help/2003-12/..., but actually I'm using the eclipse plugin to compile, so I just like to know if there is another way to get that. Thanks, Matheus -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Client side error
It happened again on IE8. Is that where you had it happen Michael? GWT team - does this error even make sense - the global event array should never be null should it? On Mar 24, 4:01 am, Michael W mwang_2...@yahoo.com wrote: I got similar error. Any solution of it? On Mar 10, 5:01 am, Joe Cole profilercorporat...@gmail.com wrote: I saw an error today which has me puzzled: com.google.gwt.core.client.JavaScriptException: (TypeError): '$wnd.__gwt_globalEventArray.length' is null or not an object number: -2146823281 description: '$wnd.__gwt_globalEventArray.length' is null or not an object This doesn't really make sense to me that it could be null - does anyone have any idea how this could happen? The application is fully initialised and has been in use for quite a time, but idle. Perhaps garbage collection? The browser config is: Browser Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/ 4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30729; .NET CLR 3.5.30729) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get the year of the current date ? Date manipulation ...
new Date() :) On Mar 19, 9:04 pm, tim timor.su...@gmail.com wrote: Hi all, I would like to get the year of the current date, but this is not working : int year = Calendar.getInstance().get(Calendar.YEAR); How to use date in gwt ? Thanks in advance for your answer -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to get the year of the current date ? Date manipulation ...
Apologies... int year = new Date().getYear() On Mar 19, 9:04 pm, tim timor.su...@gmail.com wrote: Hi all, I would like to get the year of the current date, but this is not working : int year = Calendar.getInstance().get(Calendar.YEAR); How to use date in gwt ? Thanks in advance for your answer -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Client side error
I saw an error today which has me puzzled: com.google.gwt.core.client.JavaScriptException: (TypeError): '$wnd.__gwt_globalEventArray.length' is null or not an object number: -2146823281 description: '$wnd.__gwt_globalEventArray.length' is null or not an object This doesn't really make sense to me that it could be null - does anyone have any idea how this could happen? The application is fully initialised and has been in use for quite a time, but idle. Perhaps garbage collection? The browser config is: Browser Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/ 4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.30729; .NET CLR 3.5.30729) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] RPC Request Optimisation
Background: We have a quite a few customers who use really unreliable internet connections [e.g. 3g connections in bangladesh]. Often times these requests can take a long time to complete if they are in a country with really poor internet, but the users keep on doing things and then requests pile up. Obviously browsers only let two go at a time, and then we start to run into timeout issues. Recently I implemented a system that patched proxycreator to allow me to control request error handling, optionally resending the serialized request when requests fail, trapping exceptions, logging, performance etc. This is needed in production because of weird issues with IE firefox that happen on some customers setups, and works flawlessly. I was thinking that there would be an opportunity for a global request queue, which would queue requests (have only two in transit at any one time), but would allow us to pool requests (e.g. send multiple payloads at once to the server if there are a lot of requests in the queue). A simple servlet filter would be able to process the combined request and return the results to a special pooled callback, which then calls the relevant client callbacks. Given that on really bad internet connections latency is much worse than throughput I think this would cause a huge performance improvement to our users. I have lots's of data from request logs from the client side showing that this is a problem, and doubt I am alone in this. My question is: 1) Would people be interested in my proxycreator patch, for potential inclusion into gwt core? 2) Does request pooling sound like it's something that would be of use in general? Is this something the gwt team would be interested in working with? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RPC Request Optimisation
Hi Bob/Bart, I must have missed some of those methods in RPCRequestBuilder when trying to figure out how to do the automated retries. It looks like we could extend this to override the default callback mechanism and capture the serialized payload, just as we do in my proxycreator changes. I'll go back to the drawing board and see if that will work. Joe On Feb 26, 4:53 am, BobV b...@google.com wrote: 1) Would people be interested in my proxycreator patch, for potential inclusion into gwt core? 2) Does request pooling sound like it's something that would be of use in general? Is this something the gwt team would be interested in working with? Why did you go with the approach of patching the generator, as opposed to injecting a custom RPCRequestBuilder into the proxy object? If this use case cannot be satisfied with RPCRequestBuilder, then its API is insufficient. -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: GWT fails behind Cisco PIX/ASA Firewalls.
I've submitted an issue that relates to this: when it is blocked by firewalls there is nothing we can do at the moment to intercept the result. http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a322747b293de102/fad0c613a2127f38?q=#fad0c613a2127f38 I haven't had a chance to code this as our customers adjusted their firewall rules, but it may be worth looking into adding error handling to the initialization script. Joe On Feb 18, 5:05 pm, Roy rdl1...@yahoo.com wrote: We have a GWT implementation that fails with a blank page when the client user is behind a Cisco Firewall, PIX or ASA. Yet the GWT implementation works fine for clients behind firewalls made by SonicWall and Checkpoint. The implementation is a suspect since there are many users behind the Cisco firewalls. Please help with insight or success stories on solving the issue. Thanks, Roy -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Creating text effects in GWT
Another option for newer browsers is to use CSS3 which can be very impressive. There are tons of sites showing the options eg: http://www.css3.info/preview/text-shadow/ On Feb 19, 11:20 am, Lukas Laag laa...@gmail.com wrote: Have you considered using SVG ? In terms of possible effects, there is virtually no limit to what is possible to achieve. If you look at the SVG spec, you will get a good idea of the available features:http://www.w3.org/TR/SVG11/text.htmlhttp://www.w3.org/TR/SVG11/filters.html#AnExample I am developing a GWT library for SVG (http://localhost/vectomatic/ libgwtsvg) which provides a complete GWT front-end to the browser's SVG engine. Though the lib is still very young, I think an app such as the one you describe could be developed with it. On Feb 18, 6:26 am, Zach Murphy murphy.z...@gmail.com wrote: Hi all, I am creating an app where a user enters text into a textbox and I display the text elsewhere. Currently I am creating a new HTML when I display the text. While this gives me some limited effect options (bold, italics, color, etc.), I need more. I want the user to be able to be able to choose different effect styles and change the displayed text. For instance they might change the shape of the text, curve it, bulge it, make it diagonal, etc. But also keep the old effects, like bold and different fonts. Are there any GWT or javascript tools that might help accomplish this? I haven't been able to find any and I'd prefer not to have to write all the graphic mathematics by myself. My other thought is to make the text an image and manipulate the image. Any help or guidance would be greatly appreciated. Thanks, Zach -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Download, IE7 Download Blocker
Here's some code. Perhaps this or a modification should be included in gwt itself. There are a few problems with downloading files. 1) IE doesn't always let you open a file download dialog. It will on some machines, others it won't. 2) Users double click. Prevent this! 3) When opening a window from javascript you want to test whether the window has been blocked. You'll have to adjust the code below as it's got some things specific to our codebase, but it gives you the general idea. public void download(String title, ClientFile file){ if (Browser.isInternetExplorer()) { new FileResultsDialog(Download, file).show(); return; } if (!PopupDetectingWindow.open(file.getURL(), _blank, )) { // show HUGE pop-up blocked message. controller .getCurrentPage() .showErrorMessage( Your download was blocked! Please enable popups for this site. This is usually done in a small toolbar just above this sites window. To test, just click download again.); } public class PopupDetectingWindow { /** * Opens a new browser window. The name and features arguments are * specified a href= * 'http://developer.mozilla.org/en/docs/DOM:window.open'here/a. * * @param url *the URL that the new window will display * @param name *the name of the window (e.g. _blank) * @param features *the features to be enabled/disabled on this window * @return whether or not the popup was opened */ public static native boolean open(String url, String name, String features) /*-{ var mine = $wnd.open(url, name, features); if( mine ) return true; return false; }-*/; } in our file results dialog (just a popuppanel): ExternalHyperlink externalHyperlink = new ExternalHyperlink(file.getName(), file.getURL()); headerPanel.addLink(externalHyperlink); Hope that helps! On Feb 19, 4:15 pm, Geoffrey Wiseman geoffrey.wise...@gmail.com wrote: I have a GWT application that uses GWT-RPC to send data back and forth to the server. I've got a button that downloads a PDF based on that data from the server. PDF Generation works fine, and the download worked fine using Window.open(). However, as it stood, the download would not include any data that had been changed on-screen; but if I add a GWT-RPC call before the download, then IE7 blocks the download because it decides that the download is not the direct result of user action (I guess because the Window.open happens after the async 'save my data' call). I've tried some other suggestions in the group's archive for iframes and the like, but all of these are also blocked by the download blocker. Has anyone run into this and found a solution that they're happy with? Sadly, IE7 is the target browser for this client, so it's a bit of an issue for me. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Development Mode not reloading servlets?
Servlets aren't reloaded unless you are running debug mode or use an external tool like jrebel. Only client side code changes are reloaded with gwt. On Feb 18, 1:20 am, Jaroslav Záruba jaroslav.zar...@gmail.com wrote: Hello My impression was that when I trigger Development Reload my servlets were reloaded. Last couple of days this does not work ?anymore?... (I need to kill and start again Development Mode for changes to take effect.)Was my impression wrong? Best regards J. Záruba -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Development Mode not reloading servlets?
Not that I'm aware. I would recommend checking out jrebel - it's much more powerful than debug mode in terms of the changes it can reload and you don't have to be debugging to use it. On Feb 18, 2:49 am, Jaroslav Záruba jaroslav.zar...@gmail.com wrote: Thanks for the reply! I run Development Mode via Debug, so I assumed I am actuallyrunning my webapp in debug mode. Is there way to force the debug mode please? (I can't see no such option in the debug configuration.) Regards J. Záruba On Feb 17, 2:37 pm, Joe Cole profilercorporat...@gmail.com wrote: Servlets aren't reloaded unless you are running debug mode or use an external tool like jrebel. Only client side code changes are reloaded with gwt. On Feb 18, 1:20 am, Jaroslav Záruba jaroslav.zar...@gmail.com wrote: Hello My impression was that when I trigger Development Reload my servlets were reloaded. Last couple of days this does not work ?anymore?... (I need to kill and start again Development Mode for changes to take effect.)Was my impression wrong? Best regards J. Záruba -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Blog/ Email TextArea like widget
We use antisami for this, which is awesome: http://code.google.com/p/owaspantisamy/ On Feb 16, 2:23 am, Chris Lercher cl_for_mail...@gmx.net wrote: I think the RichTextArea is really a great widget! As always, be very careful when you use the result HTML. Parse the result on the server side, and eliminate unwanted tags and also unwanted attributes (like 'onClick'). This isn't so easy, because you probably want to allow exactly the kind of HTML that a user can produce by interacting with the RichTextArea's controls. I think it might be a good idea for GWT to provide a utility method which can perform this kind of filtering (on the server side). OTOH, this will probably require to build a real parser, because it's one of the things that regular expressions can't do. Chris On Feb 15, 12:10 pm, Thomas Broyer t.bro...@gmail.com wrote: On Feb 12, 6:12 pm, Ahmad Bdair bdair2...@gmail.com wrote: Hello, Is there a widget that provides a similar functionality to what text area in emails / blog / forums provides? Where the user can write text, change its color, bold..etc How about a RichTextArea?http://gwt.google.com/samples/Showcase/Showcase.html#CwRichTexthttp:/.. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Error loading my app
I haven't seen that in particular, but what I usually do is look at the error codes and google them: http://www.google.com/search?sourceid=chromeie=UTF-8q=nsIDOMHTMLSelectElement.selectedIndex It's obviously to do with a select's selected index, probably being set to an invalid index. On Feb 9, 7:36 am, BR benjamin.ren...@gmail.com wrote: I get this while loading my app. Anyone knows what it might be caused by? This is GWT 2.0, on MacOS X Snow Leopard, in OOPHM: 00:04:00.123 [ERROR] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (NS_ERROR_FAILURE): Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLSelectElement.selectedIndex] QueryInterface: function QueryInterface() { [native code] } result: 2147500037 filename:http://test.taskdock.com: lineNumber: 62 columnNumber: 0 inner: null data: null initialize: function initialize() { [native code] } at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann elServer.java: 195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java: 507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java: 264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j ava: 91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java: 25) at java.lang.reflect.Method.invoke(Method.java:585) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java: 71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav a: 157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java : 1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java: 401) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java : 222) at java.lang.Thread.run(Thread.java:613) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Read XML file on server using ServletContext.getResource() never works for me
From memory we had heaps of trouble using getResource, and ended up using getResourceAsStream. Give that a go? InputStream stream = configuration.getServletContext().getResourceAsStream(location); On Feb 10, 6:09 pm, Lucas86 lucaslo...@gmail.com wrote: I've been trying to read an XML in my RPC servlet and I'm having trouble reading the file in development mode using ServletContext.getResource(). This is my first try, and I think I must be missing something simple but I haven't been able to find what the missing piece is. Every path I've passed to getResource has returned null, but when I call getResourcePaths() on the same context I get a full list of expected paths. When I any of these paths to getResource, it still returns null. ==Not complete code, but just copied from my running project== ServletContext context = getServletContext(); String paths = context.getResourcePaths(/ myapp/).toString(); //Returns a list, including /myapp/ hosted.html java.net.URL testUrl = context.getResource(/myapp/hosted.html); // Returns null (Not really what I'm looking for, but I need to get it finding something first) I realize this isn't strictly a GWT question, but that's where I'm working and I've heard so many unhelpful not-quite-related solutions (that usually just say use getResource) that I really wanted to ask here in case there are any special cases when working with the imbedded jetty server in GWT 2.0. Does anyone know why getResourcePaths sees what I'm looking for but the same paths fail when passed to getResource? Thanks for any help. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to resubmit RPC after session timeout/login
This is one area where gwt could improve. We ended up patching ProxyCreator (look up the class) to automatically retry any requests with strange error codes (0, 12090, 400), and now that I think about it, it would be nice to do this for session timeouts as well. It would be great if gwt could provide a mechanism to provide a custom retry behavior as standard that applies globally, rather than having to do it for every async method yourself. If anyone's interested in collaborating on this let me know. On Feb 6, 10:24 am, Jamie jsgreenb...@gmail.com wrote: Hi everybody. I'm trying to extend AsyncCallback to always have the same behavior onFailure. I can successfully catch the session timeout exception that I'm looking for, open a login dialog, and have the user login. What I want to do after that is done is to resubmit the original RPC call that caused the onfailure. Here's what I have so far: code public abstract class MyAsyncCallbackT implements AsyncCallbackT { public final void onFailure(Throwable caught) { if(caught instanceof StatusCodeException ((StatusCodeException)caught).getStatusCode() == 401) { final LoginDialog login = new LoginDialog(); login.addLoginDialogListener(new LoginDialogListener() { public void loginSuccess() { login.hide(); //RESUBMIT THE ORIGINAL RPC HERE } }); } else { Window.alert(An error has occurred. Contact your system administrator.); } } public final void onSuccess(T result) { uponSuccess(result); } public abstract void uponSuccess(T result); } /code Does anybody know how I can capture the original RPC before it is sent so I can resubmit it? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Alignment of widgets
If you are using flextables for forms you will want to set the width of the first column widgets: flextable.getCellFormatter().setWidth(0, 200px); On Feb 2, 7:26 pm, Name256 abel.bi...@gmail.com wrote: Hello to you all, it is my first time trying out GWT and I am using version 1.7. I have been trying to create a login widget that contains help information on the left and a login form on the right. I have been unable to align the login SImple Panel to the centre of the east side of the dockpanel. My code is below. Kindly assist on a way that this could be possible. kind regards. Abel public void createInformationWidget() { HTML html = new HTML(); html.setWordWrap(true); html.setHTML(pLorem ipsum dolor sit amet, consectetur adipiscing elit. + Pellentesque sit amet eros. Fusce dui. Duis aliquet dapibus dui. Mauris vitae eros. /p + pMorbi euismod felis eget tellus. Maecenas ut metus a nunc congue molestie. Nulla odio. + Aenean sollicitudin. Duis eu massa feugiat enim egestas ultrices. Nulla facilisi. Vestibulum + ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc dictum risus a + lacus. Fusce tempus arcu non tortor. Nulla pellentesque lectus eu dui./p + p Donec ac mi id massa accumsan sollicitudin. Donec consequat sapien ut augue. + Nullam erat dui, ultricies a, ullamcorper et, congue at, nisi. Fusce porta convallis augue. + Phasellus ullamcorper pharetra nisi. /p); dockPanel.add(html); html.setWidth(50%); } public void createLoginForm() { SimplePanel panel = new SimplePanel(); FlexTable flexTable = new FlexTable(); flexTable.setCellSpacing(10); flexTable.setWidget(0, 0, new Label(Email: )); flexTable.setWidget(0, 1, new TextBox()); flexTable.setWidget(1, 0, new Label(Password: )); flexTable.setWidget(1, 1, new PasswordTextBox()); //panel.add(flexTable); dockPanel.add(flexTable); dockPanel.setCellHorizontalAlignment(flexTable, HasHorizontalAlignment.ALIGN_CENTER); } -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Feature Request - Improve Visual Look
Agree entirely. Unfortunately it seems most gwt sites don't have ui designers. Perhaps the gwt team should run a competition to create an awesome default theme that has to work with the sample apps. I know a few designers who would give it a go. On Jan 30, 9:46 am, Jeff Schnitzer j...@infohazard.org wrote: Actually, I think there is a lot of merit in this feature request. Anyone *can* make a GWT-based UI beautiful with the right application of CSS. As with any attractive UI, it takes a fair bit of work and know-how. GWT comes with a set of themes already, but it's fairly clear that creating a refined piece of art was not high on the priority list of the team. I posit that having a beautiful stock appearance and good-looking samples would extend the adoption and reach of GWT ten-fold. I think a lot of developers, when picking a client framework, simply look at the samples and eventually stop at one where they say I want my app to look like that. Nobody wants their apps to look like the GWT samples - and while they don't have to, it's not totally clear unless you've already invested in the learning process. GXT looks pretty, but that's about all I can say about it. I've said this on another thread, but actually using it is awful. It has its own layout system which does not play nice with GWT's layouts. You can't just buy GXT and expect your app to suddenly look better. BTW, I am speaking from experience... my learning process went from jQueryUI, to ExtJS, to GXT, to plain-old GWT with my own custom controls and CSS. I would have saved a lot of time and abortive projects if I'd gone straight to vanilla GWT... and I have to admit that aesthetics played a major role in my choices. Jeff On Fri, Jan 29, 2010 at 11:35 AM, mariyan nenchev nenchev.mari...@gmail.com wrote: There is no need gwt widgets to be beautiful. They are easy customizable with css. On Fri, Jan 29, 2010 at 9:30 PM, Paul Grenyer paul.gren...@gmail.com wrote: Why not just use GXT then? -Original Message- From: Marcos Alcantara marc...@gmail.com Date: Fri, 29 Jan 2010 11:19:28 To: Google Web Toolkitgoogle-web-toolkit@googlegroups.com Subject: Re: Feature Request - Improve Visual Look Couldn´t agree more. GWT is great as whole and so flexible, it hurts. Although, the core widgets could have a better visual appearance to make them as good as Vaadin's or ext's but without the desktop application appeal. =) Marcos Alcantara On 28 jan, 16:27, Simon dciphercomput...@gmail.com wrote: Hi I think some of the most aesthetically pleasing UI components can be found in extJS so I would like to suggest that GWT further improve the visual appearance of their widgets. Simon -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Stick a widget on a just opened new blank page
I've never tried to do anything with the window object, so it might not work... but I use this to detect if popups aren't working: public static native boolean open(String url, String name, String features) /*-{ var newWindow = $wnd.open(url, name, features); if( newWindow ) return true; return false; }-*/; I'm sure you could change it to return the new window as an Element and use DOM.* to manipulate it. Let us know how you get on - this could be useful for creating print pages without a server roundtrip. On Jan 28, 11:39 pm, Mirco Dotta mirco.li...@gmail.com wrote: Hi folks, I'm wondering if there exist a way to stick a widget into a new page. What I'd like to do would be some sort of Window.open(myWidget, _blank, width=650,height=700) But this can't be done because the interface of the Window.open method expects an URL and not a widget. Is there any trick to get this working. I was thinking that maybe I could call a native JS method and just pass the Widget as a DOM Element, but considering I'm not at all a JS expert I would prefer not to waste time on something that is simply not possible :) If there is someone out there with a good idea and has time to give me some direction I would greatly appreciate it. Cheers, Mirco -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Filedownload with exception handling in gwt
What do you mean exceptionhandling? Our logic goes like this: 1) If IE then show an IE specific download link. Too many users have troubles with popups on IE. 2) For other browsers, use this: public static native boolean open(String url, String name, String features) /*-{ var windowReference = $wnd.open(url, name, features); if( windowReference ) return true; return false; }-*/; We check to see if the link has opened, and show them an error message telling them to enable the popup. Is that what you mean? On Jan 25, 10:08 am, muckdabobenos abo.kla...@gmx.de wrote: Does anyone knows how i can intiate a download with exceptionhandling in gwt. I tried a hidden Frame. It works fine, but i can't fetch the error message which is posted if something goes wrong. Can anybody help? 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?
This can happen in devmode. I found one today - it was an exception in a deferred command while manipulating an xml document. To debug in devmode is relatively easy - simply debug before it breaks and step through. In web mode I have encountered a few of these as well. Here is our approach: 1. Maintain a global action list which tracks most (e.g. Actions.add (actionname)) 2. In your uncaught exception handler, pull in the action list and send that back to the server which then logs the result and sends emails etc. We also send back the entire page dom structure as an attachment to the email so we can take a look at the data on the page at the time of the error. This has enabled us to find out which customer, what they were doing and the timing of what they did - then we can easily replicate it in devmode. Hope this helps On Jan 15, 10:45 pm, dduck anders.johansen.a...@gmail.com wrote: In a relatively large project I sometimes get this exception: Class: com.google.gwt.core.client.JavaScriptException Message: (TypeError): Result of expression 'a' [null] is not an object. line: 1513 sourceId: 4996591080 sourceURL:http://worm:8080/myShopInstall/gwt-results-app/F89E790362E6204FFEC75F... expressionBeginOffset: 18437 expressionCaretOffset: 18438 expressionEndOffset: 18440 I am unsure as to how I can trace or otherwise diagnose the cause, as this seems to be impossible to catch using the usual Java tools (try/ catch). Any suggestions? Regards, Anders -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Seamlessly Integrating GWT and Gears
We use this with our air project, which uses gwt-in-the-air. It's a great project I recommend checking it out. Basically we have a service manager that you can register online services and offline services. Both use Async options. When we are working offline, we just switch which services we return from the service manager for the service class. E.g. ServiceManager.registerOnline(GWT.create(...)); ServiceManager.registerOffline(new OfflineMyService()); IMyServiceAsync sync = ServiceManager.get(IMyService.class); It's extremely effective in my experience. On Jan 21, 10:33 am, Greg gregbram...@gmail.com wrote: Hi all, Has anyone tried to integrate Gears with a GWT application that uses Ajax to access the backend? Specifically, I am thinking of having a Gears class that implements the DatabaseAsync interface so that my client code can call the same methods and I will swap out the Gears class and the regular GWT database class depending on whether or not the user is online or offline. Has anyone done this? I can't find any code samples online. Does it seem feasable? Is there any better way to do it? Thanks, Greg -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Client did not send n bytes as expected
Take a look at this and the comment thread: http://dobesland.wordpress.com/2008/08/22/gwt-to-lighttpdapache-to-glassfish-502-proxy-or-500-internal-errors-fix/ There are some unresolved issues with gwt and glassfish/apache, which I think is what the cause of this error is. (We see it rarely, but sometimes see errors with error code 0 or 19020/19021 on the client side). We fixed it by patching the ProxyCreator class and making it automatically retry requests with a strange error code, the other approach is detailed in the link above. On Jan 21, 10:03 am, Vishal ranavis...@gmail.com wrote: We get this error: [#|2009-08-12T11:38:31.803-0700|SEVERE|sun-appserver9.1| javax.enterprise.system.container.web| http://dobesland.wordpress.com/2008/08/22/gwt-to-lighttpdapache-to-glassfish-502-proxy-or-500-internal-errors-fix/ _ThreadID=16;_ThreadName=httpSSLWorkerThread-38080-3;_RequestID=8b3571bb-3c 36-43f1-9e38-6947ca376436;| WebModule[]Exception while dispatching incoming RPC call javax.servlet.ServletException: Client did not send 142 bytes as expected at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8 (RPCServletUtils.java:148) at com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent (RemoteServiceServlet.java:335) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:77) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) very rarely and it is not reproducible. I have seen posts earlier but none of them justify the reason for it. Appreciate if I can get some information: 1. Is it with the this version of GWT or related software, will upgrading help? 2. How often you get this error? 3. Any more workaround? Environment: Client: ie 6 Server: GlassFish 2, GWT 1.5.3. Java 5 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0 lockup
For weird errors like that you can either use something like gwt-log and trace where you suspect it's happening, or use firebug with debugging on exceptions. On Jan 20, 5:01 am, Cliff Newton cliff.new...@gmail.com wrote: I recently upgraded from GWT 1.5 to 2.0 and since I started running 2.0 my app will occasionally lock up. When refreshing the page JBoss still serves up my login page, however when I try to actually log in it just sits there. Also, once the app freezes and you are already logged in and try to do anything that accesses the database via RPC/ servlet the app just sits there ticking away. I am able to access my mysql database from query analyzer and the command line without any problem, other apps on JBoss work fine, and there is nothing in the JBoss logs to indicate any problem. Also, I can roll my project back to GWT 1.5 and it works fine. I don't expect anyone to magically know the answer, but I'm stuck and was hoping that someone might have some suggestions as to how I should continue testing. Are there any tools you know of to help me find an issue like this? Any techniques? I would really appreciate any feedback given. I've been stuck on this for 3 days now. Server Environment: Ubuntu 8.04.1 JBoss Web/2.1.1.CR3 Java version 1.5.0_16 Mysql 5.0.5 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: javascript error (invalid Argument)
I feel your pain. I narrowed this down in our case to an incorrect style assignment. From memory I was setting: DOM.setStyleAttribute(overflowX, none); Instead of: DOM.setStyleAttribute(overflowX, hidden); Only in IE was it throwing this exception. I would suggest checking your style assignments, it could be the same problem. Joe On Jan 8, 11:29 am, John V Denley johnvden...@googlemail.com wrote: I have just come across the following error when testing my application in IE7, It seems to work fine in Chrome 4.0 and FF 3.5.7 I have seen several other people having the same problem on this forum, but I cant work out from any of them how I can work out whats wrong with MY application! Can anyone give me any clues as to how and where to look to find out where to fix this problem? Thanks, John 22:04:09.376 [ERROR] [idebanet] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument. number: -2147024809 description: Invalid argument. at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript (BrowserChannelServer.java:195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative (ModuleSpace.java:507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject (ModuleSpace.java:264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject (JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke (MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke (MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke (OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannel.reactToMessages (BrowserChannel.java:1668) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection (BrowserChannelServer.java:401) at com.google.gwt.dev.shell.BrowserChannelServer.run (BrowserChannelServer.java:222) at java.lang.Thread.run(Unknown Source) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Upgade from GWT 1.5.3 to GWT2.0
We have just moved to 2.0 and yes you need to move to 1.7/1.6 structure first. There are some redundant things, but I found it's worth getting it going in 1.6 first and then moving directly to 2.0. If you need a hand let me know. On Dec 30, 8:05 pm, Sandeep sandip.pati...@gmail.com wrote: Hi, Currently I am using GWT 1.5.3 and I want to upgrade to GWT 2.0. I just went though the release notes of GWT2.0 and i found that it has steps to upgrade from GWT 1.7 to GWT 2.0. Do I have to follow same steps to upgrade from GWT 1.5 to GWT 2.0 OR Do I have to first upgrade to GWT 1.7 and then to GWT 2.0 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problem managing clickEvent on iPhone
We started with open source projects that handle it all for you i.e. jqtouch. It's a good project to get iphone specific ideas that are tested in practice and worked fine when integrating with our project. On Dec 29, 12:01 pm, fvisticot fvisti...@gmail.com wrote: I'm working on an iPhone web application. I have used a GWT button with the following CSS: .gwt-Button { margin: 0; padding: 3px 5px; text-decoration: none; font-size: small; cursor: pointer; cursor: hand; background: url(images/hborder.png) repeat-x 0px -27px; border: 1px outset #ccc;} .gwt-Button:active { border: 1px inset #ccc; } When i click on the button, the CSS is not applied... It seems that the :active is not natively supported by the iPhone browser. Some javascript tricks are available at: -http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone/9 -http://rakaz.nl/2009/10/iphone-webapps-101-make-your-buttons-feel- native.html What is the GWT solution ? Is there something available ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Offline Mode in GWT
We use adobe air. Gears doesn't have support for encrypted local data which is important for us. We've used gwt-in-the-air as a base, which has worked really well. On Dec 16, 11:06 am, Greg gregbram...@gmail.com wrote: Hi All, I am about to attempt to turn my GWT app into an offline-capable app with DB and local server. Is Gears for GWT still the best way to do this? Has anyone used HTML5 with GWT or have any other ideas to offline a server/DB app? Thanks, Greg -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Disable backspace
Hi Andrey, Did you ever resolve this? We have had reports of people losing data in this way but have never been able to replicate it. On Dec 13, 2:35 am, Andrey mino...@gmail.com wrote: Hello! My application is desktop-like, so it does not need any history support. The problem is that when I edit a form and accidentally lose focus and then press Backspace key to delete a character browser performs history.back() and the whole application is unloaded losing all the data. How can I disable this? 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Why enfore camelcase stylenames
Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email 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: Intermittent TimeoutException running unit tests with GWTTestCase
We have experienced this on 1.5 since it was released. Happens about 1/20 runs in my experience. I've never gotten to the bottom of it - anyone else? On Oct 2, 6:56 am, Nala deschenes.na...@gmail.com wrote: I want to run JUnit tests on GWT code that I am working on. I was having some difficulties so I tried to simplify things as much as possible. I'm still having issues: I'm working with Eclipse Galileo, WTP , and the GWT plugin. I created a brand new java project, enabled GWT for the project. I added the file /src/org/example/gettest/GwtTest.gwt.xml : module inherits name='com.google.gwt.user.User'/ /module I created a very simple test, org.example.gwttest.TrueIsTrueGWTTest: package org.example.gwttest.client; import com.google.gwt.junit.client.GWTTestCase; public class TrueIsTrueGWTTest extends GWTTestCase { @Override public String getModuleName() { return org.example.gwttest.GwtTest; } public void testTrueIsTrue() { assertTrue(true); } } I run the test from the Project Explorer using the context menu Run as - GWT JUnit test or Run as - GWT JUnit test (web mode) and the test runs just fine, taking under 10 seconds. If I run the test multiple times, tho, after 2 to 5 tries, I get com.google.gwt.junit.client.TimeoutException: The browser did not contact the server within 6ms. - 1 client(s) haven't responded back to JUnitShell since the start of the test. Actual time elapsed: 60.025 seconds. at com.google.gwt.junit.JUnitShell.notDone(JUnitShell.java:551) at com.google.gwt.dev.HostedModeBase.pumpEventLoop (HostedModeBase.java:556) at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java: 652) at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:346) at com.google.gwt.junit.client.GWTTestCase.runTest (GWTTestCase.java:219) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java: 132) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run (JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run (TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:197) Then I can run it again, and it works. I have seen some suggestions related the that error, but they applied to situation where the test wouldn't run at all - mine works some of the time. Does anyone have a suggestion for getting rid of this intermittent problem? Thank you, Nancy Deschenes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Upgrading from 1.5 - Multiple modules
In 1.5 we have a structure similar to this: src - module1.gwt.xml - module2.gwt.xml - module3.gwt.xml - client -- entry point 1 -- entry point 2 -- entry point 3 - public -- other public resources -- module1.html -- module2.html -- module3.html All three modules share a lot of different servlets, which we define in our web.xml We have started to move to 1.7.1 and are wondering what is the easiest way to structure multiple modules with the new war format. Our new layout is like this: src - module1.gwt.xml - module2.gwt.xml - module3.gwt.xml - client -- entry point 1 -- entry point 2 -- entry point 3 war -other public resources -module1 -module2 -module3 -WEB-INF --web.xml This means that we have to duplicate servlet-mappings for the different services in the web.xml - e.g. module1/service1, module2/service1 module3/service1 Is this the right way to structure a multi-module package that shares servlet's between them? Does anyone have a better way? Lastly, when I run our launch file for the module2/module3, I get an error indicating that gwt hasn't renamed our module (e.g. com.company.module2) to the shorter name in the gwt.xml (module2): [WARN] 404 - GET /com.company.Module2.nocache.js (127.0.0.1) 1440 bytes This obviously stops us loading the other modules. Am I missing something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email 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: Upgrading from 1.5 - Multiple modules
Well, we have managed a workaround that lets us keep our existing web.xml with no modifications (e.g. no module specific servlets). All our services go through a single point when registered: public static void register(final String uriSuffix, final Object onlineImpl) { ServiceDefTarget target = (ServiceDefTarget) onlineImpl; String moduleBaseURL = GWT.getHostPageBaseURL(); String address = moduleBaseURL + uriSuffix; target.setServiceEntryPoint(address); } So you would call this like: ServiceManager.registerOnline(IMyService.URI, GWT.create (IMyService.class)); Note instead of using GWT.getModuleBaseURL() we are using GWT.getHostPageBaseURL() as this way we can share all our services between modules. The other problem I referred to in my first post was resolved by correctly referencing module2/module2.nocache.js in the html file instead of the full names which we had previously. On Oct 1, 10:34 am, Sripathi Krishnan sripathi.krish...@gmail.com wrote: *re. duplicate servlet mappings * We keep our services under a /service path which is parallel to /module1 /module2 etc. And in the RemoteServiceRelativePath annotation, we define the path as ../service/MyService. That way, it remains the same for all modules. I am not sure I understood your second problem, so can't comment on it. --Sri 2009/9/30 Joe Cole profilercorporat...@gmail.com In 1.5 we have a structure similar to this: src - module1.gwt.xml - module2.gwt.xml - module3.gwt.xml - client -- entry point 1 -- entry point 2 -- entry point 3 - public -- other public resources -- module1.html -- module2.html -- module3.html All three modules share a lot of different servlets, which we define in our web.xml We have started to move to 1.7.1 and are wondering what is the easiest way to structure multiple modules with the new war format. Our new layout is like this: src - module1.gwt.xml - module2.gwt.xml - module3.gwt.xml - client -- entry point 1 -- entry point 2 -- entry point 3 war -other public resources -module1 -module2 -module3 -WEB-INF --web.xml This means that we have to duplicate servlet-mappings for the different services in the web.xml - e.g. module1/service1, module2/service1 module3/service1 Is this the right way to structure a multi-module package that shares servlet's between them? Does anyone have a better way? Lastly, when I run our launch file for the module2/module3, I get an error indicating that gwt hasn't renamed our module (e.g. com.company.module2) to the shorter name in the gwt.xml (module2): [WARN] 404 - GET /com.company.Module2.nocache.js (127.0.0.1) 1440 bytes This obviously stops us loading the other modules. Am I missing something? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email 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: Null pointer in generated createStreamWriter method
I remember something like this happening once on 1.5. From memory (I couldn't find it in our tracker) it was to do with not implementing RemoteService or something similar to that like not implementing Serializable. This may be completely wrong as it was about 1000 tickets ago :) - but is worth a shot. On Sep 9, 12:14 pm, Jennifer Vendetti jennifer.vende...@gmail.com wrote: Hi, I'm developing with GWT (version 1.7.0) and having trouble figuring out the source of a runtime exception. My application compiles, runs, and behaves as expected in hosted mode (on both Windows and Linux). In browser mode (also on Windows and Linux), I get a runtime exception: 'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_s...' is null or not an object The generated javascript where the exception occurs is: function com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_ $createStreamWriter__Lcom_google_gwt_user_client_rpc_impl_RemoteServiceProxy_2 (this$static){ var clientSerializationStreamWriter; clientSerializationStreamWriter = com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_ $ClientSerializationStreamWriter__Lcom_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_2Lcom_google_gwt_user_client_rpc_impl_Serializer_2Ljava_lang_String_2Ljava_lang_String_2 (new com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter(), this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer, this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_moduleBaseURL, this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializationPolicyName); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_objectCount = 0; java_util_AbstractHashMap_$clearImpl__Ljava_util_AbstractHashMap_2 (clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_objectMap); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_stringMap.clear__ (); java_util_ArrayList_$clear__Ljava_util_ArrayList_2 (clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_stringTable); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_encodeBuffer = java_lang_StringBuffer_$StringBuffer__Ljava_lang_StringBuffer_2(new java_lang_StringBuffer()); com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_ $writeString__Lcom_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_2Ljava_lang_String_2 (clientSerializationStreamWriter, clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_moduleBaseURL); com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_ $writeString__Lcom_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_2Ljava_lang_String_2 (clientSerializationStreamWriter, clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_serializationPolicyStrongName); return clientSerializationStreamWriter; } The browser's script debugger reports that this$static is null, but I don't know what could be causing this. Can anyone give suggestions here? Thank you, Jennifer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email 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: Null pointer in generated createStreamWriter method
If you can reproduce this consistently it may be a compiler bug. It sounds as though the code is getting optimised out. GWT Team - is there a way to debug this situation with SOYC? On Sep 10, 6:39 am, Jennifer Vendetti jennifer.vende...@gmail.com wrote: Thanks for your reply Joe. I found a solution, although I'm not sure why the change I made fixes the problem. I read Robert Hanson's GWT In Action book and followed the recommendation in Chapter 11 about using the Facade pattern to simplify working with RPC. A pared down example from our code base is: // ChAOService.java @RemoteServiceRelativePath(chao) public interface ChAOService extends RemoteService { public ListNotesData getNotes(String projectName, String entityName, boolean topLevel); } // ChAOServiceAsync.java public interface ChAOServiceAsync { void getNotes(String projectName, String entityName, boolean topLevel, AsyncCallbackListNotesData cb); } // ChAOServiceManager.java public class ChAOServiceManager { private static ChAOServiceAsync proxy; private static ChAOServiceManager instance; private ChAOServiceManager() { proxy = (ChAOServiceAsync) GWT.create(ChAOService.class); } public static ChAOServiceManager getInstance() { if (instance == null) { instance = new ChAOServiceManager(); } return instance; } public void getNotes(String projectName, String entityName, boolean topLevel, AsyncCallbackListNotesData cb) { proxy.getNotes(projectName, entityName, topLevel, cb); } } In my client code, if I separate my calls into two lines like this: ChAOServiceManager chaoServiceManager = ChAOServiceManager.getInstance (); chaoServiceManager.getNotes(...); ... my app works. But, if I use one line of Java code like this: ChAOServiceManager.getInstance().getNotes(...); ... my app fails with the exception I reported yesterday. Kind of confused by this, but glad my app is working now. Thanks, Jennifer On Sep 9, 8:55 am, Joe Cole profilercorporat...@gmail.com wrote: I remember something like this happening once on 1.5. From memory (I couldn't find it in our tracker) it was to do with not implementing RemoteService or something similar to that like not implementing Serializable. This may be completely wrong as it was about 1000 tickets ago :) - but is worth a shot. On Sep 9, 12:14 pm, Jennifer Vendetti jennifer.vende...@gmail.com wrote: Hi, I'm developing with GWT (version 1.7.0) and having trouble figuring out the source of a runtime exception. My application compiles, runs, and behaves as expected in hosted mode (on both Windows and Linux). In browser mode (also on Windows and Linux), I get a runtime exception: 'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_s...' is null or not an object The generated javascript where the exception occurs is: function com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_ $createStreamWriter__Lcom_google_gwt_user_client_rpc_impl_RemoteServiceProx y_2 (this$static){ var clientSerializationStreamWriter; clientSerializationStreamWriter = com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter_ $ClientSerializationStreamWriter__Lcom_google_gwt_user_client_rpc_impl_Clie ntSerializationStreamWriter_2Lcom_google_gwt_user_client_rpc_impl_Serialize r_2Ljava_lang_String_2Ljava_lang_String_2 (new com_google_gwt_user_client_rpc_impl_ClientSerializationStreamWriter(), this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer, this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_moduleBaseUR L, this $static.com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializatio nPolicyName); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_Abstrac tSerializationStreamWriter_objectCount = 0; java_util_AbstractHashMap_$clearImpl__Ljava_util_AbstractHashMap_2 (clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_Abstra ctSerializationStreamWriter_objectMap); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_Abstrac tSerializationStreamWriter_stringMap.clear__ (); java_util_ArrayList_$clear__Ljava_util_ArrayList_2 (clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_Abstra ctSerializationStreamWriter_stringTable); clientSerializationStreamWriter.com_google_gwt_user_client_rpc_impl_ClientS erializationStreamWriter_encodeBuffer = java_lang_StringBuffer_$StringBuffer__Ljava_lang_StringBuffer_2(new java_lang_StringBuffer()); com_google_gwt_user_client_rpc_impl_AbstractSerializationStreamWriter_ $writeString__Lcom_google_gwt_user_client_rpc_impl_AbstractSerializationStr eamWriter_2Ljava_lang_String_2 (clientSerializationStreamWriter
Re: Is it possible to develop desktop applications using GWT?
I would look into titanium/air - both of which can work with gwt. On Sep 10, 6:13 am, Ian Bambury ianbamb...@gmail.com wrote: Hi kolombo1, Yes it is. GWT is very capable of producing desktop apps, either with data held centrally somewhere or alternatively by using Gears, or (best of both worlds) a combination of both so you a) can use it off-line and b) have an on-line backup or c) do all of that and have a central repository. Another option is to run a light-weight web server on the local machine or a LAN server. But GWT is not really there to provide an alternative to traditional desktop apps - there are enough options there already - it's aimed at (groan) 'cloud' computing i.e. something stuck on a server that you can access from anywhere (with a connection) and which gives you the latest version of the software every time you go there (no downgrading allowed - it's the future, whether you want it of not). Ian http://examples.roughian.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: GWT for IE7
Try taking out all other scripts first and see if that works. If it does, add them back in one by one to see which is the culprit. Another thing which is useful is this: meta name=gwt:onLoadErrorFn content=loaderror/meta meta name=gwt:onPropertyErrorFn content=unsupported/meta meta http-equiv=X-UA-Compatible content=IE=EmulateIE7/meta script type=text/javascript !-- // Called when GWT is not supported function unsupported() { document.getElementById('loading').className = loadError message-center-screen; document.getElementById('loading-content').innerHTML = Your browser is not supported by X. Please reload with a modern browser such as a href=\http://www.getfirefox.com\;Firefox/a or Internet Explorer Version 7 or Above.; } function loaderror(){ document.getElementById('loading').className = loadError message- center-screen; document.getElementById('loading-content').innerHTML = Error: There was a problem loading the application. We will try and fix this as soon as possible.; } -- /script You'll have to modify it a little to work in your situation, but is very useful as you will get notified if there is a gwt problem. On Sep 8, 3:02 am, LN helene.doum...@gmail.com wrote: we are developping an OSGI +GWT application. You can see the demo in:http://amebasystems.com/bluetooth-scanning. In Mozilla Firefox it works just fine but there is no way to do it works with IE7. I know that the IE CSS and JS specification is different than Firefox's one, but we really want to optimize my application for IE. Any ideas or suggestions? BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email 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: JUnit testing RPCServlet without client
On the server side it's good practice to move all your code from the servlet to another injected implementation: class MyRPCService extends RemoteService implements IMyRPCService { @Inject MyRPCServiceHandler handler; public boolean yourRequest(String yourParams){ // do auth return handler.yourRequest(yourParams); } That way you are able to test outside of the servlet container. Joe On Aug 28, 6:27 am, Gary S agilej...@earthlink.net wrote: I want to test a RemoteService, its Async and an RPCServlet with an ordinary TestCase that calls the Servlet. Is there an example of how to do 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: *.cache.html blocked by firewall - GWT team opinions please?
Hi Sumit, http://code.google.com/p/google-web-toolkit/issues/detail?id=3959 Thanks, Joe On Aug 18, 11:26 am, Sumit Chandel sumitchan...@google.com wrote: Hi Joe, Please see reply inlined below. Hmm. The gwt code to load the cache.html seems to be ignoring error states: line 315: http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/c... xhr.onreadystatechange = function() { // 4 == DONE if (xhr.readyState == 4) { Shouldn't we add another check like: if( xhr.status != 200 || xhr.status != 304 ) throwDocumentError(); This is probably a good thing to add in do you think? You make a good point here. I think it would make sense to have a hook that developers could implement here for such failure cases. Would you mind filing an issue for this in the Issue Tracker? That way, you'll automatically be notified of updates to the issue, and I can assigning to someone on the team for further consideration. Issue Tracker:http://code.google.com/p/google-web-toolkit/issues/list Cheers, -Sumit Chandel On Aug 14, 3:30 am, Joe Cole profilercorporat...@gmail.com wrote: Is it malformed, or missing? If I remove the file (cause a 404 response) gwt doesn't throw an error that I can catch. I used this to reproduce the error for testing purposes. In production, the file is there, and the user has a firewall that blocks it and if it returns an error page, gwt doesn't throw an error that I can catch. I was using the missing file to replicate it locally. The MD5 value is the STRONGNAME. Whether you can reproduce that hash is another matter; which algorithm means another trip through the source. If you can recalculate the hash, you'd simply compare that value to STRONGNAME. But you'd never get a chance to calculate the hash since the file's only partially received. I was hoping that the generated nocache.js would have this (or something) to check that the document returned by the server (or firewall) it loaded via xhttp was valid. I understand we can't regenerate it - I was trying to propose a solution. Another solution would be for the gwt script to check the response for an error code - is that possible? I'm under the impression that the file's missing. In which case I'd implement a watchdog timer in that routine. I'm guessing that Google doesn't implement a such a timer because there's no single implementation that would fit all circumstances. The file isn't missing - if I load up the cache.html file manually (e.g.www.mycompany.com/STRONGNAME.cache.html) at sites with a strict firewall we get an error document explaining that it's been blocked by the firewall and rationale (e.g. a high score). After reviewing the source, the onerror function doesn't get called when you need it for this particular issue. Agreed. Please try the cross-site linker. I've never used it before - how will this help? I'm guessing others haven't seen this since it's specific to these firewall settings? Or are these separate customers with different firewalls? I have seen on this list a very difficult to reproduce issue regarding RPC cargo getting truncated on the trip to the server. But, obviously, that's after loading the script. These are two separate customers (one university installation, one corporate on separate continents). I have seen the truncation issue before with a personal firewall (Norton) as well. Thanks for your help. Apologies if you are confused! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Hi Jeff, We already use the meta tags for errors and don't get any when the file is not what we expect. Looking at line 338: doc.open(); doc.write(xhr.responseText); It would make sense to do a sanity check here for the content of the response. If GWT put it's MD5 somewhere in the response we could do something like: if( ! xhr.responseText.startsWith(STRONGNAME) ) { // call the meta error function noting malformed cache.html } Thoughts? On Aug 13, 8:32 pm, Jeff Chimene jchim...@gmail.com wrote: One more point. The IFrame XmlHTTPRequest loader is found inhttp://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/c... around line 312. It should be a SMOP to add a watchdog timer to this activity. On Wed, Aug 12, 2009 at 7:43 PM, Joe Coleprofilercorporat...@gmail.com wrote: Yes, we already have gzip enabled. But the point isn't that the firewall blocks it - that's easy to solve - it's that we can't intercept the error and let the user know what to do. The simple way is we can tell them to login via https (which the firewall can't block). But we can't do that if we don't know there's a problem. On Aug 13, 2:28 pm, Jeff Chimene jchim...@gmail.com wrote: On 08/12/2009 07:24 PM, Joe Cole wrote: I know it's a firewall because if we type the *.cache.html url into the browser it comes back with a document with a message from their firewall claiming it's been blocked. The file scored very highly on some metrics which their firewall uses. I am guessing it's because of the large js because it was the same in pretty mode. We have seen this at two separate sites (different countries too), but with different builds of the software (we have different servers depending on the country). Regardless, if there is a problem I'd love to be able to check (e.g. if the html downloaded by the nocache.js doesnt contain our script). I think this is something gwt should do out of the box really - because there are no errors thrown. Unfortunately the sites are private so I can't share the links. I don't have the links at hand, but have you tried enabling compression on the server side? I think there may be some Apache incantations on this list to enable that feature. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Yes, we have considered making it https only, but as it's ~600k gzipped and some browsers don't cache SSL content we decided not to. I'm very surprised no one else has run into this error as it's happen quite a few times to us now. If this were a public app many people behind university or corporate firewalls would not be able to access it. On Aug 13, 11:57 pm, Juraj Vitko juraj.vi...@gmail.com wrote: worked fine on ssl as it bypassed the firewall Then one possiblity is to redirect to HTTPS imediatelly when someone accesses the page through HTTP. But the GWT loading check should be implemented nonetheless. On Aug 4, 3:33 pm, Joe Cole profilercorporat...@gmail.com wrote: When debugging a customer who couldn't load our site with an http connection (worked fine on ssl as it bypassed the firewall) we came across an issue where if we tried to load the *.cache.htmlfile gwt was trying to load manually the companies firewall had displayed an error message. There was no error on the gwt side, so we were unable to provide feedback to the user. Is it possible to write something in the nocache.js that checks that the *.cache.htmlthat is loaded is actually what we expect, and if not, we can get an error message back to the user in some way? Currently we use the following method for detecting load errors, but they aren't being called. Could it be tied into this in some way? meta name=gwt:onLoadErrorFn content=loaderror/meta meta name=gwt:onPropertyErrorFn content=unsupported/meta script type=text/javascript !-- // Called when GWT is not supported function unsupported() { document.getElementById('loading').className = loadError message-center-screen; document.getElementById('loading-content').innerHTML = Your browser is not supported. Please reload with a modern browser such as a href=\http://www.getfirefox.com\;Firefox/a or Internet Explorer Version 6 or Above.; } function loaderror(){ document.getElementById('loading').className = loadError message- center-screen; document.getElementById('loading-content').innerHTML = Error: There was a problem loading the application.; } -- /script E.g. a new meta property could be added that tells us the cache file is not able to be loaded, with the name of the cache file so we can show them the error by opening it in a new window so they can see the error message. Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: *.cache.html blocked by firewall - GWT team opinions please?
Is it malformed, or missing? If I remove the file (cause a 404 response) gwt doesn't throw an error that I can catch. I used this to reproduce the error for testing purposes. In production, the file is there, and the user has a firewall that blocks it and if it returns an error page, gwt doesn't throw an error that I can catch. I was using the missing file to replicate it locally. The MD5 value is the STRONGNAME. Whether you can reproduce that hash is another matter; which algorithm means another trip through the source. If you can recalculate the hash, you'd simply compare that value to STRONGNAME. But you'd never get a chance to calculate the hash since the file's only partially received. I was hoping that the generated nocache.js would have this (or something) to check that the document returned by the server (or firewall) it loaded via xhttp was valid. I understand we can't regenerate it - I was trying to propose a solution. Another solution would be for the gwt script to check the response for an error code - is that possible? I'm under the impression that the file's missing. In which case I'd implement a watchdog timer in that routine. I'm guessing that Google doesn't implement a such a timer because there's no single implementation that would fit all circumstances. The file isn't missing - if I load up the cache.html file manually (e.g. www.mycompany.com/STRONGNAME.cache.html) at sites with a strict firewall we get an error document explaining that it's been blocked by the firewall and rationale (e.g. a high score). After reviewing the source, the onerror function doesn't get called when you need it for this particular issue. Agreed. Please try the cross-site linker. I've never used it before - how will this help? I'm guessing others haven't seen this since it's specific to these firewall settings? Or are these separate customers with different firewalls? I have seen on this list a very difficult to reproduce issue regarding RPC cargo getting truncated on the trip to the server. But, obviously, that's after loading the script. These are two separate customers (one university installation, one corporate on separate continents). I have seen the truncation issue before with a personal firewall (Norton) as well. Thanks for your help. Apologies if you are confused! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Hmm. The gwt code to load the cache.html seems to be ignoring error states: line 315: http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/com/google/gwt/core/linker/IFrameTemplate.js?r=5513 xhr.onreadystatechange = function() { // 4 == DONE if (xhr.readyState == 4) { Shouldn't we add another check like: if( xhr.status != 200 || xhr.status != 304 ) throwDocumentError(); This is probably a good thing to add in do you think? On Aug 14, 3:30 am, Joe Cole profilercorporat...@gmail.com wrote: Is it malformed, or missing? If I remove the file (cause a 404 response) gwt doesn't throw an error that I can catch. I used this to reproduce the error for testing purposes. In production, the file is there, and the user has a firewall that blocks it and if it returns an error page, gwt doesn't throw an error that I can catch. I was using the missing file to replicate it locally. The MD5 value is the STRONGNAME. Whether you can reproduce that hash is another matter; which algorithm means another trip through the source. If you can recalculate the hash, you'd simply compare that value to STRONGNAME. But you'd never get a chance to calculate the hash since the file's only partially received. I was hoping that the generated nocache.js would have this (or something) to check that the document returned by the server (or firewall) it loaded via xhttp was valid. I understand we can't regenerate it - I was trying to propose a solution. Another solution would be for the gwt script to check the response for an error code - is that possible? I'm under the impression that the file's missing. In which case I'd implement a watchdog timer in that routine. I'm guessing that Google doesn't implement a such a timer because there's no single implementation that would fit all circumstances. The file isn't missing - if I load up the cache.html file manually (e.g.www.mycompany.com/STRONGNAME.cache.html) at sites with a strict firewall we get an error document explaining that it's been blocked by the firewall and rationale (e.g. a high score). After reviewing the source, the onerror function doesn't get called when you need it for this particular issue. Agreed. Please try the cross-site linker. I've never used it before - how will this help? I'm guessing others haven't seen this since it's specific to these firewall settings? Or are these separate customers with different firewalls? I have seen on this list a very difficult to reproduce issue regarding RPC cargo getting truncated on the trip to the server. But, obviously, that's after loading the script. These are two separate customers (one university installation, one corporate on separate continents). I have seen the truncation issue before with a personal firewall (Norton) as well. Thanks for your help. Apologies if you are confused! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Yes. I'd give that a shot. I am wondering why you're not going for the watchdog timer. I'd throw such logic at this problem too. Yes, this would be a good solution in general. You are meaning something similar to the way gmail loads, and if it takes longer than usual it tells you? We have users on networks that sometimes can take many minutes to load the site (they are used to this on all sites) so this may cause issues there though. I think that it doesn't have this logic because there's no single error handler that would satisfy all users. Ok, makes sense. Now I see that the bootstrap logic in trunk HEAD is somewhat different than your original example (posted on 4-Aug). Please take a moment to look at trunk HEAD's bootstrap to see if there's something you can use. Perhaps the diff between your current GWT version and HEAD will be illuminating. Ahh. I just checked and the current linker we are using is the old IFrame linker from 1.5.3 as you suspected. Am I going to have to upgrade (we are currently on 1.5) to try this linker? Please try the cross-site linker. I've never used it before - how will this help? I'm not sure it will. The XS linker implements another way of getting the *.cache.html file to the client. It's cheap to try (simply add a line to your module.xml file) and may be a win in that the firewall responds differently. Although if it's a size-based rule, the firewall will probably restrict this technique too. I admit that I'm grasping at straws with this suggestion. :) On this topic, you might also try upgrading to the GWT trunk and experimenting with the code splitting logic. There is a cost to this besides time: you will have to analyze and modify the code to see what parts of it can load later than others[*]. So, following this suggesting will produce a branch of your current trunk. The SOYC linker produces a report that will aid in this implementation. Remember that you can have several GWT versions installed on a single machine; if there's a problem you simply revert to the older GWT version. I'd love to upgrade asap, but can't really before things stabilize as we release daily at the moment to production sites. Any idea when things are going to stabilize for an RC? [*] And if you're on GWT 1.5 or earlier, you will see a lot of deprecated code warnings. I'm guessing others haven't seen this since it's specific to these firewall settings? Or are these separate customers with different firewalls? I have seen on this list a very difficult to reproduce issue regarding RPC cargo getting truncated on the trip to the server. But, obviously, that's after loading the script. These are two separate customers (one university installation, one corporate on separate continents). I have seen the truncation issue before with a personal firewall (Norton) as well. Just to be clear: these installations use the same firewall with the same (probably default) settings? Two separate firewalls. I am not sure if they use the same one or not, but I can try and find out. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: *.cache.html blocked by firewall - GWT team opinions please?
We have encountered this on another network now. Does no one else have this problem? Once again: a firewall is blocking the .cache.html file. GWT just sits there doing nothing, no error messages or anything. Is there any way we can check to see if the cache.html file is loaded correctly? It would be great to tell our users you need to ask your network administrators to remove our site from the banned list. On Aug 5, 11:14 am, Joe Cole profilercorporat...@gmail.com wrote: I have been able to simulate the problem by causing a 404 when the *.cache.html is requested. Stepping through firebug, this is the relevant code in the .nocache.js: 22 function maybeStartModule(){ 23 if (scriptsDone loadDone) { scriptsDone is never true because the script is no longer available, which is happening when the cache.html gets blocked by a firewall. Therefore our application stays in a perpetual loading application page which isn't a good look. Is there a way to test whether the cache.html file has the correct content, assuming there is a way to wait for it to load completely? Joe On Aug 5, 1:33 am, Joe Cole profilercorporat...@gmail.com wrote: When debugging a customer who couldn't load our site with an http connection (worked fine on ssl as it bypassed the firewall) we came across an issue where if we tried to load the *.cache.html file gwt was trying to load manually the companies firewall had displayed an error message. There was no error on the gwt side, so we were unable to provide feedback to the user. Is it possible to write something in the nocache.js that checks that the *.cache.html that is loaded is actually what we expect, and if not, we can get an error message back to the user in some way? Currently we use the following method for detecting load errors, but they aren't being called. Could it be tied into this in some way? meta name=gwt:onLoadErrorFn content=loaderror/meta meta name=gwt:onPropertyErrorFn content=unsupported/meta script type=text/javascript !-- // Called when GWT is not supported function unsupported() { document.getElementById('loading').className = loadError message-center-screen; document.getElementById('loading-content').innerHTML = Your browser is not supported. Please reload with a modern browser such as a href=\http://www.getfirefox.com\;Firefox/a or Internet Explorer Version 6 or Above.; } function loaderror(){ document.getElementById('loading').className = loadError message- center-screen; document.getElementById('loading-content').innerHTML = Error: There was a problem loading the application.; } -- /script E.g. a new meta property could be added that tells us the cache file is not able to be loaded, with the name of the cache file so we can show them the error by opening it in a new window so they can see the error message. Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: *.cache.html blocked by firewall - GWT team opinions please?
I know it's a firewall because if we type the *.cache.html url into the browser it comes back with a document with a message from their firewall claiming it's been blocked. The file scored very highly on some metrics which their firewall uses. I am guessing it's because of the large js because it was the same in pretty mode. We have seen this at two separate sites (different countries too), but with different builds of the software (we have different servers depending on the country). Regardless, if there is a problem I'd love to be able to check (e.g. if the html downloaded by the nocache.js doesnt contain our script). I think this is something gwt should do out of the box really - because there are no errors thrown. Unfortunately the sites are private so I can't share the links. On Aug 13, 4:42 am, Jeff Chimene jchim...@gmail.com wrote: On 08/12/2009 08:14 AM, Joe Cole wrote: We have encountered this on another network now. Does no one else have this problem? How do you know it's a firewall? Are you saying there are two different firewalls (with potentially different settings) blocking the same document? Is this a private site? Perhaps posting a link might help debug this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
I know it's a firewall because if we type the *.cache.html url into the browser it comes back with a document with a message from their firewall claiming it's been blocked. The file scored very highly on some metrics which their firewall uses. I am guessing it's because of the large js because it was the same in pretty mode. We have seen this at two separate sites (different countries too), but with different builds of the software (we have different servers depending on the country). Regardless, if there is a problem I'd love to be able to check (e.g. if the html downloaded by the nocache.js doesnt contain our script). I think this is something gwt should do out of the box really - because there are no errors thrown. Unfortunately the sites are private so I can't share the links. On Aug 13, 4:42 am, Jeff Chimene jchim...@gmail.com wrote: On 08/12/2009 08:14 AM, Joe Cole wrote: We have encountered this on another network now. Does no one else have this problem? How do you know it's a firewall? Are you saying there are two different firewalls (with potentially different settings) blocking the same document? Is this a private site? Perhaps posting a link might help debug this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Yes, we already have gzip enabled. But the point isn't that the firewall blocks it - that's easy to solve - it's that we can't intercept the error and let the user know what to do. The simple way is we can tell them to login via https (which the firewall can't block). But we can't do that if we don't know there's a problem. On Aug 13, 2:28 pm, Jeff Chimene jchim...@gmail.com wrote: On 08/12/2009 07:24 PM, Joe Cole wrote: I know it's a firewall because if we type the *.cache.html url into the browser it comes back with a document with a message from their firewall claiming it's been blocked. The file scored very highly on some metrics which their firewall uses. I am guessing it's because of the large js because it was the same in pretty mode. We have seen this at two separate sites (different countries too), but with different builds of the software (we have different servers depending on the country). Regardless, if there is a problem I'd love to be able to check (e.g. if the html downloaded by the nocache.js doesnt contain our script). I think this is something gwt should do out of the box really - because there are no errors thrown. Unfortunately the sites are private so I can't share the links. I don't have the links at hand, but have you tried enabling compression on the server side? I think there may be some Apache incantations on this list to enable that feature. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: *.cache.html blocked by firewall - GWT team opinions please?
Also - if it wasn't clear before you can simulate this problem by just moving your *.cache.html file. Your application will just sit there with it's loading spinner going, oblivious. On Aug 13, 2:43 pm, Joe Cole profilercorporat...@gmail.com wrote: Yes, we already have gzip enabled. But the point isn't that the firewall blocks it - that's easy to solve - it's that we can't intercept the error and let the user know what to do. The simple way is we can tell them to login via https (which the firewall can't block). But we can't do that if we don't know there's a problem. On Aug 13, 2:28 pm, Jeff Chimene jchim...@gmail.com wrote: On 08/12/2009 07:24 PM, Joe Cole wrote: I know it's a firewall because if we type the *.cache.html url into the browser it comes back with a document with a message from their firewall claiming it's been blocked. The file scored very highly on some metrics which their firewall uses. I am guessing it's because of the large js because it was the same in pretty mode. We have seen this at two separate sites (different countries too), but with different builds of the software (we have different servers depending on the country). Regardless, if there is a problem I'd love to be able to check (e.g. if the html downloaded by the nocache.js doesnt contain our script). I think this is something gwt should do out of the box really - because there are no errors thrown. Unfortunately the sites are private so I can't share the links. I don't have the links at hand, but have you tried enabling compression on the server side? I think there may be some Apache incantations on this list to enable that feature. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
*.cache.html blocked by firewall - GWT team opinions please?
When debugging a customer who couldn't load our site with an http connection (worked fine on ssl as it bypassed the firewall) we came across an issue where if we tried to load the *.cache.html file gwt was trying to load manually the companies firewall had displayed an error message. There was no error on the gwt side, so we were unable to provide feedback to the user. Is it possible to write something in the nocache.js that checks that the *.cache.html that is loaded is actually what we expect, and if not, we can get an error message back to the user in some way? Currently we use the following method for detecting load errors, but they aren't being called. Could it be tied into this in some way? meta name=gwt:onLoadErrorFn content=loaderror/meta meta name=gwt:onPropertyErrorFn content=unsupported/meta script type=text/javascript !-- // Called when GWT is not supported function unsupported() { document.getElementById('loading').className = loadError message-center-screen; document.getElementById('loading-content').innerHTML = Your browser is not supported. Please reload with a modern browser such as a href=\http://www.getfirefox.com\;Firefox/a or Internet Explorer Version 6 or Above.; } function loaderror(){ document.getElementById('loading').className = loadError message- center-screen; document.getElementById('loading-content').innerHTML = Error: There was a problem loading the application.; } -- /script E.g. a new meta property could be added that tells us the cache file is not able to be loaded, with the name of the cache file so we can show them the error by opening it in a new window so they can see the error message. Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: *.cache.html blocked by firewall - GWT team opinions please?
I have been able to simulate the problem by causing a 404 when the *.cache.html is requested. Stepping through firebug, this is the relevant code in the .nocache.js: 22 function maybeStartModule(){ 23 if (scriptsDone loadDone) { scriptsDone is never true because the script is no longer available, which is happening when the cache.html gets blocked by a firewall. Therefore our application stays in a perpetual loading application page which isn't a good look. Is there a way to test whether the cache.html file has the correct content, assuming there is a way to wait for it to load completely? Joe On Aug 5, 1:33 am, Joe Cole profilercorporat...@gmail.com wrote: When debugging a customer who couldn't load our site with an http connection (worked fine on ssl as it bypassed the firewall) we came across an issue where if we tried to load the *.cache.html file gwt was trying to load manually the companies firewall had displayed an error message. There was no error on the gwt side, so we were unable to provide feedback to the user. Is it possible to write something in the nocache.js that checks that the *.cache.html that is loaded is actually what we expect, and if not, we can get an error message back to the user in some way? Currently we use the following method for detecting load errors, but they aren't being called. Could it be tied into this in some way? meta name=gwt:onLoadErrorFn content=loaderror/meta meta name=gwt:onPropertyErrorFn content=unsupported/meta script type=text/javascript !-- // Called when GWT is not supported function unsupported() { document.getElementById('loading').className = loadError message-center-screen; document.getElementById('loading-content').innerHTML = Your browser is not supported. Please reload with a modern browser such as a href=\http://www.getfirefox.com\;Firefox/a or Internet Explorer Version 6 or Above.; } function loaderror(){ document.getElementById('loading').className = loadError message- center-screen; document.getElementById('loading-content').innerHTML = Error: There was a problem loading the application.; } -- /script E.g. a new meta property could be added that tells us the cache file is not able to be loaded, with the name of the cache file so we can show them the error by opening it in a new window so they can see the error message. Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Incubator project
We have been using the ScrollTable in production for a over a year. Things we have had to implement on our own (not sure if this stuff is covered in the current drops): - sorting using comparators - tablemodel interface (supporting paging) - storing of current sorting indices to original row indices. - We built our own paging mechanism, but if doing it again would probably use the incubators - On window resize recalculate columns. It works really well though, no complaints here. On Jul 31, 12:09 pm, Ben benzhe...@gmail.com wrote: Is there anyone using GWT incubator project in production? The PagiongScrollTable looks pretty interesting to me. But not sure if this incubator project is fine for production as GWT itself. If anyone has experiences, could you share your experiences? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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 App Runs Everywhere but on 1 computer
If you can, install ethereal (it has a new name) on the client and monitor your server logs at the same time. That usually helps in issues like this. Joe On Jul 31, 9:09 am, Chris chrish...@gmail.com wrote: I have an interesting problem that I'm not sure how to debug. Any pointers would be helpful. I have an application where the user logs in and then is presented with a menu of actions. This application works just about everywhere just fine. However, today I ran into an instance on 1 computer where it doesn't. I'm trying to figure out why the app stops working on this computer. What happens is: a) the user logins in and I see the tx on the server b) I see the response on the client (using firebug in firefox 3.5) Once the client gets the response, nothing. I have tried to set break on error (in firefub) to no avail, nothing is executed - or at least throwing an error that is caught by firebug. Nothing appears in the firefox console nor the firebug console. Has anyone seen anything like this? Any pointers on how to even debug this? The kicker is the computer is half way around the world. Wish I had physical access to it and not just a VPN connection to it. This computer's setup is: XP Home Edition SP 2 Firefox 3.5 / IE 8 / Chrome (and they all of the same problem) GWT 1.6 I have run these browsers (firefox 3.5 is on 100's of my clients so that isn't the generic issue) on a lot of different computers and no other computer has the same issues. Could there be some other software stopping the RPC success from evaluating? Also, the computer is able to run other large js program (e.g., gmail). Thanks in advance for a pointer, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: large GWT app fails to load in IE - anyone else seeing this?
Hi Dave, We have experienced some issues that may be explained by this. Did you get any further with fixing the issue? Joe On Jun 5, 7:20 pm, DaveS dave.sell...@gmail.com wrote: [re-post with better title - sorry for the dup but this is killing me!] If anyone from theGWTdev team is reading, please get in touch, we are struggling badly with this issue and would *really* appreciate any help. We have a fairly bigGWTapp, and we are experiencing some issues when running it in IE. Sometimes (and there's no rhyme or reason to it) the app simply fails to start up. The HTML file is loaded by the browser, and the my.app.nocache.js file is loaded, but it then gets stuck. After a *lot* of debugging and cursing IE, we found out that it is stuck in the .nocache.js file waiting for the document readyState to become ready. There is a timer-function in this file, that goes off every 50ms, and checks to see if the $doc.readyState is loaded or complete and for some reason, when our app fails to load, the $doc.readyState never has either of those values (it seems to be stuck in interactive). When the app loads and runs correctly, this timer finds the readyState the first time it goes off, and it then triggers the app to be loaded. I see there is also an event-listener on the DOMContentLoaded event that effectively does the same thing, so it looks like the designers tried to work around this in more ways than one already. Obviously, in the cases where our app fails to start, this event is not firing either. Has anyone else ever seen this, or have any ideas about why IE is not setting the document readyState. I can see it might be because the document really isn't ready, but is there any way we can tell what it's waiting for? Any suggestions gratefully received Dave. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Gmail this is taking longer than usual message
We have noticed a few cases where we need to clear the browser cache as the user cannot view the application. This is *very* rare, but we would like to remove any confusion for the user and popup a message saying the app hasn't loaded, and how to fix it. Before we go and implement a javascript timer that checks whether our application has loaded correctly, has anyone else done this for their application and used it in production? Joe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT next release - what/when?
Alex, Is there a specific tag that google are using internally for products like wave or are you using 1.6? Joe On Jul 14, 3:10 am, Alex Rudnick a...@google.com wrote: Hey Ainata, We've got a pretty good GWT roadmap over here:http://code.google.com/webtoolkit/makinggwtbetter.html#roadmap (although we should update that page, because we've already released GWT 1.6!) And somebody can correct me if I'm wrong, but I think all of those features listed under Post 1.6 are going to be in the 2.0 version. Aside from UiBinder, they're already in the trunk. GWT 2.0 is coming pretty soon, but it's not hard to build the trunk from source, so you can try the new features today! We don't have an official list of libraries, but you can find quite a few GWT-related projects by searching Google Code like this:http://code.google.com/hosting/search?q=label:GWT On Sun, Jul 12, 2009 at 10:56 AM, Ainata-Lebkassem.alsayed@gmail.com wrote: What will the next GWT release focus on and what is the expected date for that? Is there a centralized location/website that keeps tracks of GWT 3rd party libs? Hope this helps! -- Alex Rudnick swe, gwt, atl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: opacity filter in ie6
Firstly, wow that looks amazing! Great work! I've run into this before and this solved it for me: http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/ Are you planning on selling this as a component? Just wondering as I saw it was gpl. Joe On Jul 1, 6:21 pm, bradr brad.rydzew...@gmail.com wrote: I have a calendar component that I am building: souce @http://code.google.com/p/gwt-cal demo @http://google.latest.gwt-web-calendar.appspot.com/ I am having problems with opacity and ie6, using the filter:alpha (opacity=x). If you view the above demo in IE6 you will see that opacity is not working. I used the IE developer toolbar and I see the filter property is set but not being applied. I then exported the entire DOM + style to a new html file and opened the file in IE6 and the opacity worked... very strange. Just doesn't seem to want to work in my gwt example... Wondering if the community has any suggestions (other than just ignore IE6... trust me I would if I could) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: history does not work propertly
Your doctype has to be set correctly for history to work in IE. What is your doctype set to? It should be: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:// www.w3.org/TR/html4/loose.dtd On Jun 15, 2:02 am, Gabriel Gutierrez gutierrez...@gmail.com wrote: Does anyone knows why history does not ork propertly on IE ? I have this on my .html iframe src=javascript:'' id=__gwt_historyFrame style=width: 0;height:0;border:0/iframe and on my java code History.addValueChangeHandler(this); String initToken = History.getToken(); if (initToken.length() == 0) { History.newItem(index);} History.fireCurrentHistoryState(); So in firefox works fine, but on IE it goes to the server requestiong the same page, it should not do that, or at least it shouldn't be so obvious, cuz my page goes blank and the it appears again with the new changes, how can i avoid this?. Regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: SuggestBox with Facebook-style Autocomplete?
Hi Matt, We have one a similar thing for one of our applications, so it's definitely possible. The left hand section of the suggest box provides your highlighted search terms, and the right hand side provides detailed preview information about the selected item, and is heavily customised through css. The general approach is to *unfortunately* copy and paste SuggestBox and all it's related classes into your own package in the com.google.gwt.user.client package, due to the package protected nature of the existing api and final classes. You can then add all your functionality desired into your custom version. We found that we have to extend it in quite a few places to make it usable enough for clients. I know of one public enhanced suggestbox which is code.google.com/p/ kiyaa and you can look at the related commercial project clarityaccounting which is quite impressive for a demo of how they work. I am not sure if the same information applies to 1.6 as we haven't upgraded yet. Joe On May 29, 10:45 am, Matt Raible mrai...@gmail.com wrote: I'm looking for a GWT-based autocompleter that allows for a Facebook- style presentation of the chosen item. I was able to get SuggestBox to select multiple (comma-delimited) values using the following tutorial: http://ljvjonok.blogspot.com/2008/10/gwt-suggestbox-how-to-make-multi... r However, to do formatting of the selected items, it seems like a div structure needs to be used so the items can be formatted with CSS. Since SelectBox only accepts a TextBoxBase in its constructor, I'm guessing this is not possible out-of-the-box. For a specific example of what I'm looking for, see the following jQuery Plugin. http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-tex... Has anyone created such a widget for GWT? Thanks, Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Portlets framework published
Your logic applies to normal java linking (see fsf's lgpl and java post) but with gwt, it seems it may be thought of as static linking: http://pocketdope.blogspot.com/2008/02/why-you-shouldnt-use-lgpl-for-gwt.html Personally, I would agree. Thoughts? On Apr 7, 3:04 pm, Vitali Lovich vlov...@gmail.com wrote: On Mon, Apr 6, 2009 at 10:21 PM, Joe Cole profilercorporat...@gmail.comwrote: Looks great. What are the implications for the use of the LGPL? From my understanding LGPL + gwt = distribute source? No - you only have to distribute the changes you make to the library (can't recall the fundamental differences between v2 v3 for LGPL, but this remains the same because that's the fundamental reason LGPL exists in parallel with GPL). Joe On Apr 7, 1:37 am, david.tin...@gmail.com david.tin...@gmail.com wrote: GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Portlets framework published
IANAL but I believe you are stuck with liberal licensing or creating your own special license. In practice license makes no difference; if the project is successful it will always have contributions back. Joe On Apr 8, 1:07 am, David Tinker david.tin...@gmail.com wrote: Hmm. Our intention is to allow the use of GWT Portlets in commercial closed source projects without forcing those projects to become open source. We do want people who modify the framework to contribute their changes back to the community. That is why we chose LGPL instead of GPL or Apache 2. Is there anyone on this thread who is a lawyer who can answer this question? What do we need to do to fulfill our intent as described above? Cheers David On Apr 7, 12:48 pm, Joe Cole profilercorporat...@gmail.com wrote: Your logic applies to normal java linking (see fsf's lgpl and java post) but with gwt, it seems it may be thought of as static linking: http://pocketdope.blogspot.com/2008/02/why-you-shouldnt-use-lgpl-for-... Personally, I would agree. Thoughts? On Apr 7, 3:04 pm, Vitali Lovich vlov...@gmail.com wrote: On Mon, Apr 6, 2009 at 10:21 PM, Joe Cole profilercorporat...@gmail.comwrote: Looks great. What are the implications for the use of the LGPL? From my understanding LGPL + gwt = distribute source? No - you only have to distribute the changes you make to the library (can't recall the fundamental differences between v2 v3 for LGPL, but this remains the same because that's the fundamental reason LGPL exists in parallel with GPL). Joe On Apr 7, 1:37 am, david.tin...@gmail.com david.tin...@gmail.com wrote: GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT Portlets framework published
Looks great. What are the implications for the use of the LGPL? From my understanding LGPL + gwt = distribute source? Joe On Apr 7, 1:37 am, david.tin...@gmail.com david.tin...@gmail.com wrote: GWT Portlets is a free open source web framework for building modular GWT (Google Web Toolkit) applications. GWT provides the low level building blocks required to build web applications (Java to Javascript compiler, basic UI widgets, an RPC mechanism etc.) but typical business applications can benefit from the additional scaffolding provided by GWT Portlets. In traditional web applications this role would be fulfilled by Struts and other web frameworks. http://www.gwtportlets.org/ Please have a look. All feedback will be appreciated. Note that the signup mails send by the site tend to get eaten by spam filters so check your spam folder if you don't receive the mail. Thanks David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: DeckPanel causes Widget to disappear
Arrgh. I thought I was using DeckPanel yesterday and was using StackPanel. The easiest way to debug it will be using firebug. Check to see it's structue after loading - i.e. is the widget a child? Sorry about that! Joe On Mar 4, 8:30 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Joe- What API are you looking at? I only see one DeckPanel.add() method: void add(Widget w) Adds the specified widget to the deck. I've checked both 1.5.2 and 1.5.3. There's an inherited add() method, but it still doesn't match your signature. Are you thinking of TabPanel? On Tue, Mar 3, 2009 at 11:20 PM, Joe Cole profilercorporat...@gmail.com wrote: I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for 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: Div in GWT?
We ended up creating our own classes for more html-like widgets. Div (see the HTML widget implementation to get started, it's actually a div), Span, OL/UL, Heading etc and combinations as needed. I do believe it is the best approach for styling. If you understand html and css you can work around the quirks easily. It's also really easy to do it in gwt. Even though our Div class is pretty much identical to the gwt HTML class, we think in Div/Span etc so it fits our workflow better to use this. The major thing I still delegate to horizontalpanels for is a row of components with vertical alignment set to middle (e.g. image-text alignment issues, multiple image alignment etc). I use our widgets for pretty much every other part of layout. Joe On Mar 3, 9:20 pm, Joakim Sjöberg joakim.sjob...@artificial- solutions.com wrote: Hi! After some research I have realized that panels are always used J But there is different kinds of panels and some uses TABLES and some uses DIVs am I right about this? We want to make our application more independent from the layout so that we can make different layouts for different costumers. What is the best way to achieve this? Should we start using DIV panels instead? And much more use CSS to control the graphics? Is there anyone who has any input in this matter I would be very very happy J Regards Joakim Sjöberg From: Google-Web-Toolkit@googlegroups.com [mailto:google-web-tool...@googlegroups.com] On Behalf Of Joakim Sjöberg Sent: Monday, March 02, 2009 8:43 AM To: Google-Web-Toolkit@googlegroups.com Subject: Div in GWT? Hi! We have created an application that uses standard html and panels. I wonder if there is any good way to used DIVs instead of panels? Is there anyone who have done this that could give me some advice? Any special way to do it? Joakim Sjöberg Technical Consultant Artificial Solutions Scandinavia AB --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: DeckPanel causes Widget to disappear
I think the problem may be that you are not using the deckpanel add methods: DeckPanel.add(String text, Widget widget, boolean asHTML) Can you try that? On Mar 4, 1:44 pm, Robert J. Carr rjc...@gmail.com wrote: Hi Ian ... thanks for the response. Let me put it in code then: Widget w = new MyCompilicatedWidget(); DeckPanel deck = new DeckPanel(); deck.add(w); deck.showWidget(0); RootPanel.get(main).add(deck); // This doesn't work ... shows up as a single black line, however: Widget w = new MyCompilicatedWidget(); SimplePanel simple = new SimplePanel(); simple.setWidget(w); RootPanel.get(main).add(s); // Works fine, or even: RootPanel.get(main).add(new MyCompilicatedWidget()); // End code Assuming I have no styles applied to my DeckPanel (which I don't), I don't see how this can be a CSS issue. Thanks for the suggestion though, I'll dig a little deeper. Also, not surprising, the same behavior happens for a TabPanel, which makes sense because it uses a DeckPanel. On Tue, Mar 3, 2009 at 4:31 PM, Ian Bambury ianbamb...@gmail.com wrote: My approach would be to add a border to the various widget one at a time (1px dotted red, say) to find out which widget is not displaying correctly. The chances are that you need a height:100% somewhere or that you don't have an absolute height in the chain back to the body element. Without any code, it's not easy to be more specific (for me, anyway) Ian http://examples.roughian.com 2009/3/4 rjcarr rjc...@gmail.com I have a complicated widget that I'm trying to add to a DeckPanel. When the DeckPanel is rendered the widget is not shown, there's just a thin line a pixel or two high of where it is supposed to be. Other widgets added to the deck are displayed fine. Taking away the deck the widget displays normally. I've been using gwt for quite a while now and I've never seen this. There are no errors of any sort ... it just isn't shown. However, if I add my widget to a SimplePanel it works fine. My temporary solution is to replace the DeckPanel with a SimplePanel and use the setWidget() method with a listner, but I'd prefer to use the DeckPanel. Is there any explanation for 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: Check whether browser is supported
See this thread. We use this and it works well. http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/41ce4b44e0d4e262/abd93affd092bb47?lnk=gstq=profilercorporation#abd93affd092bb47 On Feb 3, 11:32 pm, Danny Schimke schimk...@googlemail.com wrote: Is there an easy way to check whether GWT supports a browser, for example in EntryPoint to tell the user, that the Browser is not supported? We've got a empty site if we browse our application in a not supported Browser. Thank you! -Danny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: RPC Error while running on Glassfish
Looks like you have a permissions issue: Caused by: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) I would check the glassfish docs on how to allow reflection for your servlets. Security must be turned off in the dev version. On Jan 11, 10:38 pm, Valavanur Man mramad...@gmail.com wrote: Has anyone faced similar issue? Can you please throw some light? On Jan 9, 2:38 pm, GWTFan valavanur...@gmail.com wrote: We are using GWT 1.5.3. On Jan 9, 2:38 pm, GWTFan valavanur...@gmail.com wrote: I'm getting the following error while trying to run our application on Glassfish High Availability server Version 9.1. However the same application runs well on Glassfish Version 9.1 Developer edition. Can anyone help? [#|2009-01-09T14:32:37.858-0800|SEVERE|sun-appserver9.1| javax.enterprise.system.container.web| _ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-3;_RequestID=570535ce- d13f-40a9-8ab3-6fec976c27e6;|WebModule[/Tims]Exception while dispatching incoming RPC call com.google.gwt.user.client.rpc.SerializationException: java.lang.reflect.InvocationTargetException at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer (ServerSerializationStreamWriter.java:696) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl (ServerSerializationStreamWriter.java:659) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize (ServerSerializationStreamWriter.java:593) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject (AbstractSerializationStreamWriter.java:129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue (ServerSerializationStreamWriter.java:530) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java: 573) at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess (RPC.java:441) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse (RPC.java:529) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:164) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 738) at javax.servlet.http.HttpServlet.service(HttpServlet.java: 831) at sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run (SecurityUtil.java:276) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java: 517) at org.apache.catalina.security.SecurityUtil.execute (SecurityUtil.java:309) at org.apache.catalina.security.SecurityUtil.doAsPrivilege (SecurityUtil.java:192) at org.apache.catalina.core.ApplicationFilterChain.servletService (ApplicationFilterChain.java:404) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:290) at org.apache.catalina.core.StandardContextValve.invokeInternal (StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java: 94) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke (StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:571) at
Re: How to get the width of a cell in a HTML table/Grid
See: UIObject.getOffsetWidth: return DOM.getElementPropertyInt(getElement(), offsetWidth); Just get your td element (do it yourself from the table or yourwidget.getParent().getElement()) and use: return DOM.getElementPropertyInt(element, offsetWidth); On Jan 9, 12:59 pm, sssmack jimc...@gmail.com wrote: The width of a widget contained it a cell can be gotten, but how is the width of a cell or column gotten? Let's say all cells of a Grid contain text. How is the width of a column or cell gotten? 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: Hosted Mode Configuration Question
Just remember that each time you upgrade gwt, or checkout your project from source control gwt will overwrite your web.xml. We get around this by logging a statement on initialisation that shows in the gwt console - if that doesn't appear we know somethings gone wrong and check the web.xml. On Jan 7, 2:07 pm, sjn...@gmail.com nichols_sc...@yahoo.com wrote: To answer my own question, existing web.xml files work fine with hosted mode. I was able to setup log4j, jdom, my singleton and other third party server side configuration by just copying the config into the generated GWT web.xml in ./tomcat/webapss/ROOT/WEB-INF/web.xml and I created a subdirectory called lib and put my third party server side JARS in there and the hosted mode tomcat found them fine. On Jan 6, 6:20 pm, sjn...@gmail.com nichols_sc...@yahoo.com wrote: I want to port a small tomcat application to use GWT hosted mode, but I want to know if I can port the following setting to the *.gwt.xml file from the web.xml file? See below. listener listener-class com.toyota.agentstatus.server.controller.FlatFileReaderFactory /listener-class /listener env-entry env-entry-namecsv.start.hour/env-entry-name env-entry-value05/env-entry-value env-entry-typejava.lang.Integer/env-entry-type /env-entry The first setting is a class that gets loaded on the server at start up as a singleton. As its name suggest it caches the data read from a CSV file. The environment entry tells the singleton to load the cache run at 5:00 AM daily. I didn't see in the docs how to add this to my gwt.xml file. Is there away to add these settings? Thanks Scott --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: Best way to add App configuration properties
Hi Gregor, We don't hack the web.xml in the jar file, but that's a good idea! Obviously the only pitfall is when gwt versions change or you checkout on another computer and gwt overwrites the web.xml - you just have to remember to update it. Our structure of the tomcat/webapps/ROOT/WEB- INF directory is: web.xml web.xml.custom readme.txt readme.txt is: The web.xml here _must not be directly changed_. Instead, change web.xml.custom and put the contents of that in web.xml. Then mark web.xml readonly, and commit everything. If you don't do this, GWT will overwrite web.xml, everything will break, and it'll get committed, and it's a pain to track down the cause. The reason for the .custom is so that when this happens, there is an up-to-date source of what the file should contain handy. :) Joe On Jan 7, 2:58 pm, gregor greg.power...@googlemail.com wrote: Oh, I see now what Joe's done. Hack the web.xml in the gwt-dev-xxx jar. Make sure to do it again when you upgrade GWT versions. That's a cool way to get round it. On Jan 7, 1:36 am, gregor greg.power...@googlemail.com wrote: Hi Scott, If you want to use features like this kicked off from web.xml then you probably need to run hosted mode with the -noserver option. You cannot access and modify web.xml for hosted mode embedded Tomcat. To run using -noserver efectively you just need an Ant build file you can easily run from your IDE to deploy your RPC servlets etc to your own Tomcat instance when you change them, and then set a remote debugging session on it so you can debug them if needed. Another way to get round this problem it is to instantiate all your start up stuff from a static method in some class that when deployed that gets called from a simple startup servlet instead of using web.xml tags. Now that won't get called in GWT hosted mode (because you can't edit web.xml to add a startup servlet...). But if you add a static boolean to that start up class which gets set when its static config method is run, then you can test for this in an init() method of the first RPC servlet your application calls (or you can add a new RPC service that specifically calls it using an if (!GWT.isScript()) clause in onModuleLoad() which will be ignored in deployed mode). It will then pick this up in hosted mode and call the config method, but ignore it in deployed mode. It's a crude workaround, but it does work. Basically, if you want to use web.xml based conveniences they won't work in normal GWT hosted mode. I don't think there are any plans to change that, I guess because doing so would complicate things for normal hosted mode operation and require a lot of work to do. regards gregor On Jan 7, 12:42 am, sjn...@gmail.com nichols_sc...@yahoo.com wrote: It's great we got this figured out, but how come GWT hosted mode doesnt work with exisitng web.xml files so we dont have to code special configuration for development and production deployment? Scott On Dec 12 2008, 4:26 pm, Joe Cole profilercorporat...@gmail.com wrote: Oh, and in your web.xml's that you ship to your production environment you would have a different listener setup. listener listener-classcom.yourcompany.ProductionConfiguration/listener-class /listener On Dec 13, 11:00 am, Joe Cole profilercorporat...@gmail.com wrote: Here is our way: In: tomcat/webapps/ROOT/WEB-INF/web.xml resource-ref res-ref-namejdbc/dbsource/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref listener listener-classcom.yourcompany.LocalConfiguration/listener- class /listener The only gotcha with this is that when you upgrade gwt it changes the web.xml - we just revert it from version control and all works well. That listener sets up the entire servlet side, including properties guice bindings: public class LocalConfiguration extends AbstractConfiguration { protected IPropertyManager createPropertyManager( final ServletContext context) { return new LocalPropertyManager(); } public IBindings getBindings() { return new LocalBindings(); } } This allows us to ship different setups to the system depending on where it's being used (one for hosted mode, production, test, staging etc). The datasource is container managed which is why it's defined in the file. The other file you will need for hosted mode is: tomcat/conf/gwt/localhost/ROOT.xml Context privileged=true antiResourceLocking=false antiJARLocking=false debug=1 reloadable=true path= !-- GWT uses Tomcat 5.0.28 - use the 5.0 style for defining
Re: jsp + javascript code not working. why?
Hasan, Can you post how you got it working? On Jan 2, 10:50 pm, Hasan Turksoy hturk...@gmail.com wrote: @Reinier; yes, it's a normal jsp page... but not working on GWT's tomcat instance... @Joe; Thanks, it worked by your suggested solution... BTW, does anybody know the reason why GWT's internal tomcat not working with a valid jsp code which is working on normal tomcat instances? I'd be appreciated if a GWT tomcat implementor, watching this thread, explains... Regards, Hasan... On Fri, Jan 2, 2009 at 6:47 AM, Joe Cole profilercorporat...@gmail.comwrote: See my post: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... It should help. You'll need to override the gwtshellservlet and make sure that you process the html files as the generated servlets. Not sure if anyone has done it, but it would be a great addition to gwt itself. On Jan 2, 11:07 am, Hasan Turksoy hturk...@gmail.com wrote: Hi all, i want to change my main html page to a jsp page - to get some request parameters to process in gwt code. But its not working... Below is a simple test code which is working on tomcat but not working on shell... script language=javascript % String str = TEST; % var s=%=str%; alert(s); /script Anybody knows the reason? Thanks and regards, Hasan... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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: 1.6 Users
Hi Thomas, We are using 1.5.3 as well. I have a read a few blog posts that oophm is ready and usable at the moment - is that correct? Joe On Dec 5, 9:49 pm, Thomas Broyer [EMAIL PROTECTED] wrote: On 5 déc, 02:53, Joe Cole [EMAIL PROTECTED] wrote: We are itching to use 1.6, especially the new async loading features and oophm. Just a note to say that OOPHM is targetted to 2.0, not 1.6. I'm using 1.5.3 in production; but some people here have said they're developping against 1.6 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Charting capabilities under GWT
Hi Miguel, We have successfully integrated amcharts.com into our application. It was very easy, I even think there are some examples posted in a similar thread a while ago. We tried a couple of other methods (jfreechart - image), xmlswf, openflash, gwtchart but found amcharts the best combination of interaction and look. Joe On Dec 5, 10:07 pm, Lonifasiko [EMAIL PROTECTED] wrote: Before taking the final decision of using GWT for our new web application, I wanted to know which options I have in order to generate graphs and charts inside a GWT application. In fact, these charting cappabilities are the most important part of the application for our customer, thus, it's a requisite that GWT application lets us integrate and generate good graphs. Data for these graphs would be retrieved from a MySQL database, using servlets and GWT-RPC to bypass data from server to client. The more advanced the graphs are, the better, no matter if opensource or commercial. For us would be awesome to let users somehow interact with charts at client-side, you know, effects and actions Flash graphs already do for example. Any advice around charting possibilities under GWT will be greatly appreciated. Thanks very much in advance. -- Miguel Blog:http://lonifasiko.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: 1.6 Users
Where can I get more info on 1.6 features? There are a couple of good gwt sources: The gwt-contributors list ongwt.com gwtsite.com gwtnow.com del.icio.us/tag/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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
1.6 Users
We are itching to use 1.6, especially the new async loading features and oophm. Is anyone using it in production? Are there any good tags to check out that are relatively stable? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Pass an applicationSessionId in each rpc request
You could just change the request urls: target.setServiceEntryPoint(GWT.getModuleBaseURL() + / + service +;sessionid=+sessionId); I haven't tried it, but assume it would work. You would have to pull out the appropriate information on the server side. Joe On Nov 28, 5:35 am, seb2nim [EMAIL PROTECTED] wrote: Hi everyone. I was playing with cookie and session and i found i cant open two different tabs on firefox with twice the same app... so i think i'm doing something wrong : I was thinking there would be two different httpSessions but apparently not. the problem is i actually keep some user information in httpsession... So two apps shares the same information wich is, really bad. I decided to generate a unique 'application level session id' at login so that i can manage multiple in one httpsession. Drawback is that once passed to client-side code, i need to pass it on every rpc call... and i'm a lazy guy... I dont want to refactor each method signature... As RPC mecanism is now improved in GWT1.5 : The first is that asynchronous interface methods can now return the underlying HTTP request object (http.client.Request) so you can access and tweak it as necessary for your application needs before sending it off through RPC. Asynchronous interface methods can now also return void or http.client.RequestBuilder objects. I think i can tweak my calls to append the appSessId in header or something like that. Did anyone already do this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: session creation
I just had the same problem on a new play site we are doing. Check your cookie path using your browser, we were deployed at /x, but rewriting so that the application came up at / (e.g. google.com compared to google.com/x). The cookies were getting reset each time because it was using the wrong path, so we had to set the cookie path in the servlet xml files to / rather than the default: /x. To check cookie path use your browser options and find the cookies section then search for your site. Hope that helps. On Oct 24, 5:47 pm, kavuri [EMAIL PROTECTED] wrote: Hi , I m creating a session at the time of loginby using the fallowing code HttpServletRequest request = getThreadLocalRequest(); HttpSession session = request.getSession(); session.setAttribute(uaerName, impl.getFirstName() + impl.getLastName()); session.setAttribute(loginId, impl.getWinLoginId()); How can i access this session attributes at client side..and at serverside at the time logging off i tried to get the same ssession which i was created at the time of login wit the fallowing code HttpSession session = getThreadLocalRequest().getSession(); System.out.println(session.isNew()); System.out.println(session.getAttribute(userName) + logged out);. i got the output as true and null rather than getting false and userName. could anyone pls tell me the solution wit some sample code... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Selenium IDE problem
We haven't used trees, but for everything else we had to use a global id generator: Widget x = ...; Ids.add(x); // set's the id of x to some unique id Joe On Oct 21, 2:25 am, Markuz05 [EMAIL PROTECTED] wrote: I'm trying to use Selenium IDE to test my web application. Is it possible that selenium doesn't record click on my item tree? How can i resolve this problem? I think that this tool could be very usefull for my tests but this problem stops me ; thank you Markuz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: PopupPanel used as tooltip with animation causes incorrect position
I am just bumping this as I think this is a bug in gwt and want to make sure that the correct people are aware. Should I file a bug? On Sep 11, 3:25 am, Joe Cole [EMAIL PROTECTED] wrote: Platform: Using GWT1.5 (release) and linux When I have a single instance of a popup panel, and it has it's content position set in response to rollover of multiple elements, all works fine until I enable animation. To run the test case just use yourWidget.add(PopupFail.buildFailingTestCase()) to see the error. Is there any way to get around this? package com.google.gwt.user.client.ui; import com.google.gwt.user.client.DOM; public class PopupFail { public static Widget buildFailingTestCase() { VerticalPanel p = new VerticalPanel(); p.setSpacing(5); p .add(new Label( Run your mouse quickly over the fail labels to see animation causing fail.)); PopupPanel pop = new PopupPanel(true, false); pop.setWidget(new Label(FAIL!)); pop.setAnimationEnabled(true); p.add(new Invoker(Fail 1, pop)); p.add(new Invoker(Fail 2, pop)); p.add(new Invoker(Fail 3, pop)); p.add(new Invoker(Fail 4, pop)); p .add(new Label( Run your mouse quickly over the pass labels to see no animation causing win.)); pop = new PopupPanel(true, false); pop.setWidget(new Label(WIN!)); pop.setAnimationEnabled(false); p.add(new Invoker(Pass 1, pop)); p.add(new Invoker(Pass 2, pop)); p.add(new Invoker(Pass 3, pop)); p.add(new Invoker(Pass 4, pop)); return p; } static class Invoker extends Label implements MouseListener { PopupPanel pop; public Invoker(final String text, final PopupPanel pop) { super(); this.pop = pop; addMouseListener(this); setText(text); } private int getDisplayLocationX(final Widget sender, final int x) { return sender.getAbsoluteLeft() + x + getPageScrollLeft(); } private int getDisplayLocationY(final Widget sender, final int y) { return sender.getAbsoluteTop() + y + getPageScrollTop(); } private int getPageScrollTop() { return DOM .getAbsoluteTop(DOM.getParent(RootPanel.getBodyElement())); } private int getPageScrollLeft() { return DOM.getAbsoluteLeft(DOM .getParent(RootPanel.getBodyElement())); } public void onMouseDown(final Widget sender, final int x, final int y) { } public void onMouseEnter(final Widget sender) { pop.show(); } public void onMouseLeave(final Widget sender) { pop.hide(); } public void onMouseMove(final Widget sender, final int x, final int y) { pop.setPopupPosition(getDisplayLocationX(this, x), getDisplayLocationY(this, y)); } public void onMouseUp(final Widget sender, final int x, final int y) { } } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: IE 6 doesn't finish load page
We ran into similar issues for a while, frustrating I know. 1. Make sure you use ethereal (forget its new name) to see what is being served by your webserver. Gzip compression can break ie, so you have to server differently to each browser. Ethereal should sort this out. 2. Make sure your javascript are the last thing in your page. If they aren't, i.e. can have issues. 3. Check the troubleshooting page of gmail. It's really good and can help you deal with popup blockers et al. 4. Find other similar sized javascript sites written in gwt and check they load. Good luck! Joe On Oct 4, 8:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi people, I have a serious problem I suggest to use the gwt technology for the new projects of my company I use gwt 1.5.2 and gwt-ext 2.0.5 every thing go fine but when I try to prove the app in IE 6 the page load don't finish, my CPU get more than 50% for iexplorer.exe and don´t finish never. This usually happens the first time, then I kill process I try again and wrko fine woth out error of js, but unexpectedly it happens again and kill process and work fine ... and another time crash. I navigate for many topics, forums, suggest but I can't fine the exactly same problem, and suspect that is not for RPC calls because the data some time appear but the loading doesn´t finish never. IE version : 6.0.2900.2180 jscript.dll: 5.6.0.8834 Pls help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: FlexTable odd behavior
We have experienced issues with flextable when setting up the table in DeferredCommands e.g.: ListCommand commands = new ArrayListCommand(){{ add(buildStructure()); add(buildCellWidgets()); add(setInitialValues()); add(setBackgroundColors()); }}; Incrementally.execute(commands); I am not sure what was happening, but basically it just didn't show no amount of debugging helped. Perhaps this is what you are running into as well? We just reverted to the non-deferred method of building the table. Joe On Sep 30, 3:59 am, Grundle [EMAIL PROTECTED] wrote: I am currently developing an application where GWT has been the primary API. So far things have gone fairly well until I began trying to implement a data entry portion. I am experience strange behavior with FlexTable where if I use FlexTable.setText(0, 0, foo); FlexTable.setText(0, 1, bar); The data shows up as intended. However if I do FlexTable.setWidget(0, 0, new Label(FooBar)); FlexTable.setWidget(0, 1, new TextBox()); suddenly the components are not appearing on the screen. I cannot figure out why setText data appears, but setWidget does not want to render. I experienced the same behavior using Grid as well, so I am at the point where I feel like I have missed something obvious. I feel like I have tried everything, such as TextBox.setVisible() , TextBox.setVisibleSize(5), FlexTable.setWidth(100%). This really makes no sense. As for the other Widgets/Panels that are being used see the following: Specifically I am adding the FlexTable to a VerticalPanel, which is then being added to a DockPanel. i.e. VerticalPanel.add(FlexTable); DockPanel.add(VerticalPanel, DockPanel.CENTER); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Best solution for client-side graphing in GWT?
Agreed. It's very well priced as well. The main drawback of amcharts is that there is no ability to generate server-side charts (it's all flash, and restricted to client side for the time being). You'll have to generate charts for pdf's if you need them using another solution like jfreechart. Another hiccup we faced was getting them to display - sometimes there are errors (I forget the reason, but they are intermittent). You'll have to include swfobject.js as a script, and then the following code should help: public void build() { try { if (!buildInternal(swfUrl, settingsFile, dataUrl, path, height, width 101 ? width + % : width + , preloaderColour, backgroundColour, divID)) { new Timer() { public void run() { build(); } }.schedule(2000); } } catch (final Exception e) { log(e); // this happens when the user changes pages before we have built } } /** * This calls out to the SWFObject class to build the flash widget itself */ private native boolean buildInternal(String swfUrl, String settings, String dataUrl, String path, int height, String width, String preloaderColour, String backgroundColour, String divID) /*-{ if( typeof($wnd.deconcept) == undefined || $wnd.deconcept == null ) return false; var so = new $wnd.deconcept.SWFObject(swfUrl, amline, width, height, 8, backgroundColour); so.addVariable(path, path); so.addVariable(chart_settings, escape(settings)); so.addVariable(data_file, escape(dataUrl)); so.addVariable(preloader_color, escape(preloaderColour)); so.addParam(wmode, transparent); so.write(divID); return true; }-*/; Joe On Sep 16, 12:53 pm, Tim [EMAIL PROTECTED] wrote: amcharts (http://www.amcharts.com) someone mentionned earlier looks extremely impressive. It seems they also have the world map charting widget as wellhttp://www.ammap.com/, which is quite cool as well. On Sep 14, 8:02 pm, Arthur Kalmenson [EMAIL PROTECTED] wrote: Hello Nathan, I'd recommend that Google Visualization API:http://code.google.com/apis/visualization/ There are GWT overlays in the works at the GALGWT project (http:// code.google.com/p/gwt-google-apis/). See the issue here:http://code.google.com/p/gwt-google-apis/issues/detail?id=130 On Sep 12, 1:04 pm, Nathan [EMAIL PROTECTED] wrote: I've been investigating the best way to do client-side graphing in GWT. The features that I am looking for that don't seem to be widely provided are the ability for users to select portions of the graph, and to receive events for mouse clicks on any part of the graph. I also can't use a solution that uses flash (IE support however, is not important). The solution I'm currently considering is to write a bunch of JavaScript Overlay classes for use with flot (http://code.google.com/p/flot/ ). As far as I can tell, gchart (http://code.google.com/p/gchart/) is the only native GWT graphing solution, but has no events support. I also looked into the dojox charting library, but flot seems to have better events support (particularly the ability to click on any point in the graph and get an event with the graph coordinates for the point clicked). Are there any projects out there that I've missed? I'd really like a native GWT solution, if possible. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Download file from server to client - w Servlet etc PLEASE?
Make sure you use the gwt jsni equivalent to; var win = Window.open(url, name, options); if ( win ) return true; return false; Otherwise you can't detect when popups are blocked. It will save you tons of time in user support if you tell them to enable popups if the window wasn't opened. It amazed me how many users didn't know how to enable this. Joe On Sep 12, 8:33 pm, Jason Morris [EMAIL PROTECTED] wrote: I assume what you want is for the client to have a new file on their hard-drive. First you'll need a servlet that produces the data. I'm not sure what data-format you want to work with, so I'm gonna assume a plain text file here (note, this is all typed directly into my mail client, sorry for any mistakes). public class MyFileServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType(text/plain); resp.setHeader(Content-Disposition, attachment; filename=output.txt); PrintWriter out = resp.getWriter(); out.println(This is the output content); out.println(Probably something dynamic should go in here); } } Then you'll want to write the client side to fetch the file. public class MyEntryPoint implements EntryPoint { public void onModuleLoad() { String link = GWT.getModuleBaseURL() + servlet/myfiledownload; RootPanel.get().add(new HTML(a href=\ + link + \Download File/a)); } } You can also use Window.open(link, downloadWindow, ); to download the file from an EventListener. Finally you'll need to configure the servlet in either your Module.gwt.xml file (for hosted mode), or in your web.xml file for web mode. Module.gwt.xml example, add: servlet path=/servlet/myfiledownload class=your.package.name.here.MyFileServlet / web.xml add: servlet servlet-nameMyFileServlet/servlet-name servlet-classyour.package.name.here.MyFileServlet/servlet-class /servlet servlet-mapping servlet-nameMyFileServlet/servlet-name url-pattern/your.package.name.here/servlet/myfiledownload/url-pattern /servlet-mapping Like I show in the web.xml example, you'll need to make sure that the servlet is bound to the module base directory (where the nocache.html files all live), and not next to the host HTML page. Another important factor is: the Servlet must not be in your client package, since the GWT compiler shouldn't get hold of it. Hope this helps. Jason. JohnnyGWT wrote: I've seen several discussions on how to download a file to the client. All contain bits of code but no complete examples. FileUpload is fine easy using Apache commons stuff. Can someone PLEASE provide some examples etc for downloading a file to the client? In my scenario I have to send a newly created file to the client. Either this is by a download servlet 'get' method or a URL. Any full examples would be greatly appreciated. Thanx 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---