Re: Set CSS for ListBox Items working in Firefox not in Safari
Hi Shashi Kant This is my css code: .list_box_style{ background-image: url(../images/pkg_image2.bmp); background-position: right; background-repeat: no-repeat; } Is this correct? I don't think this is CSS problem.. Because its working in FF correctly In Safari and IE it's not working.. If you have another solution then please suggest.. It's really urgent... On Mar 23, 4:26 pm, Shashi Kant kant.shash...@gmail.com wrote: This might be a CSS issue Paste you list_box_style here. On Mar 23, 4:03 pm, Danny Schimke schimk...@googlemail.com wrote: Could it be, that the style is set but not shown. We're adding CSS- classnames to option- elements of a listbox too, but only in FF there is a change visible. Because the listbox for example in IE will not refresh its GUI after adding styles to its items. I have not found a fix for this yet... there should be a way to refresh GWT- components on view. -Danny 2009/3/23 priya joshipriya...@gmail.com Hi all, I have one ListBox in my GWT application. I want to set CSS for some of the items in this ListBox.. I am using following code for this: DOM.getChild(listBox.getElement(), i + 1).setClassName (list_box_style); This code is working perfect in Firefox but not working in Safari browser. I don't know this is problem of DOM.getChild() method or setting style for that. Is Safari supports DOM.getChild() method? If anyone know another way then please suggest... Any help is welcome.. Thanks in advance, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
waiting for help
Hello, I have developed an applicatin Integrating GWT+Spring+Hibernate in the web mode , from the link suggested by you that is, the eggsy Three part Tutorial. Now I want to integrate my application with Struts. Can you help me in doing that and suggest me some of the links which help me in doing the further development. Thanks, Poonam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Keyboard event
Sorry for my misbehavior... I was quite angry 'cause my project has stalled because of my incapacity of intercepting some events... Won't happen again... ;) Anyway.. If someone would still want to help me, I would like some more explanation.. I don't understand.. 1) Is there any relationship between FocusListener and KeyboardListener? I mean if a widget must have fired first onFocus before could receive keyboard events. 2) The FocusListener rely totally on onFocus/onBlur DOM events or is some custom cross-browser implementation? 3) I have a class declare like this: public class ResizableDraggablePanel extends AbsolutePanel implements SourcesMouseEvents and the events it sinks are: DOM.sinkEvents(getElement(), DOM.getEventsSunk(getElement()) | Event.MOUSEEVENTS); And I have another class that extends the first like this: public class Evento extends ResizableDraggablePanel implements SourcesKeyboardEvents, HasFocus{ sinking the events like this: sinkEvents(DOM.getEventsSunk(getElement()) | Event.MOUSEEVENTS | Event.ONDBLCLICK | Event.KEYEVENTS | Event.FOCUSEVENTS); The problem is that the second class responds to focus/keyboard events only in firefox. It could have anything to do with the first class? If you need the whole source code just tell me and I'll post it. Thanks and sorry for my angry post.. On Mar 23, 11:05 pm, lukehashj bobwazn...@gmail.com wrote: Remember, when flaming a forum, not to use your real email address :) You can use the DOM and event listeners to manually monitor events. Just make sure to sink the events properly. http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g... On Mar 23, 3:31 am, nicanor.babula nicanor.bab...@gmail.com wrote: Very nice though... Useless forum... No help at all... I finally figured it out. But it doesn't worth sharing the solution with you... Thank you anyway for your help.. On Mar 20, 5:37 pm, nicanor.babula nicanor.bab...@gmail.com wrote: Hello everyone... This is my first post in here so don't be too sharp on me.. I have wrote a class that extends AbsolutePanel and implements SourcesMouseEvents in order to have an AbsolutePanel that accept mouse events. Now, the next step I want to do is to make it accept Keyboard events. I won't use any other component existing in other libraries (like extjs) because my app must be very light. So, you have any hint? Any tutorial? So far I could handle it just by reading the javadocs, but for this one I couldn't figure it out... Sorry for my poor english too.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Set CSS for ListBox Items working in Firefox not in Safari
Oh you are using an image. I dont think IE supports that. ,This reason behind this is because of how IE gets the base for the HTML Select tag - it's derived from the Win32api - the same reason why dropdown lists and select lists have a nasty habit of rendering above everything else on the html page. BUT, you could still experiment with background-color. That should work like in this example: html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Page/title style type=text/css media=screen .optionBold {background-color: Fuchsia; font-weight: bold;} /style /head body form id=form1 div select id=htmlSelect multiple=multiple size=5 optionNon-styled 1/option optionNon-styled 2/option option class=optionBoldStyled/option option style=background-color: Aqua; font-weight: bold;Styled inline/option /select /div /form /body /html On Mar 24, 11:01 am, priya joshipriya...@gmail.com wrote: Hi Shashi Kant This is my css code: .list_box_style{ background-image: url(../images/pkg_image2.bmp); background-position: right; background-repeat: no-repeat; } Is this correct? I don't think this is CSS problem.. Because its working in FF correctly In Safari and IE it's not working.. If you have another solution then please suggest.. It's really urgent... On Mar 23, 4:26 pm, Shashi Kant kant.shash...@gmail.com wrote: This might be a CSS issue Paste you list_box_style here. On Mar 23, 4:03 pm, Danny Schimke schimk...@googlemail.com wrote: Could it be, that the style is set but not shown. We're adding CSS- classnames to option- elements of a listbox too, but only in FF there is a change visible. Because the listbox for example in IE will not refresh its GUI after adding styles to its items. I have not found a fix for this yet... there should be a way to refresh GWT- components on view. -Danny 2009/3/23 priya joshipriya...@gmail.com Hi all, I have one ListBox in my GWT application. I want to set CSS for some of the items in this ListBox.. I am using following code for this: DOM.getChild(listBox.getElement(), i + 1).setClassName (list_box_style); This code is working perfect in Firefox but not working in Safari browser. I don't know this is problem of DOM.getChild() method or setting style for that. Is Safari supports DOM.getChild() method? If anyone know another way then please suggest... Any help is welcome.. Thanks in advance, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 about the gwt Geolocation accuracy
Hi Mark, I'm making some test in your tool ( geolocation ), but I can take accuracy information. how It works? how you calculate the longitude and latitude? Thanks for your effort. Regards jfco.g...@gmail.com wrote: hello, I have some test with this tool and the latitude an longitude that show me is : (40,-3) but I'm in the (40.28723552052237, -3.8025999069213867) , maybe im making a mistake? or there are something to configure a best accuracy. I'll use the op.setHighAccuracy(true) but I think that not usefull in the way I was thinking. any idea? ;) thanks for your support , and good work Mark!! this tool is really interesting ^o^ !! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
Hi Poonam, It would also help answer your question if you could give more information as to why you want to introduce struts. Or are you obliged to do so for some reason? regards gregor On Mar 24, 9:09 am, Ed post2edb...@hotmail.com wrote: Hi, It's difficult to give a concrete answer to your question as it's to vaque and global. You have to come up with concrete question. I would suggest that you play with some of the examples and read the documentation to get a good understanding of the different components and their boundaries. For example: GWT is purely a front-end (javascript) application that connects with the backend through HTTP POST/get. That's it... You can use the GWT RPC mechanism to easily to connect to a java backend. In your case this would be struts. Said this, have a look how you can connect to Struts. If I google I find a lot of info likehttp://cwiki.apache.org/WW/struts-2-gwt.html. I suppose that you know how to connect Spring and Hibernate. The only thing to consider then is: ho to pass hibernate objects to the front-end as Hibernate objects contain java jre elements that aren't supported by GWT. So you have to decouple this. There is a tool like gwt-hibernate that does that for you. i myself use Dozer and I don't want my backend domain objects to contain any gwt thing, even not some simple interface/class from gwt-hibernate (isn't allowed). There is a lot of info abut this subject. Consider it well as both have their advantages/disadvantages. Look for Spring Hibernate Dozer and you know enough. BTW: I made my own Dozer version such that I does exactly what I want and handles hibernate proxies well. Most of these things are being included in Dozer as we speak (Dozer has improved a lot the last months). Hope this helps. Good luck, Ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
Hello, No reason as particular but I just wanted to check whether it works with struts and if it works then how does it works? If u have the solution ar tried out something then please let me know. 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: Set CSS for ListBox Items working in Firefox not in Safari
My problem is similar. My CSS for option- tag's of a select- element are not shown dynamically their new CSS- layout in IE. I'am setting the CSS- classes like the following: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); My CSS looks like: .empty-option { color: #F2A336; } This is only a color- change... But this color is not shown in IE after adding the class. If I hide and show the listBox again the colors are updated correctly in IE. But this cannot be a correct workaround for me... Example: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); // after this the color of css class empty-option is shown correctly in FF, not IE listBox.setVisible(false); listBox.setVisible(true); // now the color is shown correctly in IE too This means, that the CSS works in all browsers. It's not a CSS- issue... I dont know how to fix this. -Danny 2009/3/24 Shashi Kant kant.shash...@gmail.com Oh you are using an image. I dont think IE supports that. ,This reason behind this is because of how IE gets the base for the HTML Select tag - it's derived from the Win32api - the same reason why dropdown lists and select lists have a nasty habit of rendering above everything else on the html page. BUT, you could still experiment with background-color. That should work like in this example: html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Page/title style type=text/css media=screen .optionBold {background-color: Fuchsia; font-weight: bold;} /style /head body form id=form1 div select id=htmlSelect multiple=multiple size=5 optionNon-styled 1/option optionNon-styled 2/option option class=optionBoldStyled/option option style=background-color: Aqua; font-weight: bold;Styled inline/option /select /div /form /body /html On Mar 24, 11:01 am, priya joshipriya...@gmail.com wrote: Hi Shashi Kant This is my css code: .list_box_style{ background-image: url(../images/pkg_image2.bmp); background-position: right; background-repeat: no-repeat; } Is this correct? I don't think this is CSS problem.. Because its working in FF correctly In Safari and IE it's not working.. If you have another solution then please suggest.. It's really urgent... On Mar 23, 4:26 pm, Shashi Kant kant.shash...@gmail.com wrote: This might be a CSS issue Paste you list_box_style here. On Mar 23, 4:03 pm, Danny Schimke schimk...@googlemail.com wrote: Could it be, that the style is set but not shown. We're adding CSS- classnames to option- elements of a listbox too, but only in FF there is a change visible. Because the listbox for example in IE will not refresh its GUI after adding styles to its items. I have not found a fix for this yet... there should be a way to refresh GWT- components on view. -Danny 2009/3/23 priya joshipriya...@gmail.com Hi all, I have one ListBox in my GWT application. I want to set CSS for some of the items in this ListBox.. I am using following code for this: DOM.getChild(listBox.getElement(), i + 1).setClassName (list_box_style); This code is working perfect in Firefox but not working in Safari browser. I don't know this is problem of DOM.getChild() method or setting style for that. Is Safari supports DOM.getChild() method? If anyone know another way then please suggest... Any help is welcome.. Thanks in advance, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: inhibit selection of some TreeItems on Tree
On 23 mar, 20:11, fedy2 defav...@gmail.com wrote: Hi, I'm looking for a way to inhibit the selection of some TreeItems in a Tree. AFAIK, that's not possible because it would hurt accessibility: you must be able to select an item in order to navigate to the next/ previous sibling or its children (and/or expanding/collapsing its children without the mouse). AFAICT, selection == focus in a GWT Tree. I'm not sure, but maybe subclassing FastTree from GWT-Incubator and overriding processElementClicked(FastTreeItem) might be what you're looking for. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: 2 timers on one page?
On 24 mar, 03:15, denis56 denis.ergashb...@gmail.com wrote: His, does anyone know if there are performance implications with having 2 timers running on a single page? I am designing an application where one timer does background fetching of updates (2s) while the other (0.5s) updates gui elements to achieve blinking behavior. It is especially noticeable in IE, that the background updates take longer than 2s and that the browser is jittering and fails to respond immediately. Has anyone encountered something like that. Maybe having 2 timers is too much, have no idea. Timers in javascript just queue events that are processed by a single event loop in a single thread, so they're not accurate (depends on what you do when the timer fires and on other events you're handling at the same time). John Resig made a pretty complete description: http://ejohn.org/blog/how-javascript-timers-work/ (GWT's schedule() is javascript's setTimeout and GWT's scheduleRepeating() is javascript's setInterval). Also, do GWT UI components understand ISO-8859-1 encoding? I cannot display non-ASCII letters in a label, however, the data coming from a RPC invocation displays properly. strange. Where is your latin-1 text coming from? GWT is JavaScript, where strings are made up of characters, not bytes (i.e. encoding from/to utf-8 or latin-1 or some other encoding is done elsewhere (in the browser)). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
Please first search the forum or internet for answers to your question before posting yours. There is a lot of information out there and I am sure you find most of your answers there. If not, post your concrete question here. GoodLuck, Ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
Thanks Kevin, i'll use it and get back to u with findings. - Harish You can't strengthen the weak by weakening the strong. - Abraham Lincoln 2009/3/24 Kevin Tarn kevn.t...@gmail.com You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Add widget at runtime
Of course it is possible. For example: [code] // create the button Button btn = new Button(click me, new ClickListener(){ public void onClick(Widget sender){ Window.alert(you just click a button); } }; // add the button to a panel AbsolutePanel absolutePanel = new AbsolutePanel(); absolutePanel.add(btn); [/code] In fact almost all panels provide the add which allows you to append widgets to that panel's DOM tree. You can also add elements directly to the root panel (in most cases this is the body). For example: [code] // get an instance of the root panel RootPanel myRoot = RootPanel.get(); // add to the rootpanel the button created in the example above myRoot.add(btn); [/code] On Mar 24, 11:32 am, Gilles gilles_ta...@yahoo.fr wrote: I am coming for the actionScript world. I have some problems at runtime, to fix those problems I would need to at a widget at runtime. For example, I would like to add a button. Is it possible ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Keyboard event
On 24 mar, 09:40, nicanor.babula nicanor.bab...@gmail.com wrote: I don't understand.. 1) Is there any relationship between FocusListener and KeyboardListener? I mean if a widget must have fired first onFocus before could receive keyboard events. Yes, a widget must have the focus (and thus be focusable; which does not mean it has to *fire* focus events at the GWT level) to receive keyboard events. That's how it works in browsers (firstly so that keyboard events are directed to e.g. a single text box at a time ;-) ) and it's unrelated to GWT (i.e. you just cannot change it, you'll have to live with that). Eventually, you could use DOM.addEventPreview to get all keyboard events (including ones that are directed to a text box), but the add in DOM.addEventPreview is misleading as it rather pushes the preview EventPreviewer on an internal stack and effectively *replaces* it in previewing events. 2) The FocusListener rely totally on onFocus/onBlur DOM events or is some custom cross-browser implementation? I believe it's based only on onfocus and onblur DOM events, but I might be wrong (have a look at the code if you really want to know). But in your case (receiving keyboard events), you don't have to play with FocusListener; the need for having focus to receive keyboard events is handled at the browser level. 3) I have a class declare like this: public class ResizableDraggablePanel extends AbsolutePanel implements SourcesMouseEvents and the events it sinks are: DOM.sinkEvents(getElement(), DOM.getEventsSunk(getElement()) | Event.MOUSEEVENTS); You should use this.sinkEvents(Event.MOUSEEVENTS), which does just that but is far more readable and less error-prone. http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/UIObject.html#sinkEvents(int) And I have another class that extends the first like this: public class Evento extends ResizableDraggablePanel implements SourcesKeyboardEvents, HasFocus{ sinking the events like this: sinkEvents(DOM.getEventsSunk(getElement()) | Event.MOUSEEVENTS | Event.ONDBLCLICK | Event.KEYEVENTS | Event.FOCUSEVENTS); The problem is that the second class responds to focus/keyboard events only in firefox. It could have anything to do with the first class? No, I think it's a problem with your DOM element not being focusable (in Firefox, Opera and IE it's just a matter of giving it a tabindex, but in Safari 3 and Chrome 1.0 you have to do a tricky thing with a hidden text box; it'll be fixed in Safari 4 and Chrome 2.0 though). If I were you, I'd extend FocusPanel which handles all this for you; but in your case this means that either Evento doesn't extend ResizableDraggablePanel (and you'll have to refactor your code within a helper class and duplicate a bit of code in the two classes) or ResizableDraggablePanel extends FocusPanel (even if it doesn't need to handle focus events and be focusable). If you feel plucky, you can also copy some bits from FocusPanel (the bits that use FocusImpl) to make your Evento be focusable without having to break inheritance or make the base class a FocusPanel itself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Writing Plasmoid with GWT?
Since Plasmoids can be written in JavaScript... can you develop a Plasmoid with GWT? If so, how? Any pointers? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: warning when compiling RPC method with long[] return type
Don't know, but try using Long instead. In general, if I remember right, the long type requires some extra processing due to the fact that JavaScript doesn't really support it, so some manipulation takes place in JavaScript to make it appear that it does. If you can, avoid using longs in your RemoteServices. On Mar 23, 5:09 am, snorbi sandor.norb...@erinors.com wrote: Hello, I have an RPC interface: public interface Generator extends RemoteService { long generate(); long[] generate(int count); } I get the warning during compiling: [WARN] Line 14: Referencing class 'long_Array_Rank_1_FieldSerializer: unable to resolve class, expect subsequent failures What does this mean? I use gwt-1.6.1, and there was no warning until I upgraded from 1.5.3. Thanks for your help! Regards: Norbi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
RPC slow in hosted mode + external server
Hi everyone, RPC calls to the server suddenly became extremely slow when working in hosted mode using an external web server. By extremely slow I mean it takes almost 10 seconds to complete the call, during which the application freezes completely (huge PITA when you start having timers firing up RPCs every few seconds) . When I compile and deploy the application to the server everything works smoothly. The two computers are on a local network, I tried various combinations like using another server or a virtualbox on the same desktop machine, no change. I also tried disabling firewalls and everything I could think of that might interfere with network traffic. Here's the configuration: Development machine: - GWT 1.53 - Eclipse 3.4.2 on Windows XP - Cypal Studio 1.0 Server: - Ubuntu server 8.04.1 - Geronimo Tomcat 2.1.3 - Java 1.6 Did anyone have similar problems? Any suggestions as to where I could look for a solution? Best, Eros --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
yes, check the group for struts posts Poonam. Bottom line is don't use struts on server with GWT app unless you absolutely have to (legacy situation), better to use GWT RPC and keep state on client. Reasons have all been spelled out several times before so no point in reiterating them. On Mar 24, 10:47 am, Ed post2edb...@hotmail.com wrote: Please first search the forum or internet for answers to your question before posting yours. There is a lot of information out there and I am sure you find most of your answers there. If not, post your concrete question here. GoodLuck, Ed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
Does it work only for IE or it's crossbrowser code? 2009/3/24 Kevin Tarn kevn.t...@gmail.com: You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Set CSS for ListBox Items working in Firefox not in Safari
CSS-styling of listbox items isn't consistent across the major browsers. Just use a listbox/combobox from any widget library out there. On 24 Mrz., 11:13, Danny Schimke schimk...@googlemail.com wrote: My problem is similar. My CSS for option- tag's of a select- element are not shown dynamically their new CSS- layout in IE. I'am setting the CSS- classes like the following: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); My CSS looks like: .empty-option { color: #F2A336; } This is only a color- change... But this color is not shown in IE after adding the class. If I hide and show the listBox again the colors are updated correctly in IE. But this cannot be a correct workaround for me... Example: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); // after this the color of css class empty-option is shown correctly in FF, not IE listBox.setVisible(false); listBox.setVisible(true); // now the color is shown correctly in IE too This means, that the CSS works in all browsers. It's not a CSS- issue... I dont know how to fix this. -Danny 2009/3/24 Shashi Kant kant.shash...@gmail.com Oh you are using an image. I dont think IE supports that. ,This reason behind this is because of how IE gets the base for the HTML Select tag - it's derived from the Win32api - the same reason why dropdown lists and select lists have a nasty habit of rendering above everything else on the html page. BUT, you could still experiment with background-color. That should work like in this example: html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Page/title style type=text/css media=screen .optionBold {background-color: Fuchsia; font-weight: bold;} /style /head body form id=form1 div select id=htmlSelect multiple=multiple size=5 optionNon-styled 1/option optionNon-styled 2/option option class=optionBoldStyled/option option style=background-color: Aqua; font-weight: bold;Styled inline/option /select /div /form /body /html On Mar 24, 11:01 am, priya joshipriya...@gmail.com wrote: Hi Shashi Kant This is my css code: .list_box_style{ background-image: url(../images/pkg_image2.bmp); background-position: right; background-repeat: no-repeat; } Is this correct? I don't think this is CSS problem.. Because its working in FF correctly In Safari and IE it's not working.. If you have another solution then please suggest.. It's really urgent... On Mar 23, 4:26 pm, Shashi Kant kant.shash...@gmail.com wrote: This might be a CSS issue Paste you list_box_style here. On Mar 23, 4:03 pm, Danny Schimke schimk...@googlemail.com wrote: Could it be, that the style is set but not shown. We're adding CSS- classnames to option- elements of a listbox too, but only in FF there is a change visible. Because the listbox for example in IE will not refresh its GUI after adding styles to its items. I have not found a fix for this yet... there should be a way to refresh GWT- components on view. -Danny 2009/3/23 priya joshipriya...@gmail.com Hi all, I have one ListBox in my GWT application. I want to set CSS for some of the items in this ListBox.. I am using following code for this: DOM.getChild(listBox.getElement(), i + 1).setClassName (list_box_style); This code is working perfect in Firefox but not working in Safari browser. I don't know this is problem of DOM.getChild() method or setting style for that. Is Safari supports DOM.getChild() method? If anyone know another way then please suggest... Any help is welcome.. Thanks in advance, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: 2 timers on one page?
thanks for the hints. My asynchronous callback actually looks like this: private AsyncCallbackListReplicable callback = new AsyncCallbackListReplicable() { public void onFailure(Throwable throwable) { timer.schedule(UPDATE_PERIOD); } public void onSuccess(ListReplicable replicables) { //code timer.schedule(UPDATE_PERIOD); } }; private Timer timer = new Timer() { @Override public void run() { update(); } }; timer.schedule(UPDATE_PERIOD); In this case, the results I am getting from server should always come in proper order, since the next asynchronous request is only started in onSuccess or onFailure blocks. Right? For blinking I am using exactly this. My custom widgets (extending from Composite) implement blink() and add/remove css as appropriate. However, I am doing blinking in another timer, partly because interval is shorter (500ms) and also because this is conceptually a different task and placed in another class. private Timer timer = new Timer() { @Override public void run() { blinkBlinkables(); } }; timer.scheduleRepeating(500); In this case I am using scheduleRepeating instead of schedule since the code flow is not asynchronous, as I think. I though that having 2 timers running along each other may be causing the problems, should it? Maybe it is better to have just one that would run two separate tasks (updates and blinking) or I am missing something? Thanks On 24 Mrz., 04:42, Vitali Lovich vlov...@gmail.com wrote: It's all Javascript so it's all going to be UTF AFAIK. As for the updates, I think you're architecture is just wrong (you could potentially see results from the server out of order). A better approach would be myCallback = new AsyncCallbackT { void onFailure(Throwable t) { fetchDataFromServer(); } void onSuccess(T r) { fetchDataFromServer(); } } fetchDataFromServer() { rpcCall(myCallback); } That way, if you've got a slow client your not going to overwhelm them where you're generating timer events faster than they can be handled. It should also scale up down gracefully with the performance of the client browser/machine. If you want to ensure a minimum of 2 seconds, then do: fetchDataFromServer() { fetchTimer.schedule(Math.max(1, System.currentTimeMillis() - lastUpdate)); lastUpdate = System.currentTimeMillis(); } then fetchTimer would actually do the rpc invocation. As for the blinking, I'm not sure how you are doing it, but I would recommend adding removing a CSS class name (i.e addStyleName or. addStyleDependantName). have the CSS actually define what the visual representation is. On Mon, Mar 23, 2009 at 10:15 PM, denis56 denis.ergashb...@gmail.comwrote: His, does anyone know if there are performance implications with having 2 timers running on a single page? I am designing an application where one timer does background fetching of updates (2s) while the other (0.5s) updates gui elements to achieve blinking behavior. It is especially noticeable in IE, that the background updates take longer than 2s and that the browser is jittering and fails to respond immediately. Has anyone encountered something like that. Maybe having 2 timers is too much, have no idea. Also, do GWT UI components understand ISO-8859-1 encoding? I cannot display non-ASCII letters in a label, however, the data coming from a RPC invocation displays properly. strange. 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: 2 timers on one page?
Thanks for the link. Not sure if I've got the concept right, but at least I know that timers do not run in another thread :) My latin text is coming direct from the class implementing EntryPoint. (lblNew.setText(ÜÖ);). I made sure its encoding is set to ISO-8859-1. Metas in HTML are also set as meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1. Should something else be missing (HTTP headers, maybe?). cheers, denis On 24 Mrz., 11:44, Thomas Broyer t.bro...@gmail.com wrote: On 24 mar, 03:15, denis56 denis.ergashb...@gmail.com wrote: His, does anyone know if there are performance implications with having 2 timers running on a single page? I am designing an application where one timer does background fetching of updates (2s) while the other (0.5s) updates gui elements to achieve blinking behavior. It is especially noticeable in IE, that the background updates take longer than 2s and that the browser is jittering and fails to respond immediately. Has anyone encountered something like that. Maybe having 2 timers is too much, have no idea. Timers in javascript just queue events that are processed by a single event loop in a single thread, so they're not accurate (depends on what you do when the timer fires and on other events you're handling at the same time). John Resig made a pretty complete description:http://ejohn.org/blog/how-javascript-timers-work/(GWT's schedule() is javascript's setTimeout and GWT's scheduleRepeating() is javascript's setInterval). Also, do GWT UI components understand ISO-8859-1 encoding? I cannot display non-ASCII letters in a label, however, the data coming from a RPC invocation displays properly. strange. Where is your latin-1 text coming from? GWT is JavaScript, where strings are made up of characters, not bytes (i.e. encoding from/to utf-8 or latin-1 or some other encoding is done elsewhere (in the browser)). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Set CSS for ListBox Items working in Firefox not in Safari
Hi, Setting listbox visible false and then true is working for color.. But i want to set image.. it's not working for image.. I know it's not CSS issue.. my code is not working in Safari and IE... It's working perfect in FF.. I want to work this in safari.. On Mar 24, 3:13 pm, Danny Schimke schimk...@googlemail.com wrote: My problem is similar. My CSS for option- tag's of a select- element are not shown dynamically their new CSS- layout in IE. I'am setting the CSS- classes like the following: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); My CSS looks like: .empty-option { color: #F2A336; } This is only a color- change... But this color is not shown in IE after adding the class. If I hide and show the listBox again the colors are updated correctly in IE. But this cannot be a correct workaround for me... Example: listBox.getElement().getElementsByTagName(option).getItem(index).setClassName(empty-option); // after this the color of css class empty-option is shown correctly in FF, not IE listBox.setVisible(false); listBox.setVisible(true); // now the color is shown correctly in IE too This means, that the CSS works in all browsers. It's not a CSS- issue... I dont know how to fix this. -Danny 2009/3/24 Shashi Kant kant.shash...@gmail.com Oh you are using an image. I dont think IE supports that. ,This reason behind this is because of how IE gets the base for the HTML Select tag - it's derived from the Win32api - the same reason why dropdown lists and select lists have a nasty habit of rendering above everything else on the html page. BUT, you could still experiment with background-color. That should work like in this example: html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Page/title style type=text/css media=screen .optionBold {background-color: Fuchsia; font-weight: bold;} /style /head body form id=form1 div select id=htmlSelect multiple=multiple size=5 optionNon-styled 1/option optionNon-styled 2/option option class=optionBoldStyled/option option style=background-color: Aqua; font-weight: bold;Styled inline/option /select /div /form /body /html On Mar 24, 11:01 am, priya joshipriya...@gmail.com wrote: Hi Shashi Kant This is my css code: .list_box_style{ background-image: url(../images/pkg_image2.bmp); background-position: right; background-repeat: no-repeat; } Is this correct? I don't think this is CSS problem.. Because its working in FF correctly In Safari and IE it's not working.. If you have another solution then please suggest.. It's really urgent... On Mar 23, 4:26 pm, Shashi Kant kant.shash...@gmail.com wrote: This might be a CSS issue Paste you list_box_style here. On Mar 23, 4:03 pm, Danny Schimke schimk...@googlemail.com wrote: Could it be, that the style is set but not shown. We're adding CSS- classnames to option- elements of a listbox too, but only in FF there is a change visible. Because the listbox for example in IE will not refresh its GUI after adding styles to its items. I have not found a fix for this yet... there should be a way to refresh GWT- components on view. -Danny 2009/3/23 priya joshipriya...@gmail.com Hi all, I have one ListBox in my GWT application. I want to set CSS for some of the items in this ListBox.. I am using following code for this: DOM.getChild(listBox.getElement(), i + 1).setClassName (list_box_style); This code is working perfect in Firefox but not working in Safari browser. I don't know this is problem of DOM.getChild() method or setting style for that. Is Safari supports DOM.getChild() method? If anyone know another way then please suggest... Any help is welcome.. Thanks in advance, Priya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Keyboard event
Thomas Broyer wrote: No, I think it's a problem with your DOM element not being focusable (in Firefox, Opera and IE it's just a matter of giving it a tabindex, but in Safari 3 and Chrome 1.0 you have to do a tricky thing with a hidden text box; it'll be fixed in Safari 4 and Chrome 2.0 though). If I were you, I'd extend FocusPanel which handles all this for you; but in your case this means that either Evento doesn't extend ResizableDraggablePanel (and you'll have to refactor your code within a helper class and duplicate a bit of code in the two classes) or ResizableDraggablePanel extends FocusPanel (even if it doesn't need to handle focus events and be focusable). If you feel plucky, you can also copy some bits from FocusPanel (the bits that use FocusImpl) to make your Evento be focusable without having to break inheritance or make the base class a FocusPanel itself. First of all thank for your answer. It really put order in my ideas. I tried both ways (ResizableDraggablePanel extends FocusPanel / copying the necessary methods from FocusPanel). The results are the same: In Firefox it's all perfect. In Chrome and Safari, the element is getting keyboard focus, but it doesn't trigger the onFocus/onLostFocus methods. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email 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 with svn in NetBeans 6.5
good thing is I'm using the following svn google codes but am not successful in doing the svn with the project with gwt, could you tell me which solution to take to resolve this. which project to the normal functioning normally --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Easy List to Tree Drag-n-Drop
I need to create an application with List to Tree Drag-n-Drop. The Tree have some structure, for example: Root_term ---Term1 ---Term2 ---Term3 ---Term4 ---Term5 And the user should be able to fill this tree with data from ListBox using DnD (replace temporary Term values with values from ListBox). The example with GWT-Ext (http://gwt-ext.com/demo/#gridDD) is rather good, but I need replacing instead of adding nodes. Please advise simple solution to this problem. It would be nice not to use the GWT-Ext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
And to follow up further, there are a number of resources available for doing some amount of GWT integration with Struts, Dave Geary's book, Google Web Toolkit Solutions, for one. Another resource is to look at general information on integrating AJAX with Struts. GWT is after all, a way to do AJAX, so any article/web page that talks about integrating the two would be advantageous. But as gregor states, unless you have to, move beyond Struts and stick with GWT. They are two fundamentally different ways of attacking a problem (one isn't more right than the other) and if you don't have to integrate the two, don't do it. Good luck. Later, Shaffer On Mar 24, 6:17 am, gregor greg.power...@googlemail.com wrote: yes, check the group for struts posts Poonam. Bottom line is don't use struts on server with GWT app unless you absolutely have to (legacy situation), better to use GWT RPC and keep state on client. Reasons have all been spelled out several times before so no point in reiterating them. On Mar 24, 10:47 am, Ed post2edb...@hotmail.com wrote: Please first search the forum or internet for answers to your question before posting yours. There is a lot of information out there and I am sure you find most of your answers there. If not, post your concrete question here. GoodLuck, Ed- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
eclipse is launching forever
hi all, i want to run my gwt app on eclipse. sometimes, after i added some new method and want to launch it. it will take so long to launch. i am thinking that the eclipse is going through those old code/ folders which i never edit. does anybody know solution to fix 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: Copy to Clipboard
I second Nicanor's solution: have the click event handler on the button move the text from the first textbox to the second one. That's all copy does natively... Good luck. Later, Shaffer On Mar 24, 6:29 am, Nicanor Babula nicanor.bab...@gmail.com wrote: Given the situation: [code] TextBox txtBoxSrc = new TextBox(); TextBox txtBoxDest = new TextBox(); [/code] I think the simplest way to copy the first textboxes text into the second is: [code] txtBoxDest.setText(txtBoxSrc.getText()); [/code] Dmitry Sterinzat wrote: Does it work only for IE or it's crossbrowser code? 2009/3/24 Kevin Tarn kevn.t...@gmail.com: You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Approaches to develop a stateful application
A little late getting to this post...but here's what we've determined is the best practice. Keep the state of your application on either of the two ends of your application stack. By that I mean either on the client, or in your database (assumes you have one). If you don't have a database, then you've answered your question really, state in the client is the only way to go. Standard computer science logic applies here, you store state in your known singletons, and you can guarantee a single client and a single data repository. Typically, you could have n server instances and many people have tried and most have failed to use whatever slick technology is available to span sessions across multiple servers (or whatever) On Mar 23, 1:47 pm, Clint Gilbert clint.gilb...@childrens.harvard.edu wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 In case you're still on the fence, I suggest you keep as much of your state as possible (preferably all of it) on the client. It's just easier. You can think of an instance of your EntryPoint class being around while your app is open in a browser window or tab. That class has fields, and there's your state. GWT apps are a lot like desktop apps in that way. stsch wrote: Hi, I have just started with GWT. What are the approaches to develop a stateful GWT application? Could any of the experts please summarize this a bit for a beginner and maybe point me/us to some reference material? Thanks, -StSch- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFJx+dlrZoE3ArapxERCFwZAJ0XrijghlJyN9vjwBbr7vvZfyYhLQCfdCqb 1165OOIC2BnZqyrj9YeLTZA= =5aRG -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
How does that copy the text to the clipboard? Ian http://examples.roughian.com 2009/3/24 mikedshaffer mikedshaf...@gmail.com I second Nicanor's solution: have the click event handler on the button move the text from the first textbox to the second one. That's all copy does natively... Good luck. Later, Shaffer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Apparently same Remote Service instance across multiple web page on same pc client
Thanks, this was something I wasn't aware of. Anyway I've tested to put objects in the Session but the getThreadLocalRequest() returns null, when I run it from eclipse in Hosted Mode. This is my code: public class SASAdapterServiceImpl extends RemoteServiceServlet implements SASAdapterService { final static long serialVersionUID = 1L; public SASAdapterServiceImpl() { super(); System.out.println(\n Thread Local Request : +this.getThreadLocalRequest()); and the result is: Thread Local Request : null Any idea ? On 23 Mar, 22:09, obesga obe...@gmail.com wrote: That's a servlet lifecycle question, a servlet engine ( f.e. Tomcat ) may create one or many instances of a servlet, as needed. At init, one will be created. There's no way to control or configure this; and this behaviour is determined by servlet specification, nor by GWT If you want to assign some resources /objects to only one session, use this on the servlet code : getThreadLocalRequest().getSession().setAttribute(resource, resoure); Oskar Pd. so much time without posting here excuse me ! On 23 mar, 21:32, Arturo ita...@ita.sas.com wrote: Hi all, may be my question sounds a bit strange, but 'cause I'm approaching an important project implementation I want to be sure I understood GWT mechanism. My problem is the following: - I've created a GWT application that uses anRPCService for accessing data from database. In a single user environment it works fine. Than I tested a multiuser access and I started from accessing the deployed application from two different web browser (Firefox and IE) at thesametime (approx...) from thesamePC (sameip address). What I found out is that the Remote Implementation object, that is subclass of RemoteServiceServlet seems to be thesamefor both web page ! If I put the remoteinstanceout (System.out.println(this)) if discover that is just thesame. Of course this creates a lot of problems to me. Am I missing something or is a normal behaviour because it use a sort of session context ? My worries is what happens when different end-users access to my application, once deployed ! Any help would be appreciated. Arturo- Nascondi testo citato - Mostra testo citato - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Recherche profil JAVA/GWT
Bonjour, Je recherche actuellement 2 profils JAVA/GWT. Un développeur : Dans le cadre d'un projet, vous interviendrez au sein d'une équipe de 4 personnes, sur la technologie JAVA/GWT. Rattaché à un Responsable Projet, vos principales missions seront : - le développement JAVA en suivant les spécifications préétablies - maintenance corrective et évolutive des applications développées Le développement des applications se fait en méthode RAD / Agiles. Profil : De formation bac+3/5, école d'ingénieur informatique ou diplôme équivalent, vous avez déjà travaillé avec le framework GWT. Compétences requises : - JAVA : minimum 1 an en tant que développeur JAVA - GWT : minimum 6 mois d'utilisation au sein d'un projet - Qualités relationnelles, dynamisme, esprit de service - L'Anglais serait un plus apprécié Un architecte : Dans le cadre d'un projet, au sein d'une équipe de 4 personnes, vous interviendrez en tant qu'expert JAVA/GWT. Rattaché à un Responsable Projet, vos responsabilités seront : - la définition de l'architecture technique, - la participation aux conceptions - l'aide au développement d'applications. Vous apporterez votre expertise technique au sein d'une équipe motivée. Profil : De formation bac+3/5, école d'ingénieur informatique ou diplôme équivalent, vous avez déjà travaillé sur la technologie GWT. Compétences requises : - JAVA : minimum 3 ans en tant qu'architecte JAVA - GWT : minimum 1 an d'expérience - Qualités relationnelles, dynamisme, esprit de service - L'Anglais serait un plus apprécié Les candidatures d'indépendants (portage salarial ou freelance) seront étudiées pour répondre à l'urgence de la demande. N'hésitez pas à me contacter pour plus de renseignements. Cordialement, Arnaud --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
It was tested in IE and Firefox. I am not sure whether it works on Chrome or Webkit. Kevin On 3/24/09, Dmitry Sterinzat dmitri.sterin...@gmail.com wrote: Does it work only for IE or it's crossbrowser code? 2009/3/24 Kevin Tarn kevn.t...@gmail.com: You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: eclipse is launching forever
Switch focus between hosted browser and eclipse a few times - this should trigger your app to start (that's a quirky solution but it works ;-) hth On 24 Mrz., 15:20, ytbryan ytbr...@gmail.com wrote: hi all, i want to run my gwt app on eclipse. sometimes, after i added some new method and want to launch it. it will take so long to launch. i am thinking that the eclipse is going through those old code/ folders which i never edit. does anybody know solution to fix 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: Approaches to develop a stateful application
Thanks to everybody for their replies. Having read this I also tend to maintain the application state on the client side. Keep the state of your application on either of the two ends of your application stack. By that I mean either on the client, or in your database (assumes you have one). If you don't have a database, then you've answered your question really, state in the client is the only way to go. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Help! My Generators don't work for Web Mode :(
Hi Marcelo, It might help to post up the generator rule and especially the generate() implementation that is being used to generate the FormView generated type. My thought is that whatever is going on in there is depending on rules that might not hold true in web mode. Cheers, -Sumit Chandel On Thu, Mar 19, 2009 at 2:46 PM, Marcelo Emanoel B. Diniz marceloeman...@gmail.com wrote: this is my entry point package br.com.gwt.symbiosis.client; import br.com.gwt.symbiosis.client.mock.FormView; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; public class Symbiosis implements EntryPoint { public void onModuleLoad() { FormView binded = GWT.create(FormView.class); Label label = new Label(); label.setText(binded.getClass().getName()); RootPanel.get().add(binded); RootPanel.get().add(label); } } on hosted mode the label text is br.com.gwt.symbiosis.client.mock.Bound_FormView_View wich is in fact what is expected to be... but at web mode the label text is ''br.com.gwt.symbiosis.client.mock.FormView which in turn is not what I need... and doesn't work as expected either... :( by the way... there's no complain on the console On Mar 19, 3:53 pm, Marcelo Emanoel marceloeman...@gmail.com wrote: Hi guys I have a problem with generators... I've manage to do 2 generators and they work fine on hosted mode however they don't work when I compile code to web mode :( What I'm trying to acomplish is to build an API for binding... An important thing is that my generators work on hosted mode and they are called when the code start is compiled --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Apparently same Remote Service instance across multiple web page on same pc client
That's because you're calling getThreadLocalRequest() before the servlet has even been initialized. Call it from a remote service method instead. On Tue, Mar 24, 2009 at 10:28 AM, Arturo ita...@ita.sas.com wrote: Thanks, this was something I wasn't aware of. Anyway I've tested to put objects in the Session but the getThreadLocalRequest() returns null, when I run it from eclipse in Hosted Mode. This is my code: public class SASAdapterServiceImpl extends RemoteServiceServlet implements SASAdapterService { final static long serialVersionUID = 1L; public SASAdapterServiceImpl() { super(); System.out.println(\n Thread Local Request : +this.getThreadLocalRequest()); and the result is: Thread Local Request : null Any idea ? On 23 Mar, 22:09, obesga obe...@gmail.com wrote: That's a servlet lifecycle question, a servlet engine ( f.e. Tomcat ) may create one or many instances of a servlet, as needed. At init, one will be created. There's no way to control or configure this; and this behaviour is determined by servlet specification, nor by GWT If you want to assign some resources /objects to only one session, use this on the servlet code : getThreadLocalRequest().getSession().setAttribute(resource, resoure); Oskar Pd. so much time without posting here excuse me ! On 23 mar, 21:32, Arturo ita...@ita.sas.com wrote: Hi all, may be my question sounds a bit strange, but 'cause I'm approaching an important project implementation I want to be sure I understood GWT mechanism. My problem is the following: - I've created a GWT application that uses anRPCService for accessing data from database. In a single user environment it works fine. Than I tested a multiuser access and I started from accessing the deployed application from two different web browser (Firefox and IE) at thesametime (approx...) from thesamePC (sameip address). What I found out is that the Remote Implementation object, that is subclass of RemoteServiceServlet seems to be thesamefor both web page ! If I put the remoteinstanceout (System.out.println(this)) if discover that is just thesame. Of course this creates a lot of problems to me. Am I missing something or is a normal behaviour because it use a sort of session context ? My worries is what happens when different end-users access to my application, once deployed ! Any help would be appreciated. Arturo- Nascondi testo citato - Mostra testo citato - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Easy List to Tree Drag-n-Drop
There's a GWT-dnd library, search google code. Oskar On 24 mar, 13:36, SerBeys serb...@gmail.com wrote: I need to create an application with List to Tree Drag-n-Drop. The Tree have some structure, for example: Root_term ---Term1 ---Term2 ---Term3 ---Term4 ---Term5 And the user should be able to fill this tree with data from ListBox using DnD (replace temporary Term values with values from ListBox). The example with GWT-Ext (http://gwt-ext.com/demo/#gridDD) is rather good, but I need replacing instead of adding nodes. Please advise simple solution to this problem. It would be nice not to use the GWT-Ext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: uncaught Exception java.lang.IllegalArgumentException
Hi greatness, The urchinTracker variable has to do with Google Analytics. My guess is that you're using analytics in your page and something broke along the way as you made the migration from 1.4.62 to 1.5.3. While possible, I don't think changing and updating to GWT 1.5.3 would be directly responsible for a break in analytics usage. I suggest you traceback any inadvertent changes that may have occurred during the upgrade process that might have affected your analytics usage. Hope that helps, -Sumit Chandel On Thu, Mar 19, 2009 at 3:18 PM, greatness awsa...@gmail.com wrote: Hi all, I have got this problem since migrating to GWT 1.5.3 from 1.4.62. I get this exception only in the web mode. I do not get this in the hosted mode. I am kind of new to the GWT and I am not sure how I can fix this. I have a tree structure that pages are shown on the right by selecting tree items on the tree. When I click on the tree item, nothing is displayed on the right frame. I get this java.lang.illegalArgumentException. FYI-- I installed firebug, I see weird messages such as urchinTracker is not defined [Break on this error] urchinTracker(\x2Fgroup\x2FGoogle...oin=y \x26als_sstat=s\x26als_usc=1\x26);. As far as I know, we don't use urchine software. I am totally lost. any help is highly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Easy List to Tree Drag-n-Drop
I've read about GWT-dnd, but I didn't find the examle of List to Tree DnD (Only List to List). does GWT-dnd library allow to use such kind of DnD? On Mar 24, 10:23 pm, obesga obe...@gmail.com wrote: There's a GWT-dnd library, search google code. Oskar On 24 mar, 13:36, SerBeys serb...@gmail.com wrote: I need to create an application with List to Tree Drag-n-Drop. The Tree have some structure, for example: Root_term ---Term1 ---Term2 ---Term3 ---Term4 ---Term5 And the user should be able to fill this tree with data from ListBox using DnD (replace temporary Term values with values from ListBox). The example with GWT-Ext (http://gwt-ext.com/demo/#gridDD) is rather good, but I need replacing instead of adding nodes. Please advise simple solution to this problem. It would be nice not to use the GWT-Ext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Easy List to Tree Drag-n-Drop
It doesn't matter what widget you use for GWT-DnD. The dnd operation can be configured to any AbsolutePanel. So you can put your Tree and List widget in one AbsolutePanel, and create a DropController for your Tree widget. Kevin On 3/25/09, SerBeys serb...@gmail.com wrote: I've read about GWT-dnd, but I didn't find the examle of List to Tree DnD (Only List to List). does GWT-dnd library allow to use such kind of DnD? On Mar 24, 10:23 pm, obesga obe...@gmail.com wrote: There's a GWT-dnd library, search google code. Oskar On 24 mar, 13:36, SerBeys serb...@gmail.com wrote: I need to create an application with List to Tree Drag-n-Drop. The Tree have some structure, for example: Root_term ---Term1 ---Term2 ---Term3 ---Term4 ---Term5 And the user should be able to fill this tree with data from ListBox using DnD (replace temporary Term values with values from ListBox). The example with GWT-Ext (http://gwt-ext.com/demo/#gridDD) is rather good, but I need replacing instead of adding nodes. Please advise simple solution to this problem. It would be nice not to use the GWT-Ext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Apparently same Remote Service instance across multiple web page on same pc client
OK. Calling it from a method then it works. I thought calling the super() the servlet was already initialized. Thanks for helping. On 24 Mar, 16:30, Isaac Truett itru...@gmail.com wrote: That's because you're calling getThreadLocalRequest() before the servlet has even been initialized. Call it from a remote service method instead. On Tue, Mar 24, 2009 at 10:28 AM, Arturo ita...@ita.sas.com wrote: Thanks, this was something I wasn't aware of. Anyway I've tested to put objects in the Session but the getThreadLocalRequest() returns null, when I run it from eclipse in Hosted Mode. This is my code: public class SASAdapterServiceImpl extends RemoteServiceServlet implements SASAdapterService { final static long serialVersionUID = 1L; public SASAdapterServiceImpl() { super(); System.out.println(\n Thread Local Request : +this.getThreadLocalRequest()); and the result is: Thread Local Request : null Any idea ? On 23 Mar, 22:09, obesga obe...@gmail.com wrote: That's a servlet lifecycle question, a servlet engine ( f.e. Tomcat ) may create one or many instances of a servlet, as needed. At init, one will be created. There's no way to control or configure this; and this behaviour is determined by servlet specification, nor by GWT If you want to assign some resources /objects to only one session, use this on the servlet code : getThreadLocalRequest().getSession().setAttribute(resource, resoure); Oskar Pd. so much time without posting here excuse me ! On 23 mar, 21:32, Arturo ita...@ita.sas.com wrote: Hi all, may be my question sounds a bit strange, but 'cause I'm approaching an important project implementation I want to be sure I understood GWT mechanism. My problem is the following: - I've created a GWT application that uses anRPCService for accessing data from database. In a single user environment it works fine. Than I tested a multiuser access and I started from accessing the deployed application from two different web browser (Firefox and IE) at thesametime (approx...) from thesamePC (sameip address). What I found out is that the Remote Implementation object, that is subclass of RemoteServiceServlet seems to be thesamefor both web page ! If I put the remoteinstanceout (System.out.println(this)) if discover that is just thesame. Of course this creates a lot of problems to me. Am I missing something or is a normal behaviour because it use a sort of session context ? My worries is what happens when different end-users access to my application, once deployed ! Any help would be appreciated. Arturo- Nascondi testo citato - Mostra testo citato -- Nascondi testo citato - Mostra testo citato - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Server side includes with built-in Tomcat?
Hi, I want to have server side includes in my GWT main page. On an external Tomcat server I had no problem, but I can't make it work with the built in server. I added the SSI servlet configuration to the ROOT/WEB-INF/web.xml file and I think the servlet is starting correctly, but the SSI directives aren't being processed. Any help is appreciated. 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: RequestBuilder.setPassword on IE6
Hi Geoff, I couldn't reproduce this issue on 1.5.3 or 1.6.2 with the code snippet below. Are you doing anything differently that might bring up the issue you saw on IE6? public void onModuleLoad() { RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,data.xml); rb.setUser(sumit); rb.setPassword(password); try { rb.sendRequest(Some good data, new RequestCallback() { public void onError(Request request, Throwable exception) { Window.alert(Error occurred: + exception.getMessage()); } public void onResponseReceived(Request request, Response response) { Window.alert(response.getText()); } }); } catch(RequestException re) { Window.alert(Request exception\n\n + re.getMessage()); } } Hope that helps, -Sumit Chandel On Thu, Mar 19, 2009 at 3:31 PM, Geoff gknel...@precisiongeo.ca wrote: I've encountered an issue with the RequestBuilder that only crops up on IE6. If I set a username and password using RequestBuilder.setUser () and RequestBuilder.setPassword(), and then call RequestBuilder.sendRequest(), my onResponseReceived() immediately gets called with a Response object that has a status code of zero, no status message, and no response text. On all other browsers, the expected response to download an XML document is received. I've had to temporarily resort to not setting the user and password in my request and letting the browser pop up its authentication dialog, which then produces a valid Response object. Any ideas as to what's going on here? Have I stumbled on a bug? Something to look forward to in 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 google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
Hi Kevin, This is not working in FF where as its working very well in IE. Please advice me how to do it on FF as the site is going to run on that. - Harry 2009/3/24 Kevin Tarn kevn.t...@gmail.com It was tested in IE and Firefox. I am not sure whether it works on Chrome or Webkit. Kevin On 3/24/09, Dmitry Sterinzat dmitri.sterin...@gmail.com wrote: Does it work only for IE or it's crossbrowser code? 2009/3/24 Kevin Tarn kevn.t...@gmail.com: You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Copy to Clipboard
I got this code from web its still not working is there any change i should make to run and copy text to clipboard. public static native void copyFrom(String mytext) /*-{ if (window.clipboardData) { // IE $wnd.window.clipboardData.setData('text', mytext); // Netscape } else if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect'); var clip = components.classes['@ mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return; // var trans = Components.classes['@ mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); if (!trans) return; // trans.addDataFlavor('text/unicode'); // var str = new Object(); var len = new Object(); var str = Components.classes[@mozilla.org/supports-string;1].createInstance(Components.interfaces.nsISupportsS tring); var copytext=mytext; str.data=copytext; trans.setTransferData(text/unicode,str,copytext.length*2); var clipid=Components.interfaces.nsIClipboard; if (!clip) return false; clip.setData(trans,null,clipid.kGlobalClipboard); } alert(Following info was copied to your clipboard:\n\n + mytext); }-*/; -harry 2009/3/24 Harish Nair harish1...@gmail.com Hi Kevin, This is not working in FF where as its working very well in IE. Please advice me how to do it on FF as the site is going to run on that. - Harry 2009/3/24 Kevin Tarn kevn.t...@gmail.com It was tested in IE and Firefox. I am not sure whether it works on Chrome or Webkit. Kevin On 3/24/09, Dmitry Sterinzat dmitri.sterin...@gmail.com wrote: Does it work only for IE or it's crossbrowser code? 2009/3/24 Kevin Tarn kevn.t...@gmail.com: You can try below JSNI methods: public static native void copyFrom(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.setData('text', element); }-*/; public static native void pasteTo(com.google.gwt.user.client.Element element) /*-{ $wnd.window.clipboardData.getData(element); }-*/; Kevin On 3/24/09, Harry harish1...@gmail.com wrote: Hi, My project is that user is enabled to copy the content of a text box and paste it on another form using 'Copy' button. Please advice how to do it as GWT is not support copying to system clipboard. Please help its important. Thanks Harry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Announcing GWT 1.6 Release Candidate
Hey Christos, We tried to reproduce this error on Eclipse 3.3/Windows and 3.4/Linux, but it didn't repro for us. It's a weird error, though -- Eclipse projects shouldn't have to live in a directory with the same name as the project! Which platform are you on, and which Eclipse distribution are you using? Do you get the same problem with a fresh Eclipse install? Thanks! On Mar 23, 4:19 pm, cvasilak cvasi...@gmail.com wrote: Hi there, downloaded RC but I have a problem getting it to work. Specifically If I do: $ mkdir MyProject $ cd MyProject $ webAppCreator org.tests.client.MyApp If I try now to import the project into eclipse(3.4.2), right-click Debug as-Debug Configurations-Java Application-MyApp, eclipse gives me the error Project MyApp does not exist. if I click Browse and select the correct project name(MyProject) eclipse gives me: The archive: /MyApp/src which is referenced by the classpath, does not exist. Only if the top-level directory is the same as the main class eg. MyProject-MyApp only then the debug works as expected. (Or if you modify MyApp.lauch and replace all the references of MyApp to MyProject) Let me know if you need more information. Regards, Christos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
How to use Servlets to download file to browser?
Hello, I know this topic has been discussed in a few threads. I have attempted to ask my questions in those but for some reason they are not posting, so I had to create this new one. I read documentation and other posts but still confused on how to do this. File download is very simple in normal web app, but having trouble in GWT. Can someone please help me with what I have written here? This is code for client side : [CODE] private void exportToExcel() { final int STATUS_CODE_OK = 200; final String url = /exportExcel; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); try { Request response = builder.sendRequest(null, new RequestCallback () { public void onError(Request request, Throwable exception) { // TODO: } public void onResponseReceived(Request request, Response response) { // TODO: } }); } catch (RequestException e) { // TODO: } } [/CODE] This is in the ***.gwt.xml file: [CODE] inherits name=com.google.gwt.http.HTTP / servlet path=/exportExcel class=com.myweb.server.ExportExcelServlet / [/CODE] This is my servlet: [CODE] package com.myweb.server; import java.io.ByteArrayInputStream; ... public class ExportExcelServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(application/download); response.setHeader(Content- Disposition,attachment;filename=temp.csv); try { StringBuffer sb = generateCsvFileBuffer(); InputStream in = new ByteArrayInputStream(sb.toString().getBytes (UTF-8)); ServletOutputStream out = response.getOutputStream(); byte[] outputByte = new byte[4096]; //copy binary contect to output stream while(in.read(outputByte, 0, 4096) != -1) { out.write(outputByte, 0, 4096); } in.close(); out.flush(); out.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request,response); } private static StringBuffer generateCsvFileBuffer() { StringBuffer writer = new StringBuffer(); writer.append(DisplayName); writer.append(','); writer.append(Age); writer.append('\n'); writer.append(your name); writer.append(','); writer.append(30); writer.append('\n'); return writer; } } [/CODE] At first I was having no errors generated but in the browser no download dialog would pop up, and nothing happened. I changed something...not sure what now, and getting runtime errors. [ERROR] Unable to find 'exportExcel.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? My entire app is written in GWT, so I dont have a web.xml file I am very stuck any help would be extreemly appreciated 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: Easy List to Tree Drag-n-Drop
I've tried GWT-DnD, but there only widgets can be droggable. And Item in ListBox or Tree is not widget (it is String), so it can not be droggable. I made groggable whole listBox, but I need only droggable Items in it. Please help On 24 мар, 22:50, Kevin Tarn kevn.t...@gmail.com wrote: It doesn't matter what widget you use for GWT-DnD. The dnd operation can be configured to any AbsolutePanel. So you can put your Tree and List widget in one AbsolutePanel, and create a DropController for your Tree widget. Kevin On 3/25/09, SerBeys serb...@gmail.com wrote: I've read about GWT-dnd, but I didn't find the examle of List to Tree DnD (Only List to List). does GWT-dnd library allow to use such kind of DnD? On Mar 24, 10:23 pm, obesga obe...@gmail.com wrote: There's a GWT-dnd library, search google code. Oskar On 24 mar, 13:36, SerBeys serb...@gmail.com wrote: I need to create an application with List to Tree Drag-n-Drop. The Tree have some structure, for example: Root_term ---Term1 ---Term2 ---Term3 ---Term4 ---Term5 And the user should be able to fill this tree with data from ListBox using DnD (replace temporary Term values with values from ListBox). The example with GWT-Ext (http://gwt-ext.com/demo/#gridDD) is rather good, but I need replacing instead of adding nodes. Please advise simple solution to this problem. It would be nice not to use the GWT-Ext --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 use Servlets to download file to browser?
This looks like an operation that should use an RPC. This may help you: http://roberthanson.blogspot.com/2006/06/trivial-gwt-example.html On Mar 24, 1:06 pm, vroom_vroom slabarb...@gmail.com wrote: Hello, I know this topic has been discussed in a few threads. I have attempted to ask my questions in those but for some reason they are not posting, so I had to create this new one. I read documentation and other posts but still confused on how to do this. File download is very simple in normal web app, but having trouble in GWT. Can someone please help me with what I have written here? This is code for client side : [CODE] private void exportToExcel() { final int STATUS_CODE_OK = 200; final String url = /exportExcel; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); try { Request response = builder.sendRequest(null, new RequestCallback () { public void onError(Request request, Throwable exception) { // TODO: } public void onResponseReceived(Request request, Response response) { // TODO: } }); } catch (RequestException e) { // TODO: } } [/CODE] This is in the ***.gwt.xml file: [CODE] inherits name=com.google.gwt.http.HTTP / servlet path=/exportExcel class=com.myweb.server.ExportExcelServlet / [/CODE] This is my servlet: [CODE] package com.myweb.server; import java.io.ByteArrayInputStream; ... public class ExportExcelServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(application/download); response.setHeader(Content- Disposition,attachment;filename=temp.csv); try { StringBuffer sb = generateCsvFileBuffer(); InputStream in = new ByteArrayInputStream(sb.toString().getBytes (UTF-8)); ServletOutputStream out = response.getOutputStream(); byte[] outputByte = new byte[4096]; //copy binary contect to output stream while(in.read(outputByte, 0, 4096) != -1) { out.write(outputByte, 0, 4096); } in.close(); out.flush(); out.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request,response); } private static StringBuffer generateCsvFileBuffer() { StringBuffer writer = new StringBuffer(); writer.append(DisplayName); writer.append(','); writer.append(Age); writer.append('\n'); writer.append(your name); writer.append(','); writer.append(30); writer.append('\n'); return writer; }} [/CODE] At first I was having no errors generated but in the browser no download dialog would pop up, and nothing happened. I changed something...not sure what now, and getting runtime errors. [ERROR] Unable to find 'exportExcel.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? My entire app is written in GWT, so I dont have a web.xml file I am very stuck any help would be extreemly appreciated 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: How to use Servlets to download file to browser?
Thanks lukehashj, I started out trying to do this with RPC, but had no luck so now I tried this HTTPRequest method. I am begining to think that neither way is possible because they are both making asynchronous calls. Maybe I need to figure out how to make a normal hyperlink call my servlet as in a normal web app?? not sure how to do that in GWT so researching. thanks Sam On Mar 24, 1:40 pm, lukehashj bobwazn...@gmail.com wrote: This looks like an operation that should use an RPC. This may help you:http://roberthanson.blogspot.com/2006/06/trivial-gwt-example.html On Mar 24, 1:06 pm, vroom_vroom slabarb...@gmail.com wrote: Hello, I know this topic has been discussed in a few threads. I have attempted to ask my questions in those but for some reason they are not posting, so I had to create this new one. I read documentation and other posts but still confused on how to do this. File download is very simple in normal web app, but having trouble in GWT. Can someone please help me with what I have written here? This is code for client side : [CODE] private void exportToExcel() { final int STATUS_CODE_OK = 200; final String url = /exportExcel; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); try { Request response = builder.sendRequest(null, new RequestCallback () { public void onError(Request request, Throwable exception) { // TODO: } public void onResponseReceived(Request request, Response response) { // TODO: } }); } catch (RequestException e) { // TODO: } } [/CODE] This is in the ***.gwt.xml file: [CODE] inherits name=com.google.gwt.http.HTTP / servlet path=/exportExcel class=com.myweb.server.ExportExcelServlet / [/CODE] This is my servlet: [CODE] package com.myweb.server; import java.io.ByteArrayInputStream; ... public class ExportExcelServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(application/download); response.setHeader(Content- Disposition,attachment;filename=temp.csv); try { StringBuffer sb = generateCsvFileBuffer(); InputStream in = new ByteArrayInputStream(sb.toString().getBytes (UTF-8)); ServletOutputStream out = response.getOutputStream(); byte[] outputByte = new byte[4096]; //copy binary contect to output stream while(in.read(outputByte, 0, 4096) != -1) { out.write(outputByte, 0, 4096); } in.close(); out.flush(); out.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request,response); } private static StringBuffer generateCsvFileBuffer() { StringBuffer writer = new StringBuffer(); writer.append(DisplayName); writer.append(','); writer.append(Age); writer.append('\n'); writer.append(your name); writer.append(','); writer.append(30); writer.append('\n'); return writer; }} [/CODE] At first I was having no errors generated but in the browser no download dialog would pop up, and nothing happened. I changed something...not sure what now, and getting runtime errors. [ERROR] Unable to find 'exportExcel.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? My entire app is written in GWT, so I dont have a web.xml file I am very stuck any help would be extreemly appreciated Thanks!- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at
Re: How to use Servlets to download file to browser?
Surprizingly, keeping all code the same with the exception of the client side...and changing all that code to just: Window.open(/exportExcel, _self, ); actually works. However, in hosted mode even though the file is created and my servlet is hit I get the error: [ERROR] Unable to find 'exportExcel.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? So not sure why this error occurs...maybe I am doing my servlet mapping incorrectly?? Should it not go in the projects .gwt.xml file? I am speaking of the same file that you inherit the other modules and gwt style sheets. Thanks Sam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
How to use data from Java bean to render GWT widgets in JSP ?
Hi All, I am new to GWT and I am trying to do a POC (Proof of Concept) to demonstrate using GWT with JSF. Most of the examples in GWT use static data to showcase the widgests, dialog box etc. But I like to create these widgets and dialog box in the JSP using the JSP beans available to me. I do not want to do an RPC call or a new HTTP Request. Since I already have a a java bean, I like to use the values from the bean to create the GWT widgets or create a Dialog box with text read from the java bean in the JSP. I am using GWT 1.4. How can I do this? I don't see any examples listed. Any help is greatly apperciated. Thanks, Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Announcing GWT 1.6 Release Candidate
Hi Alex and thanks for your reply. I have downloaded the latest Eclipse IDE for Java EE Developers (163 MB) - eclipse-jee-ganymede-SR2-linux-gtk.tar.gz from the eclipse web site. I am using Ubuntu 8.10 with t...@casper:$ java -version java version 1.6.0_12 Java(TM) SE Runtime Environment (build 1.6.0_12-b04) Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode) (Only caveat here is that java is installed manually not through ubuntu's package manager) In order to start clean, I have created a separate user (temp), unpack the tgz in his $HOME/bin directory, started eclipse, pointed to a new $HOME/workspace but I am still experiencing the same problem :( Exact steps followed: $ export GWT_HOME=/opt/gwt-linux-1.6.2 $ mkdir bin $ cp eclipse-jee-ganymede-SR2-linux-gtk.tar.gz bin/ $ cd bin $ tar xvzf eclipse-jee-ganymede-SR2-linux-gtk.tar.gz $ cd eclipse $ ./eclipse Eclipse recommends the default workspace /home/temp/workspace. I choose Yes. (From another terminal) $ cd workspace $ mkdir MyProject $ cd MyProject $ /opt/gwt-linux-1.6.2/webAppCreator org.tests.client.MyApp Import into eclipse, but the same problem as explained in my previous post... Regards On Mar 24, 8:31 pm, Alex Rudnick a...@google.com wrote: Hey Christos, We tried to reproduce this error on Eclipse 3.3/Windows and 3.4/Linux, but it didn't repro for us. It's a weird error, though -- Eclipse projects shouldn't have to live in a directory with the same name as the project! Which platform are you on, and which Eclipse distribution are you using? Do you get the same problem with a fresh Eclipse install? Thanks! On Mar 23, 4:19 pm, cvasilak cvasi...@gmail.com wrote: Hi there, downloaded RC but I have a problem getting it to work. Specifically If I do: $ mkdir MyProject $ cd MyProject $ webAppCreator org.tests.client.MyApp If I try now to import the project into eclipse(3.4.2), right-click Debug as-Debug Configurations-Java Application-MyApp, eclipse gives me the error Project MyApp does not exist. if I click Browse and select the correct project name(MyProject) eclipse gives me: The archive: /MyApp/src which is referenced by the classpath, does not exist. Only if the top-level directory is the same as the main class eg. MyProject-MyApp only then the debug works as expected. (Or if you modify MyApp.lauch and replace all the references of MyApp to MyProject) Let me know if you need more information. Regards, Christos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Announcing GWT 1.6 Release Candidate
Hi Hez, I've managed to download and extract the 1.6.2 distribution while on an external network. You should be able to do the same. Make sure you're on a stable connection when trying to download the distribution. If you're sure of the connection and still can't download the zip, let us know. Hope that helps, -Sumit Chandel On Thu, Mar 19, 2009 at 2:27 AM, hezjing hezj...@gmail.com wrote: Hi The gwt-windows-1.6.2.zip seems to be invalid when downloaded from IE 7 and Chrome. I'm not sure if anyone has successfully download and extract gwt-windows-1.6.2.zip? On Thu, Mar 19, 2009 at 4:32 AM, Bruce Johnson br...@google.com wrote: Good news! Google Web Toolkit 1.6 RC is ready for you to download and try out: http://code.google.com/p/google-web-toolkit/downloads/list?q=1.6.2 For background on what's new in GWT 1.6, please see the still-in-progress doc: http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6s=google-web-toolkit-doc-1-6t=ReleaseNotes_1_6 as well as previous 1.6-related announcements: Announcing GWT 1.6 Milestone 1 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3e7e6cc3b35ad98a and Announcing GWT 1.6 Milestone 2 http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/33df9cc75aead5a1 For complete details, the GWT issue tracker has the full list of changes: http://code.google.com/p/google-web-toolkit/issues/list?can=2q=milestone:1_6_RC%20status:FixedNotReleased,Fixedsort=priority We expect this to be a short RC cycle, so a more comprehensive blog post with an overview of the features in GWT 1.6 should be just around the corner. -- Bruce, on behalf of the GWT team -- Hez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT + Google Maps [ERROR] Unable to load module entry point class
Hello, I ve been trying to learn GWT and Google Maps API, however, when I follow the official online tutorial I end up with this error: [ERROR] Unable to load module entry point class com.example.google.gwt.mapstutorial.client.SimpleMaps (see associated exception for details) java.lang.RuntimeException: The Maps API has not been loaded. Is a script tag missing from your host HTML or module file? Is the Maps key missing or invalid? at com.google.gwt.maps.client.Maps.assertLoaded(Maps.java:29) at com.google.gwt.maps.client.geom.LatLng$.newInstance(Native Method) at com.example.google.gwt.mapstutorial.client.SimpleMaps.onModuleLoad (SimpleMaps.java:23) If I try pure GWT with no Google Maps it works fine! my xml file is : module !-- Inherit the core Web Toolkit stuff. -- inherits name='com.google.gwt.user.User'/ !-- Load the Google Maps GWT bindings from the gwt-google-apis project -- !-- Added by projectCreator if you use the -addModule argument -- inherits name=com.google.gwt.maps.GoogleMaps / !-- If you want to deploy this application outside of localhost, you must obtain a Google Maps API key at: http://www.google.com/apis/maps/signup.html Replace the src attribute below with a URL that contains your key. -- !-- script src=http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=??? /-- !-- You can usually run under localhost without a key -- script src=http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=ABQIYoCcpT5eK4RhbA3gS1NPNhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQnNpBGVHff63uyhRABeY3eVBZaGQ / !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines. -- inherits name='com.google.gwt.user.theme.standard.Standard'/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- !-- Other module inherits -- inherits name=com.google.gwt.maps.GoogleMaps / !-- Specify the app entry point class. -- entry-point class='com.example.google.gwt.mapstutorial.client.SimpleMaps'/ !-- Specify the application specific style sheet. -- stylesheet src='SimpleMaps.css' / /module where the key has been generated for http://localhost my Java file is: package com.example.google.gwt.mapstutorial.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.maps.client.InfoWindowContent; import com.google.gwt.maps.client.MapWidget; import com.google.gwt.maps.client.control.LargeMapControl; import com.google.gwt.maps.client.geom.LatLng; import com.google.gwt.maps.client.overlay.Marker; import com.google.gwt.user.client.ui.RootPanel; /** * Entry point classes define codeonModuleLoad()/code. */ public class SimpleMaps implements EntryPoint { private MapWidget map; /** * This is the entry point method. */ // GWT module entry point method. public void onModuleLoad() { LatLng cawkerCity = LatLng.newInstance(39.509,-98.434); // Open a map centered on Cawker City, KS USA map = new MapWidget(cawkerCity, 2); map.setSize(500px, 300px); // Add some controls for the zoom level map.addControl(new LargeMapControl()); // Add a marker map.addOverlay(new Marker(cawkerCity)); // Add an info window to highlight a point of interest map.getInfoWindow().open(map.getCenter(), new InfoWindowContent(World's Largest Ball of Sisal Twine)); // Add the map to the HTML host page RootPanel.get(mapsTutorial).add(map); } } the html is like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !-- The HTML 4.01 Transitional DOCTYPE declaration-- !-- above set at the top of the file will set -- !-- the browser's rendering engine into -- !-- Quirks Mode. Replacing this declaration -- !-- with a Standards Mode doctype is supported, -- !-- but may lead to some differences in layout. -- html head meta http-equiv=content-type content=text/html; charset=UTF-8 !-- -- !-- Any title is fine -- !-- -- titleSimpleMaps/title !-- -- !-- This script loads your compiled module. -- !-- If you add any GWT meta tags, they must -- !-- be added before this line.-- !-- -- script type=text/javascript language=javascript src=com.example.google.gwt.mapstutorial.SimpleMaps.nocache.js/ script /head !-- -- !-- The body can have arbitrary html, or -- !-- you can leave the body empty if you want -- !-- to create a
Re: ImageBundle and polling very often
Thx! I was testing the getHTML and setHTML and it worked good, the CPU is going up to ~40% when it's redrawing now and not max everytime. The memory is very very slowly gaining but it's not a problem now as it was befoure. It's running much smoother. Just some code how I'm doing this. private OhtelloImageBundle oImageBoundle = (OhtelloImageBundle) GWT.create(OhtelloImageBundle.class); private String black = oImageBoundle.blackIcon().getHTML(); private String white = oImageBoundle.whiteIcon().getHTML(); private String green = oImageBoundle.greenIcon().getHTML(); private void doGameUpdate() { if (ohtelloSvc == null) { ohtelloSvc = GWT.create(OhtelloService.class); } AsyncCallbackGamePlan callback = new AsyncCallbackGamePlan() { public void onFailure(Throwable caught) { // do something with errors GWT.log(onFailure: + caught, null); } public void onSuccess(GamePlan result) { for (int i = 0; i gamePlan.getColumnCount(); i++) { for (int j = 0; j gamePlan.getRowCount(); j++) { if (result.getGamePlan()[i][j].equals(B)) { gamePlan.setHTML(i, j, black); } else if (result.getGamePlan()[i][j].equals(W)) { gamePlan.setHTML(i, j, white); } else { gamePlan.setHTML(i, j, green); } } } } }; ohtelloSvc.doGameUpdate(callback); } Thx for the help. On 20 Mar, 01:42, Vitali Lovich vlov...@gmail.com wrote: Also, make sure that the stall is actually because you're swapping memory not because your trying to repaint a large board (look at your OS resource monitor). You should see almost no CPU usage in user-space if it's memory swapping. If it's the CPU, you'll want to do the traditional trick of doing your work in multiple steps: private static final STEP_SIZE = 100; Timer repainter = new Timer() { public GameResult result; private GameResult current; private int row = 0; private int col = 0; public void run() { int steps = 0; if (current != result) { row = col = 0; current = result; } ResultGamePlan rGamePlan = current.getGamePlan(); for (; steps STEP_SIZE row gamePlan.getRowCount(); row++) { for (; steps STEP_SIZE col gamePlan.getColumnCount(); col++, steps++) { if (rGamePlan[col][row].equals(B)) //paint black else if (rGamePlan[col][row].equals(W)) // paint white else // paint green } } if (row == gamePlan.getRowCount() col == gamePlan.getColumnCount) { // finished painting cancel(); current = null; } }; /// when you get an update from server repainter.result = serverResult; repainter.scheduleRepeating(10); That'll actually make things slower in terms of throughput, but the UI will remain responsive, so it'll seem faster. Another thing you can try is to use initialize like in my previous e-mail, except use HTML instead of Image. Then cache the HTML representation of the images in 3 global variables (getHTML of AbstractImagePrototype). Then when you iterate, simple call setHTML - that should be even faster should give you pretty good memory savings. On Thu, Mar 19, 2009 at 8:24 PM, Vitali Lovich vlov...@gmail.com wrote: Try doing an initialization first: for (int i = 0; i gamePlan.getColumnCount(); i++) for (int j = 0; j gamePlan.getRowCount(); j++) gamePlan.setWidget(i,j, new Image()); Then in your actual paint do: imagePrototype.applyTo(gamePlan.getWidget(i, j)) On Thu, Mar 19, 2009 at 6:30 PM, GhostNr1 ghost...@gmail.com wrote: Hi! I'm trying to use ImageBundle to paint all my images. That's work very good except from one thing. Every 3 secound I poll the server to check if an ohtello plan have changed and then I try to paint it for (int i = 0; i gamePlan.getColumnCount(); i++) { for (int j = 0; j gamePlan.getRowCount(); j++) {
Copy to clipboard using ZeroClipboard - Problem
Hi all, I've been playing around with the ZeroClipboard (see http://code.google.com/p/zeroclipboard/) but I did not manage to get it to work as of now. After having tried out different approaches / solutions from other users (for example here http://code.google.com/p/zeroclipboard/wiki/IdeasAndSuggestions), I'm now asking you guys. =) I want to copy a calculated value *from within my GWT-application* to the clipboard so that I can use that value anywhere else using Ctrl-v (that's what ZeroClipboard is all about right? ;-) ) I therefore put the corresponding code into my host html file (Application.html) of my GWT-app: html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleApplication/title script type=text/javascript language=javascript src=ZeroClipbaord.js/script script language=JavaScript function copy() { var clip = new ZeroClipboard.Client(); clip.setText('Copied!!!'); clip.glue( 'buttonId' ); } /script script type=text/javascript language=javascript src=GWTServlet.Application.nocache.js/script /head body iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe /body /html My corresponding Java source-code looks like this: public class Application implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { FlowPanel table = new FlowPanel(); table.getElement().setId(FlowPanel); Button button = new Button(ClickMe to copy to clipboard); button.getElement().setId(buttonId); button.addClickListener(new ClickListener(){ public void onClick(Widget arg0) { copyInJava(); } }); table.add(button); RootPanel.get().add(table); } public native void copyInJava() /*-{ $wnd.copy(); }-*/; } ZeroClipboard works just fine when used in plain HTML to copy contents to the clipboard but I did not manage to get it to work from inside a GWT-application. I also used FireBug to debug and apparently there is some issue when creating the ZeroClipboard.Client() object. Nonetheless, when I run it in plain HTML, everything is fine so I assume that the issue is due to the fact that I'm using a GWT-app to get the job done. Does anybody have suggestions what the problem might be? Cheers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Currency Formatting
Hi, Can someone please tell me a way to correctly format currency in pounds? Jack --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: waiting for help
As mentioned in our posts within this thread there is absolutely no benefit in introducing struts as part of your app. Struts does not help in anyway with with gwt rpc calls back to the server. Gwtrpc is psuedo binary so all the form bindings, valudations and page forwarding etc are not needed because your service call is not working with pages but invoking methods. If you need to call existing actions consider exposing the service underneath as a proper gwtrpc service method and invoke that. In short keep away from struts if your gwt land it's an antiquated useless framework that does nothing in this modern world with tomorrows rich web app when one uses gwt . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT + Google Maps [ERROR] Unable to load module entry point class
This problem is a symptom of the http://maps.google.com/maps?http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=ABQIYoCcpT5eK4RhbA3gS1NPNhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQnNpBGVHff63uyhRABeY3eVBZaGQ gwt=1file=apiv=2key=... http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=ABQIYoCcpT5eK4RhbA3gS1NPNhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQnNpBGVHff63uyhRABeY3eVBZaGQ url not loading. Here are a couple of possibilities: - There is a typo in the URL - You are not loading the .gwt.xml file you think you are (maybe the hosted mode browser is using a module with a different name, or on a different path?) Some things to try: - Move the script tag from the .gwt.xml file into the .html host page. - If you can get the script to compile, run in Firefox and use Firebug or use Safari the Inspector to make sure that the maps.google.com/maps script is actually loading. On Tue, Mar 24, 2009 at 6:29 PM, nmadzharov nmadzha...@gmail.com wrote: Hello, I ve been trying to learn GWT and Google Maps API, however, when I follow the official online tutorial I end up with this error: [ERROR] Unable to load module entry point class com.example.google.gwt.mapstutorial.client.SimpleMaps (see associated exception for details) java.lang.RuntimeException: The Maps API has not been loaded. Is a script tag missing from your host HTML or module file? Is the Maps key missing or invalid? at com.google.gwt.maps.client.Maps.assertLoaded(Maps.java:29) at com.google.gwt.maps.client.geom.LatLng$.newInstance(Native Method) at com.example.google.gwt.mapstutorial.client.SimpleMaps.onModuleLoad (SimpleMaps.java:23) If I try pure GWT with no Google Maps it works fine! my xml file is : module !-- Inherit the core Web Toolkit stuff. -- inherits name='com.google.gwt.user.User'/ !-- Load the Google Maps GWT bindings from the gwt-google-apis project -- !-- Added by projectCreator if you use the -addModule argument -- inherits name=com.google.gwt.maps.GoogleMaps / !-- If you want to deploy this application outside of localhost, you must obtain a Google Maps API key at: http://www.google.com/apis/maps/signup.html Replace the src attribute below with a URL that contains your key. -- !-- script src=http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=??? /-- !-- You can usually run under localhost without a key -- script src=http://maps.google.com/maps? gwt=1amp;file=apiamp;v=2amp;key=ABQIYoCcpT5eK4RhbA3gS1NPNhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQnNpBGVHff63uyhRABeY3eVBZaGQ / !-- Inherit the default GWT style sheet. You can change -- !-- the theme of your GWT application by uncommenting -- !-- any one of the following lines. -- inherits name='com.google.gwt.user.theme.standard.Standard'/ !-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ -- !-- inherits name='com.google.gwt.user.theme.dark.Dark'/ -- !-- Other module inherits -- inherits name=com.google.gwt.maps.GoogleMaps / !-- Specify the app entry point class. -- entry-point class='com.example.google.gwt.mapstutorial.client.SimpleMaps'/ !-- Specify the application specific style sheet. -- stylesheet src='SimpleMaps.css' / /module where the key has been generated for http://localhost my Java file is: package com.example.google.gwt.mapstutorial.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.maps.client.InfoWindowContent; import com.google.gwt.maps.client.MapWidget; import com.google.gwt.maps.client.control.LargeMapControl; import com.google.gwt.maps.client.geom.LatLng; import com.google.gwt.maps.client.overlay.Marker; import com.google.gwt.user.client.ui.RootPanel; /** * Entry point classes define codeonModuleLoad()/code. */ public class SimpleMaps implements EntryPoint { private MapWidget map; /** * This is the entry point method. */ // GWT module entry point method. public void onModuleLoad() { LatLng cawkerCity = LatLng.newInstance(39.509,-98.434); // Open a map centered on Cawker City, KS USA map = new MapWidget(cawkerCity, 2); map.setSize(500px, 300px); // Add some controls for the zoom level map.addControl(new LargeMapControl()); // Add a marker map.addOverlay(new Marker(cawkerCity)); // Add an info window to highlight a point of interest map.getInfoWindow().open(map.getCenter(), new InfoWindowContent(World's Largest Ball of Sisal Twine)); // Add the map to the HTML host page RootPanel.get(mapsTutorial).add(map); } } the html is like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !-- The HTML 4.01 Transitional DOCTYPE declaration-- !-- above set at the top of the file will set -- !-- the browser's rendering
Re: Copy to clipboard using ZeroClipboard - Problem
On 24 mar, 23:51, Chris zae...@gmail.com wrote: Hi all, I've been playing around with the ZeroClipboard (seehttp://code.google.com/p/zeroclipboard/) but I did not manage to get it to work as of now. After having tried out different approaches / solutions from other users (for example herehttp://code.google.com/p/zeroclipboard/wiki/IdeasAndSuggestions), I'm now asking you guys. =) I want to copy a calculated value *from within my GWT-application* to the clipboard so that I can use that value anywhere else using Ctrl-v (that's what ZeroClipboard is all about right? ;-) ) I therefore put the corresponding code into my host html file (Application.html) of my GWT-app: html head meta http-equiv=content-type content=text/html; charset=UTF-8 titleApplication/title script type=text/javascript language=javascript src=ZeroClipbaord.js/script script language=JavaScript function copy() { var clip = new ZeroClipboard.Client(); clip.setText('Copied!!!'); clip.glue( 'buttonId' ); } /script script type=text/javascript language=javascript src=GWTServlet.Application.nocache.js/script /head body iframe src=javascript:'' id=__gwt_historyFrame tabIndex='-1' style=position:absolute;width:0;height:0;border:0/iframe /body /html My corresponding Java source-code looks like this: public class Application implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { FlowPanel table = new FlowPanel(); table.getElement().setId(FlowPanel); Button button = new Button(ClickMe to copy to clipboard); button.getElement().setId(buttonId); button.addClickListener(new ClickListener(){ public void onClick(Widget arg0) { copyInJava(); } }); table.add(button); RootPanel.get().add(table); } public native void copyInJava() /*-{ $wnd.copy(); }-*/; } ZeroClipboard works just fine when used in plain HTML to copy contents to the clipboard but I did not manage to get it to work from inside a GWT-application. I also used FireBug to debug and apparently there is some issue when creating the ZeroClipboard.Client() object. Nonetheless, when I run it in plain HTML, everything is fine so I assume that the issue is due to the fact that I'm using a GWT-app to get the job done. Does anybody have suggestions what the problem might be? My understanding of ZeroClipboard is that your copy() function should be called *prior* to clicking the button, so that ZeroClipboard can overlay a transparent Flash movie over the button; when you click the button, you actually click the Flash movie which copies the given text into the clipboard (that's click-jacking). So with your code, on the first click you install the ZeroClipboard client and starting with the second click only you copy the text to the clipboard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 use Servlets to download file to browser?
On 24 mar, 21:53, vroom_vroom slabarb...@gmail.com wrote: Surprizingly, keeping all code the same with the exception of the client side...and changing all that code to just: Window.open(/exportExcel, _self, ); actually works. Your RequestBuilder in the previous code snippet would create an ajax connection from your browser where the response from the server is accessible in the Response's getText(). That's the whole point of AJAX: handling the response from code. This means that this never, ever pops up a save to disk dialog (which is the desired behavior). However, in hosted mode even though the file is created and my servlet is hit I get the error: [ERROR] Unable to find 'exportExcel.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? So not sure why this error occurs...maybe I am doing my servlet mapping incorrectly?? Should it not go in the projects .gwt.xml file? I am speaking of the same file that you inherit the other modules and gwt style sheets. In hosted mode, the servlet declared in your module lives within your module (e.g. http://localhost:/my.package.MyModule/exportExcel), while /exportExcel above tries to access http://localhost:/exportExcel which the hosted mode tries to resolve into a module named exportExcel (hence the look-up for a exportExcel.gwt.xml). The solution (which is documented) is to use GWT.getModuleBaseURL() + exportExcel which will resolve to /my.package.MyModule/ in the hosted mode, and probably just / when deployed as your ROOT webapp. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: 2 timers on one page?
On 24 mar, 13:50, denis56 denis.ergashb...@gmail.com wrote: My latin text is coming direct from the class implementing EntryPoint. (lblNew.setText(ÜÖ);). I made sure its encoding is set to ISO-8859-1. Metas in HTML are also set as meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1. Should something else be missing (HTTP headers, maybe?). http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5t=FAQ_InternationalizedCharactersInLocalizedApplication I'm not sure about the Java requires UTF-8 bit, but GWT compiler expects UTF-8 so... just use UTF-8! See also: http://code.google.com/p/google-web-toolkit/issues/detail?id=1825 (and note the NotPlanned status) Issue 1825 proposes another workaround: using unicode escapes (\u) in your strings (i.e. make your files us-ascii) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: 2 timers on one page?
On 24 mar, 13:43, denis56 denis.ergashb...@gmail.com wrote: private Timer timer = new Timer() { @Override public void run() { blinkBlinkables(); } }; timer.scheduleRepeating(500); In this case I am using scheduleRepeating instead of schedule since the code flow is not asynchronous, as I think. Unless blinkBlinkables is really fast and given the low interval (semi- second), I'd use a timer re-scheduling itself, as you did with your RPC call: new Timer() { public void run() { blinkBlinkables(); this.schedule(500); } }.schedule(500); I though that having 2 timers running along each other may be causing the problems, should it? Maybe it is better to have just one that would run two separate tasks (updates and blinking) or I am missing something? It would needlessly complicate your code and I doubt it'd change much thing (the above change might have a more noticeable effect). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 1.6 and the new com.google.gwt.dev.HostedMode problem
Hi Doru, You can use the webAppCreator utility to automatically generate the required web.xml file for you. It works in a similar fashion as the pre-1.6 applicationCreator utility. You can invoke the webAppCreator utility with the command below: webAppCreator -out test com.test.TestApp Hope that helps, -Sumit Chandel On Sun, Mar 15, 2009 at 12:29 PM, Ned Nowotny n...@nowotny.net wrote: I believe there is a simple misunderstanding here. The -war argument should refer to a directory that already exists. Within this directory, you should have already created the WEB-INF/web.xml file you need. The HostedMode class will create a war directory for you if it does not already exist while writing the files it generates. However, that is a side-effect. The intent is that the directory stucture is already there containing all of your static and non-GWT files for your application, including your web.xml file. Ned On Mar 9, 7:28 am, Doru virgil.tra...@gmail.com wrote: Hi, Yes I know that. But who is supposed to put that file there? HostedMode is not putting that file there ( when is generating the WAR) but after that when is launching the application is looking for the file and is not finding anything and an exception is thrown. Who is supposed to put web.xml in the war/WEB-INF? Thanks, Doruhttp://java-hobby.blogspot.com/ On Mar 9, 12:18 pm, Shawn Brown big.coffee.lo...@gmail.com wrote: web.xml goes in war/WEB-INF On Mon, Mar 9, 2009 at 5:45 PM, Doru virgil.tra...@gmail.com wrote: Hi Vitaly, I am not an expert in HostedMode but what I observed is that HostedMode is generating the WAR with the JS output of the compilation. The problem is that it's not putting any web.xml inside the WAR and also it doesn't ask me where the web.xml is located. I have a correct web.xml but nobody is asking me where that file is located. Thanks, Doru http://java-hobby.blogspot.com/ On Mar 9, 10:24 am, Vitali Lovich vlov...@gmail.com wrote: The web.xml file goes directly into your war - war/web.xml. HostedMode should pick it up directly. On Mon, Mar 9, 2009 at 4:21 AM, Doru virgil.tra...@gmail.com wrote: Hi Vitaly, I already have the web.xml file properly configured. My only issue is that I don't know how to tell to the HostedMode application with an argument where the web.xml file is located. There is a -war argument which I used and which is generating a war folder structure...but how do I specify which web.xml to use? Thanks, Doru http://java-hobby.blogspot.com/ On Mar 9, 7:46 am, Vitali Lovich vlov...@gmail.com wrote: Ummm... I've never launched hosted mode from an ant file. My recommendation would be to create a sample project, import it into Eclipse look at the parameters you need. From what I remember of the top of my head, all you have to give when launching HostedMode is is the fully-qualified name of your module. Then localhost/module-alias should hit your page (assuming that you've configured your web.xml like webAppCreator does). On Sun, Mar 8, 2009 at 3:15 PM, Doru virgil.tra...@gmail.com wrote: Hi, I have an old GWT 1.5 project which I am trying to migrate to 1.6 In build.xml how can I specify a web.xml file to the com.google.gwt.dev.HostedMode? Thanks, Virgil On Mar 8, 7:59 pm, Vitali Lovich vlov...@gmail.com wrote: If you used the webAppCreator, you should get a sample web.xml in your war/ directory. Servlets are no longer defined in your gwt.xml but rather through the web.xml file. On Sun, Mar 8, 2009 at 9:56 AM, Doru virgil.tra...@gmail.com wrote: Hi, I am trying to use the new com.google.gwt.dev.HostedMode from an ANT build script. I have a problem and I get [WARN] Module declares 2 servlet declaration(s), but a valid 'web.xml' was not found. How can I declare the web.xml when I use the new HostedMode in GWT1.6 Thanks, Doru http://java-hobby.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
IE vertical scrollbar triggers a horizontal scrollbar
hello, i have some content widget, which is placed into a pixel sized ScrollPanel. the widget easily fits into ScrollPanel by its width. in IE6 when widget's height is more than ScrollPanel, vertical scroll bar appears, which in turn (i guess so) triggers horizontal scrollbar to create space for vertical scrollbar. when widget is shorter by height no scrollbar appears. i tried both setting width of widget to 100% and remain it unset. in firefox it works as expected (no horizontal scrollbar). i didn't test it for other IE versions any ideas how to fix this ? setting width of widget to 90% or some pixel width may help (didnt try), but i prefer them as last choices as they depend on scrollbar width. thanks, r a f t --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Hibernate performance in GWT
Hello Friends, When i was trying to use hibernate in GWT then i was found one major problem i.e. PersistentBag is not serializable. For resolving this issue, i read many blogs. According to the blogs, i found many solutions but at last i found when i am using this method then there is some performance methods and can't use hibernate lazy-loading properly because we can't use lazy-loading outside the scope of the Session and so when we use the Hibernate in GWT then we need to close the session on the service/server level while we send the object on the client side. Some described solution for using hibernate in the group are :- 1.)Array instead of collection :- One is the major solution for using the collection object, use array instead of the Collection object. But with this solution there is lot of overhead on the user part i.e. maintain the array properly with index values. 2.)Inverse-Owner objects :- One another solution for supporting the colletion in the hibernate i.e. use only inverse-owner objects instead of the collection object but in this case there is one major problem i.e. whenever we need to use the collections data then we need to send the one extra call on the server everytime for collecting the collections objects and for maintaining that thing code readability also lost. 3.)Maintain PersistentBag/PersistentSet Serializable class :- Somewhere i read about create one serializable class for PersistentBag,PersistentSet and use it. But in this case, we need to create that class on the client side package and while we are creating this after that problem starts i.e. GWT not support for importing org.hibernate.PersistentBag on the client side. 4.)Convertor class :- One another method for using hibernate in GWT is Convertor class i.e. when you send your Object on the client side then you need to use the Convertor class for changing all the PersistentBag/PersistentSet objects in Collection objects.In this case, performance is decreased badly because of lazy-loading .But it's working fine. I used the fourth method with some changes for increaing the performance. I include one Obect Fetch Plan design pattern with the lazy loading. In this pattern, we need to create one xml file where we define the fetch plans with the binding name. for e.g. suppose i have one object A and A having collection of B,C,D and E, F 1-1 objects in class A.B having 1-1 objects of B1, B2. Suppose in this case when i need to fetch the A object from the database then fetch only A, B, B1 not all the other objects as defined in the A objects and in another fetch plan, fetch only A,C,E,F objects then we need to create two fetch plans which we bind with the corresponding Fetch-Plan-Name i.e. A_B and A_C_E_F. When we use hibernate in this way, then i know there is also lazy- loading problem but we can control on the fetching of the objects while we convert the Collections objects. In this way, we need to care one thing i.e. use lazy=true for collection and 1-1 objects. Thanks and regards, Sunil Bansal, +91-9784175320 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
[gwt-contrib] Re: Announcing GWT 1.6 Release Candidate
Hi Scott, Yes, this fixes the problem for my configuration, the spring container started now :) Thanks. On 3/24/09, Scott Blum sco...@google.com wrote: Hey, can you guys do me a favor and try out a fix? Just take the attached jar and put it on your classpath ahead of gwt-dev-platform.jar. See if it fixes the not and instance of Servlet problem (and doesn't cause other problems). Lemme know if that works, thanks, Scott On Mon, Mar 23, 2009 at 9:09 PM, Alejandro D. Garin aga...@gmail.comwrote: Are the spring jar and its dependencies in your WEB-INF/lib folder? We did introduce an extra convenience mode recently, hence the message Hi Bruce, Yes, the spring.jar is in the lib folder, no other dependences needed. If you want I can send to you a little demo project based on the webAppCreator default example plus an Spring bean loaded in the server. The demo project work fine in 1.6.1 Thanks. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on ImageBundleDesign in google-web-toolkit
Comment by Nitin.sawant2008: GWT is really Great!! I'll soon develop WebSoftwareApp on it! thanx to gooogle For more information: http://code.google.com/p/google-web-toolkit/wiki/ImageBundleDesign --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] CSSResource @sprite IE6 examples?
Does anyone have CSSResource css examples successfully utilizing .png sprites with transparencies in IE6? Specifically, I'm trying to fix the artifacts on my DecoratorPanel rounded corners in IE6. I suspect it might work with something like below but have not had any luck: @sprite .popup .popupTopRight { gwt-image: popupTR; } @if user.agent ie6 { @sprite .popup .popupTopRight { gwt-image: popupTR; } } Are there plans to support IE7 or IE8 user.agents so proper @sprite support in IE6 utilizing CSSResource bundles can eventually be automatic? Thanks, Jeff --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: CSSResource @sprite IE6 examples?
Bob could probably speak more to the specifics, but I don't believe the @sprite support in CSS resources deals with PNG transparency on IE6 as yet. The PNG transparency support for IE6 in ImageBundle is hideous and has caused no end of performance and layout issues (just take a look at the nasty DOM structure it generates to see why). Don't take this as an official stance, since we haven't really discussed it in detail, but I'm starting to believe the right answer is to slowly move towards supporting IE6 to the best degree possible, while not hamstringing later IE browsers (e.g., by not bending over backwards to support PNG transparency in IE6 if it's going to cause lots of problems). What I think this means in practice is keeping the 'ie6' user-agent for IE6/7 and adding an 'ie8' user-agent, because IE8 adds a *lot* more standard browser features. Where strictly necessary, we can do dynamic checks for IE6/7. The differences between IE6 and 7 fall into three categories that I know of: - PNG transparency support. - Certain CSS constructs (especially w.r.t. fixed positioning). - Popup peek-through-rendering bugs (i.e. heavyweight HWND controls like select poke through when they shouldn't on IE6). Of these, PNG transparency could be theoretically dropped for IE6 without seriously breaking functionality (remember you *can* do transparency in GIFs, even though it's only a one-bit alpha channel). The CSS stuff is ugly, but well-known, and we don't currently do much to help with it anyway. And the popup bug could be left in as a dynamic check to differentiate IE6/7. Sorry to hijack this thread with my ruminations on IE user-agents, but I think it's worth discussing, and is salient to the question at hand. joel. On Tue, Mar 24, 2009 at 9:28 AM, Jeff J. jsjenkins...@gmail.com wrote: Does anyone have CSSResource css examples successfully utilizing .png sprites with transparencies in IE6? Specifically, I'm trying to fix the artifacts on my DecoratorPanel rounded corners in IE6. I suspect it might work with something like below but have not had any luck: @sprite .popup .popupTopRight { gwt-image: popupTR; } @if user.agent ie6 { @sprite .popup .popupTopRight { gwt-image: popupTR; } } Are there plans to support IE7 or IE8 user.agents so proper @sprite support in IE6 utilizing CSSResource bundles can eventually be automatic? Thanks, Jeff --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: CSSResource @sprite IE6 examples?
Oops I hit send too quickly.. The CSS I've been trying looks like this: @sprite .popup .popupTopRight { gwt-image: popupTR; } @if user.agent ie6 { @sprite * html .popup .popupTopRight { gwt-image: popupTR; overflow: hidden; filter: literal (progid:DXImageTransform.Microsoft.AlphaImageLoader(src=')value ('popupTR.getURL')literal(',sizingMethod='crop')); } } This css is not cropping the proper portion of the image (showing the wrong corner), and I cant figure out how to determine the proper margin offset values to shift it around. Hopefully that makes sense.. Jeff On Mar 24, 11:28 am, Jeff J. jsjenkins...@gmail.com wrote: Does anyone have CSSResource css examples successfully utilizing .png sprites with transparencies in IE6? Specifically, I'm trying to fix the artifacts on my DecoratorPanel rounded corners in IE6. I suspect it might work with something like below but have not had any luck: @sprite .popup .popupTopRight { gwt-image: popupTR;} @if user.agent ie6 { @sprite .popup .popupTopRight { gwt-image: popupTR; } } Are there plans to support IE7 or IE8 user.agents so proper @sprite support in IE6 utilizing CSSResource bundles can eventually be automatic? Thanks, Jeff --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Announcing GWT 1.6 Release Candidate
I just tried the patch with trunk (5072) got java.lang.NullPointerException at sun.misc.MetaIndex.mayContain(MetaIndex.java:243) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:761) at sun.misc.URLClassPath.getResource(URLClassPath.java:185) at sun.misc.URLClassPath.getResource(URLClassPath.java:237) at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1130) at java.lang.ClassLoader.getResource(ClassLoader.java:991) at java.lang.ClassLoader.getResource(ClassLoader.java:989) at com.google.gwt.dev.OophmHostedModeBase.loadImageIcon(OophmHostedModeBase.java:293) at com.google.gwt.dev.HostedMode.getWebServerIcon(HostedMode.java:431) at com.google.gwt.dev.OophmHostedModeBase.openAppWindow(OophmHostedModeBase.java:495) at com.google.gwt.dev.HostedModeBase.doStartup(HostedModeBase.java:493) at com.google.gwt.dev.OophmHostedModeBase.doStartup(OophmHostedModeBase.java:420) at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:363) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:609) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:402) at com.google.gwt.dev.HostedMode.main(HostedMode.java:264) on trying to launch OOPHM in HostedMode. Is this patch compatible? I'm trying to fix the issue with the log4j that I'm getting: log4j:ERROR A org.apache.log4j.ConsoleAppender object is not assignable to a org.apache.log4j.Appender variable. log4j:ERROR The class org.apache.log4j.Appender was loaded by log4j:ERROR [sun.misc.launcher$appclassloa...@64601bb1] whereas object of type log4j:ERROR org.apache.log4j.ConsoleAppender was loaded by [contextloa...@null]. log4j:ERROR Could not instantiate appender named O. I think there's some interference going on due to me launching HostedMode. On Tue, Mar 24, 2009 at 7:41 AM, Alejandro D. Garin aga...@gmail.comwrote: Hi Scott, Yes, this fixes the problem for my configuration, the spring container started now :) Thanks. On 3/24/09, Scott Blum sco...@google.com wrote: Hey, can you guys do me a favor and try out a fix? Just take the attached jar and put it on your classpath ahead of gwt-dev-platform.jar. See if it fixes the not and instance of Servlet problem (and doesn't cause other problems). Lemme know if that works, thanks, Scott On Mon, Mar 23, 2009 at 9:09 PM, Alejandro D. Garin aga...@gmail.comwrote: Are the spring jar and its dependencies in your WEB-INF/lib folder? We did introduce an extra convenience mode recently, hence the message Hi Bruce, Yes, the spring.jar is in the lib folder, no other dependences needed. If you want I can send to you a little demo project based on the webAppCreator default example plus an Spring bean loaded in the server. The demo project work fine in 1.6.1 Thanks. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Announcing GWT 1.6 Release Candidate
The jar file I sent is NOT compatible with trunk. You would need to patch the source using the patch from issue #3496http://code.google.com/p/google-web-toolkit/issues/detail?id=3496and rebuild. On Tue, Mar 24, 2009 at 1:20 PM, Vitali Lovich vlov...@gmail.com wrote: I just tried the patch with trunk (5072) got java.lang.NullPointerException at sun.misc.MetaIndex.mayContain(MetaIndex.java:243) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:761) at sun.misc.URLClassPath.getResource(URLClassPath.java:185) at sun.misc.URLClassPath.getResource(URLClassPath.java:237) at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1130) at java.lang.ClassLoader.getResource(ClassLoader.java:991) at java.lang.ClassLoader.getResource(ClassLoader.java:989) at com.google.gwt.dev.OophmHostedModeBase.loadImageIcon(OophmHostedModeBase.java:293) at com.google.gwt.dev.HostedMode.getWebServerIcon(HostedMode.java:431) at com.google.gwt.dev.OophmHostedModeBase.openAppWindow(OophmHostedModeBase.java:495) at com.google.gwt.dev.HostedModeBase.doStartup(HostedModeBase.java:493) at com.google.gwt.dev.OophmHostedModeBase.doStartup(OophmHostedModeBase.java:420) at com.google.gwt.dev.HostedMode.doStartup(HostedMode.java:363) at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:609) at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:402) at com.google.gwt.dev.HostedMode.main(HostedMode.java:264) on trying to launch OOPHM in HostedMode. Is this patch compatible? I'm trying to fix the issue with the log4j that I'm getting: log4j:ERROR A org.apache.log4j.ConsoleAppender object is not assignable to a org.apache.log4j.Appender variable. log4j:ERROR The class org.apache.log4j.Appender was loaded by log4j:ERROR [sun.misc.launcher$appclassloa...@64601bb1] whereas object of type log4j:ERROR org.apache.log4j.ConsoleAppender was loaded by [contextloa...@null]. log4j:ERROR Could not instantiate appender named O. I think there's some interference going on due to me launching HostedMode. On Tue, Mar 24, 2009 at 7:41 AM, Alejandro D. Garin aga...@gmail.comwrote: Hi Scott, Yes, this fixes the problem for my configuration, the spring container started now :) Thanks. On 3/24/09, Scott Blum sco...@google.com wrote: Hey, can you guys do me a favor and try out a fix? Just take the attached jar and put it on your classpath ahead of gwt-dev-platform.jar. See if it fixes the not and instance of Servlet problem (and doesn't cause other problems). Lemme know if that works, thanks, Scott On Mon, Mar 23, 2009 at 9:09 PM, Alejandro D. Garin aga...@gmail.comwrote: Are the spring jar and its dependencies in your WEB-INF/lib folder? We did introduce an extra convenience mode recently, hence the message Hi Bruce, Yes, the spring.jar is in the lib folder, no other dependences needed. If you want I can send to you a little demo project based on the webAppCreator default example plus an Spring bean loaded in the server. The demo project work fine in 1.6.1 Thanks. --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5073 - Created wiki page through web user interface.
Author: j...@google.com Date: Tue Mar 24 12:14:51 2009 New Revision: 5073 Added: wiki/UsingOOPHM.wiki Log: Created wiki page through web user interface. Added: wiki/UsingOOPHM.wiki == --- (empty file) +++ wiki/UsingOOPHM.wikiTue Mar 24 12:14:51 2009 @@ -0,0 +1,43 @@ +#summary How to use OOPHM in current trunk. +#labels Phase-Deploy + += Introduction = + +Previously, we have embedded the browser inside GWT hosted mode using SWT. This is unsatisfactory for a number of reasons: + * SWT has native pointers, so you have to build it for 32 or 64 bits. + * You can only use one browser per platform in hosted mode. + * You can't easily use tools like DOM Inspector, Firebug, etc. + * On Linux, we have to ship an embeddable version of Mozilla 1.7.12, which is a very old browser. Also, distributing a large binary like this is problematic to support on a wide range of distributions due to shared library dependencies. + +The solution is to invert the problem -- instead of embedding the browser in hosted mode, we will embed a hosted mode plugin in the browser. This has a much smaller footprint that is easier to support, and then we can get support for multiple browsers per platform and cross-machine hosted mode (ie, running hosted mode on Linux and connecting to it from IE on a Windows machine). + += Installing the Plugin = +You will need to install a plugin in each browser you intend to use with OOPHM. + + * *Firefox 3* + Install the [http://code.google.com/p/google-web-toolkit/source/browse/branches/oophm/plugins/xpcom/prebuilt/oophm-xpcom.xpi plugin] in your browser. + + * *Safari 3 on MacOSX* + Run the installer from this [http://google-web-toolkit.googlecode.com/svn/branches/oophm/plugins/webkit/prebuilt/oophm.dmg disk image]. + + * *IE6/7* + Download [http://google-web-toolkit.googlecode.com/svn/branches/oophm/plugins/ie/prebuilt/oophm.dll oophm.dll] to local disk. Run regsvr32 oophm.dll and restart IE. + += Using OOPHM = +OOPHM is currently in trunk, but is not enabled by default because the UI needs some work and some features are missing, plus it just hasn't had enough testing to be sure it is completely usable as a replacement. So, to use it now, you need to add gwt-dev-oophm.jar at the beginning of your classpath. There are a number of ways to do it: + +== Getting the right Classpath == + + * *webAppCreator* + If you are creating a war-style project, you can just use webAppCreator and it will generate an ant target oophm for you. You can just run ant oophm and it will run your application using OOPHM instead of legacy hosted mode. If you have an existing project, you can delete the build.xml file and then run webAppCreator with -ignore and it won't overwrite any existing files. + + * *Eclipse* + If you have an existing launch config for Eclipse, simply edit the classpath for that launch config and add gwt-dev-oophm.jar at the top of the classpath. + + * *Others* + Basically, wherever you set the classpath that includes gwt-dev-{platform}.jar, make sure that gwt-dev-oophm.jar is searched before the platform-specific jar. + +== Running == +Just execute the GWTShell or !HostedMode classes as usual. A swing UI will show up and it will try and launch firefox with the proper URL -- it does this by just running firefox URL, so if you don't have the path set properly or if you need to run a different executable it will fail -- in that case, just copy the URL from the log window and paste it in the browser you want to use. + +Note that calls between Java and JS are synchronous, and that means the plugin has to block the browser while a Java method is executing. If you are debugging your Java code, the browser will appear hung until you return back to browser-side code. \ No newline at end of file --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5074 - Edited wiki page through web user interface.
Author: j...@google.com Date: Tue Mar 24 12:19:15 2009 New Revision: 5074 Modified: wiki/UsingOOPHM.wiki Log: Edited wiki page through web user interface. Modified: wiki/UsingOOPHM.wiki == --- wiki/UsingOOPHM.wiki(original) +++ wiki/UsingOOPHM.wikiTue Mar 24 12:19:15 2009 @@ -4,7 +4,7 @@ = Introduction = Previously, we have embedded the browser inside GWT hosted mode using SWT. This is unsatisfactory for a number of reasons: - * SWT has native pointers, so you have to build it for 32 or 64 bits. + * SWT has native pointers, so you have to build it for 32 or 64 bits (and we currently only ship 32-bit binaries, so you can't use it with a 64-bit JVM). * You can only use one browser per platform in hosted mode. * You can't easily use tools like DOM Inspector, Firebug, etc. * On Linux, we have to ship an embeddable version of Mozilla 1.7.12, which is a very old browser. Also, distributing a large binary like this is problematic to support on a wide range of distributions due to shared library dependencies. @@ -24,7 +24,7 @@ Download [http://google-web-toolkit.googlecode.com/svn/branches/oophm/plugins/ie/prebuilt/oophm.dll oophm.dll] to local disk. Run regsvr32 oophm.dll and restart IE. = Using OOPHM = -OOPHM is currently in trunk, but is not enabled by default because the UI needs some work and some features are missing, plus it just hasn't had enough testing to be sure it is completely usable as a replacement. So, to use it now, you need to add gwt-dev-oophm.jar at the beginning of your classpath. There are a number of ways to do it: +OOPHM is currently in trunk (it is not and will not be available with 1.6 or earlier versions), but is not enabled by default because the UI needs some work and some features are missing, plus it just hasn't had enough testing to be sure it is completely usable as a replacement. So, to use it now, you need to add gwt-dev-oophm.jar at the beginning of your classpath. There are a number of ways to do it: == Getting the right Classpath == --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Getting oophm working
I think it might be a good idea to also reference the -localWorkers flag. I find that it cuts down on my startup time significantly (especially on my desktop which is quad-core, but even on my dual-core laptop). With OOPHM I find this to be particularly more annoying because the browser freezes on startup while the server is compiling the code. Also, perhaps a mention that every refresh of the page launches a fresh compilation of the code thus the browser locks up for a while there as well. The other thing I noticed is that after changing client-side code refreshing, although the debugger claims the source is out of sync, it works perfectly with the changed code. On Tue, Mar 24, 2009 at 3:20 PM, John Tamplin j...@google.com wrote: On Fri, Mar 6, 2009 at 7:27 PM, John Tamplin j...@google.com wrote: I will write up a document next week about how to use OOPHM with trunk (it isn't going to be usable with 1.6). Sorry for the delay, but I finally got around to writing it up -- see UsingOOPHM http://code.google.com/p/google-web-toolkit/wiki/UsingOOPHMon the wiki. Let me know if that doesn't address any issues you have. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Getting oophm working
On Tue, Mar 24, 2009 at 3:59 PM, Vitali Lovich vlov...@gmail.com wrote: I think it might be a good idea to also reference the -localWorkers flag. I find that it cuts down on my startup time significantly (especially on my desktop which is quad-core, but even on my dual-core laptop). With OOPHM I find this to be particularly more annoying because the browser freezes on startup while the server is compiling the code. I don't know that the OOPHM document is the right place to discuss other compiler flags. Also, I don't think -localWorkers will have any impact on hosted mode at all, since it is used to compile different permutations in parallel. it will speedup web-mode compilation if you have more than one permutation, but nothing for hosted mode. Also, perhaps a mention that every refresh of the page launches a fresh compilation of the code thus the browser locks up for a while there as well. It is doing a bytecode compile (including of generated code), not a web-mode compile, so it should be very long unless you have a really large app. There is a project we call instant hosted mode which will allow reuse of your IDE's bytecode compilation rather than having to recompile, but it isn't ready yet (soon though). The other thing I noticed is that after changing client-side code refreshing, although the debugger claims the source is out of sync, it works perfectly with the changed code. What IDE are you using? I know there are issues with hot-swap between JDT and Javac, so if you aren't using Eclipse you may have some hot-swap issues (Eclipse and GWT both use JDT), which allows you to change some classes without doing a refresh. That is independent of a refresh, which is basically tossing the running classes and reloading them. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5075 - SerializableTypeOracleBuilder no longer warns when it sees a final
Author: sp...@google.com Date: Tue Mar 24 14:59:29 2009 New Revision: 5075 Modified: trunk/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java trunk/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java Log: SerializableTypeOracleBuilder no longer warns when it sees a final field of a class that has a custom serializer. It simply quietly ignores the field. Review by: jat Modified: trunk/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java == --- trunk/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java (original) +++ trunk/user/src/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilder.java Tue Mar 24 14:59:29 2009 @@ -461,8 +461,18 @@ } if (field.isFinal()) { + Type logLevel; + if (isManuallySerializable(field.getEnclosingType())) { +/* + * If the type has a custom serializer, assume the programmer knows + * best. + */ +logLevel = TreeLogger.DEBUG; + } else { +logLevel = TreeLogger.WARN; + } logger.branch(suppressNonStaticFinalFieldWarnings ? TreeLogger.DEBUG - : TreeLogger.WARN, Field ' + field.toString() + : logLevel, Field ' + field.toString() + ' will not be serialized because it is final, null); return false; } Modified: trunk/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java == --- trunk/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java (original) +++ trunk/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java Tue Mar 24 14:59:29 2009 @@ -38,6 +38,7 @@ import com.google.gwt.dev.javac.MockCompilationUnit; import com.google.gwt.dev.javac.TypeOracleTestingUtils; import com.google.gwt.dev.javac.impl.SourceFileCompilationUnit; +import com.google.gwt.dev.util.UnitTestTreeLogger; import com.google.gwt.dev.util.log.PrintWriterTreeLogger; import com.google.gwt.user.rebind.rpc.testcases.client.AbstractSerializableTypes; import com.google.gwt.user.rebind.rpc.testcases.client.ClassWithTypeParameterThatErasesToObject; @@ -105,6 +106,13 @@ private static final int EXPOSURE_NONE = TypeParameterExposureComputer.EXPOSURE_NONE; + private static void addAnnotation(SetCompilationUnit units) { +StringBuffer code = new StringBuffer(); +code.append(package java.lang.annotation;\n); +code.append(public interface Annotation { }\n); +units.add(createMockCompilationUnit(java.lang.annotation.Annotation, code)); + } + private static void addGwtTransient(SetCompilationUnit units) { StringBuffer code = new StringBuffer(); code.append(package com.google.gwt.user.client.rpc;\n); @@ -174,7 +182,24 @@ units.add(new SourceFileCompilationUnit(JavaSourceCodeBase.MAP)); } + private static void addSerializationStreamReader(SetCompilationUnit units) { +StringBuffer code = new StringBuffer(); +code.append(package com.google.gwt.user.client.rpc;\n); +code.append(public class SerializationStreamReader { }\n); +units.add(createMockCompilationUnit( +com.google.gwt.user.client.rpc.SerializationStreamReader, code)); + } + + private static void addSerializationStreamWriter(SetCompilationUnit units) { +StringBuffer code = new StringBuffer(); +code.append(package com.google.gwt.user.client.rpc;\n); +code.append(public class SerializationStreamWriter { }\n); +units.add(createMockCompilationUnit( +com.google.gwt.user.client.rpc.SerializationStreamWriter, code)); + } + private static void addStandardClasses(SetCompilationUnit units) { +addAnnotation(units); addGwtTransient(units); addJavaIoSerializable(units); addJavaLangObject(units); @@ -308,7 +333,6 @@ public SerializableTypeOracleBuilderTest() throws UnableToCompleteException { TreeLogger logger = createLogger(); - moduleDef = ModuleDefLoader.createSyntheticModule(logger, com.google.gwt.user.rebind.rpc.testcases.RebindRPCTestCases.JUnit, new String[] { @@ -1404,6 +1428,63 @@ SerializableTypeOracle sto = stob.build(logger); assertInstantiable(sto, a); assertNotInstantiableOrFieldSerializable(sto, b); + } + + /** + * Make sure that when serializing a class that has a custom field serializer, + * the warning about final fields is disabled. See issue 2931. + */ + public void testManualSerializerWithFinalField() throws NotFoundException, + UnableToCompleteException { +SetCompilationUnit units = new HashSetCompilationUnit(); +addStandardClasses(units); +addSerializationStreamReader(units); +addSerializationStreamWriter(units); + +{ +
[gwt-contrib] Re: RR: logging script size for programs with code splitting
Thanks, John! Comments inline. On Mon, Mar 23, 2009 at 2:32 PM, John Tamplin j...@google.com wrote: Checkstyle doesn't require sorted order of fields, since you can have initialization dependencies, and so our style guide does not require them being ordered (though for new code I would order them). Reordering fields later just makes merges more difficult and doesn't really add anything since we can't always order them. So, I would leave outDir where it was. Done. Regarding logScriptSize -- I thought the split strategy was pluggable, so is it safe to assume the assignment meanings of particular indices into the generated Javascript? Ie, (len - 1)/3, 2 * sp + 1, etc. If the split strategies are required to keep this same mapping (but may change how things are assigned between them), perhaps we should encapsulate that knowledge somewhere (ie, xxx.getLeftoversFragment(splitPoint), getExclusiveFragment(splitPoint)) rather than spreading these magic formulas around in case they need to be changed in the future. It's not pluggable, but the magic formula do suck. I moved these to static methods on CodeSplitter. Also, I think the log level for this is probably better at TRACE than DEBUG, but I don't feel strongly about it. I left it at DEBUG, only for the following reason: the intention is that people can pick this script size out of their continuous builds. They'll need to run at level DEBUG to do that, which already generates a ton of output. Does anyone run their continuous build at TRACE level, even though it generates even more output? If so, I wouldn't mind switching it back. Other than that, LGTM. Thanks! It's at revision 5076. Lex --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] [google-web-toolkit commit] r5076 - Have the compiler emit a hopefully reasonable measure of script
Author: sp...@google.com Date: Tue Mar 24 15:33:51 2009 New Revision: 5076 Modified: trunk/dev/core/src/com/google/gwt/dev/Link.java trunk/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java Log: Have the compiler emit a hopefully reasonable measure of script size for applications that use GWT.runAsync and thus include a large number of code fragments in the output. Review by: jat Modified: trunk/dev/core/src/com/google/gwt/dev/Link.java == --- trunk/dev/core/src/com/google/gwt/dev/Link.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/Link.java Tue Mar 24 15:33:51 2009 @@ -27,6 +27,7 @@ import com.google.gwt.dev.cfg.ModuleDefLoader; import com.google.gwt.dev.cfg.StaticPropertyOracle; import com.google.gwt.dev.jjs.JJSOptions; +import com.google.gwt.dev.jjs.impl.CodeSplitter; import com.google.gwt.dev.util.FileBackedObject; import com.google.gwt.dev.util.Util; import com.google.gwt.dev.util.arg.ArgHandlerExtraDir; @@ -240,6 +241,66 @@ } compilation.addSelectionPermutation(unboundProperties); } +logScriptSize(logger, perm.getId(), compilation); + } + + /** + * p + * Computes and logs the maximum total script size for this permutation. The + * total script size for one sequence of split points reached is the sum of + * the scripts that are downloaded for that sequence. The maximum total script + * size is the maximum such size for all possible sequences of split points. + * /p + */ + private static void logScriptSize(TreeLogger logger, int permId, + StandardCompilationResult compilation) { +/* + * The total script size is fully determined by the first split point that + * is reached; the order that the remaining are reached doesn't matter. To + * find the maximum, divide the sum into two parts: first add the initial + * and exclusive fragments, and then calculate the adjustment that should be + * applied depending on which split point comes first. Choose among these + * adjustments the one that is largest. + */ + +String[] javaScript = compilation.getJavaScript(); +int numSplitPoints = CodeSplitter.numSplitPointsForFragments(javaScript.length); +int maxTotalSize; + +if (numSplitPoints == 0) { + maxTotalSize = javaScript[0].length(); +} else { + // Add up the initial and exclusive fragments + maxTotalSize = javaScript[0].length(); + for (int sp = 1; sp = numSplitPoints; sp++) { +int excl = CodeSplitter.getExclusiveFragmentNumber(sp, numSplitPoints); +maxTotalSize += javaScript[excl].length(); + } + + // Find the largest adjustment for any split point + boolean first = true; + int adjustment = 0; + + for (int sp = 1; sp = numSplitPoints; sp++) { +int excl = CodeSplitter.getExclusiveFragmentNumber(sp, numSplitPoints); +int base = CodeSplitter.getBaseFragmentNumber(sp, numSplitPoints); +int leftovers = CodeSplitter.getLeftoversFragmentNumber(sp, +numSplitPoints); +int thisAdjustment = javaScript[base].length() ++ javaScript[leftovers].length() - javaScript[excl].length(); +if (first || (thisAdjustment adjustment)) { + adjustment = thisAdjustment; +} +first = false; + } + + maxTotalSize += adjustment; +} + +logger.log(TreeLogger.DEBUG, Permutation + permId + (strong name ++ compilation.getStrongName() + ) has an initial download size of ++ javaScript[0].length() + and max total script size of ++ maxTotalSize); } private final LinkOptionsImpl options; Modified: trunk/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java == --- trunk/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java (original) +++ trunk/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.javaTue Mar 24 15:33:51 2009 @@ -227,6 +227,28 @@ new CodeSplitter(logger, jprogram, jsprogram, map).execImpl(); } + public static int getBaseFragmentNumber(int sp, int numSplitPoints) { +return numSplitPoints + 2 * sp - 1; + } + + public static int getExclusiveFragmentNumber(int splitPoint, + int numSplitPoints) { +return splitPoint; + } + + public static int getLeftoversFragmentNumber(int splitPoint, + int numSplitPoints) { +return numSplitPoints + 2 * splitPoint; + } + + /** + * Infer the number of split points for a given number of code fragments. + */ + public static int numSplitPointsForFragments(int codeFragments) { +assert (((codeFragments - 1) % 3) == 0); +return (codeFragments - 1) / 3; + } + private static MapJField, JClassLiteral buildFieldToClassLiteralMap( JProgram jprogram) { final MapJField, JClassLiteral map = new
[gwt-contrib] Re: RR: logging script size for programs with code splitting
On Tue, Mar 24, 2009 at 6:34 PM, Lex Spoon sp...@google.com wrote: I left it at DEBUG, only for the following reason: the intention is that people can pick this script size out of their continuous builds. They'll need to run at level DEBUG to do that, which already generates a ton of output. Does anyone run their continuous build at TRACE level, even though it generates even more output? If so, I wouldn't mind switching it back. TRACE is actually lower volume than DEBUG -- DEBUG includes all TRACE output plus more. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] code review requested - add skeleton of runtime locales test
This just does a couple of tests that need to be fleshed out, but basically just proves that your suggestion of putting a hacked junit.html into a public path of a particular test module works for setting the runtime locale. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~--- Index: user/test/com/google/gwt/i18n/public_es_MX/junit.html === --- user/test/com/google/gwt/i18n/public_es_MX/junit.html (revision 0) +++ user/test/com/google/gwt/i18n/public_es_MX/junit.html (revision 0) @@ -0,0 +1,62 @@ +!-- +Copyright 2008 Google Inc. + +Licensed under the Apache License, Version 2.0 (the License); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an AS IS BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. +-- +html +head +meta name='gwt:onLoadErrorFn' content='junitOnLoadErrorFn' +meta name='gwt:onPropertyErrorFn' content='junitOnPropertyErrorFn' +/head +body +script language='javascript' +!-- +window['__gwt_Locale'] = 'es_MX'; + +function junitOnLoadErrorFn(moduleName) { + junitError('Failed to load module ' + moduleName + +'.\nPlease see the log for details.'); +} + +function junitOnPropertyErrorFn(propName, allowedValues, badValue) { + var msg = 'While attempting to load the module, property ' + propName; + if (badValue != null) { +msg += ' was set to the unexpected value ' + badValue + ''; + } else { +msg += ' was not specified'; + } + msg += 'Allowed values: ' + allowedValues; + junitError(msg); +} + +function junitError(msg) { + var xmlHttpRequest = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(Microsoft.XMLHTTP); + xmlHttpRequest.open('POST', 'junithost/loadError', true); + xmlHttpRequest.setRequestHeader('Content-Type', 'text/x-gwt-rpc; charset=utf-8'); + xmlHttpRequest.send(msg); +} + +function loadSelectionScript() { + var moduleName = document.location.href; + var pos = moduleName.lastIndexOf('/'); + moduleName = moduleName.substr(0, pos); + pos = moduleName.lastIndexOf('/'); + moduleName = moduleName.substr(pos + 1); + document.write(script language='javascript' src=' + moduleName + .nocache.js'/script); +} +loadSelectionScript(); +-- +/script +iframe src=javascript:'' id='__gwt_historyFrame' style='position:absolute;width:0;height:0;border:0'/iframe +/body +/html Property changes on: user/test/com/google/gwt/i18n/public_es_MX/junit.html ___ Name: svn:mime-type + text/html Name: svn:eol-style + native Index: user/test/com/google/gwt/i18n/I18NTest_es_MX_runtime.gwt.xml === --- user/test/com/google/gwt/i18n/I18NTest_es_MX_runtime.gwt.xml (revision 0) +++ user/test/com/google/gwt/i18n/I18NTest_es_MX_runtime.gwt.xml (revision 0) @@ -0,0 +1,25 @@ +!---- +!-- Copyright 2009 Google Inc. -- +!-- Licensed under the Apache License, Version 2.0 (the License); you-- +!-- may not use this file except in compliance with the License. You may -- +!-- may obtain a copy of the License at-- +!---- +!-- http://www.apache.org/licenses/LICENSE-2.0 -- +!---- +!-- Unless required by applicable law or agreed to in writing, software-- +!-- distributed under the License is distributed on an AS IS BASIS, -- +!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or-- +!-- implied. License for the specific language governing permissions and -- +!-- limitations under the License. -- + +module + !-- Inherit the JUnit support -- + inherits name='com.google.gwt.junit.JUnit'/ + inherits name = 'com.google.gwt.i18n.I18N'/ + !-- Include client-side source for the test cases -- + source path=client/ + extend-property name=locale values=es_419/ + set-property name = locale value = es_419/ + set-configuration-property name=runtime.locales value=es_AR,es_MX/ + public path=public_es_MX/ +/module Index: user/test/com/google/gwt/i18n/client/I18N_es_MX_RuntimeTest.java === ---
[gwt-contrib] Re: Getting oophm working
On Tue, Mar 24, 2009 at 4:59 PM, John Tamplin j...@google.com wrote: On Tue, Mar 24, 2009 at 3:59 PM, Vitali Lovich vlov...@gmail.com wrote: I think it might be a good idea to also reference the -localWorkers flag. I find that it cuts down on my startup time significantly (especially on my desktop which is quad-core, but even on my dual-core laptop). With OOPHM I find this to be particularly more annoying because the browser freezes on startup while the server is compiling the code. I don't know that the OOPHM document is the right place to discuss other compiler flags. Also, I don't think -localWorkers will have any impact on hosted mode at all, since it is used to compile different permutations in parallel. it will speedup web-mode compilation if you have more than one permutation, but nothing for hosted mode. Sorry my mistake. It was probably just the placebo effect :D. However, it does take about 11 seconds between when the OOPHM connection is established (request for module in log) when the onModuleLoad starts executing (8 seconds between Request for module Refreshing module from source). My IDE takes about 1 second to compile my project cleanly (same with ant). On my laptop which takes 4 seconds to build using ant, takes 28 seconds to go from Request for module to Refreshing module from source then takes 7 seconds to compile. When I run HostedMode using the release configuration, then the times drop to 1/7 for the desktop, 1/25 for the laptop (compilation time/module request time). Also, this happens on every launch regardless of whether or not code was actually changed. Also, perhaps a mention that every refresh of the page launches a fresh compilation of the code thus the browser locks up for a while there as well. It is doing a bytecode compile (including of generated code), not a web-mode compile, so it should be very long unless you have a really large app. There is a project we call instant hosted mode which will allow reuse of your IDE's bytecode compilation rather than having to recompile, but it isn't ready yet (soon though). Sorry, my mistake. Refreshing isn't actually slow. But if it's doing a bytecode compile, why is it even taking any time on the initial startup when there was no source code change the compiled classes haven't changed? Shouldn't it notice this not do anything? The other thing I noticed is that after changing client-side code refreshing, although the debugger claims the source is out of sync, it works perfectly with the changed code. What IDE are you using? I know there are issues with hot-swap between JDT and Javac, so if you aren't using Eclipse you may have some hot-swap issues (Eclipse and GWT both use JDT), which allows you to change some classes without doing a refresh. That is independent of a refresh, which is basically tossing the running classes and reloading them. Using Eclipse. The IDE warns me that hot swapping failed on save. The debugger claims the source is out of sync, but like I said, it actually hits the breakpoints correctly executes the changed code. I can't reproduce it right now (I can't remember if it was a persistent problem and it was fixed by me updating the trunk today or if it was an intermittent problem). If it happens again, I'll let you know. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: Getting oophm working
On Tue, Mar 24, 2009 at 10:51 PM, Vitali Lovich vlov...@gmail.com wrote: Also, this happens on every launch regardless of whether or not code was actually changed. Right, currently hosted mode builds TypeOracle and other things from source, so it has to run all the source through JDT each time you start it. Sorry, my mistake. Refreshing isn't actually slow. But if it's doing a bytecode compile, why is it even taking any time on the initial startup when there was no source code change the compiled classes haven't changed? Shouldn't it notice this not do anything? It should not be recompiling any classes that haven't changed, but until very recently it always compiled the output of generators. Amit checked in a patch in the past week to avoid the recompile if the generator produces the same output. Eventually, we might build in a way for generators to specify their dependencies (or to automatically infer them) and not even run the generator if its dependencies have not changed, but right now that is not possible. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Re: OOPHM disconnects when using gwt-mosaic Viewport
Gotcha. I was stupid and for some reason thought XPCOM had something to do with COM would be linux only. I've been getting no sleep thanks to this databases project :(. On Tue, Mar 24, 2009 at 3:29 PM, John Tamplin j...@google.com wrote: On Tue, Mar 24, 2009 at 3:10 PM, Vitali Lovich vlov...@gmail.com wrote: As an update, I just realized that the error Error: Bad NPObject as private data! Source File: http://localhost:9000/module/hosted.html?module Line: 84 Keeps showing up whenever there's any kind of event (i.e. mouse move, key press, window resize, etc). Attaching the script. This is probably because the OOPHM connection is broken, so it's unable to deliver the events from the browser to the The NPAPI plugin is not really going to work -- you need to use the XPCOM pluginhttp://code.google.com/p/google-web-toolkit/source/browse/branches/oophm/plugins/xpcom/prebuilt/oophm-xpcom.xpiinstead. The issue is that whenever window.enableScrolling is changed, Firefox rebuilds the page and in the process unloads and reloads the plugin. Aside from losing state in the plugin, this is problematic since the unloaded plugin is still on the call stack, and things go bad when it returns to that code after a new instance of the plugin is created. -- John A. Tamplin Software Engineer (GWT), Google --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---