Re: Design Decision RPC with AsyncDataProvider
Hi, I now started to give my columns DataStoreNames, works much better for a couple of requirements. Thank you so much for helping me on this topic. Best regards Jochen -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory, entity Id not populated when it reaches the server?
On Monday, June 17, 2013 9:55:09 PM UTC+2, GWTter wrote: Hi, So I went back using the dev tools, inspected the payload, and confirmed what I had before: the ID is not set at all in the user object payload. Just to make sure I wasn't crazy or missing something I created just a User object and tried to save it. I checked the payload in that request and could clearly see the ID set in the object. I've persisted/sent entities that had field values set with other entities before. The only difference I can make between the two cases is that in the previous case the entity I was setting as the field value was from a request to the server (I had not created it on the client). In this case the booking entity is created on the client and the user entity is also created on the client. Could this be the reason why it's failing? maybe because RF only lets you add entities as fields if they already have stableIDs? Thanks again in advance. If you can make a small repro case, please file an issue; it looks like a critical regression (which would also mean our test suite is weak) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: JUnitShell: Why is the log level overriden to WARN?
On Monday, June 17, 2013 10:54:16 PM UTC+2, Maik Riechert wrote: Hi, when developing JUnit runstyles I want to do info/trace logging, e.g.: shell.getTopLogger().log(TreeLogger.TRACE, Letting PhantomJS fetch + url); I have to change all those logging outputs to at least WARN to see anything. This is caused by the following code in JUnitShell I guess: // Override log level to set WARN by default.. registerHandler(new ArgHandlerLogLevel(options) { @Override protected Type getDefaultLogLevel() { return TreeLogger.WARN; } }); My question is: Why? I find it very strange that I can't set a custom log level via command line argument or system property. What is the reasoning behind this and can it be changed? You definitely *can* change the log level from the command line, WARN is just the default value. Arguments are passed to JUnitShell through the gwt.args system property, the same you use to set your custom RunStyle: -Dgwt.args=-logLevel DEBUG -out www-test -runStyle com.example.PhantomJS:/path/to/phantomjs -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: JUnitShell: Why is the log level overriden to WARN?
Thomas Broyer wrote: You definitely *can* change the log level from the command line, WARN is just the default value. Arguments are passed to JUnitShell through the gwt.args system property, the same you use to set your custom RunStyle: -Dgwt.args=-logLevel DEBUG -out www-test -runStyle com.example.PhantomJS:/path/to/phantomjs Hmm, I already tried setting the logLevel through the maven configuration: https://github.com/neothemachine/KineticGWT/blob/master/pom.xml#L122 Am I doing something wrong? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: AWS (CDN) GWT file deployment and 'Blocked a frame with origin' issue
On Monday, June 17, 2013 7:26:43 PM UTC+2, Joseph Lust wrote: Thomas, Sorry I didn't catch you at the GWTogether in SF last month. I owe you a number of beers. :) *That did the trick*. I'll bang out an article for GWTProject.org on AWS (and similar) CDN deployments. BTW, I shamefully plead ignorance on the *xsiframe* linker. I'd only used the linkers in the GWT Docshttps://developers.google.com/web-toolkit/doc/latest/DevGuideOrganizingProjects#DevGuideModuleXml . Yet, a grepping against the GWT source reveals: - appcachelinker (sample) - direct_install - xs - sso - std - xsiframe We'll need to ensure the new official docshttp://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.htmlinclude these as I've seen little documentation on most of them, or perhaps I'm missing something and they're not all meant for prime time yet. Yes, we need to document them (or update existing documentation) and possibly deprecate a few of them. When xsiframe was introduced a few releases ago, it was said that it could eventually replace std as the default linker: it combines the best of iframe (sandboxing in an iframe, DevMode) and xs (cross-origin), and is modular and extensible (you can even plug your own script fragments using set-configuration-property), and of course also brings SuperDevMode. I think xs should be deprecated, maybe sso too (who compiles a single permutation anyway?) AFAICT, Google's linker (Server-Side Selection Script) is based on xsiframe (or direct_install, which extends xsiframe) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: JUnitShell: Why is the log level overriden to WARN?
On Tuesday, June 18, 2013 10:11:57 AM UTC+2, Maik Riechert wrote: Thomas Broyer wrote: You definitely *can* change the log level from the command line, WARN is just the default value. Arguments are passed to JUnitShell through the gwt.args system property, the same you use to set your custom RunStyle: -Dgwt.args=-logLevel DEBUG -out www-test -runStyle com.example.PhantomJS:/path/to/phantomjs Hmm, I already tried setting the logLevel through the maven configuration: https://github.com/neothemachine/KineticGWT/blob/master/pom.xml#L122 Am I doing something wrong? No, the gwt-maven-plugin is doing something wrong: it does not allow you to configure the logLevel: https://github.com/gwt-maven-plugin/gwt-maven-plugin/blob/2fa0f0065aecde5e6ced88eb5f82a6e914ec2cdb/src/main/java/org/codehaus/mojo/gwt/shell/TestMojo.java#L300 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Dynamic place navigation
Hi, I have a requirement to navigate to the places where place is dynamically decided. For example, I have an Edit User link from Screen-1 Screen-2. When I click on the link, it takes me to EditUserView.java. Now, when I click on Save button from my EditUserView.java, it should take me to Screen-1 if I come from Screen-1 and to Screen-2 if I come from Screen-2. Is there any way I can achieve this? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dynamic place navigation
History.back(); maybe? If this doesn't work for you then store the previous place in the current place so you can call placeController.goTo(editUserPlace.getPreviousPlace()); later on. -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dynamic place navigation
On Tuesday, June 18, 2013 11:19:39 AM UTC+2, Prince wrote: Hi, I have a requirement to navigate to the places where place is dynamically decided. For example, I have an Edit User link from Screen-1 Screen-2. When I click on the link, it takes me to EditUserView.java. Now, when I click on Save button from my EditUserView.java, it should take me to Screen-1 if I come from Screen-1 and to Screen-2 if I come from Screen-2. Is there any way I can achieve this? Add the return-to place to the edit user place (that doesn't mean you surface it in the URL through the PlaceTokenizer though), so you can use in from your EditUserView (and choose a sane default when the place is constructed from the URL and doesn't have a return-to place; as an alternative, just put the return-to place in the URL, serializing it using the PlaceHistoryMapper). As an alternative, you can use 2 distinct places *resolving* to the same EditUserView. In any case, the idea is to choose the next place based on the current place. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How to update and refresh a Cell by code?
Hi, I have a CellWidget (EditTextCell) that I want to set a specific value manually by code. But the UI is not updated? What am I missing? @UiField(provided = true) CellWidgetString cell; cell.setValue(text, true); cell.redraw(); -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
JUnitShell.getModuleUrl() produces invalid URL for IPv6 addresses
Hi, it seems the JUnitShell is generating invalid URLs if IPv6 is used: http://2607:f700:8000:12d:dd58:687b:744c:800c:48579/... You can observe this here: https://travis-ci.org/neothemachine/KineticGWT/builds/8191369#L881 The URL should be http://[2607:f700:8000:12d:dd58:687b:744c:800c]:48579/... Is this a known issue? I couldn't find anything related to that. Cheers Maik -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: JUnitShell.getModuleUrl() produces invalid URL for IPv6 addresses
On Tuesday, June 18, 2013 11:59:49 AM UTC+2, Maik Riechert wrote: Hi, it seems the JUnitShell is generating invalid URLs if IPv6 is used: http://2607:f700:8000:12d:dd58:687b:744c:800c:48579/... You can observe this here: https://travis-ci.org/neothemachine/KineticGWT/builds/8191369#L881 The URL should be http://[2607:f700:8000:12d:dd58:687b:744c:800c]:48579/... Is this a known issue? I couldn't find anything related to that. I don't think I've seen a bug report about that. This is due to constructing the URL by string concatenations; using java.net.URL or java.net.URI, the brackets could be added automatically if needed (depending on the constructor used). As a workaround, because you're working on a custom RunStyle, override RunStyle#getLocalHostName to add the brackets when the InetAddress is an Inet6Address. Feel free to file a bug in the issue tracker. And it'd be awesome if you could provide a patch! (note that there's a similar issue in RunStyleSelenium I guess) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Application architecture question
Follow up on this matter. Thanks you for all the inputs, we considered them and decided what is the best solution for our project. In the end we created an object that models the data that we receive from the database and from the after calculations. In the HomeActivity class of the HomeView (in case of mGWT) or Presenter class (case of GWT) we create an onModelLoaded event handler which fills the model. We also implemented states and the readyState is only activated when the model is loaded. From the model we also fill the GUI afterwards. Cheers, Timea On 11 June 2013 23:08, Joseph Lust lifeofl...@gmail.com wrote: Timea, If you've got the case of waiting on a multiplicity of RPC's to complete before continuing, something like Jen's suggestion is best. I've implemented it before with a multibit latches. However you get into the issue of syncing. For example, let's say you have N RPC calls for a given event. If someone triggers this event twice quickly (say event A and B) that fires off 2*N RPC calls. You've no guarantee that all of A's RPC's will return before all of B's RPC's. What if B completed first? Should A update the UI too or is it no longer relevant? Essentially all of the thread locking goodness you normally avoid with JS creeps in. That is why when I've run into this pattern, I usually try to find a way to do the grouping server side rather than UI side if possible. If you must, make sure you: - Block all UI interaction until the event's RPC's return - Unblock the UI on error for any RPC - Have a way to cancel all inflight RPC's if you need to cancel the update from the UI - Make sure you reset you latches on error/success Sincerely, Joseph -- You received this message because you are subscribed to a topic in the Google Groups Google Web Toolkit group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/eZLxnlpixL0/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Beginning...Problems with navigation
Hi, i'm just beginning with GWT and I have a problem to make my application behave as I want. The fact is that I have one main static html page that links to three subpages that are similar but contain a dynamic part each one. Must I use one single entry point to the main page? If I choose this option...how can I continue navigation (as events, perhaps)? I also thought of creating three modules for each subpage, each one with its XML file that make me able to control the dynammic part, but I really think this is not useful Has anyone an idea of how to manage this? Thanks a lot -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Beginning...Problems with navigation
Carmen, Can you elaborate on what you're trying to build and what it does? GWT is intended for Web *Apps*, not Web *Sites*. So, typically GWT would not be used for a blog, but it would be used for say an employee time tracking application. Take this forum reader as a good example of GWT. The strength of GWT is that you are only on a single (physical) web page. All user interactions update the page content and the browser history, but the user does not need to make a trip to your server to reload the page, making everything faster and lower overhead. Of course it is a different ball game from PHP or JSP's, but I'd posit it is more straight forward with less boilerplate than those implementations. Check out frameworks like GWTP which handle those events and pages you just mentioned rather seemlessly. They've got a number of ready to code demos too. Sincerely, Joseph -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Setting TreeItem userObject with uiBinder?
On 17/06/2013 16:38, Pascal Heus wrote: Tried that one but fails with Cannot parse value: FooKeyValue as type java.lang.Object: g:TreeItem ... *P On 6/17/13 12:38 PM, Philippe Lhoste wrote: On 17/06/2013 10:55, Kulnor wrote: Is there any way to set a TreeItem user object in the UI Binder XML? Something like g:TreeItemtext='Foo'userObject=FooKeyValue/ Have you tried it? (I haven't!) I see TreeItem has a setUserObject(Object userObj) method, so maybe it can work. Ah, I expected the String to be an Object, but UiBinder tries to be smarter... :-P Perhaps you can open a bug against UiBinder? -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
problem to test the widget TabPanel
I work on a gwt project, I should create some interfaces using widgets, and everything is good. here a part of my file .ui.xml ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.uig:TabPanel width=150px height=130px g:Tab field=tab1 text=tab1 blabla /g:Tab/g:TabPanel But when i try to test this widget, i have this exception : com.googlecode.gwt.test.exceptions.GwtTestUiBinderException: Cannot find class 'com.google.gwt.user.client.ui.Tab' declared in file creationInterface.ui.xml Anybady have idea where is the problem ?? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: problem to test the widget TabPanel
This is likely a bug in gwt-test-utils. Does your app compile? Does the creationInterface.ui.xml works in a GWTTestCase? On Tuesday, June 18, 2013 4:38:04 PM UTC+2, fatimaAngel wrote: I work on a gwt project, I should create some interfaces using widgets, and everything is good. here a part of my file .ui.xml ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder xmlns:g=urn:import:com.google.gwt.user.client.uig:TabPanel width=150px height=130px g:Tab field=tab1 text=tab1 blabla /g:Tab/g:TabPanel But when i try to test this widget, i have this exception : com.googlecode.gwt.test.exceptions.GwtTestUiBinderException: Cannot find class 'com.google.gwt.user.client.ui.Tab' declared in file creationInterface.ui.xml Anybady have idea where is the problem ?? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: RequestFactory, entity Id not populated when it reaches the server?
Hi Thomas, I just submitted the issue http://code.google.com/p/google-web-toolkit/issues/detail?id=8204, thanks again. On Tuesday, June 18, 2013 9:39:33 AM UTC+2, Thomas Broyer wrote: On Monday, June 17, 2013 9:55:09 PM UTC+2, GWTter wrote: Hi, So I went back using the dev tools, inspected the payload, and confirmed what I had before: the ID is not set at all in the user object payload. Just to make sure I wasn't crazy or missing something I created just a User object and tried to save it. I checked the payload in that request and could clearly see the ID set in the object. I've persisted/sent entities that had field values set with other entities before. The only difference I can make between the two cases is that in the previous case the entity I was setting as the field value was from a request to the server (I had not created it on the client). In this case the booking entity is created on the client and the user entity is also created on the client. Could this be the reason why it's failing? maybe because RF only lets you add entities as fields if they already have stableIDs? Thanks again in advance. If you can make a small repro case, please file an issue; it looks like a critical regression (which would also mean our test suite is weak) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How to change corner color of DecoratedTabBar?
Hi, I can see a DecoratedTabBar depends on some images (images/corner.png). If I edit them and change the color, where to I have to place them in order to make the TabBar respect my changes? Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
How come the ScrollEvent is never fired in this code?
I'm playing around with some code, but I couldn't figure out how come the ScrollEvent is never fired, I put a breakpoint on onScroll and it never breaks! Here is the code: public class InfiniteScrollPanel implements ScrollHandler { String text = Lorem ipsum dolor sit amet, consectetuer...; ScrollPanel panel; String height = 1200px; String width = 200px; public InfiniteScrollPanel() { panel = new ScrollPanel(new HTML(text)); panel.setSize(width, height); panel.addScrollHandler(this); panel.getElement().getStyle().setBackgroundColor(rgb(216, 216, 216)); } @Override public void onScroll(ScrollEvent event) { if (panel.getVerticalScrollPosition() == 1100) { panel.add(new HTML(text)); } } } Then I add it like this: InfiniteScrollPanel demo = new InfiniteScrollPanel(); RootPanel.get().add(demo.panel); Any ideas? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: How come the ScrollEvent is never fired in this code?
Your ScrollPanel never needs to scroll if it really has a height of 1200px but only contains such a short text. Also ScrollPanel extends SimplePanel so it can only have exactly one child widget. That means if onScroll() executes you will see an exception because you are trying to add a second child to ScrollPanel. What you want is: ScrollPanel (height 1200px) --- FlowPanel - child 1 (should be taller than 1200px so ScrollPanel can actually scroll it) - child 2 -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
Re: Dynamic place navigation
Hi All, Thanks for responding. I will try to add return place in my new place. On Tue, Jun 18, 2013 at 3:01 PM, Thomas Broyer t.bro...@gmail.com wrote: On Tuesday, June 18, 2013 11:19:39 AM UTC+2, Prince wrote: Hi, I have a requirement to navigate to the places where place is dynamically decided. For example, I have an Edit User link from Screen-1 Screen-2. When I click on the link, it takes me to EditUserView.java. Now, when I click on Save button from my EditUserView.java, it should take me to Screen-1 if I come from Screen-1 and to Screen-2 if I come from Screen-2. Is there any way I can achieve this? Add the return-to place to the edit user place (that doesn't mean you surface it in the URL through the PlaceTokenizer though), so you can use in from your EditUserView (and choose a sane default when the place is constructed from the URL and doesn't have a return-to place; as an alternative, just put the return-to place in the URL, serializing it using the PlaceHistoryMapper). As an alternative, you can use 2 distinct places *resolving* to the same EditUserView. In any case, the idea is to choose the next place based on the current place. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Fix binary vs. internal variable names, remove unused Name c...
Manuel Carrasco Moñino has posted comments on this change. Change subject: Fix binary vs. internal variable names, remove unused Name code. .. Patch Set 1: Code-Review+1 -- To view, visit https://gwt-review.googlesource.com/3470 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I540b1225efe7f81f0fc3ac50871cc66d1e99e753 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Manuel Carrasco Moñino manuel.carrasc...@gmail.com Gerrit-Reviewer: Roberto Lublinerman rlu...@google.com Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adding key codes
Daniel Kurka has uploaded a new patch set (#2). Change subject: Adding key codes .. Adding key codes fixes issue 8203 Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e --- M user/src/com/google/gwt/event/dom/client/KeyCodes.java 1 file changed, 345 insertions(+), 10 deletions(-) -- To view, visit https://gwt-review.googlesource.com/3480 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Daniel Kurka danku...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adding key codes
Ray Cromwell has posted comments on this change. Change subject: Adding key codes .. Patch Set 2: Code-Review+2 -- To view, visit https://gwt-review.googlesource.com/3480 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Daniel Kurka danku...@google.com Gerrit-Reviewer: Ray Cromwell cromwell...@google.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adding key codes
Daniel Kurka has uploaded a new change for review. https://gwt-review.googlesource.com/3480 Change subject: Adding key codes .. Adding key codes fixes issue 8203 Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e --- M user/src/com/google/gwt/event/dom/client/KeyCodes.java 1 file changed, 345 insertions(+), 10 deletions(-) diff --git a/user/src/com/google/gwt/event/dom/client/KeyCodes.java b/user/src/com/google/gwt/event/dom/client/KeyCodes.java index 5a28ccb..be9a414 100644 --- a/user/src/com/google/gwt/event/dom/client/KeyCodes.java +++ b/user/src/com/google/gwt/event/dom/client/KeyCodes.java @@ -29,6 +29,213 @@ * {@link com.google.gwt.user.client.ui.KeyboardListener}. */ public class KeyCodes { + + /** + * Key code for A + */ + public static final int KEY_A = 65; + /** + * Key code for B + */ + public static final int KEY_B = 66; + /** + * Key code for C + */ + public static final int KEY_C = 67; + /** + * Key code for D + */ + public static final int KEY_D = 68; + /** + * Key code for E + */ + public static final int KEY_E = 69; + /** + * Key code for F + */ + public static final int KEY_F = 70; + /** + * Key code for G + */ + public static final int KEY_G = 71; + /** + * Key code for H + */ + public static final int KEY_H = 72; + /** + * Key code for I + */ + public static final int KEY_I = 73; + /** + * Key code for J + */ + public static final int KEY_J = 74; + /** + * Key code for K + */ + public static final int KEY_K = 75; + /** + * Key code for L + */ + public static final int KEY_L = 76; + /** + * Key code for M + */ + public static final int KEY_M = 77; + /** + * Key code for N + */ + public static final int KEY_N = 78; + /** + * Key code for O + */ + public static final int KEY_O = 79; + /** + * Key code for P + */ + public static final int KEY_P = 80; + /** + * Key code for Q + */ + public static final int KEY_Q = 81; + /** + * Key code for R + */ + public static final int KEY_R = 82; + /** + * Key code for S + */ + public static final int KEY_S = 83; + /** + * Key code for T + */ + public static final int KEY_T = 84; + /** + * Key code for U + */ + public static final int KEY_U = 85; + /** + * Key code for V + */ + public static final int KEY_V = 86; + /** + * Key code for W + */ + public static final int KEY_W = 87; + /** + * Key code for X + */ + public static final int KEY_X = 88; + /** + * Key code for Y + */ + public static final int KEY_Y = 89; + /** + * Key code for Z + */ + public static final int KEY_Z = 90; + + /** + * Key code number 0 + */ + public static final int KEY_ZERO = 48; + /** + * Key code number 1 + */ + public static final int KEY_ONE = 49; + /** + * Key code number 2 + */ + public static final int KEY_TWO = 50; + /** + * Key code number 3 + */ + public static final int KEY_THREE = 51; + /** + * Key code number 4 + */ + public static final int KEY_FOUR = 52; + /** + * Key code number 5 + */ + public static final int KEY_FIVE = 53; + /** + * Key code number 6 + */ + public static final int KEY_SIX = 54; + /** + * Key code number 7 + */ + public static final int KEY_SEVEN = 55; + /** + * Key code number 8 + */ + public static final int KEY_EIGHT = 56; + /** + * Key code number 9 + */ + public static final int KEY_NINE = 57; + + /** + * Key code for number 0 on numeric keyboard + */ + public static final int KEY_NUM_ZERO = 96; + /** + * Key code for number 1 on numeric keyboard + */ + public static final int KEY_NUM_ONE = 97; + /** + * Key code for number 2 on numeric keyboard + */ + public static final int KEY_NUM_TWO = 98; + /** + * Key code for number 3 on numeric keyboard + */ + public static final int KEY_NUM_THREE = 99; + /** + * Key code for number 4 on numeric keyboard + */ + public static final int KEY_NUM_FOUR = 100; + /** + * Key code for number 5 on numeric keyboard + */ + public static final int KEY_NUM_FIVE = 101; + /** + * Key code for number 6 on numeric keyboard + */ + public static final int KEY_NUM_SIX = 102; + /** + * Key code for number 7 on numeric keyboard + */ + public static final int KEY_NUM_SEVEN = 103; + /** + * Key code for number 8 on numeric keyboard + */ + public static final int KEY_NUM_EIGHT = 104; + /** + * Key code for number 9 on numeric keyboard + */ + public static final int KEY_NUM_NINE = 105; + /** + * Key code for multiply on numeric keyboard + */ + public static final int KEY_NUM_MULTIPLY = 106; + /** + * Key code for plus on numeric keyboard + */ + public static final int KEY_NUM_PLUS = 107; + /** + * Key code for minus on numeric keyboard + */ + public static final int KEY_NUM_MINUS = 109; + /** + * Key code for period on numeric keyboard + */
[gwt-contrib] Change in gwt[master]: Adding key codes
Daniel Kurka has submitted this change and it was merged. Change subject: Adding key codes .. Adding key codes fixes issue 8203 Change-Id: Ia1cd903123d79db81ceb44103892e168d38a4e4e --- M user/src/com/google/gwt/event/dom/client/KeyCodes.java 1 file changed, 345 insertions(+), 10 deletions(-) Approvals: Ray Cromwell: Verified; Looks good to me, approved diff --git a/user/src/com/google/gwt/event/dom/client/KeyCodes.java b/user/src/com/google/gwt/event/dom/client/KeyCodes.java index 5a28ccb..699510e 100644 --- a/user/src/com/google/gwt/event/dom/client/KeyCodes.java +++ b/user/src/com/google/gwt/event/dom/client/KeyCodes.java @@ -29,6 +29,213 @@ * {@link com.google.gwt.user.client.ui.KeyboardListener}. */ public class KeyCodes { + + /** + * Key code for A + */ + public static final int KEY_A = 65; + /** + * Key code for B + */ + public static final int KEY_B = 66; + /** + * Key code for C + */ + public static final int KEY_C = 67; + /** + * Key code for D + */ + public static final int KEY_D = 68; + /** + * Key code for E + */ + public static final int KEY_E = 69; + /** + * Key code for F + */ + public static final int KEY_F = 70; + /** + * Key code for G + */ + public static final int KEY_G = 71; + /** + * Key code for H + */ + public static final int KEY_H = 72; + /** + * Key code for I + */ + public static final int KEY_I = 73; + /** + * Key code for J + */ + public static final int KEY_J = 74; + /** + * Key code for K + */ + public static final int KEY_K = 75; + /** + * Key code for L + */ + public static final int KEY_L = 76; + /** + * Key code for M + */ + public static final int KEY_M = 77; + /** + * Key code for N + */ + public static final int KEY_N = 78; + /** + * Key code for O + */ + public static final int KEY_O = 79; + /** + * Key code for P + */ + public static final int KEY_P = 80; + /** + * Key code for Q + */ + public static final int KEY_Q = 81; + /** + * Key code for R + */ + public static final int KEY_R = 82; + /** + * Key code for S + */ + public static final int KEY_S = 83; + /** + * Key code for T + */ + public static final int KEY_T = 84; + /** + * Key code for U + */ + public static final int KEY_U = 85; + /** + * Key code for V + */ + public static final int KEY_V = 86; + /** + * Key code for W + */ + public static final int KEY_W = 87; + /** + * Key code for X + */ + public static final int KEY_X = 88; + /** + * Key code for Y + */ + public static final int KEY_Y = 89; + /** + * Key code for Z + */ + public static final int KEY_Z = 90; + + /** + * Key code number 0 + */ + public static final int KEY_ZERO = 48; + /** + * Key code number 1 + */ + public static final int KEY_ONE = 49; + /** + * Key code number 2 + */ + public static final int KEY_TWO = 50; + /** + * Key code number 3 + */ + public static final int KEY_THREE = 51; + /** + * Key code number 4 + */ + public static final int KEY_FOUR = 52; + /** + * Key code number 5 + */ + public static final int KEY_FIVE = 53; + /** + * Key code number 6 + */ + public static final int KEY_SIX = 54; + /** + * Key code number 7 + */ + public static final int KEY_SEVEN = 55; + /** + * Key code number 8 + */ + public static final int KEY_EIGHT = 56; + /** + * Key code number 9 + */ + public static final int KEY_NINE = 57; + + /** + * Key code for number 0 on numeric keyboard + */ + public static final int KEY_NUM_ZERO = 96; + /** + * Key code for number 1 on numeric keyboard + */ + public static final int KEY_NUM_ONE = 97; + /** + * Key code for number 2 on numeric keyboard + */ + public static final int KEY_NUM_TWO = 98; + /** + * Key code for number 3 on numeric keyboard + */ + public static final int KEY_NUM_THREE = 99; + /** + * Key code for number 4 on numeric keyboard + */ + public static final int KEY_NUM_FOUR = 100; + /** + * Key code for number 5 on numeric keyboard + */ + public static final int KEY_NUM_FIVE = 101; + /** + * Key code for number 6 on numeric keyboard + */ + public static final int KEY_NUM_SIX = 102; + /** + * Key code for number 7 on numeric keyboard + */ + public static final int KEY_NUM_SEVEN = 103; + /** + * Key code for number 8 on numeric keyboard + */ + public static final int KEY_NUM_EIGHT = 104; + /** + * Key code for number 9 on numeric keyboard + */ + public static final int KEY_NUM_NINE = 105; + /** + * Key code for multiply on numeric keyboard + */ + public static final int KEY_NUM_MULTIPLY = 106; + /** + * Key code for plus on numeric keyboard + */ + public static final int KEY_NUM_PLUS = 107; + /** + * Key code for minus on numeric keyboard + */ + public static final int KEY_NUM_MINUS = 109; + /** + * Key code for period
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Stephen Haberman has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: doesn't fit into current IsXXX because if it was you wouldn't need IsWidget2 :) My take is that it's just because IsWidget is already a public API, and can't have methods added to it without being a breaking change. very common practice for testing in java Given Java's history, I don't believe that something being common in Java is necessarily a good argument. :-) Or, less cynically, mocks being common shouldn't mean they should be the *only* way of testing (which is how it is with GWT right now). You cannot do what you exactly want ... in (AWT, SWT, Swing, Android) Right, and MVP-style unit testing subsequently sucks in them as well. Same boilerplate hell of hand-coding your own view interfaces/impls/etc. See some of the papers from Atomic Object. AWT/SWT/Swing were all created before MVP/unit testing was popular in the Java community, so it is not surprising they were not designed with unit testing in mind. This is an opportunity to fix that. Answer can be implemented by just using naming conventions (i.e. store x on setX and return it on getX) That works for Style, but I've stubbed about 80-90% of the widgets, and by far most of the methods are not trivial based-on-the-name-implementations like that. forward calls to your handwritten StubElement - which doesn't need to extend the StubElement. That sounds painful as you wouldn't have any compiler support about whether you've implemented the right methods or not. Also, then you can't use covariant return types to provide tests with test-specific helper methods on the not-really-Element StubElements. Ironically, we are both wanting to do the same thing (do MVP directly against widgets), and both had to write code outside of GWT to do so (gwt-mockito/etc. and Tessell). Obviously I can keep doing what I'm doing in Tessell, my assertion is just that these interfaces would be useful in GWT itself. They make both mocking and stubbing easier, because then both supported out-of-the-box instead of having to be hacked around. Yes, we can be annoyed that Java requires duplicating an API in interfaces and the implementation, but I believe that's a cost that we as Java users have collectively decided to carry. So, I understand you don't have an interest in using these interfaces; that's fine, but myself (and at least a few others) do. I think part of a healthy open source project is letting in changes that the maintainer(s) themselves may not necessarily use, but that other users want. Obviously there is a balance here, and you can't let in every single commit. But I believe it's surprising how many patches can generally be let in. For example, see the Spark project, whose maintainers, sans typical style/architecture issues, let in a wide range of community patches. As a contributor (to Spark), it's very refreshing. And I believe as a direct consequence, Spark has a very healthy community of contributors (much, much more healthy than GWT for sure). So, I very much want your feedback, Goktug, on making this patch as good as it can possibly be from an implementation perspective; but I'd hope you'd avoid -1'ing just because you personally wouldn't use it. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Goktug Gokdogan has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: The part that I'm not comfortable with is, you can exactly have the same effect with the current state. Yes you wouldn't have compiler support but I don't think you it is a big deal. Stub are going to be written once and you already did that. If a new method is added and if somebody calls it, if will fail-fast; and you can fix that yourself in your own code. With the interfaces, if someone forgets to add the new method to interface and then you will need a patch to gwt proper. Being said that, rest assured, I wouldn't -1 for just not using it. My point was, what I suggested looked like pretty feasible and acceptable for your use case. If other reviewers +1's, you can go ahead submit the patch. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Use Double.isNan(d) instead of d != d to test for NaN.
Matthew Dempsky has uploaded a new change for review. https://gwt-review.googlesource.com/3490 Change subject: Use Double.isNan(d) instead of d != d to test for NaN. .. Use Double.isNan(d) instead of d != d to test for NaN. Satisfies upcoming error-prone warnings. Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764 --- M dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java index df30186..d9599e3 100644 --- a/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java +++ b/dev/core/src/com/google/gwt/dev/js/rhino/ScriptRuntime.java @@ -52,7 +52,7 @@ public static double NaN = 0.0d / 0.0; public static String numberToString(double d, int base) { -if (d != d) +if (Double.isNaN(d)) return NaN; if (d == Double.POSITIVE_INFINITY) return Infinity; -- To view, visit https://gwt-review.googlesource.com/3490 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Matthew Dempsky mdemp...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Use Double.isNaN(d) instead of d != d to test for NaN.
Goktug Gokdogan has posted comments on this change. Change subject: Use Double.isNaN(d) instead of d != d to test for NaN. .. Patch Set 2: Code-Review+2 -- To view, visit https://gwt-review.googlesource.com/3490 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4dcdd53fa616712c6a5548453fae51b5713e7764 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Matthew Dempsky mdemp...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds Timer#isRunning().
Goktug Gokdogan has posted comments on this change. Change subject: Adds Timer#isRunning(). .. Patch Set 2: Daniel, do you have any other concerns? -- To view, visit https://gwt-review.googlesource.com/3321 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0133c64de75d5d95cff863c5ab950d474dda0c56 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Colin Alworth has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: What is the thinking for the remaining 10%-ish of widgets - all of the cell widgets (except CellPanel), remaining *boxes (DateBox, various number-Box), RichTextArea, missing *LayoutPanels (SplitLayoutPanel, LayoutPanel, HeaderPanel, DeckLayoutPanel), etc? Future patch, or less important? I could see skipping most of the boxes, since the api should be relatively similar since subclasses mostly modify internal behavior, but then you have IsNumberLabel which just makes the generics more explicit (and should almost certainly be extending IsValueLabel to get those other super-interfaces...). Then there are the layout panels which arguably look like HasWidgets.ForIsWidget, but if IsElement gets so specific as to allow direct dom manipulation, it seems reasonable to allow layout manipulation as well. AbstractHasData and subclasses (lots of cell widgets) is a nice abstract class which already has most -- but not all -- methods declared in various interfaces. Unless we're waiting for a future patch to finish the job, I'm not yet understanding the approach in which classes get selected for this treatment and which types/methods get a pass. I don't mean for this to stand in the way of this patch, but to suggest that the strategy is sufficiently unclear that we could probably use a gwt-site doc on this or a body of javadoc that covers how these are intended to be used, and how widget authors/maintainers should behave to make their code usable by downstream users who like these interfaces for testing. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Fixes UiHandler method matching in generic classes
Goktug Gokdogan has submitted this change and it was merged. Change subject: Fixes UiHandler method matching in generic classes .. Fixes UiHandler method matching in generic classes Method matching in UiHandler is completely broken for generic ui fields as FieldWriterOfExistingType is using the raw type of the ui field. Raw type of a generic field erases all generics from the method signature. This was causing type parameter information to be not used while matching methods. This is a huge problem with some common events like SelectEvent and ValueChangeEvent. We were not hitting the problem in some cases because JRawType is broken and doesn't correctly delete the generics from the signature of parent methods. However that was causing another problem: UiBinder uses the type information for ui.xml so it doesn't really know the type parameters so it can't match generics methods from the parent class (Issue 6091). This fix changes the UiBinder generator so that - it will enhance the type information if there is a @uifield declaration - it will not use raw type in FieldWriterOfExistingType - it will fallback to erase type if it can't find any method match Bugs: Issue 6091 Change-Id: I3121542b6eb4f06f36b88b02006b155422c45726 Review-Link: https://gwt-review.googlesource.com/#/c/3250/ --- M user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java M user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java M user/test/com/google/gwt/uibinder/rebind/FieldWriterOfExistingTypeTest.java A user/test/com/google/gwt/uibinder/test/client/ExtendsValueChangeWidget.java M user/test/com/google/gwt/uibinder/test/client/UiHandlerTest.java A user/test/com/google/gwt/uibinder/test/client/ValueChangeWidget.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java M user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml D user/test/com/google/gwt/uibinder/test/client/WildcardValueChangeWidget.java 9 files changed, 238 insertions(+), 153 deletions(-) Approvals: Roberto Lublinerman: Looks good to me, approved Leeroy Jenkins: Verified diff --git a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java index c6d8a35..46e5b73 100644 --- a/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java +++ b/user/src/com/google/gwt/uibinder/rebind/FieldWriterOfExistingType.java @@ -16,7 +16,6 @@ package com.google.gwt.uibinder.rebind; import com.google.gwt.core.ext.typeinfo.JClassType; -import com.google.gwt.core.ext.typeinfo.JGenericType; /** * Implementation of FieldWriter for fields whose type already exists (that is, @@ -33,12 +32,6 @@ if (type == null) { throw new IllegalArgumentException(type cannot be null); } - -JGenericType genericType = type.isGenericType(); -if (genericType != null) { - type = genericType.getRawType(); -} - this.type = type; } diff --git a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java index cc7bc2c..a2fd077 100644 --- a/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java +++ b/user/src/com/google/gwt/uibinder/rebind/HandlerEvaluator.java @@ -25,6 +25,7 @@ import com.google.gwt.event.shared.EventHandler; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.uibinder.rebind.model.OwnerClass; +import com.google.gwt.uibinder.rebind.model.OwnerField; import com.google.web.bindery.event.shared.HandlerRegistration; /** @@ -153,10 +154,13 @@ (Method '%s' can not be bound. You probably missed ui:field='%s' + in the template.), boundMethod, objectName); } +JClassType objectType = fieldWriter.getInstantiableType(); +if (objectType.isGenericType() != null) { + objectType = tryEnhancingTypeInfo(objectName, objectType); +} // Retrieves the add handler method in the object. -JMethod addHandlerMethodType = getAddHandlerMethodForObject( -fieldWriter.getInstantiableType(), handlerType); +JMethod addHandlerMethodType = getAddHandlerMethodForObject(objectType, handlerType); if (addHandlerMethodType == null) { logger.die(Field '%s' does not have an 'add%s' method associated., objectName, handlerType.getName()); @@ -167,6 +171,23 @@ addHandlerMethodType.getName(), objectName); } } + } + + private JClassType tryEnhancingTypeInfo(String objectName, JClassType objectType) { +OwnerField uiField = ownerClass.getUiField(objectName); +if (uiField != null) { + JParameterizedType pType = uiField.getRawType().isParameterized(); + if (pType != null) { +// Even field is parameterized, it might be a super class. In that case, if
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/3500 Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Adds an accessor to original throwable from SerializableThrowable. This provides ability for client side code (e.g. a client log handler) to look into the original throwable. Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 --- M user/src/com/google/gwt/core/shared/SerializableThrowable.java 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/user/src/com/google/gwt/core/shared/SerializableThrowable.java b/user/src/com/google/gwt/core/shared/SerializableThrowable.java index cbbd612..03e993e 100644 --- a/user/src/com/google/gwt/core/shared/SerializableThrowable.java +++ b/user/src/com/google/gwt/core/shared/SerializableThrowable.java @@ -55,6 +55,7 @@ private String typeName; private boolean exactTypeKnown; + private transient Throwable originalThrowable; private StackTraceElement[] dummyFieldToIncludeTheTypeInSerialization; /** @@ -95,7 +96,7 @@ } /** - * Return {@code true} if provided type name is the exact type of the throwable that is designed + * Return {@code true} if provided type name is the exact type of the throwable that is designated * by this instance. This can return {@code false} if the class metadata is not available in the * runtime. In that case {@link #getDesignatedType()} will return the type resolved by best-effort * and may not be the exact type; instead it can be one of the ancestors of the real type that @@ -115,6 +116,24 @@ return super.initCause(fromThrowable(cause)); } + /** + * Set the original throwable that this serializable throwable is derived from. Note that, + * original throwable is kept in a transient field; that is it will not be transferred to server + * side. + */ + public void setOriginalThrowable(Throwable originalThrowable) { +this.originalThrowable = originalThrowable; + } + + /** + * Returns the original throwable that this serializable throwable is derived from. Note that, + * original throwable is kept in a transient field; that is; it will not be transferred to server + * side. In that case this method will return {@code null}. + */ + public Throwable getOriginalThrowable() { +return originalThrowable; + } + @Override public String toString() { String type = exactTypeKnown ? typeName : (typeName + (EXACT TYPE UNKNOWN)); @@ -126,6 +145,7 @@ SerializableThrowable throwable = new SerializableThrowable(null, t.getMessage()); throwable.setStackTrace(t.getStackTrace()); throwable.initCause(t.getCause()); +throwable.setOriginalThrowable(t); ThrowableTypeResolver.resolveDesignatedType(throwable, t); return throwable; } -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Fixes GWT.runAsync that was broken in a recent patch.
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/3510 Change subject: Fixes GWT.runAsync that was broken in a recent patch. .. Fixes GWT.runAsync that was broken in a recent patch. This is a regression to my previous change to GWT.runAsync to make it always run async. In the previous patch, GWT.runAsync was calling overloaded GWT.runAsync that is treated as a split point itself. Apparently, it was treated as a split point before the code was replaced for production mode. This patch avoids the problem by delegating both runAsync calls to a helper method. Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba --- M user/src/com/google/gwt/core/client/GWT.java 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/user/src/com/google/gwt/core/client/GWT.java b/user/src/com/google/gwt/core/client/GWT.java index 3d3440d..6216e27 100644 --- a/user/src/com/google/gwt/core/client/GWT.java +++ b/user/src/com/google/gwt/core/client/GWT.java @@ -258,14 +258,19 @@ * should use the same name. */ @SuppressWarnings(unused) // parameter will be used following replacement - public static void runAsync(Class? name, RunAsyncCallback callback) { -runAsync(callback); + public static void runAsync(Class? name, final RunAsyncCallback callback) { +runAsyncImpl(callback); } + /** * Run the specified callback once the necessary code for it has been loaded. */ public static void runAsync(final RunAsyncCallback callback) { +runAsyncImpl(callback); + } + + private static void runAsyncImpl(final RunAsyncCallback callback) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { callback.onSuccess(); -- To view, visit https://gwt-review.googlesource.com/3510 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If396a7f72ac533b304daf4d8afd8684d25e018ba Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Brian Slesinsky has posted comments on this change. Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Patch Set 1: Code-Review+1 (1 comment) Seems basically okay. File user/src/com/google/gwt/core/shared/SerializableThrowable.java Line 124: public void setOriginalThrowable(Throwable originalThrowable) { When would someone use the setter? -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Goktug Gokdogan has posted comments on this change. Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Patch Set 1: (1 comment) File user/src/com/google/gwt/core/shared/SerializableThrowable.java Line 124: public void setOriginalThrowable(Throwable originalThrowable) { The constructor was public (I can't remember why) so that was the reason I provided the setter but I can remove and wait until someone asks for it? -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Hello Leeroy Jenkins, Brian Slesinsky, I'd like you to reexamine a change. Please visit https://gwt-review.googlesource.com/3500 to look at the new patch set (#2). Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Adds an accessor to original throwable from SerializableThrowable. This provides ability for client side code (e.g. a client log handler) to look into the original throwable. Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Review-Link: https://gwt-review.googlesource.com/#/c/3500/ --- M user/src/com/google/gwt/core/shared/SerializableThrowable.java 1 file changed, 12 insertions(+), 1 deletion(-) -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds Element#toggleClassName.
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/3501 Change subject: Adds Element#toggleClassName. .. Adds Element#toggleClassName. Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f --- M user/src/com/google/gwt/dom/client/Element.java M user/test/com/google/gwt/dom/client/ElementTest.java 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/user/src/com/google/gwt/dom/client/Element.java b/user/src/com/google/gwt/dom/client/Element.java index c801f5d..6232db6 100644 --- a/user/src/com/google/gwt/dom/client/Element.java +++ b/user/src/com/google/gwt/dom/client/Element.java @@ -595,6 +595,18 @@ } /** + * Add the class name if it doesn't exist or removes it if does. + * + * @param className the class name to be toggled + */ + public final void toggleClassName(String className) { +boolean added = addClassName(className); +if (!added) { + removeClassName(className); +} + } + + /** * Replace one class name with another. * * @param oldClassName the class name to be replaced diff --git a/user/test/com/google/gwt/dom/client/ElementTest.java b/user/test/com/google/gwt/dom/client/ElementTest.java index 911d788..c4a2acf 100644 --- a/user/test/com/google/gwt/dom/client/ElementTest.java +++ b/user/test/com/google/gwt/dom/client/ElementTest.java @@ -34,11 +34,9 @@ return com.google.gwt.dom.DOMTest; } - public void testAddRemoveReplaceHasClassName() { + public void testAddClassName() { DivElement div = Document.get().createDivElement(); - div.setClassName(foo); -assertEquals(foo, div.getClassName()); assertTrue(div.addClassName(bar)); assertEquals(foo bar, div.getClassName()); @@ -48,12 +46,13 @@ assertFalse(div.addClassName(baz)); assertEquals(foo bar baz, div.getClassName()); + } -div.replaceClassName(bar, tintin); -assertTrue(div.getClassName().contains(tintin)); -assertFalse(div.getClassName().contains(bar)); + public void testRemoveClassName() { +DivElement div = Document.get().createDivElement(); +div.setClassName(foo bar baz); -assertTrue(div.removeClassName(tintin)); +assertTrue(div.removeClassName(bar)); assertEquals(foo baz, div.getClassName()); assertFalse(div.removeClassName(bar)); @@ -64,15 +63,42 @@ assertTrue(div.removeClassName(foo)); assertEquals(, div.getClassName()); + } + public void testHasClassName() { +DivElement div = Document.get().createDivElement(); div.setClassName(foo bar); + assertTrue(div.hasClassName(bar)); assertTrue(div.hasClassName(foo)); -div.removeClassName(foo); + +div.setClassName(bar); assertFalse(div.hasClassName(foo)); assertTrue(div.hasClassName(bar)); } + public void testToggleClassName() { +DivElement div = Document.get().createDivElement(); +div.setClassName(foo bar baz); + +div.toggleClassName(bar); +assertEquals(foo baz, div.getClassName()); + +div.toggleClassName(bar); +assertEquals(foo baz bar, div.getClassName()); + } + + public void testReplaceClassName() { +DivElement div = Document.get().createDivElement(); +div.setClassName(foo bar baz); + +div.replaceClassName(bar, tintin); +assertEquals(foo baz tintin, div.getClassName()); + +div.replaceClassName(bar, tintin2); +assertEquals(foo baz tintin tintin2, div.getClassName()); + } + public void testIndexOfName() { assertEquals(-1, Element.indexOfName(, foo)); -- To view, visit https://gwt-review.googlesource.com/3501 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Brian Slesinsky has posted comments on this change. Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Patch Set 2: Code-Review+2 (1 comment) File user/src/com/google/gwt/core/shared/SerializableThrowable.java Line 120:* Returns the original throwable that this serializable throwable is derived from. Note that, Note that the -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 2 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds an accessor to original throwable from SerializableThro...
Hello Leeroy Jenkins, Brian Slesinsky, I'd like you to reexamine a change. Please visit https://gwt-review.googlesource.com/3500 to look at the new patch set (#3). Change subject: Adds an accessor to original throwable from SerializableThrowable. .. Adds an accessor to original throwable from SerializableThrowable. This provides ability for client side code (e.g. a client log handler) to look into the original throwable. Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Review-Link: https://gwt-review.googlesource.com/#/c/3500/ --- M user/src/com/google/gwt/core/shared/SerializableThrowable.java 1 file changed, 12 insertions(+), 1 deletion(-) -- To view, visit https://gwt-review.googlesource.com/3500 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6856ca06f85af0165eea5ff6ac3015081b579352 Gerrit-PatchSet: 3 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Brian Slesinsky skybr...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds Node#removeAllChildren.
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/3511 Change subject: Adds Node#removeAllChildren. .. Adds Node#removeAllChildren. Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916 --- M user/src/com/google/gwt/dom/client/Node.java M user/test/com/google/gwt/dom/client/NodeTest.java 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/user/src/com/google/gwt/dom/client/Node.java b/user/src/com/google/gwt/dom/client/Node.java index 7433829..0f34f1e 100644 --- a/user/src/com/google/gwt/dom/client/Node.java +++ b/user/src/com/google/gwt/dom/client/Node.java @@ -292,6 +292,15 @@ }-*/; /** + * Remove all children of the node. + */ + public final native Node removeAllChildren() /*-{ +while (this.lastChild) { + this.removeChild(this.lastChild); +} + }-*/; + + /** * Removes this node from its parent node if it is attached to one. */ public final void removeFromParent() { diff --git a/user/test/com/google/gwt/dom/client/NodeTest.java b/user/test/com/google/gwt/dom/client/NodeTest.java index fe9935f..eddaf4b 100644 --- a/user/test/com/google/gwt/dom/client/NodeTest.java +++ b/user/test/com/google/gwt/dom/client/NodeTest.java @@ -40,7 +40,7 @@ // divfoobutton/bar/div DivElement div = doc.createDivElement(); Text txt0 = doc.createTextNode(foo); -ButtonElement btn0 = doc.createButtonElement(); +ButtonElement btn0 = doc.createPushButtonElement(); Text txt1 = doc.createTextNode(bar); body.appendChild(div); @@ -49,7 +49,7 @@ div.appendChild(txt1); // appendChild, insertBefore -ButtonElement btn1 = doc.createButtonElement(); +ButtonElement btn1 = doc.createPushButtonElement(); // divfoobtn0/barbtn1//div div.appendChild(btn1); @@ -88,6 +88,23 @@ assertEquals(txt0, div.getFirstChild()); } + public void testRemoveAllChildren() throws Exception { +Document doc = Document.get(); +BodyElement body = doc.getBody(); + +DivElement div = doc.createDivElement(); +div.appendChild(doc.createTextNode(foo)); +div.appendChild(doc.createAnchorElement()); +div.appendChild(doc.createTextNode(bar)); +body.appendChild(div); + +assertEquals(fooa/abar, div.getInnerHTML()); + +div.removeAllChildren(); +assertEquals(, div.getInnerHTML()); +assertEquals(0, div.getChildCount()); + } + /** * setAttribute, getAttribute, hasAttributes, hasAttribute. */ -- To view, visit https://gwt-review.googlesource.com/3511 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Move StackTraceDeobfuscator from core.server.impl to core.se...
Goktug Gokdogan has uploaded a new change for review. https://gwt-review.googlesource.com/3512 Change subject: Move StackTraceDeobfuscator from core.server.impl to core.server. .. Move StackTraceDeobfuscator from core.server.impl to core.server. This patch moves StackTraceDeobfuscator to core.server as the API is finalized. Change-Id: Ic84f3b2210e3c40f0f7dc41bdeea9d13bf1a4dc6 --- D user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java M user/src/com/google/gwt/junit/server/JUnitHostImpl.java M user/src/com/google/gwt/logging/server/RemoteLoggingServiceImpl.java M user/src/com/google/gwt/logging/server/RemoteLoggingServiceUtil.java M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java M user/src/com/google/web/bindery/requestfactory/server/Logging.java M user/test/com/google/gwt/user/server/rpc/LoggingRPCTestServiceImpl.java 7 files changed, 6 insertions(+), 442 deletions(-) diff --git a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java b/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java deleted file mode 100644 index 2d62b5c..000 --- a/user/src/com/google/gwt/core/server/impl/StackTraceDeobfuscator.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Copyright 2013 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. - */ -package com.google.gwt.core.server.impl; - -import com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerFactory; -import com.google.gwt.thirdparty.debugging.sourcemap.SourceMapping; -import com.google.gwt.thirdparty.debugging.sourcemap.proto.Mapping; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Scanner; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Deobfuscates stack traces on the server side. This class requires that you have turned on - * emulated stack traces, via codelt;set-property name=compiler.stackMode value=emulated - * /gt;/code in your code.gwt.xml/code module file for browsers that don't support - * sourcemaps or codelt;set-property name=compiler.useSourceMaps value=true/gt;/code for - * browsers that support it (e.g. Chrome), and moved your symbol map files to a location accessible - * by your server-side code. You can use the GWT compiler code-deploy/code command line - * argument to specify the location of the folder into which the generated codesymbolMaps/code - * directory is written. By default, the final codesymbolMaps/code directory is - * codewar/WEB-INF/deploy/iyourmodulename/i/symbolMaps//code. - */ -public abstract class StackTraceDeobfuscator { - - /** - * Creates a deobfuscator that loads symbol and source map files under given resource path. Uses - * StackTraceObfuscator's {@link ClassLoader}. - */ - public static StackTraceDeobfuscator fromResource(String symbolMapsPath) { -final String basePath = symbolMapsPath.endsWith(/) ? symbolMapsPath : symbolMapsPath + /; -final ClassLoader classLoader = StackTraceDeobfuscator.class.getClassLoader(); -return new StackTraceDeobfuscator() { - protected InputStream openInputStream(String fileName) throws IOException { -String filePath = basePath + fileName; -InputStream inputStream = classLoader.getResourceAsStream(filePath); -if (inputStream == null) { - throw new IOException(Missing resource: + filePath); -} -return inputStream; - } -}; - } - - /** - * Creates a deobfuscator that loads symbol and source map files from the given directory. - */ - public static StackTraceDeobfuscator fromFileSystem(final String symbolMapsDirectory) { -return new StackTraceDeobfuscator() { - protected InputStream openInputStream(String fileName) throws IOException { -return new FileInputStream(new File(symbolMapsDirectory, fileName)); - } -}; - } - - /** - * Creates a deobfuscator that loads symbol and source map files beneath the given URL. - */ - public static StackTraceDeobfuscator fromUrl(final URL urlPath) { -return new
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Stephen Haberman has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: Hi Colin, the only approach in selecting classes is that these are what I'd used so far, plus a few others. For the remaining 10%-ish, I could add the low-hanging fruit in this CL, but I could also see adding them lazily/in a future patch. Either way I would anticipate having them eventually. Good catch on IsNumberLabel not extending IsValueLabel; fixed (but not uploaded yet). Adding documentation/guidelines is a good idea; assuming/after this gets +2'd (but before a release), I'll add something to the gwt site. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds Node#removeAllChildren.
Daniel Kurka has posted comments on this change. Change subject: Adds Node#removeAllChildren. .. Patch Set 1: (3 comments) File user/src/com/google/gwt/dom/client/Node.java Line 303: /** Is there a reason to do this in JSNI, instead of Java? File user/test/com/google/gwt/dom/client/NodeTest.java Line 43: ButtonElement btn0 = doc.createPushButtonElement(); why did you change this? Line 52: ButtonElement btn1 = doc.createPushButtonElement(); same here -- To view, visit https://gwt-review.googlesource.com/3511 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic607bf6523a41c0ee4020a12e8505b1d8b39d916 Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-HasComments: Yes -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Add interfaces for widgets.
Stephen Haberman has posted comments on this change. Change subject: Add interfaces for widgets. .. Patch Set 8: Hi Goktug, Being said that, rest assured, I wouldn't -1 for just not using it. Good, good--sorry if I got a bit long winded. I do appreciate your feedback, and have spent several episodes mulling over how I could abuse Java to get widget stubs working as I'd like. I certainly want to avoid these interfaces becoming the next Request Factory, which in 2 years we end up regretting having gotten into GWT core. I'll play around a little bit. -- To view, visit https://gwt-review.googlesource.com/3231 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd17162d37e367720829bcdaf9a350e446c833b9 Gerrit-PatchSet: 8 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Colin Alworth niloc...@gmail.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-Reviewer: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org Gerrit-Reviewer: Stephen Haberman stephen.haber...@gmail.com Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[gwt-contrib] Change in gwt[master]: Adds Element#toggleClassName.
Daniel Kurka has posted comments on this change. Change subject: Adds Element#toggleClassName. .. Patch Set 1: Code-Review+2 -- To view, visit https://gwt-review.googlesource.com/3501 To unsubscribe, visit https://gwt-review.googlesource.com/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b2a507d5ee8482a91aae28c9dc9a6b6826afb2f Gerrit-PatchSet: 1 Gerrit-Project: gwt Gerrit-Branch: master Gerrit-Owner: Goktug Gokdogan gok...@google.com Gerrit-Reviewer: Daniel Kurka danku...@google.com Gerrit-HasComments: No -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups GWT Contributors group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.