Re: GWT 1.7 Now Available
On Jul 23, 12:54 am, Bruce Johnson wrote: > Download > here:http://code.google.com/p/google-web-toolkit/downloads/list?can=1&q=GW... This link only lists the linux version (the search doesn't seem to work properly, or at least I can't figure out what it is searching in). Official download site: http://code.google.com/webtoolkit/download.html Featured download, currently lists GWT 1.7.0, for all platforms: http://code.google.com/p/google-web-toolkit/downloads/list?can=3 Regards, Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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.7 Now Available
On Jul 23, 12:54 am, Bruce Johnson wrote: > Download > here:http://code.google.com/p/google-web-toolkit/downloads/list?can=1&q=GW... This link only lists the linux version (the search doesn't seem to work properly, or at least I can't figure out what it is searching in). Official download site: http://code.google.com/webtoolkit/download.html Featured download, currently lists GWT 1.7.0, for all platforms: http://code.google.com/p/google-web-toolkit/downloads/list?can=3 Regards, Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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.7.0
The javadoc suggests you to use .getTextBox.addClickHandler(). http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/SuggestBox.html#addClickListener%28com.google.gwt.user.client.ui.ClickListener%29 On Jul 18, 10:44 pm, twdarkflame wrote: > ah, still no clickhandelers for Suggestion Boxs then, I expected at > least that to be fixed fairly quick :-/ > oh well, not that important. > > On Jul 15, 8:54 am, "brett.wooldridge" > wrote: > > > Read the release notes. Very few issues were fixed in 1.7.0, just a > > few extremely critical issues. > > > On Jul 15, 3:34 pm, Paulo Coutinho wrote: > > > > I have compiled my app with new version, but the button size has the > > > same problem, on IE is bigger than other browsers. > > > > 2009/7/15 sideview1 : > > > > > nevermind, I was looking at the main > > > > pagehttp://code.google.com/p/google-web-toolkit/ > > > > > but I found the correct location and here are the release notes: > > > >http://code.google.com/webtoolkit/releases/release-notes-1.7.0.html > > > > > Sorry I'm used to the posts pinned to the top in the forum. > > > > > On Jul 14, 4:03 pm, ben wrote: > > > >> I see that it's out for download now. What updates are in that > > > >> release? I don't see any milestone in the Issues Tab for the > > > >> release. And I don't seem to see any posts about the new release? > > > > -- > > > Atenciosamente, > > > Paulo Coutinho. > > > Blog:www.prsolucoes.com/blog > > > Site:www.prsolucoes.com > > > Msn: pa...@prsolucoes.com > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to pass javascript maps between Java and javascript
On Jul 17, 10:21 pm, byhisdeeds wrote: > I have a GWT application with a JSONObject which must be passed to a > javascript function which will make some calculations, which will then > be returned to the calling GWT app. > > ie: > > JSONObject json = new JSONObject(); > json.put("x", 2); > json.put("y", 5); > JSONObject result = process(json) > Window.alert("sum="+result.get("sum")); > Window.alert("average="+result.get("avg")); > > public native JSONObject process(json) /*-{ > return $wnd.myJavascriptFunction(json); > }-*/; > > My question is what is the correct way to reference the JSON object > within my javascript function, and when it must return my results in > another JSON obejct how do I do this in javascript. JSONObject wraps a real JavaScriptObject, so using: JavaScriptObject unwrapped = json.getJavaScriptObject(); JavaScriptObject result = process(unwrapped); json = new JSONObject(result); public native JavaScriptObject process(JavaScriptObject o) /*-{ return $wnd.myJavascriptFunction(o); }-*/; should do what you want. $wnd.myJavascriptFunction will get and return a normal javascript object. Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT next release - what/when?
Interresting... I wonder why there wasn't an official announcement of the release in the blog... or did it get released just a few min ago? On Jul 14, 5:25 pm, Yegor wrote: > FYI, GWT 1.7 downloads are already available. This is a minor release, > with added support for new browsers (IE8, FF3.5, Safari 4). > > On Jul 12, 8:56 am, Ainata-Leb wrote: > > > What will the next GWT release focus on and what is the expected date > > for that? > > Is there a centralized location/website that keeps tracks of GWT 3rd > > party libs? > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Window.Location.getParameterMap() and serialization
On Jul 14, 12:31 am, Thad wrote: > I see references to problems with serializing Map objects across the > RPC layer. From what I read, folks have a lot of trouble with this, > but that is should work. Well, it's not working for me. > > I have an application to which I wish pass the parsed query string to > the server, as in MyAppl.html?foo=bar&eanie=meanie > In client/MyAppl.java I call > Map> paramMap = Window.Location.getParameterMap > (); > > Now I call myService.execute(paramMap, callback). This fails, whether > passed as a Map or as "new HashMap(paramMap)". The first line in my > service is a System.out.println() and it never gets called. I'm > tossed right into my callback's onFailure() method. (The Throwable's > getMessage() is "[ERROR] java.util.Collections > $UnmodifiableRandomAccessList > com.google.gwt.user.client.rpc.SerializationException: > java.util.Collections$UnmodifiableRandomAccessList"). > > What gives? A HashMap implements serializable. The keys are Strings > and the value is a List of Strings. > > Why won't this serialize? That is a good question... It is because the java.util.Collections$UnmodifiableRandomAccessList class is not supported for serialization, it it correct that the call will never reach your servlet. Imo, it shouldn't even compile if this is intended behavior. That said, according to the docs at http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html#Package_java_util the Collections.unmodifiableList(List) method _is_ supported, which makes it doubly odd that it's result won't serialize. The workaround is doing a deep copy of your UnmodifiableHashMap, instead of the shallow copy you do with the copy constructor. Go for: HashMap copy = new HashMap(); for (Entry> e : paramMap.entrySet()) { copy.put(e.getId(), new ArrayList(e.getValue()); } Regards, Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 architecture MVP/EventBus (mentioned at Google I/O)
Exactly the same, only your implement your service yourself, instead of relying on the GWTrpc. You should end up with something similar to (assuming "traditional" RPC, not the command patten displayed in the Google-IO video): interface MyService { void myMethod(..., AsyncCallback); } class MyServiceAsRESTThroughRequestBuilderImplWithALongName implements MyService { void myMethod(..., AsyncCallback cb) { requestBuilder.sendRequest(..., new RequestCallback() { void onError(..., Throwable t) { cb.onError(t); } void onResponseReceived(...) { ok ? cb.onSucces(parsedResult) : cb.onError(parsedError); } } } } Pass around a MyService, or a MockMyservice for testing etc... On Jul 10, 8:51 pm, Zheren wrote: > How does this architecture work if I do not have RPC calls? Instead, > mostly I use RequestBuilder to make REST service calls and update/ > change View depends on onError or onRespondeReceived callback. > > Thanks, > > On Jul 10, 11:11 am, Thomas Broyer wrote: > > > On 10 juil, 15:15, Eduardo Nunes wrote: > > > > On Fri, Jul 10, 2009 at 7:10 AM, Thomas Broyer wrote: > > > > > I wouldn't have used an addClickHandler on the View, but rather a > > > > "HasClickHandlers getAddIssueButton()". Also, I would have named the > > > > EditIssuePresenter method showIssue(Issue issue) instead of go(Issue > > > > issue). > > [...] > > > > I do think it's the View's responsibility to attach a "child View" at > > > > the correct "location", maybe along with setting its size and other > > > > "presentation" properties, but yet the parent View still have to cast > > > > the child View into a Widget, or each View has to provide a getWidget > > > > () method just like Eduardo did (the fact that the Presenter also has > > > > a getWidget() is a different thing, but it would at least have to have > > > > a getView() method so you can instantiate a "child Presenter" and pass > > > > it's view to your view to add the view's widget into your own view's > > > > widgets...) > > > > I didn't realize how to implement what you described. > > > Pretty easy: > > - first, replace "Widget getWidget()" in your presenters with "View > > getView()" and simply implement it as "return view" (instead of > > "return view.getWidget()"); eventually introduce a generic View > > interface with a single getWidget() method, and a generic Presenter > > interface with a single getView() method. > > - next, introduce a MainPresenter.View interface, and move all the > > code in MainPresenter dealing Widgets into an implementation of > > MainPresenter.View; the MainPresenter.View will have methods taking > > views in argument, and the implementation of MainPresenter.View will > > get their respective widgets using their getWidget() method. > > > ...and instead of your "Widget go(Issue)" method, I'd have two > > methods: getView() as above (with the view having a getWidget() > > method) and showIssue(issue). > > (In Ray Ryan's I/O presentation, see slide #62 which shows an editPhone > > (Phone) method's implementation) > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 architecture MVP/EventBus (mentioned at Google I/O)
On Jul 10, 12:47 am, Eduardo Nunes wrote: > Hello guys, > > I had a little difficulty to define how establish a communication > between the Presenters. When you deal with just one Presenter, the MVP > pattern is very simple to understand. After a while I found my > solution and I decided to share it with you all. I created a simple > application that contains just four Presenters. It's a small piece of > a briefing issue tracker - well the application domain itself doesn't > matter. > > Please, take a look on it and gimme some feedbacks, the idea is to > discuss about it to improve the pattern knowledge at all. In the main > page of the project you will find a brief description of it, the > screens shots, svn access and a simple download. > > http://gwt-mvp-sample.googlecode.com > > I'm looking forward to your replies. Without looking into the inter-presenter communication, I think you missed a pretty important point made in the google IO vid (25m1s into it, http://www.youtube.com/watch?v=PDuhR18-EdM#t=25m1): Your presenters and their views should not deal with widgets, but with abstracts like HasValue. Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to 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 architecture MVP/EventBus (mentioned at Google I/O)
I'm only making guesses here as well... but perhaps either: interface Display { HasFocusHandlers getEntryFocus(); HasBlurHandlers getEntryBlur(); } or something like: interface FocusableTextEntry extends HasValue, HasFocusHandlers, HasBlurHandlers {} interface Display { FocusableTextEntry getLoginEntry(); } Not sure what is preferable... to many methods is messay, but a wildgrowth of interface is also not good - but I suppose you could combine them to a few basic ones, perhaps something like. Another thing is, is focus management supposed to be in the Presenter? I'd guess it's supposed to go in the View... the blur event handlers come from com.google.gwt.event.dom.client, which implies to me the need for a GwtTestcase, and the whole idea is to be able to test your presenter _without_ the need for any displayable widgets and related code. On Jun 30, 10:12 pm, Zheren wrote: > So if for a TextBox I need to bind both FocusHandler and BlurHandler, > I need to have two interfaces and combine them? > > How does that work? > > On Jun 30, 6:54 am, gscholt wrote: > > > On Jun 29, 11:13 pm, Daniel Jue wrote: > > > > Does anyone have a working MVP/Eventbus sample of something simple > > > like the PhoneEditor? > > > I don't think I'm doing it right. The code from the IO presentation > > > leaves out enough details so that I'm not sure what to do. > > > For instance, in my Presenter.class, > > > > I have something like this: > > > public class Presenter { > > > ... > > > private Display display; > > > interface Display { > > > HasClickHandlers getSaveButton(); > > > HasClickHandlers getCancelButton(); > > > HasClickHandlers getNumberField(); > > > HasClickHandlers getLabelPicker(); > > > } > > > void editPhone(Phone phone) { > > > this.phone = Phone.from(phone); > > > display.getNumberField().setValue(phone.getNumber()); > > > display.getLabelPicker().setValue(phone.getLabel()); > > > } > > > ...} > > > > Obviously, a HasClickHandlers object doesn't have a setValue method. > > > It doesn't feel like I should be casting to the widget here, since we > > > went through all the trouble of using the Display interface. > > > > I started looking at Mvp4g, but it seems to go off on a tangent with a > > > code generation class to wire up presenters and views via > > > xml.http://code.google.com/p/mvp4g/ > > > It's also intertwined with some mvc4g classes. > > > > I just want something basic that works, so I can seed my project from > > > there. A minimalist, working command style RPC example would be nice > > > too. > > > Anyone? If you're in the DC area, I'll buy you a drink! > > > interface Display { > > HasClickHandlers getSaveButton(); > > HasClickHandlers getCancelButton(); > > HasValue getNumberField(); > > HasValue getLabelPicker(); > > > } > > > This will work for this example at least. If you want to bind events > > AND set a value to those fields you'd need to combine the two > > interfaces in a new one, or perhaps have two accessor methods. > > > Gert > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: gwtjsonrpc
On Jul 1, 3:55 am, Shawn Pearce wrote: > On Tue, Jun 30, 2009 at 18:49, asianCoolz wrote: > > > i came across this > > projecthttp://android.git.kernel.org/?p=tools/gwtjsonrpc.git > > . is this just for android or i can use with any app using gwt? any > > overview article,tutorial on this? > > Actually, its not for Android, its for its code review system, Gerrit > Code Review (http://code.google.com/p/gerrit/). But yes, its a > stand-alone module meant to be embedded into any GWT project, not just > Gerrit. Actually, I know at least one other developer who uses it in > an unrelated project, Gert Scholten. He has contributed a few patches > to gwtjsonrpc. > > Best thing for a tutorial is probably the README in the top level of > the directory. Its very, very similar to standard GWT RPC, only it > uses JSON encoding, and has built-in XSRF protection, if the server > knows how to demand/enforce it. The README is a good tutorial. Note though that the README assumes you are using the provided server-side code, if you do not some limitations change. (Example, the docs note that there is no support for call approximation; which is a server-side only feature). Also worth noting, if you plan to use it for _remote_ JSON services (circumventing the same-origin policy in any way), it doesn't support calling, but does give you a callback handle with automatic object deserializer. You'll have to encode the parameters and make the call yourself. Other then that, it works like a charm, Regards, Gert Scholten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Compiling with the new eclipse plugin, classpaths and
Hi, Either I'm doing something wrong, or there is something wrong with the way the eclipse plugin hands out classpaths to the gwt Compiler. The Compiler loads the Generator class from rules when parsing the .gwt.xml files, but it is not passed the war/WEB-INF/ classes (aka, eclipse output) directory on it's classpath, resulting in a ClassNotFoundException when you hit the compile button. Create new Web Application (using the GWT SDK 1.6), name: plugintest, package: plugintest Create (empty) interface plugintest.client.Foo Create (empty) class plugintest.client.FooGenerator Edit plugintest.Plugintest.gwt.xml, add: When you hit the GWT Compile Project button, the error you get is: Loading module 'plugintest.Plugintest' [ERROR] Unable to load class 'plugintest.client.FooGenerator' java.lang.ClassNotFoundException: plugintest.client.FooGenerator ... instead of the expected exception that FooGenerator doesn't extend the Generator base class. Compiling manuall with java -cp %GWT_HOME%/gwt-user.jar;%GWT_HOME%/gwt-dev-windws.jar;src;war \WEB-INF\classes com.google.gwt.dev.Compiler plugintest.plugintest gives the same result. Note that the gwtc target in a build.xml generated by the webAppCreator does include the compiled classes in the classpath of the Compiler. It can be circumvented by adding war/WEB-INF/classes as a source folder or something, but that's obviously not intended. Is this a bug in the plugin, or is there a proper solution (and why is that not default) ? Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Devolping strategy, get parameters on gwt
On Feb 13, 3:06 pm, Tuvok wrote: > Hi guys, > I'm elaboratating the strategy to take in the devolping of my first > gwt app; it's gonna be an online tournament and matchmaking system > supporting team managing and other (in my mind :D) cool features. > I am using Tomcat/Apache as Web Server and RPC target and EXT GWT on > the client side. > At first I thought about using a single host page and manage > everything through panels/widgets adding-removing-modifying, but I > ended up thinking that in this case users wouldn't be able to exchange > urls pointing to a specific page (ie, if I wanna tell you, 'go check > out my team athttp://site.com/viewteam.html?teamID=10'I can't > because there's a single page, index.html). > So I thought about splitting every page, but then, how can I make GWT > catch the data stored on the parameters? > IE on home page I have a link to viewteam.html?teamID=10, GWT catches > the teamID parameter, calls a RPC to the server using that ID and > populates the widgets, is this the correct way to go? If so, how to > make GWT catch that data? GWT History tokens are passed in the fragment part of an url, if you link to http://site.com/viewteam.html#teamId=10, you can use History.getToken() to return you the String "teamId=10". Or better yet, register an handler and run History.fireCurrentHistoryState(). See the documentation on the history stack and using it for program state. Gert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---