Re: cannot use css background-image
yes, I miss the opening quote ' and I find in css, if using development mode, the url has a / at the beginning background-image:url('/images/line.png'); but if in production mode, the url has no / at the beginning background-image:url('images/line.png'); the reason is really unknown. But now I face another strange problem, the code is as follow: public class TestFlowPanelLeft extends FlowPanel { public void onLoad(){ HorizontalPanel outer = new HorizontalPanel(); outer.setSize(100%, 30px); outer.setBorderWidth(10); HorizontalPanel left1 = new HorizontalPanel(); left1.add(new Label(see?)); outer.add(left1); HorizontalPanel left2 = new HorizontalPanel(); left2.addStyleName(backGroundImage1); //left2.setSize(100%, 100%); cannot show left2!! left2.setSize(100%, 10px); outer.add(left2); this.add(outer); } } I try to set left2 height to 100%, and because outer is 30px, so I expect left2 can show correctly, but the result is not!! I need to explicit set the height of left2. the css of backGroundImage1 is .backGroundImage1{ background-image:url('/images/line.png'); background-repeat:repeat-x; } if I set the height of left2 to 10px, the output is as attached. why if I set the height of left2 to 100%, left2 cannot be shown?!! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5B-bLd_PsHcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. attachment: layoutproblem2.jpg
Re: cannot use css background-image
even worse, if I comment the line outer.setBorderWidth(10); then left2 cannot show at all!! On Monday, April 2, 2012 2:11:51 PM UTC+8, tong123123 wrote: yes, I miss the opening quote ' and I find in css, if using development mode, the url has a / at the beginning background-image:url('/images/line.png'); but if in production mode, the url has no / at the beginning background-image:url('images/line.png'); the reason is really unknown. But now I face another strange problem, the code is as follow: public class TestFlowPanelLeft extends FlowPanel { public void onLoad(){ HorizontalPanel outer = new HorizontalPanel(); outer.setSize(100%, 30px); outer.setBorderWidth(10); HorizontalPanel left1 = new HorizontalPanel(); left1.add(new Label(see?)); outer.add(left1); HorizontalPanel left2 = new HorizontalPanel(); left2.addStyleName(backGroundImage1); //left2.setSize(100%, 100%); cannot show left2!! left2.setSize(100%, 10px); outer.add(left2); this.add(outer); } } I try to set left2 height to 100%, and because outer is 30px, so I expect left2 can show correctly, but the result is not!! I need to explicit set the height of left2. the css of backGroundImage1 is .backGroundImage1{ background-image:url('/images/line.png'); background-repeat:repeat-x; } if I set the height of left2 to 10px, the output is as attached. why if I set the height of left2 to 100%, left2 cannot be shown?!! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/huxhL7vpG7oJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Source maps
Yep, I'm using trunk but I'm not sure that the source map support is fully functional even in trunk though it gets generated. I tried both canary and dev channels of Chrome (I think even Googlers won't use anything special since canary is almost daily build but we cannot be sure ;-) ) Honza On Sun, Apr 1, 2012 at 18:34, Gal Dolber gal.dol...@gmail.com wrote: oh, my mistake, it seems SourceMap is there.. are you using trunk? On Sun, Apr 1, 2012 at 12:31 PM, Gal Dolber gal.dol...@gmail.com wrote: got exited for a minute... its not there yet, I'm checking out trunk everyday hoping to see SuperDraftMode and SourceMap commited On Sun, Apr 1, 2012 at 7:20 AM, Andrea Boscolo andrew...@gmail.comwrote: Are you sure the whole machinery is already available in the public (trunk) repo? I thought it's not. https://plus.google.com/u/1/110412141990454266397/posts/Nvr6Se6eAPh On Sunday, April 1, 2012 12:16:05 PM UTC+2, Honza Rames wrote: Hi everyone, I tried to compile my GWT app with source maps support (as explained here http://stackoverflow.com/**questions/9804492/how-to-try-** sourcemaps-with-gwthttp://stackoverflow.com/questions/9804492/how-to-try-sourcemaps-with-gwt) and it failed at first (some json stuff was missing) so I added it to my project's class path then it compiled OK and I can see the source maps generated in WEB-INF/deploy/project/**symbolMaps. I should also note that I'm using custom build of GWT from trunk. I enabled source maps support in Chrome's Developer tools setting panel but I the source maps doesn't seem to work. I'm launching the app through jetty but not in dev mode (obviously ;-) ) I compiled the project in obfuscated mode as standard compile (no draft or anything like that). Do I have to use another version of Chrome? Does anyone tried this as well and succeeded? Honza -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hcGUk2-d124J. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Source maps
Yes, some bits are still missing, but using trunk and following the instructions from here: http://code.google.com/p/google-web-toolkit/wiki/SourceMaps (with few additional steps, mentioned in the comments) I was able to debug the Mail application, using the java sources in Development tools. On Mon, Apr 2, 2012 at 9:45 AM, Honza Rameš rame...@gmail.com wrote: Yep, I'm using trunk but I'm not sure that the source map support is fully functional even in trunk though it gets generated. I tried both canary and dev channels of Chrome (I think even Googlers won't use anything special since canary is almost daily build but we cannot be sure ;-) ) Honza On Sun, Apr 1, 2012 at 18:34, Gal Dolber gal.dol...@gmail.com wrote: oh, my mistake, it seems SourceMap is there.. are you using trunk? On Sun, Apr 1, 2012 at 12:31 PM, Gal Dolber gal.dol...@gmail.com wrote: got exited for a minute... its not there yet, I'm checking out trunk everyday hoping to see SuperDraftMode and SourceMap commited On Sun, Apr 1, 2012 at 7:20 AM, Andrea Boscolo andrew...@gmail.comwrote: Are you sure the whole machinery is already available in the public (trunk) repo? I thought it's not. https://plus.google.com/u/1/110412141990454266397/posts/Nvr6Se6eAPh On Sunday, April 1, 2012 12:16:05 PM UTC+2, Honza Rames wrote: Hi everyone, I tried to compile my GWT app with source maps support (as explained here http://stackoverflow.com/**questions/9804492/how-to-try-** sourcemaps-with-gwthttp://stackoverflow.com/questions/9804492/how-to-try-sourcemaps-with-gwt) and it failed at first (some json stuff was missing) so I added it to my project's class path then it compiled OK and I can see the source maps generated in WEB-INF/deploy/project/**symbolMaps. I should also note that I'm using custom build of GWT from trunk. I enabled source maps support in Chrome's Developer tools setting panel but I the source maps doesn't seem to work. I'm launching the app through jetty but not in dev mode (obviously ;-) ) I compiled the project in obfuscated mode as standard compile (no draft or anything like that). Do I have to use another version of Chrome? Does anyone tried this as well and succeeded? Honza -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hcGUk2-d124J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Source maps
Thanks cool, this way it works just fine, I also had to symlink my java sources so the browser could access them, you can do this by creating a symlink to you com (org or whatever package you use as base) in you war/project-name folder (where the cache.htmls are generated and where you copy source maps to). It would probably be a lot better to have a servlet that can handle fetching the sources and also a modified linker that adds the sourceMappingURL to the generated JS (I guess this gets more complicated when code splitting is in play). Honza On Mon, Apr 2, 2012 at 09:27, Dan Cojocar dan.cojo...@gmail.com wrote: Yes, some bits are still missing, but using trunk and following the instructions from here: http://code.google.com/p/google-web-toolkit/wiki/SourceMaps (with few additional steps, mentioned in the comments) I was able to debug the Mail application, using the java sources in Development tools. On Mon, Apr 2, 2012 at 9:45 AM, Honza Rameš rame...@gmail.com wrote: Yep, I'm using trunk but I'm not sure that the source map support is fully functional even in trunk though it gets generated. I tried both canary and dev channels of Chrome (I think even Googlers won't use anything special since canary is almost daily build but we cannot be sure ;-) ) Honza On Sun, Apr 1, 2012 at 18:34, Gal Dolber gal.dol...@gmail.com wrote: oh, my mistake, it seems SourceMap is there.. are you using trunk? On Sun, Apr 1, 2012 at 12:31 PM, Gal Dolber gal.dol...@gmail.comwrote: got exited for a minute... its not there yet, I'm checking out trunk everyday hoping to see SuperDraftMode and SourceMap commited On Sun, Apr 1, 2012 at 7:20 AM, Andrea Boscolo andrew...@gmail.comwrote: Are you sure the whole machinery is already available in the public (trunk) repo? I thought it's not. https://plus.google.com/u/1/110412141990454266397/posts/Nvr6Se6eAPh On Sunday, April 1, 2012 12:16:05 PM UTC+2, Honza Rames wrote: Hi everyone, I tried to compile my GWT app with source maps support (as explained here http://stackoverflow.com/**questions/9804492/how-to-try-** sourcemaps-with-gwthttp://stackoverflow.com/questions/9804492/how-to-try-sourcemaps-with-gwt) and it failed at first (some json stuff was missing) so I added it to my project's class path then it compiled OK and I can see the source maps generated in WEB-INF/deploy/project/**symbolMaps. I should also note that I'm using custom build of GWT from trunk. I enabled source maps support in Chrome's Developer tools setting panel but I the source maps doesn't seem to work. I'm launching the app through jetty but not in dev mode (obviously ;-) ) I compiled the project in obfuscated mode as standard compile (no draft or anything like that). Do I have to use another version of Chrome? Does anyone tried this as well and succeeded? Honza -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hcGUk2-d124J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to
Re: GWT history handling library - give it a try
So, for me to resume (my opinion): 1) Using components state for bookmarks is a bad idea - URL should contain only 'Place' information. If you need to have an ability to bookmark state different then initial page state - use different Place. As an example - if in a gmail I want to have a shortcut to some of my favorite folders (for example: https://mail.google.com/mail/#label/hello_thomas ;-) )- this is rather different Place, not a state of all Components on a page. 2) For a history navigation probably it would be better to have some key generated. Components states should be stored under that key (either in cookies or in HTMLs 5 browser cache) 3) If an application does not use Places and Activities - I should think what to do in that case. Will make necessary updates, though. thanks! On 30 mar, 17:09, Thomas Broyer t.bro...@gmail.com wrote: On Friday, March 30, 2012 3:49:11 PM UTC+2, Kostya Kulagin wrote: What you'll have to do to be assured that sub-params (or there is an other way to do it?) in the browser history string does not intercept? Create a specific Place that can hold those two parameters and navigate from place to place, changing only one value at a time? If you want to decouple your pagers from the places then, well, abstract that out behind some navigator component that'll manage the places for you (e.g. moveSecondPager(2) would navigate to a place with the same value for the first pager and the value 2 for the second pager; the second pager doesn't need to know about that). This is a bad approach from my point of view (see big comment above). Place should not depend or know anything about components inside of it. It is mostly like marker. A Place is a type-safe representation of the URL. No more, no less. If you want to put something in the URL, then put it in a Place and have a PlaceTokenizer transform it to your URL (and back when navigating to the URL, either through a bookmark, link, or browser history). As I said, there might be cases where you want some history entries to change the URL and some others that won't (but honestly, I still cannot find any use case). In that case, I'd investigate HTML5's pushState to see if it supports the use case, and if it does then simply punt for browsers that don't support it (only handle the case where it changes the URL, i.e. true navigation, not intermediate state). I believe it'd be possible to mix a hidden iframe hidden state change and manipulating the URL's #hash for navigation, I'm really not sure it's worth it = use pushState and let oldIE users with a not as good experience as others (and possibly have them installChrome Frame, so you could use pushState). And I still strongly believe that if you have two truly independent things on a page, only one should affect the browser history, or you have a serious design issue (Er, I clicked the back button 3 times, now if I click it once more, will it change the left side or the right side of the screen?). That was the main issue with frames (apart from addressability, i.e. bookmarkability), that are now officially dead (as in:http://www.w3.org/TR/html5/obsolete.html#frames) Of course, YMMV. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Source maps
On Monday, April 2, 2012 10:17:15 AM UTC+2, Honza Rames wrote: Thanks cool, this way it works just fine, I also had to symlink my java sources so the browser could access them, you can do this by creating a symlink to you com (org or whatever package you use as base) in you war/project-name folder (where the cache.htmls are generated and where you copy source maps to). It would probably be a lot better to have a servlet that can handle fetching the sources and also a modified linker that adds the sourceMappingURL to the generated JS (I guess this gets more complicated when code splitting is in play). According to http://code.google.com/p/google-web-toolkit/source/detail?r=10760 only the xsiframe linker (add-linker name='xsiframe'/) will output the //@ sourceUrl=… It's also only used for stack-trace deobfuscation (as is said on the wiki page), which is why it doesn't Just Work™ with Chrome's Developer Tools' support for Source Maps (no //@ sourceMappingURL=…, and the generated artifacts are not publicly accessible) It also won't work if you use the experimental Closure Compiler backend. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/98YPPJoosJQJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CustomScrollPanel issue (extra div overlays generated impacting performance?)
Hi Deepak, This looks good to me. What style are you using for the vertical scrollbar? And thanks for the repost. -Seth On Sunday, April 1, 2012 3:50:12 PM UTC-4, Deepak Singh wrote: Hi Seth, I am posting my code here: myScrollPanel.css @CHARSET ISO-8859-1; .customScrollPanel{ } .customScrollPanelCorner{ opacity: 0.0; } MyScrollPanel.java public class MyScrollPanel extends CustomScrollPanel { /** * Extends the CustomScrollPanel Resources interface so that we can add our own css file and still reuse the Resources and Style interfaces from CustomScrollPanel * @author SL * */ public interface MyScrollResources extends Resources{ @Source(com/pdstechi/client/myScrollPanel.css) Style customScrollPanelStyle(); } public MyScrollPanel(){ super((MyScrollResources)GWT.create(MyScrollResources.class)); this.setVerticalScrollbar(new MyVerticalScrollBar(), MyVerticalScrollBar.getScrollBarWidth()); // this.setHorizontalScrollbar(new MyHorizontalScrollBar(), MyHorizontalScrollBar.getScrollBarHeight()); } } MyVerticalScrollBar.java public class MyVerticalScrollBar extends Widget implements VerticalScrollbar { private double scrollBarHeight = 0.0; private double scrollBarPosition = 0.0; private double scrollWindowPercentage = 1.0; private double scrollWindowHeight = 0; private int totalScrollContentHeight = 0; private static final int SCROLL_BAR_WIDTH = 10; private Element elem; public MyVerticalScrollBar(){ this.elem = Document.get().createDivElement(); setElement(this.elem); this.setStyleName(verticalScrollBar); } public static int getScrollBarWidth(){ return SCROLL_BAR_WIDTH; } @Override public int getMaximumVerticalScrollPosition() { return (int)(this.scrollWindowHeight-this.scrollBarHeight); } @Override public int getMinimumVerticalScrollPosition() { return 0; } @Override public int getVerticalScrollPosition() { return (int)this.scrollBarPosition; } @Override public void setVerticalScrollPosition(int position) { this.scrollBarPosition = Math.floor(position*this.scrollWindowPercentage); //make sure we don't go out of bounds with the scrollbar if(this.scrollBarPosition this.getMaximumVerticalScrollPosition()){ this.scrollBarPosition = this.getMaximumVerticalScrollPosition(); } this.elem.getStyle().setTop(this.scrollBarPosition, Unit.PX); } @Override public HandlerRegistration addScrollHandler(ScrollHandler handler) { Event.sinkEvents(this.getElement(), Event.ONSCROLL); return this.addHandler(handler, ScrollEvent.getType()); } @Override public Widget asWidget() { return this; } @Override public int getScrollHeight() { return this.totalScrollContentHeight; } @Override public void setScrollHeight(int height) { //TODO: HAVE TO FIND A WAY TO GET THE SIZE OF THE CORNER BOX, OR BETTER YET, IF THE CORNER BOX IS ENABLED BECAUSE THE HORIZONTAL SCROLL BAR IS ALSO VISIBLE this.totalScrollContentHeight = height; this.scrollWindowHeight = this.elem.getParentElement().getOffsetHeight(); this.scrollWindowPercentage = (height 0) ? Math.min(1.0,this.scrollWindowHeight/height):1.0; this.scrollBarHeight = Math.max(SCROLL_BAR_WIDTH,Math.floor(this.scrollWindowHeight*this.scrollWindowPercentage)); this.elem.getStyle().setHeight(this.scrollBarHeight, Unit.PX); } } All these classes are in my client package. I just want that browser default varticalscrollbar should change its look. Also, I am reposting the original msg with attached code again to the group. Thanks Deepak On Sun, Apr 1, 2012 at 11:01 PM, GWTter seth@gmail.com wrote: Hi Deepak, You would have to post your code. Did you make sure to style your vertical scrollbar, create the MyScrollPanel and set its verticalScrollbar with the one you created? In the code I sent you the vertical scrollbar has a width of 10px, you should style the vertical scrollbar to be within that width. Also, I can't seem to find the repost of the original message with the attached code I sent you anywhere in this thread, am I looking in the wrong place. Thanks. -Seth On Saturday, March 31, 2012 4:27:42 PM UTC-4, Deepak Singh wrote: Hi Seth, I copied your classes and css in my client package. It compiled fine. When i run the applicatio in dev mode, the browser default scrollbar is not overridden. It is same as default. What can i do to override the native one ? On Sun, Apr 1, 2012 at 1:05 AM, Deepak Singh deepaksingh...@gmail.comwrote: Thank you Seth. I would give it a try. Thats already reposted and is in the thread. Thanks Deepak On Sat, Mar 31, 2012 at 10:59 PM, GWTter seth@gmail.com wrote: Hi Deepak, This is all that's in the css file as the only important class is the corner that I've set to be transparent: .customScrollPanel{ } .customScrollPanelCorner{ opacity: 0.0; } As for how to use the vertical scroll bar to override the native (or
Call for action: Time to rethink a road-map and more frequent updates for GWT.
With the rise of the new developers.google.com, and with Google trying to rally up developers using Google technologies and products, and the rise of Dart and unclear future of GWT, I think it's about time that Google will rethink the all We don't and won't have a road map, and there are no release dates for new GWT versions and embrace the GWT developers community. What do you guys think? (if you agree, +1 this) Best, Josh -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Vygrm-U-8-oJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to 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 history handling library - give it a try
--3) If an application does not use Places and Activities - I should think what to do in that case. I just stepped into reworking an application that used a custom history mapper (developed before places were available) to a Places design, so here's what I found. If you don't use Places, you'll go and use GWT native history support (https://developers.google.com/web-toolkit/doc/latest/ DevGuideCodingBasicsHistory) building an HistoryToken based on your object properties, and viceversa. This is a sample from my own code private MapString, String parseHistoryToken(String token){ MapString, String properties = new HashMapString, String(); if (!token.startsWith(MAIN_LBL + /)) return properties; String toParse = token.substring(MAIN_LBL.length() + 1, token.length()); String[] propList = toParse.split(/); for (int i = 0; i propList.length; i++){ String property = propList[i]; if (property.length() 3)// il controllo serve perché il primo // split ritorna un array con una // stringa vuota e non un array vuoto continue; String[] values = property.split(=); //nella history il valore null è salvato come stringa == null String value = (values[1].equals(null)) ? null : values[1]; properties.put(values[0], value); } return properties; } It will cut a history token like #home/prop1=123/prop2=zaq into a map like prop1, 123, prop2, zaq, and map.get(prop1) will return a String 123. This is *exactly* what a PlaceTokenizer and a PlaceHistoryMapper will do, except for the fact that you can then access your HistoryToken properties in a type safe way (i.e. you'll call some methods on your Place). You'll write a PlaceTokenizer to build sort of a CustomPlace, and call ( (CustomPlace) PlaceController.getWhere()).getProp1(). The *huge* difference is that getProp1() can return a type (String, Integer, CustomObject etc.) and once you defined a tokenizer from your place to the URL and viceversa this will work correctly. This means getPlace1() will return the Integer 123, not a String, and if you build a bad URL you'll get (and handle) a meaningful exception. If you try to dig into the Places tutorial Thomas Broyer linked before you'll find out that this is the behavior you get. So if you don't use places, but want a good history support, the best way is, er, go for Places :-) You don't need Activities for history support, using Places, a PlaceHistoryMapper and listening to PlaceChangeEvent will do a top class history support by themselves. Again, the article mentioned above is a clear and helpful starting point, just try to code a simple use case. Regards Lorenzo On Apr 2, 10:33 am, Kostya Kulagin kkula...@gmail.com wrote: So, for me to resume (my opinion): 1) Using components state for bookmarks is a bad idea - URL should contain only 'Place' information. If you need to have an ability to bookmark state different then initial page state - use different Place. As an example - if in a gmail I want to have a shortcut to some of my favorite folders (for example:https://mail.google.com/mail/#label/hello_thomas;-) )- this is rather different Place, not a state of all Components on a page. 2) For a history navigation probably it would be better to have some key generated. Components states should be stored under that key (either in cookies or in HTMLs 5 browser cache 3) If an application does not use Places and Activities - I should think what to do in that case. Will make necessary updates, though. thanks! On 30 mar, 17:09, Thomas Broyer t.bro...@gmail.com wrote: On Friday, March 30, 2012 3:49:11 PM UTC+2, Kostya Kulagin wrote: What you'll have to do to be assured that sub-params (or there is an other way to do it?) in the browser history string does not intercept? Create a specific Place that can hold those two parameters and navigate from place to place, changing only one value at a time? If you want to decouple your pagers from the places then, well, abstract that out behind some navigator component that'll manage the places for you (e.g. moveSecondPager(2) would navigate to a place with the same value for the first pager and the value 2 for the second pager; the second pager doesn't need to know about that). This is a bad approach from my point of view (see big comment above). Place should not depend or know anything about components inside of it. It is mostly like marker. A Place is a type-safe representation of the URL. No more, no less. If you want to put
Re: Call for action: Time to rethink a road-map and more frequent updates for GWT.
On 04/02/2012 08:19 AM, Joshua Kappon wrote: With the rise of the new developers.google.com, and with Google trying to rally up developers using Google technologies and products, and the rise of Dart and unclear future of GWT, I think it's about time that Google will rethink the all We don't and won't have a road map, and there are no release dates for new GWT versions and embrace the GWT developers community. I think that there is no logical relationship between your opening statements and the need for Google to produce a road map for GWT. Why is the future of GWT unclear? Its an open-source project that a lot people use and quite a few contribute to. If Google stopped new work on it tomorrow, the project wouldn't go away - it would just become a community project and I'm sure a lot of people would continue to use it and work on it. The Google Web Toolkit software and sample code developed by Google is licensed under the Apache License, v. 2.0. - so, if you are really worried about it disappearing keep an up to date copy of the trunk. Alan What do you guys think? (if you agree, +1 this) Best, Josh -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Vygrm-U-8-oJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: CustomScrollPanel issue (extra div overlays generated impacting performance?)
Nothing more than what i sent you. I have just myScrollPanel.css as mention above. Could you pls guide me with css if i need to apply some css over vertical scrollbar? Thanks in advance Deepak On Mon, Apr 2, 2012 at 8:19 PM, GWTter seth@gmail.com wrote: Hi Deepak, This looks good to me. What style are you using for the vertical scrollbar? And thanks for the repost. -Seth On Sunday, April 1, 2012 3:50:12 PM UTC-4, Deepak Singh wrote: Hi Seth, I am posting my code here: myScrollPanel.css @CHARSET ISO-8859-1; .customScrollPanel{ } .customScrollPanelCorner{ opacity: 0.0; } MyScrollPanel.java public class MyScrollPanel extends CustomScrollPanel { /** * Extends the CustomScrollPanel Resources interface so that we can add our own css file and still reuse the Resources and Style interfaces from CustomScrollPanel * @author SL * */ public interface MyScrollResources extends Resources{ @Source(com/pdstechi/client/**myScrollPanel.css) Style customScrollPanelStyle(); } public MyScrollPanel(){ super((MyScrollResources)GWT.**create(MyScrollResources.**class)); this.setVerticalScrollbar(new MyVerticalScrollBar(), MyVerticalScrollBar.**getScrollBarWidth()); // this.setHorizontalScrollbar(**new MyHorizontalScrollBar(), MyHorizontalScrollBar.**getScrollBarHeight()); } } MyVerticalScrollBar.java public class MyVerticalScrollBar extends Widget implements VerticalScrollbar { private double scrollBarHeight = 0.0; private double scrollBarPosition = 0.0; private double scrollWindowPercentage = 1.0; private double scrollWindowHeight = 0; private int totalScrollContentHeight = 0; private static final int SCROLL_BAR_WIDTH = 10; private Element elem; public MyVerticalScrollBar(){ this.elem = Document.get().**createDivElement(); setElement(this.elem); this.setStyleName(**verticalScrollBar); } public static int getScrollBarWidth(){ return SCROLL_BAR_WIDTH; } @Override public int getMaximumVerticalScrollPositi**on() { return (int)(this.scrollWindowHeight-**this.scrollBarHeight); } @Override public int getMinimumVerticalScrollPositi**on() { return 0; } @Override public int getVerticalScrollPosition() { return (int)this.scrollBarPosition; } @Override public void setVerticalScrollPosition(int position) { this.scrollBarPosition = Math.floor(position*this.** scrollWindowPercentage); //make sure we don't go out of bounds with the scrollbar if(this.scrollBarPosition this.**getMaximumVerticalScrollPositi**on()){ this.scrollBarPosition = this.**getMaximumVerticalScrollPositi**on(); } this.elem.getStyle().setTop(**this.scrollBarPosition, Unit.PX); } @Override public HandlerRegistration addScrollHandler(ScrollHandler handler) { Event.sinkEvents(this.**getElement(), Event.ONSCROLL); return this.addHandler(handler, ScrollEvent.getType()); } @Override public Widget asWidget() { return this; } @Override public int getScrollHeight() { return this.totalScrollContentHeight; } @Override public void setScrollHeight(int height) { //TODO: HAVE TO FIND A WAY TO GET THE SIZE OF THE CORNER BOX, OR BETTER YET, IF THE CORNER BOX IS ENABLED BECAUSE THE HORIZONTAL SCROLL BAR IS ALSO VISIBLE this.totalScrollContentHeight = height; this.scrollWindowHeight = this.elem.getParentElement().** getOffsetHeight(); this.scrollWindowPercentage = (height 0) ? Math.min(1.0,this.** scrollWindowHeight/height):1.**0; this.scrollBarHeight = Math.max(SCROLL_BAR_WIDTH,**Math.floor(this.** scrollWindowHeight*this.**scrollWindowPercentage)); this.elem.getStyle().**setHeight(this.**scrollBarHeight, Unit.PX); } } All these classes are in my client package. I just want that browser default varticalscrollbar should change its look. Also, I am reposting the original msg with attached code again to the group. Thanks Deepak On Sun, Apr 1, 2012 at 11:01 PM, GWTter seth@gmail.com wrote: Hi Deepak, You would have to post your code. Did you make sure to style your vertical scrollbar, create the MyScrollPanel and set its verticalScrollbar with the one you created? In the code I sent you the vertical scrollbar has a width of 10px, you should style the vertical scrollbar to be within that width. Also, I can't seem to find the repost of the original message with the attached code I sent you anywhere in this thread, am I looking in the wrong place. Thanks. -Seth On Saturday, March 31, 2012 4:27:42 PM UTC-4, Deepak Singh wrote: Hi Seth, I copied your classes and css in my client package. It compiled fine. When i run the applicatio in dev mode, the browser default scrollbar is not overridden. It is same as default. What can i do to override the native one ? On Sun, Apr 1, 2012 at 1:05 AM, Deepak Singh deepaksingh...@gmail.comwrote: Thank you Seth. I would give it a try. Thats already reposted and is in the thread. Thanks Deepak On Sat, Mar 31, 2012 at 10:59
Re: CustomScrollPanel issue (extra div overlays generated impacting performance?)
Hi Deepak, Yes, you would need to apply some style to your scrollbar so that it at least has width (or height if you were using the horizontal scrollbar). If you look at the MyVerticalScrollBar constructor, the line 'this.setStyleName(verticalScrollBar)' sets the style for the scrollbar. This style is not defined in the myScrollPanel.css as that CSS file is only meant for the cornerpanel styling. You would need to define the style verticalScrollBar in your main CSS file. For example: .verticalScrollBar{ width: 10px; background: blue; } Also, make sure that the content you're scrolling is within the MyScrollPanel, since only content within the MyScrollPanel will have the custom scroll bars, anything not within a CustomScrollPanel will still default to the native implementation. Hope this helps. -Seth -Seth On Monday, April 2, 2012 11:44:57 AM UTC-4, Deepak Singh wrote: Nothing more than what i sent you. I have just myScrollPanel.css as mention above. Could you pls guide me with css if i need to apply some css over vertical scrollbar? Thanks in advance Deepak On Mon, Apr 2, 2012 at 8:19 PM, GWTter seth@gmail.com wrote: Hi Deepak, This looks good to me. What style are you using for the vertical scrollbar? And thanks for the repost. -Seth On Sunday, April 1, 2012 3:50:12 PM UTC-4, Deepak Singh wrote: Hi Seth, I am posting my code here: myScrollPanel.css @CHARSET ISO-8859-1; .customScrollPanel{ } .customScrollPanelCorner{ opacity: 0.0; } MyScrollPanel.java public class MyScrollPanel extends CustomScrollPanel { /** * Extends the CustomScrollPanel Resources interface so that we can add our own css file and still reuse the Resources and Style interfaces from CustomScrollPanel * @author SL * */ public interface MyScrollResources extends Resources{ @Source(com/pdstechi/client/**myScrollPanel.css) Style customScrollPanelStyle(); } public MyScrollPanel(){ super((MyScrollResources)GWT.**create(MyScrollResources.**class)); this.setVerticalScrollbar(new MyVerticalScrollBar(), MyVerticalScrollBar.**getScrollBarWidth()); // this.setHorizontalScrollbar(**new MyHorizontalScrollBar(), MyHorizontalScrollBar.**getScrollBarHeight()); } } MyVerticalScrollBar.java public class MyVerticalScrollBar extends Widget implements VerticalScrollbar { private double scrollBarHeight = 0.0; private double scrollBarPosition = 0.0; private double scrollWindowPercentage = 1.0; private double scrollWindowHeight = 0; private int totalScrollContentHeight = 0; private static final int SCROLL_BAR_WIDTH = 10; private Element elem; public MyVerticalScrollBar(){ this.elem = Document.get().**createDivElement(); setElement(this.elem); this.setStyleName(**verticalScrollBar); } public static int getScrollBarWidth(){ return SCROLL_BAR_WIDTH; } @Override public int getMaximumVerticalScrollPositi**on() { return (int)(this.scrollWindowHeight-**this.scrollBarHeight); } @Override public int getMinimumVerticalScrollPositi**on() { return 0; } @Override public int getVerticalScrollPosition() { return (int)this.scrollBarPosition; } @Override public void setVerticalScrollPosition(int position) { this.scrollBarPosition = Math.floor(position*this.** scrollWindowPercentage); //make sure we don't go out of bounds with the scrollbar if(this.scrollBarPosition this.**getMaximumVerticalScrollPositi** on()){ this.scrollBarPosition = this.**getMaximumVerticalScrollPositi**on(); } this.elem.getStyle().setTop(**this.scrollBarPosition, Unit.PX); } @Override public HandlerRegistration addScrollHandler(ScrollHandler handler) { Event.sinkEvents(this.**getElement(), Event.ONSCROLL); return this.addHandler(handler, ScrollEvent.getType()); } @Override public Widget asWidget() { return this; } @Override public int getScrollHeight() { return this.totalScrollContentHeight; } @Override public void setScrollHeight(int height) { //TODO: HAVE TO FIND A WAY TO GET THE SIZE OF THE CORNER BOX, OR BETTER YET, IF THE CORNER BOX IS ENABLED BECAUSE THE HORIZONTAL SCROLL BAR IS ALSO VISIBLE this.totalScrollContentHeight = height; this.scrollWindowHeight = this.elem.getParentElement().** getOffsetHeight(); this.scrollWindowPercentage = (height 0) ? Math.min(1.0,this.** scrollWindowHeight/height):1.**0; this.scrollBarHeight = Math.max(SCROLL_BAR_WIDTH,**Math.floor(this.** scrollWindowHeight*this.**scrollWindowPercentage)); this.elem.getStyle().**setHeight(this.**scrollBarHeight, Unit.PX); } } All these classes are in my client package. I just want that browser default varticalscrollbar should change its look. Also, I am reposting the original msg with attached code again to the group. Thanks Deepak On Sun, Apr 1, 2012 at 11:01 PM, GWTter seth@gmail.com wrote: Hi Deepak, You would have to post your code. Did you make sure to style your vertical
Touch4j 2.0 Official GA Release
Our official GA release for Touch4j has arrived! Want to see it in action before reading further and see how simple it is to use it? Go to: http://touch4j.appspot.com/ and if you want to see how the code would look, simply click on Source. In this new package you will find support for: - Maps - Hardware/Device - Charts - UI and all of it from within one single code base. Create a web mobile app or simply package it to native if needed, you decide. We've tried very hard to provide a complete kitchen sink demonstrating some of the main features that are found in this release. It can be checked out from: http://svn.emitrom.com/gwt4touch2ks/trunk/kitchensink/ More details as well as the download package itself can be found at: http://www.emitrom.com/touch4j We have had a tremendous amount of help from our community. We like to really thank all our users who provided tons of feedback. Your help is really appreciated and invaluable. We also like to thank as usual the GWT community as well as the GWT team, without you, none of this would be possible. Thank you all and we truly hope that you find the package useful and easy to use. Happy Coding! The Emitrom Team -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
capture image from mysql
Hello people! I'm trying to retrieve an image of the mysql database, I am trying to restore the image using servlet but I'm not very skilled with it ... I code returns the following error: java.lang.IllegalStateException: Committed at org.mortbay.jetty.Response.resetBuffer(Response.java:995) at org.mortbay.jetty.Response.reset(Response.java:938) at br.com.google.server.FileUploadServlet.doGet(FileUploadServlet.java: 52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java: 49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 505) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:829) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 395) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:488) [WARN] 405 - GET /upload (127.0.0.1) 1462 bytes Request headers Host: 127.0.0.1: Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/ 535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11 Accept: */* Referer: http://127.0.0.1:/ProjetoImagem.html?gwt.codesvr=127.0.0.1:9997 Accept-Encoding: gzip,deflate,sdch Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: JSESSIONID=uibpkj9tbmhv Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 1462 I will also post my class on the server side: public class FileUploadServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doGet(req, resp); Connection conn = null; Statement st = null; try { Class.forName(AbstractDAO.DRIVER); conn = DriverManager.getConnection(AbstractDAO.URL, AbstractDAO.USUBD, AbstractDAO.SENHABD); st = conn.createStatement(); ResultSet rs = st.executeQuery(SELECT IMAGEM FROM tbl_imagem where CD_IMAGEM = 2); String imgLen = ; while(rs.next()){ imgLen = rs.getString(1); System.out.println(imgLen.length()); int len = imgLen.length(); byte [] rb = new byte[len]; InputStream readImg = rs.getBinaryStream(1); int index = readImg.read(rb, 0, len); System.out.println(index + index); resp.reset(); resp.setContentType(image/jpg); resp.getOutputStream().write(rb, 0, len); resp.getOutputStream().flush(); } st.close(); resp.getOutputStream().close(); } catch (Exception e) { e.printStackTrace(); } } } to retrieve the client-side image I made as follows: Image image = new Image(GWT.getHostPageBaseURL() + upload); rootPanel.add(image, 289, 138); image.setSize(200px, 200px); Anyone know any solution for me to solve my problem or any tips that I may be using? Thank you! Leonardo Terrã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
Exporting Instance Methods to Hand-Written Javascript
I have a piece of GWT code that I wanted to invoke from outside handwritten JavaScript. There's an example shown here under Calling a Java method from Handwritten JavaScript: https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsJSNI That example uses a static method; I can make that work, but my first instinct was that i'd rather use an instance, so using the syntax shown under JSNI invocations, I tried: /* package */ native void exportJavascriptMethods( PreviewPane x ) /*-{ $wnd.imageSelected = $entry(this @ca.cpp.spike.gwtapplet.client.PreviewPane::imageSelected (Ljava/lang/String;Ljava/lang/String;)); }-*/; That doesn't work. Eclipse (and the GWT compiler) complain: JavaScript parsing: Missing ) after argument list PreviewPane.java If I replace 'this' with 'x', same problem. If I take 'this' out and leave it binding to the static method: /* package */ native void exportJavascriptMethods( PreviewPane x ) /*-{ $wnd.imageSelected = $entry(@ca.cpp.spike.gwtapplet.client.PreviewPane::imageSelected (Ljava/lang/String;Ljava/lang/String;)); }-*/; All is well in the world. So -- is that just not an option, exporting an instance method like that? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/mC9EADg67lcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email 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 Compiler as a stand-alone javascript compiler?
Is there a way to use the GWT Compiler as a stand-alone javascript compiler to optimize/minimize pure javascript? If so, how does it stack up to other javascript compilers? 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: GWT Compiler as a stand-alone javascript compiler?
I don't know if you can use GWT, but check out Google Closure for javascript optimization/minification. https://developers.google.com/closure/compiler/ -Kevin On Monday, April 2, 2012 3:03:42 PM UTC-7, Transplant wrote: Is there a way to use the GWT Compiler as a stand-alone javascript compiler to optimize/minimize pure javascript? If so, how does it stack up to other javascript compilers? Thanks, -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wlXYYiXvO8kJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to 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 Compiler as a stand-alone javascript compiler?
GWT does a very good job at optimizing Java into Javascript. However, the Closure Compiler team focus a lot of just pure Javascript optimization / minifications. In fact, the GWT team has been looking into use Closure Compiler a backend. I have done some surveys on different Javascript compression and Closure Compiler outperforms them on almost all situations in terms of size. Although I might be bias as I am also a contributor to that project. -Alan On Mon, Apr 2, 2012 at 3:31 PM, KevMo kevinps...@gmail.com wrote: I don't know if you can use GWT, but check out Google Closure for javascript optimization/minification. https://developers.google.com/closure/compiler/ -Kevin On Monday, April 2, 2012 3:03:42 PM UTC-7, Transplant wrote: Is there a way to use the GWT Compiler as a stand-alone javascript compiler to optimize/minimize pure javascript? If so, how does it stack up to other javascript compilers? Thanks, -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/wlXYYiXvO8kJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Create autobean as RF does it
Is there a way to a ValueProxy from the same type of object that RF would use to make a ValueProxy but outside of a web server. I'm looking to use ProxySerializer to get a string of a ValueProxy and send it via some other means to the browser where I can then serialize it back into a ValueProxy. On Friday, March 30, 2012 3:32:03 AM UTC-4, Thomas Broyer wrote: Have a look at AbstractRequestContext (particularly the processReturnOperations method; also look for calls to setTag), but basically you'll have to transport more than the AutoBean data: you'll have to send its stableId and version (have a look at SimpleRequestContext et al. for how they're computed). You'll also have to apply the BaseProxycategory, EntityProxyCategory and ValueProxyCategory to your AutoBeanFactory, and @NoWrap the EntityProxyId. Have a look at the RequestFactoryGenerator or run the DevMode or Compiler with the -gen argument to look at what's generated. All in all, it might be better (and I really mean *might*, as I have not actually looked at it in details) to use a ProxySerializer or extend the AbstractRequestContext to use RF's serialization. Search the group, there has been a similar question in the past months (and I made basically the same answer). On Thursday, March 29, 2012 12:10:09 PM UTC+2, Eugene Ivlev wrote: I have such problem: I use RF as main CRUD client-server interface, but I also use Atmosphere framework as server-push mechanism. My aim is multi-client application. All clients must receive notification about changes made by anyone. The communication looks like this: @ProxyFor(TestEntity.class) TestProxy extends EntityProxy || TestProxy obj|RF update entity--|--- RequestFactory Servlet || | || | || | || | AutoBeanTestProxy obj|--Atmosphere notification-|-| Atmosphere Servlet creates AutoBeanTestProxy | with entity to all client| || || || || || || client server But RF adds to AutoBean some kind of additional information. Therefore I can't use autobaen received from Atmosphere in next communication by RF channel. How I can create autobean as RF does it? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/cmvim7mn3ywJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Call for action: Time to rethink a road-map and more frequent updates for GWT.
Dear Alen. In my opinion, if Google would stop working on it, then GWT's future is unclear. It might be adopted by the contributors and it also might be droped after sometime. The problem is you never know. I personally think it won't be droped any time soon, since Google is heavly vested in it. But you can probably understand how the GWT community is missing new comers and sitting on the fence people, because of Dart and the GWT silence (GWT blog, and official site haven'tbeen updated in months) As for logic - I simply ment to imply, that if Google is now focusing more than ever on developers using Google technologies, they should listen to the GWT community as well. You can search this group, blogs and google for gwt 2.5 (see also gwt issue tracker) or gwt roadmap and see that these interst many developers using GWT. Hope I made myself a bit more clear. By the way, what's your take on a roadmap? Josh. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/0BSJabF7BGwJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Call for action: Time to rethink a road-map and more frequent updates for GWT.
On Monday, April 2, 2012 6:30:14 PM UTC+3, Alan Chaney wrote: On 04/02/2012 08:19 AM, Joshua Kappon wrote: With the rise of the new developers.google.com, and with Google trying to rally up developers using Google technologies and products, and the rise of Dart and unclear future of GWT, I think it's about time that Google will rethink the all We don't and won't have a road map, and there are no release dates for new GWT versions and embrace the GWT developers community. I think that there is no logical relationship between your opening statements and the need for Google to produce a road map for GWT. Why is the future of GWT unclear? Its an open-source project that a lot people use and quite a few contribute to. If Google stopped new work on it tomorrow, the project wouldn't go away - it would just become a community project and I'm sure a lot of people would continue to use it and work on it. The Google Web Toolkit software and sample code developed by Google is licensed under the Apache License, v. 2.0. - so, if you are really worried about it disappearing keep an up to date copy of the trunk. Alan What do you guys think? (if you agree, +1 this) Best, Josh -- Dear Alan In my opinion, if Google would stop working on it, then GWT's future is unclear. It might be adopted by the contributors and it also might be droped after sometime. The problem is you never know. I personally think it won't be droped any time soon, since Google is heavly vested in it, but you can probably understand why the GWT community is missing new comers and sitting on the fence people, because of Google's promotion of Dart on one side, and the GWT silence (GWT blog, and official site haven't been updated in months) on the other. As for logic - I simply ment to imply, that if Google is focusing now, more than ever, on developers using Google technologies, they should listen to the GWT community as well. You can search this group, blogs and google for gwt 2.5 (see also gwt issue tracker) or gwt roadmap and see that these interst many developers using GWT. Anyway I Hope I made myself a bit more clear. What's your take on a roadmap? Josh -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/i9Z0-bcty5oJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Exporting Instance Methods to Hand-Written Javascript
At first glance it seems like: PreviewPane::imageSelected(Ljava/lang/String;Ljava/lang/String;)) takes two arguments, in this case two Strings. The JSNI error seems to indicate that you are not passing the two arguments as per the method signature. I would think that you would end up with something like this: PreviewPane::imageSelected(Ljava/lang/String;Ljava/lang/String;))(string1, string2); Best regards, Alfredo On Mon, Apr 2, 2012 at 4:26 PM, Geoffrey Wiseman geoffrey.wise...@gmail.com wrote: I have a piece of GWT code that I wanted to invoke from outside handwritten JavaScript. There's an example shown here under Calling a Java method from Handwritten JavaScript: https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsJSNI That example uses a static method; I can make that work, but my first instinct was that i'd rather use an instance, so using the syntax shown under JSNI invocations, I tried: /* package */ native void exportJavascriptMethods( PreviewPane x ) /*-{ $wnd.imageSelected = $entry(this @ca.cpp.spike.gwtapplet.client.PreviewPane::imageSelected (Ljava/lang/String;Ljava/lang/String;)); }-*/; That doesn't work. Eclipse (and the GWT compiler) complain: JavaScript parsing: Missing ) after argument list PreviewPane.java If I replace 'this' with 'x', same problem. If I take 'this' out and leave it binding to the static method: /* package */ native void exportJavascriptMethods( PreviewPane x ) /*-{ $wnd.imageSelected = $entry(@ca.cpp.spike.gwtapplet.client.PreviewPane::imageSelected (Ljava/lang/String;Ljava/lang/String;)); }-*/; All is well in the world. So -- is that just not an option, exporting an instance method like that? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/mC9EADg67lcJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- Alfredo Quiroga-Villamil AOL/Yahoo/Gmail/MSN IM: lawwton -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email 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: Switched Map implementaion in MultiSelectionModel to LinkedHashMap. This way it retains the (issue1674803)
Can you also add a test case. At the least, select a few values before calling getSelectedList() and make sure that the values are returned in the correct order. http://gwt-code-reviews.appspot.com/1674803/diff/1/user/src/com/google/gwt/view/client/MultiSelectionModel.java File user/src/com/google/gwt/view/client/MultiSelectionModel.java (right): http://gwt-code-reviews.appspot.com/1674803/diff/1/user/src/com/google/gwt/view/client/MultiSelectionModel.java#newcode36 user/src/com/google/gwt/view/client/MultiSelectionModel.java:36: private final MapObject, T selectedSet = new LinkedHashMapObject, T(); This will include GWT's emulated LinkedHashMap code into the compiled app, which is a significant amount of code. We generally stick to the basic HashMap, Hashset, ArrayList collections throughout GWT to avoid including code associated with the different types of collections. Can we create an OrderedMultiSelectionModel subclass instead? That way, only users who need the functionality will pay the cost. http://gwt-code-reviews.appspot.com/1674803/diff/1/user/src/com/google/gwt/view/client/MultiSelectionModel.java#newcode38 user/src/com/google/gwt/view/client/MultiSelectionModel.java:38: private final MapT, Boolean selectionChanges = new HashMapT, Boolean(); selectionChanges has to be a LinkedHashMap as well, or multiple pending changes will be applied in an undefined order when resolveChanges() is called. http://gwt-code-reviews.appspot.com/1674803/diff/1/user/src/com/google/gwt/view/client/MultiSelectionModel.java#newcode81 user/src/com/google/gwt/view/client/MultiSelectionModel.java:81: public ListT getSelectedList() { I think this would make more sense in an OrderMultiSelectionModel subclass. Imposing an API restriction that MultiSelectionModel will retain the order of items would make it tough for a user to subclass and change the implementation. http://gwt-code-reviews.appspot.com/1674803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Bean Validation status / future plans?
Hi, what is the current status/future plans of GWT's bean validation (JSR303)? Looking at the issue tracker (issues labeled jsr303) it seems like that its half way done but most of the still opened issues are 6-12 month old. Are these issues real big blockers and will take their time to fix or is the original author just busy with other things? So, although its marked as experimental do you think it is stable enough to use it in a production application for simple validations (mainly using validation groups for client/server and all the predefined jsr303 validation annotations. I dont think I need custom validations for now but I do have some loops that should be handled)? -- J. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Bean Validation status / future plans?
I believe we are getting an intern to finish this soon. -Ray On Mon, Apr 2, 2012 at 6:55 AM, Jens jens.nehlme...@gmail.com wrote: Hi, what is the current status/future plans of GWT's bean validation (JSR303)? Looking at the issue tracker (issues labeled jsr303) it seems like that its half way done but most of the still opened issues are 6-12 month old. Are these issues real big blockers and will take their time to fix or is the original author just busy with other things? So, although its marked as experimental do you think it is stable enough to use it in a production application for simple validations (mainly using validation groups for client/server and all the predefined jsr303 validation annotations. I dont think I need custom validations for now but I do have some loops that should be handled)? -- J. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors