Re: Images in server folder (store and access)
I guess you need to generate the images in war/images - Abdullah On Thu, Feb 11, 2010 at 10:27 PM, K. K. Forest ralf.bie...@gmail.comwrote: To extend on this, when generating an image (I am operating in hosted mode) it puts it into MyEclipseProject/images, but when running the service (in hosted mode) it tries to find it in MyEclipseProject/war/ images. Does this mean that I cannot test this in hosted mode but only in fully deployed mode? Is there a trick to link these two folders so that I can use generative content without an extra deployment step? Ralf -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
ClientBundle; Best Practices
While planning a new Application I'm trying to figure out how to best design it to get the most out of the whole ClientBundle thing. But I'm trying to figure out how to use the bundles in ways that they (1) were intended to be and (2) that fit my needs; * Is the goal to have a single Resource class at the top-level that inherits all the resources used by that application? Is there some penalty to having separate resources created with GWT.create? * For CSS, should my app inject the CSS or should the users of the resource do that themselves using #ensureInjected() ? * Is there a good way of styling a Widget in different ways, but still using a single top-level resource? Think a WindowPanel and a DialogPanel, both inherits a popup panel but wants to style it differently; interface WindowResources extends PopupResources { } interface DialogResources extends PopupResources { } interface AppResources extends WindowResources, DialogResources { ... } If a top-level resource like AppResource can't inherit both WindowResources and DialogResources, how would one structure the resources so that WindowPanel and DialogPanel can have their separate looks? * If you want to style your application differently than the default GWT look, you fork the theme module and alter the CSS to fit your needs. Possible you add some extra style-names to some of your widgets. All and all, it's quite simple to change the appearance of the standard widgets. How will this work with client bundles in the future? Will all standard Widgets accept a Resource class as first constructor argument? And if you want a different look to your application, you need always to pass resources around? Thanks Johan -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
valantine images
Feel free to download any of the images. Just right click and Save As... VALENTINE'S DAY. IMAGES, BACKGROUND, BORDERS ... You can select among 200+ images. .. http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1003278afsid=1 http://deve12.regeasy.hop.clickbank.net/ http://www.cuteonly.com/?a_aid=bcc2d3c1a_bid=d75df85d http://secure.bidvertiser.com/performance/bdv_rd.dbm?enparms2=1229,492206,986500,1180,1279,1239,1274,1263,1735,1184,1243,497761,176068,81506,1179,1179,-159204988ioa=0ncm=1bd_ref_v=http://operationalrisk.50webs.com/TREF=1WIN_NAME=nullfrdto=jloc=http://bdv.bidvertiser.com/bidvertiser.dbm%3Fpid%3D201326%26bid%3D491027%26RD%3D37%26DIF%3D1%26bd_ref_v%3Dhttp%253A//operationalrisk.50webs.com/%26tref%3D1%26win_name%3Dnull%26docref%3D%26jsrand%3D72645%26js1loc%3Dhttp%253A//operationalrisk.50webs.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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Using external styles with UiBinder error
I started using the UiBinder for various forms in my application. I have created a UiStyles.css (with a CssResource interface called Css) under the main client package and would like to use that in all packages across the application. The problem is I am using a sprite in the stylesheet for a background image as: @sprite .datebox { gwt-image:calendar; width : 150px !important; height : 24px !important; padding : 2px; background-position : right center !important; } and I refer to the stylesheet in the ui.xml as: ui:style src='../UiStyles.css' / and for the sprite I have the following line in the ui.xml : ui:image field=calendar src='../StaticResources/images/ calendar.png' / Now I thought I should only need this in the ui.xml file that is using the .datebox style. But I see that if I refer to the UiStyles.css in any ui.xml (even if it does use the above sprite), it requires the ui:image field=calendar src='../StaticResources/images/ calendar.png' / otherwise it fails to compile [ERROR] Unable to find ImageResource method calendar in ... packagename -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT UIBinder - unrecognized text in g:VerticalPanel
I have a rather complete explanation here. http://h2g2java.blessedgeek.com/2010/02/tutorial-gwt-rpc-stub-modified-with.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: SOP in GWT 2.0
GWT.getModuleBaseURL() - in Hosted Mode http://localhost:/ModuleName - in Compiled Version file://C:/PathToEclipseWorkspace/ModuleName/WAR/ On 10 Feb., 15:29, lhoracek lhora...@softeu.com wrote: Did you tried to see what URL/URI the browser requests before that SOP Exception? Im going through cross-domain comunication right now too .. but i done it through the iframe -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
File upload problem
I'm trying to upload a file using GWT + GAE. I want to store the file as a BLOB, but i can't get there because i can't make the request: my code is: final FormPanel form = new FormPanel(); form.setAction(/ebas/fileservice); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.setMethod(FormPanel.METHOD_POST); ... submit on click i get this exception: Content-Type was 'multipart/form-data; boundary=---15625134051197559972520180008'. Expected 'text/x-gwt-rpc' if i set this: form.setEncoding(text/x-gwt-rpc); i get javax.servlet.ServletException: Content-Type was 'application/x-www- form-urlencoded'. Expected 'text/x-gwt-rpc'. What's the problem? and how do i handle the request since i can't override doPost method ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Getting error $doc.getBoxObjectFor is not a function in Firefox 3.6
Resolved this in GWT 1.4 (we're version locked due to WAS 6.0) by modifying the com/google/gwt/user/client/impl/DOMImplMozilla.java file in gwt-user.jar. I assume a similar strategy would work in later versions of GWT. Replace the implementations of the getAbsoluteLeft and getAbsoluteTop methods with: return elem.getBoundingClientRect().left - $doc.documentElement.getBoundingClientRect().left; and return elem.getBoundingClientRect().top - $doc.documentElement.getBoundingClientRect().top; respectively. Links I found helpful: http://stackoverflow.com/questions/1018997/gwt-javascript-exception-in-hosted-mode-result-of-expression-doc-getboxobjectfo https://bugzilla.mozilla.org/show_bug.cgi?id=409111#c14 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Need help with Table!!!!
i have build what u r looking for... a grid with header, scrolling, grid Title and pagination use VerticalPanel, add inside it Horizontal Panel for the title and anything else u want. then add a scrollPanel which will contain the grid... for the grid. add a class and extend the GWT grid.. add function to take a list of string to build the header, and a two dimensional array with the same width of the header array to add the data. u need to add OnClick, OnMouseEnter, and OnMouseLeave events for the grid to select and to change the color of the rows when the mouse moves over it... and that is it u have what u r looking for. if u need any help please let me know On Thu, Feb 11, 2010 at 7:32 PM, SergeZ comp1...@gmail.com wrote: Please, help I searching for a very simple solution for how to build a Table!!! I need a simple table with Titles in columns and selectable rows( for possibility to get field from selected string ) and with the possibility to scroll table . I had searched a lot of sites and libraries but they are very featured - it is unnecessary for me. I want to build table as I described above. I know that I should be very easy but I cunfused yet about it. I tried to use DataTable and put it in Table.draw() method, but the app crashes before completly loads. It crashed with cannot load module ... error message!!! Please, help me!!! I suppose that it should be developed with standart GWT2.0's features and with Visualization library. Thanks a lot for you attention to my post -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- ~~~With Regards~~~ Muhannad Dar-Nasser ~~Computer Systems Engineering~~ -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: File upload problem
ok... so... i found it works with a HttpServlet and i fond a way to get the input stream using some jars from apache (http:// code.google.com/appengine/kb/java.html#fileforms). Should i understand that i can't use a RemoteServiceServlet (GWT) ? or should i change method to METHOD_GET (does that work ?) On Feb 12, 3:18 pm, Ice13ill andrei.fifi...@gmail.com wrote: I'm trying to upload a file using GWT + GAE. I want to store the file as a BLOB, but i can't get there because i can't make the request: my code is: final FormPanel form = new FormPanel(); form.setAction(/ebas/fileservice); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.setMethod(FormPanel.METHOD_POST); ... submit on click i get this exception: Content-Type was 'multipart/form-data; boundary=---15625134051197559972520180008'. Expected 'text/x-gwt-rpc' if i set this: form.setEncoding(text/x-gwt-rpc); i get javax.servlet.ServletException: Content-Type was 'application/x-www- form-urlencoded'. Expected 'text/x-gwt-rpc'. What's the problem? and how do i handle the request since i can't override doPost method ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT in Dev-Mode works only on IE6
Ok! I've got it! I had problems because I had 3 different versions of gwt.xml - one for tests, one for production and one for common use. Dev-mode tried to load them all, and in one version of .gwt.xml there was only ie6 in user.agent. So my FF was able to work correctly just after I started my dev-mode, because it didn't load all three versions of config-file yet. On 10 Lut, 17:05, SokoleOko karolsto...@gmail.com wrote: Hello! My GWT application works only in IE6 in Dev-Mode. When I try Firefox or Chrome it bahaves just like I was using IE6 - so it uses DomImplIE6 and other classes designed for this browser. When I try setting user.agent to gecko1_8 (without IE6) it still works fine on IE6 and withous success in FF. Sometimes the application works fine on FF just after I run the Dev- Mode, but when I refresh it - it fails because GWT has Rules to call IE6 implementations instead of FF. com.google.gwt.core.client.JavaScriptException: (NS_ERROR_DOM_INVALID_CHARACTER_ERR): String contains an invalid character code: 5 INDEX_SIZE_ERR: 1 DOMSTRING_SIZE_ERR: 2 HIERARCHY_REQUEST_ERR: 3 WRONG_DOCUMENT_ERR: 4 INVALID_CHARACTER_ERR: 5 NO_DATA_ALLOWED_ERR: 6 NO_MODIFICATION_ALLOWED_ERR: 7 NOT_FOUND_ERR: 8 NOT_SUPPORTED_ERR: 9 INUSE_ATTRIBUTE_ERR: 10 INVALID_STATE_ERR: 11 SYNTAX_ERR: 12 INVALID_MODIFICATION_ERR: 13 NAMESPACE_ERR: 14 INVALID_ACCESS_ERR: 15 VALIDATION_ERR: 16 TYPE_MISMATCH_ERR: 17 result: 2152923141 filename:http://127.0.0.1: lineNumber: 93 columnNumber: 0 inner: null data: null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java: 195) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java: 120) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java: 507) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java: 264) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java: 91) at com.google.gwt.dom.client.DOMImplTrident.createButtonElement(DOMImplTrident.java) at com.google.gwt.dom.client.Document$.createPushButtonElement$ (Document.java:834) at com.google.gwt.user.client.ui.Button.init(Button.java:69) at com.google.gwt.user.client.ui.Button.init(Button.java:79) at com.xxx.xxx.client.ui.RightPanel.init(RightPanel.java:26) where line 26 in RightPanel.java is: private final Button btnOk = new Button(New Button); The application works fine on FF when not in Dev-Mode. Any ideas what can be wrong? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Local events dispatch/handling. Don't wanna go through the EventBus...
I don't see any reason why the TabPresenter can't listen for events on the main event bus. People talk about not wanting to crowd the event bus. I'm not sure what they mean by this, though I can think of three things: 1. Volume of events 2. Diversity of event types 3. Number of registered event handlers For the first one, you have to remember that you're running in Javascript in a web browser. When you post an event to the event bus, it gets processed and all listeners are notified immediately, in series. The event bus isn't holding on to events until some processing thread wakes up to process them, so there's never a backlog of events to process. Incidentally, you also have to keep this in mind when choosing the order of events when you have multiple events to fire. When it comes to diversity of event types, handlers are registered for particular event types and are put into different buckets based on that type. When the event bus goes to choose the handlers, it knows the event type and can locate them quickly. Before moving to HandlerManager, I wrote my own event bus that was simply a HashMap of event type to Collection of handlers. Looking at the source for HandlerManager, that's exactly what it does as well. Assuming GWT's Javascript implementation of HashMap is reasonably efficient, having handlers for many different types of events shouldn't be a problem. As for the number of event handlers registered, that shouldn't actually get too out of control in practice. No matter how large the application is, the scope of what the event bus needs to handle at any one time is limited to what's displayed in the browser at one time. If a view is hidden, it shouldn't have any handlers registered (aside from maybe a place change handler). This is addressed during the Q A of Ray Ryan's Google I/O talk (around 46:00 - 49:00) and Ray's answers are excellent. To reiterate one very important part of that (as I don't feel it's emphasized enough): you always have to be careful to unregister any handlers when they become irrelevant (such as when a view is dismissed or replaced with a different view). As long as you do that, the size of the application becomes largely irrelevant. There are two cases I can think of where having a separate event bus might be useful: 1. Prioritizing event delivery 2. Automatic clean-up of event handlers When using a single HandlerManager, you don't have much control over the order that event handlers are notified; it depends entirely on the order in which they were added and whether the HandlerManager instance is configured to fire handlers in reverse order. If you have a local event and you want to make sure that, for example, the related view gets first stab at it, you could create a local event bus that will automatically propagate the event to the global event bus where the less important handlers are registered. I think that these cases would be rare, and you can get the same effect by chaining two events/ handlers rather than two event busses. Finally, it would be nice if you could create a local HandlerManager that would clean up all of its handlers automatically when the view changes. I don't think that the current HandlerManager implementation does anything like this. It could probably be done, but would still require discipline to explicitly deconstruct HandlerManager instances when they're no longer needed. Plus, it could be confusing for the object owning the handler for it to be implicitly unregistered. -Brian On Jan 29, 5:05 am, Abdullah Shaikh abdullah.shaik...@gmail.com wrote: Hi Thomas, I understand EventBus is for decoupling things .. but I guess there are sometimes where you would want to use multiple (local) event bus. I don't know may be I am missing something .. let me explain you my case I have a DockPanel where I have added Widgets (panels) on West, Center East directions. The panel on the west side contains navigation links and when clicked the content is displayed on the center panel. I was able to do the above navigation displaying because the DockPanel was the part of main presenter/view and I could easily access the DockPanel and change the content of center panel. But there is a time when I have a TabPresenter (which has a Tabpanel) into my center panel, and in the first panel of TabPanel there is a button which should fetch some data from server and display it in the second panel of TabPanel. Now if I do this using the app wide EventBus bus, I won't have access to the TabPanel because it's inside of TabPresenter, in the app wide EventBus I could only create TabPresenter and add it to center panel but cant access TabPanel. or should I have getTabPanel in Dispay of TabPresenter and manipulate it in app wide eventbus ? I don't think this should be done like this. a local EventBus which will be a part of TabPresenter will be good for this case I guess. - Abdullah On Fri, Jan 29, 2010 at 3:00 PM, Thomas Broyer
GWT Gears WorkerPool
I am using the GWT Gears WorkerPool API. I am trying to figure out if there is a way to call methods implemented in Java from the worker's java script implementation ? I am not sure if this is a duplicate post. If it is, apologies and please delete it. Ruchir. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Resize of div's
HI, I'm currently facing the following problem and hope someone can help me out : e.g. ..div id=content div id=widget /div /div div id=footer /div ... i insert the GWT app i create not into the body but into a div id=widget. The problem is that as the widget gets bigger (e.g. inserting more labels into a vertcalpanel) the wrapping div-content does not. Although both have the css property height:100%; div-footer contains a footer image and this is than gets overlapped by the widget. TIA , Vladi -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Source code availability to the GWT Compiler
We also use the Maven sources JAR approach. The .class and .java do NOT have to be in the same JAR file. The GWT compiler will just need the sources JAR on the classpath, which you can accomplish via Maven dependency management, as you have stated. The only problem I found using the Maven provided scope is that provided scope is currently not transitive. So if you have project A depend on project B, which depends on project C, and project C builds a sources JAR for GWT, then you can't use provided scope if you want the GWT compile to happen with project A. To work around this, we simply use excludes to prevent the sources JARs from being included in the final WAR. Also note that if you build test JARs, test dependencies are not transitive. There is a JIRA issue to fix this: http://jira.codehaus.org/browse/MNG-1378. -Richard On Feb 5, 4:09 pm, Micah mkwhita...@gmail.com wrote: I acknowledge that the source needs to be available for the gwt compiler but I still question if the source needs to be in the same jar as the compiled endstates you'd ship to a client. Is there documentation that states the requirements (location/conditions) for providing source code to the gwt compiler? I guess I'm asking in general as opposed to specifically using the gwt-maven-plugin. I'm still testing this out but it seems like it should work as long as a jar with the source code is on the classpath. The approach I'm trying to take is to follow themavenstandard of producing a *-sources.jar during the build of the first module. Then all consuming modules will list the standard jar as a compile scoped dependency and thesourcesjar as a provided scoped dependency. If this is going to take me down a road of pain I'd like to know ahead of time. Thanks for your help, Micah On Feb 5, 6:00 am, getaceres getace...@gmail.com wrote: Yes, they have to be in the same jar, so you have to include this lines in your pom.xml: build . resources resource directorysrc/main/java/directory /resource resource directorysrc/main/resources/directory /resource /resources . /build On 4 feb, 23:08,Micahmkwhita...@gmail.com wrote: I currently have a GWT app that I'm looking to break into separate modules. The build system is currently Maven2 and utilizing the gwt- maven-plugin[1]. When reading over the documentation on how to do this, I wonder what exactly are the requirements around the source code for a module being available for packaging another module. Does the source (*.java) have to be in the same jar or does it just have to be on the classpath? Maven'sgeneral approach is to make source available in a secondary artifact using themaven-source-jar[2]. This is nice because it removes bloat from my endstates but also I don't have to worry about shipping source code to each of my clients. So do I have to have *.java files in my jar or are there other means of accomplishing this to make the GWT compiler happy? Thanks for your help, Micah [1] -http://mojo.codehaus.org/gwt-maven-plugin/user-guide/multiproject.html [2] -http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to invoke GWT entry point from external java script
String referral = Window.Location.getParameter(referral); On Feb 11, 10:26 am, ramesh chiluverirame...@gmail.com wrote: Hai All, I am new to GWT. i am facing problem to call my GWT entry point class from out side script. Can any one explain ,how can i invoke my GWT application from outside script?? and i need to pass parameter like referral=abc to my entry point. my application will work in hosted mode if i give url like.. http://localhost:/pacakgename/home.html?referral=abc Please advise me ... Thank you -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to invoke GWT entry point from external java script
String referral = Window.Location.getParameter(referral); On Feb 11, 10:26 am, ramesh chiluverirame...@gmail.com wrote: Hai All, I am new to GWT. i am facing problem to call my GWT entry point class from out side script. Can any one explain ,how can i invoke my GWT application from outside script?? and i need to pass parameter like referral=abc to my entry point. my application will work in hosted mode if i give url like.. http://localhost:/pacakgename/home.html?referral=abc Please advise me ... Thank you -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Calling Java code from within Gears WorkerPool worker
Hi, Is it possible to call a java method from the Gears WorkerPool's worker's java script code ? Ruchir. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT Plugin on Firefox 3.6 (linux) not working
Distro: Arch Linux Same problem as vali. Any word on Chrome/Chromium support? Cheers On Feb 3, 8:34 am, vali valentin.kol...@googlemail.com wrote: Hello I hope i'm right here with my problem. If not, please inform me and i'm sorry about that. When i read that the new GWT-plugin update added FF3.6support i updated my browser on linux. Unfortunately it doesn't work. It says install plugin, downloads the ~3m, installs and needs to be restarted, but the same massage will show up again. It's just like i didn't install it at all. Uninstall the plugin and make a fresh install doesn't help. I also tested in VM; on windows i got no problems on ff3.6, everything works well. I read about this yet on other boards, but with no helpful answers. Maybe you know something about that. Thank you Vali PS: i'm running arch linux (rolling release) w/ 2.6.32 i686 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT 2.0.1 + Low Level API of GAE
Can anyone provides me the well understandable example of use of low level API with GWT 2.0.1? I have one grid in which there will be three columns and 2 rows. Coulmns : Field Name, Field Type, Field Type Row1: Id, String, 100 Row2: fName, int, 10 I want to pass this values to datastore and fetch it whenever required. I am using low level apis to do this thing. Anyone have comment on this? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Generalpath
I have an AWT application that draws some products using lines and arcs, fills, etc (java2d stuff) and creates a GeneralPath that ultimately gets drawn in the Swing JPanel (presentation layer). If the UI of the application is all written in GWT (instead of swing, and use GWT RPC for communication with the server side AWT services), can the server side (awt code) still create the same GeneralPath and have the GWT UI draw it (similar to d.draw(myDrawing))? If not what would the solution be? I need to see how easy will this be before jumping into a GWT conversion project. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Generator sourse 5
I write a generator for my JPA entities for convinient using of gwt- ext Record. But my entities use annotations and generator tell me: could not parse error message: com\huskon\rria\office\entity \User.java(com\huskon\rria\office\entity:User.java):26: annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) @Entity ^ And so on... I use maven for building project (http://mojo.codehaus.org/gwt-maven- plugin/). My question is how to unable java 1.5 code generation? (GWT 2.0.1) With best regards, Den Bardadym. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Local events dispatch/handling. Don't wanna go through the EventBus...
I also don't like the EventBus approach. In my opinion, it decouples exactly the wrong things: While it acts like something you can just throw events onto, and you don't have to care who will handle them, in the end you actually do care. So the coupling is invisible, but logically it's still there. Things get really nasty, as soon as event handlers have to be coordinated (meaning they're not 100% independent). The 'fireInReverseOrder' field of the HandlerManager class is symptomatic. What we've got here is basically a publisher subscriber pattern, which is a great pattern, if and only if the publisher and all subscribers are absolutely independent (like in a message feed). But with GUIs that's very often not the case. So instead of using an EventBus, I'd do the following: Introduce an 'Operation' interface, and inject operations into your presenters. The presenter then binds these operations. So you get decoupling, testability [*], and allows for much better static analysis of your code. In the projects that I've tried both approaches (non-GWT projects), I found the difference is huge, especially when you encounter a bug. Chris [*] Note: Avoids the ServiceLocator pattern, so it doesn't violate the law of demeter http://en.wikipedia.org/wiki/Law_Of_Demeter . The EventBus basically plays the role of a ServiceLocator from the sender's and receiver's point of view. You don't really know what's in there, and you use the EventBus to get the thing that you actually want indirectly. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0.0 JPEG errors with JAI and JAI-IMAGEIO
I am having this exact same error with GWT 2.0.0. I upgraded to GWT 2.0.1 and it fixed the problem. However, I hear there is a regression with 2.0.1 and the developers are working on getting 2.0.2 out soon. The only issue I saw tagged for 2.0.2 is this one: http://code.google.com/p/google-web-toolkit/issues/detail?id=4584 That happens to not be a problem for us. -Richard On Dec 9 2009, 2:15 pm, Thad thad.humphr...@gmail.com wrote: I am using Sun's Java Advanced Imaging (JAI) and Java Advanced Imaging- Image I/O (JAI-IMAGEIO) on the server side of my application for reading and processing TIFF's and other images which are then scaled, converted to PNG, and sent to the browser. Today I downloaded and installed GWT 2.0.0. In attempting to run the sample Showcase, I receive javax.imageio.IIOException's on the JPG images, like jimmy.jpg. This happens only if the $JAVA_HOME I'm using hasJAIandJAI-IMAGEIO installed. WithoutJAI, the JPGs open fine. (Note: Yesterday with GWT 2.0.0 RC2 I was able to modify the JPGs by converting them to/from PNG but that trick is not working today). The stack trace strikes me as screwy, since the images start with the proper 0xff 0xd8 0xff 0xe0: 00:00:22.020 [ERROR] Unable to read image resource javax.imageio.IIOException: Not a JPEG file: starts with 0xff 0xd9 at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader (Native Method) at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader (JPEGImageReader.java:517) at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly (JPEGImageReader.java:272) at com.sun.imageio.plugins.jpeg.JPEGImageReader.getNumImages (JPEGImageReader.java:324) at com.google.gwt.resources.rg.ImageBundleBuilder.addImage (ImageBundleBuilder.java:685) at com.google.gwt.resources.rg.ImageBundleBuilder.assimilate (ImageBundleBuilder.java:623) at com.google.gwt.resources.rg.ImageResourceGenerator.prepare (ImageResourceGenerator.java:234) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initA ndPrepare (AbstractClientBundleGenerator.java:556) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initA ndPrepare (AbstractClientBundleGenerator.java:582) at com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.gener ate (AbstractClientBundleGenerator.java:204) at com.google.gwt.dev.javac.StandardGeneratorContext.runGenerator (StandardGeneratorContext.java:418) at com.google.gwt.dev.cfg.RuleGenerateWith.realize (RuleGenerateWith.java:38) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind (StandardRebindOracle.java:108) at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind (StandardRebindOracle.java:54) at com.google.gwt.dev.shell.StandardRebindOracle.rebind (StandardRebindOracle.java:154) at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind (ShellModuleSpaceHost.java:119) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java: 531) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate (ModuleSpace.java:414) at com.google.gwt.dev.shell.GWTBridgeImpl.create (GWTBridgeImpl.java:39) at com.google.gwt.core.client.GWT.create(GWT.java:98) at com.google.gwt.sample.showcase.client.Showcase.clinit (Showcase.java:151) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName (ModuleSpace.java:580) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java: 348) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule (OophmSessionHandler.java:185) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection (BrowserChannelServer.java:380) at com.google.gwt.dev.shell.BrowserChannelServer.run (BrowserChannelServer.java:222) at java.lang.Thread.run(Thread.java:619) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
ScrollPanel (scrollbar) CSS
Hello, Does anyone know how to change the scrollpanel CSS (specifically I want to make the scrollbar a different colour). Any example CSS or tips would be much appreciated (it's not in the GWT showcase). Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: ScrollPanel (scrollbar) CSS
Simply copy the ScrollPanel css from the google css file. Change de gwt-ScrollPanel name to whatever you want, but only change the primary name. Then, you have to call setStylePrimaryName on your scrollbar. Finally, you change the css as you wish. Christian On Fri, Feb 12, 2010 at 11:38 AM, RPB robbol...@gmail.com wrote: Hello, Does anyone know how to change the scrollpanel CSS (specifically I want to make the scrollbar a different colour). Any example CSS or tips would be much appreciated (it's not in the GWT showcase). Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT 2.0.1 + Low Level API of GAE
Hi. GWT is not directly related to the GAE datastore, but I assume you mean that you want to be able to pass entities between client and server. This can be done both with JDO and detachable entities, or you should have a look at the objectify framework that wraps the low level api. JDO stuff: http://code.google.com/appengine/docs/java/datastore/ Objectify: http://code.google.com/p/objectify-appengine/ On Feb 12, 1:31 pm, vbjain webash...@gmail.com wrote: Can anyone provides me the well understandable example of use of low level API with GWT 2.0.1? I have one grid in which there will be three columns and 2 rows. Coulmns : Field Name, Field Type, Field Type Row1: Id, String, 100 Row2: fName, int, 10 I want to pass this values to datastore and fetch it whenever required. I am using low level apis to do this thing. Anyone have comment on this? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: ScrollPanel (scrollbar) CSS
Thanks for the suggestion, but ScrollPanel doesn't exist in standard.css (or if i've missed it, could you please post the google css here?) I've been trying a couple of things. The most successful is the below which works on IE but not Firefox or Chrome. Any other ideas? . .scroll{ scrollbar-3dlight-color:#FFD700; scrollbar-arrow-color:#00; scrollbar-base-color:#FF6347; scrollbar-darkshadow-color:#FFA500; scrollbar-face-color:#008080; scrollbar-highlight-color:#FF69B4; scrollbar-shadow-color:#FF00FF; } .. g:ScrollPanel styleName='{style.scroll}' On Feb 12, 4:42 pm, Christian Goudreau goudreau.christ...@gmail.com wrote: Simply copy the ScrollPanel css from the google css file. Change de gwt-ScrollPanel name to whatever you want, but only change the primary name. Then, you have to call setStylePrimaryName on your scrollbar. Finally, you change the css as you wish. Christian On Fri, Feb 12, 2010 at 11:38 AM, RPB robbol...@gmail.com wrote: Hello, Does anyone know how to change the scrollpanel CSS (specifically I want to make the scrollbar a different colour). Any example CSS or tips would be much appreciated (it's not in the GWT showcase). Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
On Feb 11, 4:48 pm, philippe philippe.vonc...@gmail.com wrote: Normally, Anchor is used to internal link.http://myapp/#myAnchor You're confusing Anchor with Hyperlink (or InlineHyperlink) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: ScrollPanel (scrollbar) CSS
It's simply because there's no style in standard .css. Anyway a scroll panel is simply a div with overflow set to scroll. It's not css standard to be able to customize it... I didn't pay attention to what widget you wanted to customize, I simply explained how we customize a widget in general. Christian On Fri, Feb 12, 2010 at 12:03 PM, RPB robbol...@gmail.com wrote: Thanks for the suggestion, but ScrollPanel doesn't exist in standard.css (or if i've missed it, could you please post the google css here?) I've been trying a couple of things. The most successful is the below which works on IE but not Firefox or Chrome. Any other ideas? . .scroll{ scrollbar-3dlight-color:#FFD700; scrollbar-arrow-color:#00; scrollbar-base-color:#FF6347; scrollbar-darkshadow-color:#FFA500; scrollbar-face-color:#008080; scrollbar-highlight-color:#FF69B4; scrollbar-shadow-color:#FF00FF; } .. g:ScrollPanel styleName='{style.scroll}' On Feb 12, 4:42 pm, Christian Goudreau goudreau.christ...@gmail.com wrote: Simply copy the ScrollPanel css from the google css file. Change de gwt-ScrollPanel name to whatever you want, but only change the primary name. Then, you have to call setStylePrimaryName on your scrollbar. Finally, you change the css as you wish. Christian On Fri, Feb 12, 2010 at 11:38 AM, RPB robbol...@gmail.com wrote: Hello, Does anyone know how to change the scrollpanel CSS (specifically I want to make the scrollbar a different colour). Any example CSS or tips would be much appreciated (it's not in the GWT showcase). Thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Blog/ Email TextArea like widget
Hello, Is there a widget that provides a similar functionality to what text area in emails / blog / forums provides? Where the user can write text, change its color, bold..etc Ahmad. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: How to place url link in gwt Label
Anyway : g:HTMLPanel blablabla your text g:InlineHyperlinkYour link/g:InlineHyperlink blabalbla your text /g:HTMLPanel On Fri, Feb 12, 2010 at 12:06 PM, Thomas Broyer t.bro...@gmail.com wrote: On Feb 11, 4:48 pm, philippe philippe.vonc...@gmail.com wrote: Normally, Anchor is used to internal link.http://myapp/#myAnchor You're confusing Anchor with Hyperlink (or InlineHyperlink) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: binding of event handlers
On Feb 10, 6:57 pm, alfonz19 alfon...@gmail.com wrote: Hi, this is shown as an example of binding event handler. public class MyFoo extends Composite { @UiField Button button; public MyFoo() { initWidget(button); } @UiHandler(button) void handleClick(ClickEvent e) { Window.alert(Hello, AJAX); } } Right.So this is how ClickHandler implementation can be registered. Ok, suppose I use TextBox instad of button. HOW will the framework tell which EventHandler descendant to use? I can't figure it out. So? How this thing work? It's NOT based on same type of method argument of anotated (@UiHandler) method and method from handler interface, isn't it? Well, almost. In brief, ClickEvent links to ClickHandler (it extends DomEventClickHandler), so UiBinder makes a call to addClickHandler (yes, AFAICT, it just prepends an add in front of the handler's class name). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Understanding RequestBilder und SOP Problem
On Feb 11, 3:16 pm, nino jazzmatad...@googlemail.com wrote: Well this code is working inside of the non-application sandboy : function HCall(){ xmlhttp = new XMLHttpRequest(); xmlhttp.open(GET, http://localhost:/pdmdesktop/host;, true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { alert(xmlhttp.responseText); } } } xmlhttp.send(null); } bei setting : allowCrossDomainXHR=yes inside of the iframe. But still the Requestbuilder is throwing an excemtion so i m also interesred why is that ? Could it be because of the IFrameLinker? the GWT runs in an iframe created by the nocache.js, which obviously does not set allowCrossDomainXHR=yes. Have you tried using the xs linker? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Integrating a simple GWT app with an existing java web app
I have been trying hard for a few days to get this working and seem to be stuck still at the same place. This is a very simple java web app that has only a few jsp's and some servlet's. The GWT app has no rpc's at this point and has some client code which is accessing a rest resource, I have this working in hosted mode by using a proxy servlet on the server side which should just fall away when the integration is done. So this is what I have tried to do to deploy the gwt app with the existing app: The GWT app file structure is: war- editor_central ext-3.1.0 WEB-INF/lib Editor_central.css Editor_central.html I copied everthing except the WEB-INF into the WebRoot of my existing java web app and created a new jsp file which has basically the exact same contents as the Editor_central.html. When I deploy the war and access my new jsp file I get the following pop up: GWT module 'editor_central' may need to be (re)compiled. I would appreciate any advice on how to debug this or links to some decent documentation for how to do what I am trying to do. The only thing I could find to give me direction at this point is this: http://code.google.com/webtoolkit/doc/1.6/DevGuideDeploying.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
UiBinder exceptions
I have recently started to use UiBinder as a way to define the UI. I have previously defined my UI using either just Java code to build panels and widgets or by (ab)using setInnerHTML. I have never come across runtime exceptions when creating widgets until using UiBinder. My UI will now throw exceptions regularly, although not consistently, nevertheless leading me to a situation where I have to wrap every widget creation code in try/catch to prevent the Javascript interpreter from falling over. The error I see is always this: (TypeError): Result of expression 'domId0Element' [null] is not an object. which is part of the generated Javascript that is used to represent createAndBindUi() Is this a bug? Should I resign myself to using try/catch? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Integrating a simple GWT app with an existing java web app
Ok for sure not the best way to start off my posting in the GWT forum. I didn't realize there was actually a google-compile option in the eclipse context menu and thought that running the app would result in a recompile. Actually doing what the popup suggested has resulted in my trivial page loading. On Feb 12, 1:24 pm, Greg gllo...@gmail.com wrote: I have been trying hard for a few days to get this working and seem to be stuck still at the same place. This is a very simple java web app that has only a few jsp's and some servlet's. The GWT app has no rpc's at this point and has some client code which is accessing a rest resource, I have this working in hosted mode by using a proxy servlet on the server side which should just fall away when the integration is done. So this is what I have tried to do to deploy the gwt app with the existing app: The GWT app file structure is: war- editor_central ext-3.1.0 WEB-INF/lib Editor_central.css Editor_central.html I copied everthing except the WEB-INF into the WebRoot of my existing java web app and created a new jsp file which has basically the exact same contents as the Editor_central.html. When I deploy the war and access my new jsp file I get the following pop up: GWT module 'editor_central' may need to be (re)compiled. I would appreciate any advice on how to debug this or links to some decent documentation for how to do what I am trying to do. The only thing I could find to give me direction at this point is this:http://code.google.com/webtoolkit/doc/1.6/DevGuideDeploying.html -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Facebook
Yes, I have. You can play with it: http://www.mobca.st/ There are two sides to a facebook webapp, the client and the server. On the GWT side you will not be using facebook-java-api or any other java http-based client. You will use the facebook connect library through JSNI. The new api library is quite easy to use from GWT: http://github.com/facebook/connect-js On the server side, throw facebook-java-api in the trash. It's horrid. The Facebook API, while kludgy as hell, is actually pretty straightforward. Just make HTTP requests and parse the results with your favorite JSON or XML parser (I use Jackson). Jeff On Thu, Feb 11, 2010 at 5:46 PM, Manny manster...@gmail.com wrote: Has anyone succeded in building a facebook app using gwt? I have spent 50+ hours trying to just get the facebook-java-api to work with my halfway done gwt app. but to no avail. My project is at a stand still untill i can figure this out. PLEASE help if you know how to do this. the current code examples do not take the gwt into account. and please if you just google a solution for me i've probably already seen it. I need someone who has actually done this or knows for sure how to.please. thanks -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Firefox ONPASTE: Get the text to be pasted?
I'm in the process of implementing a text control from Swing (JFormattedTextField) to GWT. One of the requirements is that when the user pastes in a block of text, I can't just let the default action occur; I have to filter the text through a mask. Given that requirement, I need to be able to intercept the text the user is about to paste into a TextBox. I've got a solution that seems to be working perfectly in IE and WebKit (Chrome/Safari). There's an open Mozilla bug requesting this feature (https://bugzilla.mozilla.org/show_bug.cgi?id=407983), but it's not clear when it will be resolved. Here's what I have so far, plugged in to the StockWatcher sample app for ease of testing. Does anyone know of a reliable way to make this work in Firefox? (1) Create the nameField TextBox like this: final TextBox nameField = new TextBox() { @Override public void onBrowserEvent(Event event) { super.onBrowserEvent(event); switch (event.getTypeInt()) { case Event.ONPASTE: { event.preventDefault(); String text = getPastedText(event); if (text.length() 0) { Window.alert(Pasted: +text); } break; } } } }; nameField.sinkEvents(Event.ONPASTE); (2) Add this methodt: public static native String getPastedText(Event event) /*-{ var text = ; if (event.clipboardData) // WebKit/Chrome/Safari { try { text = event.clipboardData.getData(Text); return text; } catch (e) { // Hmm, that didn't work. } } if ($wnd.clipboardData) // IE { try { text = $wnd.clipboardData.getData(Text); return text; } catch (e) { // Hmm, that didn't work. } } // Ok, last chance. Firefox refuses to make this easy: // https://bugzilla.mozilla.org/show_bug.cgi?id=407983 // And this ridiculous approach is unlikely to work. // But try it anyway; we have nothing to lose. // We can ignore Opera; it doesn't even fire ONPASTE. try { if (netscape.security.PrivilegeManager.enablePrivilege) { netscape.security.PrivilegeManager.enablePrivilege(UniversalXPConnect); } else { return ; } } catch (ex) { return ; } var clip = Components.classes[@mozilla.org/widget/clipboard; 1].getService(Components.interfaces.nsIClipboard); if (!clip) return ; var trans = Components.classes[@mozilla.org/widget/ transferable; 1].createInstance(Components.interfaces.nsITransferable); if (!trans) return ; trans.addDataFlavor(text/unicode); clip.getData(trans, clip.kGlobalClipboard); var str = new Object(); var strLength = new Object(); trans.getTransferData(text/unicode, str, strLength); if (str) str = str.value.QueryInterface(Components.interfaces.nsISupportsString); if (str) text = str.data.substring(0, strLength.value / 2); return text; }-*/; -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[ANN] Objectify-Appengine 2.0, easily use GWT with the GAE datastore
A couple days ago the Objectify team released version 2.0 of Objectify-Appengine, a mid-level open-source data persistence tier for Google App Engine. It's a comfortable level of abstraction somewhere between JDO's too complicated and the Low-Level API's too simple, allowing you to easily put(), get(), delete(), and query() your own typed objects. Why am I posting about it here? One of Objectify's goals has been to make it easier to work with GWT. In Objectify v2, all of the datastore basic types (Key, Email, Link, GeoPt, Category, Rating, etc) are made available to your GWT code. So: * You can pass your entity classes back and forth through GWT-RPC without DTOs, detaching, or any other magic. Even if you choose to use JDO or other persistence APIs, you can still use the Objectify GWT module to GWT-enable the datastore types. Objectify is a ~100k jar with no dependencies. Just add the jar to your project and this to your module: inherits name=com.googlecode.objectify.Objectify / You can find more information about Objectify here: http://code.google.com/p/objectify-appengine/ You can find specific information about using Objectify with GWT here: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT Thanks, The Objectify-Appengine Team -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Using external styles with UiBinder error
Why not reference your styles from a CssResource that itself is wrapped in a ClientBundle? Something like: *Resources.java* public interface Resources extends ClientBundle { public static final Resources INSTANCE = GWT.create(Resources.class); @Source(UiStyles.css) public MyUiStyles uiStylesCss(); @Source(calendar.png) public ImageResource calendar(); } *MyUiStyles.java* * public interface ImagesDialogCss extends CssResource { public String datebox(); } * * * *MyDialog.ui.xml* ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' ui:with field='resources' type='com.google.gwt.sample.client.Resources'/ g:VerticalPanel g:Image addStyleNames='{resources.uiStylesCss.datebox}' ui:field='someFieldId' / /g:VerticalPanel /ui:UiBinder I might be overlooking some details, but you should be able to use the above to share your UiStyles.css w/o having to declare an associated ui:image element all over the place. -- Chris On Fri, Feb 12, 2010 at 3:59 AM, shahid shahidza...@gmail.com wrote: I started using the UiBinder for various forms in my application. I have created a UiStyles.css (with a CssResource interface called Css) under the main client package and would like to use that in all packages across the application. The problem is I am using a sprite in the stylesheet for a background image as: @sprite .datebox { gwt-image:calendar; width : 150px !important; height : 24px !important; padding : 2px; background-position : right center !important; } and I refer to the stylesheet in the ui.xml as: ui:style src='../UiStyles.css' / and for the sprite I have the following line in the ui.xml : ui:image field=calendar src='../StaticResources/images/ calendar.png' / Now I thought I should only need this in the ui.xml file that is using the .datebox style. But I see that if I refer to the UiStyles.css in any ui.xml (even if it does use the above sprite), it requires the ui:image field=calendar src='../StaticResources/images/ calendar.png' / otherwise it fails to compile [ERROR] Unable to find ImageResource method calendar in ... packagename -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Generalpath
You would need to look at the graphics solutions for GWT (svg/canvas/ vml/flash). As there is no native (nonFlash/plugin) corssbrowser methods you would need to either look at a gwt library or wrap an existing javascript solution for graphics. But I would instead inspect your ui, because a lot of your code may be done with CSS or html. You probably will not be able to maintain the same structure as awt, swt, swing, etc are not compatible with GWT (as in not implemented). On Feb 12, 1:29 am, S Eldibany seldib...@gmail.com wrote: I have an AWT application that draws some products using lines and arcs, fills, etc (java2d stuff) and creates a GeneralPath that ultimately gets drawn in the Swing JPanel (presentation layer). If the UI of the application is all written in GWT (instead of swing, and use GWT RPC for communication with the server side AWT services), can the server side (awt code) still create the same GeneralPath and have the GWT UI draw it (similar to d.draw(myDrawing))? If not what would the solution be? I need to see how easy will this be before jumping into a GWT conversion project. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: [ANN] Objectify-Appengine 2.0, easily use GWT with the GAE datastore
Begs the question (and I don't have time, sadly, to try it). GWT 2.0 + ObjectifyWithGWT + (Gaelyk or Grails) That would be an insanely awesome stack. Roger On Feb 12, 2010, at 2:54 PM, Jeff Schnitzer wrote: A couple days ago the Objectify team released version 2.0 of Objectify-Appengine, a mid-level open-source data persistence tier for Google App Engine. It's a comfortable level of abstraction somewhere between JDO's too complicated and the Low-Level API's too simple, allowing you to easily put(), get(), delete(), and query() your own typed objects. Why am I posting about it here? One of Objectify's goals has been to make it easier to work with GWT. In Objectify v2, all of the datastore basic types (Key, Email, Link, GeoPt, Category, Rating, etc) are made available to your GWT code. So: * You can pass your entity classes back and forth through GWT-RPC without DTOs, detaching, or any other magic. Even if you choose to use JDO or other persistence APIs, you can still use the Objectify GWT module to GWT-enable the datastore types. Objectify is a ~100k jar with no dependencies. Just add the jar to your project and this to your module: inherits name=com.googlecode.objectify.Objectify / You can find more information about Objectify here: http://code.google.com/p/objectify-appengine/ You can find specific information about using Objectify with GWT here: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT Thanks, The Objectify-Appengine Team -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Sneak preview of my first Facebook app
Hey, everyone, For those of you who are on Facebook, get a sneak preview of my upcoming new Web app, What Do We Have In Common?, before the official launch this Sunday. The URL is https://www.chiaramail.com/WhatDoWeHaveInCommon/WDWHIChome.html . The app enables you to find out what you have in common with other Facebook members, friends or not. Also, please note that you do NOT need to be connected to Facebook in order to use the app! Bob -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: [ANN] Objectify-Appengine 2.0, easily use GWT with the GAE datastore
Hi Jeff: Thanks for posting in GWT group as well. I start to test part of our application to Objectify and like its new @Embedded. I may have more feedbacks to your team soon. @Embedded is an excellent way to build JSON data transport and JsonpRequestBuilder is already in GWT 2.0 - probably in official release soon. It is very useful to show an example of objectify @Embedded with GWT 2.x JsonPRequestBuilder http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/index.html Thanks for your effort. Duong BaTien DBGROUPS and BudhNet On Fri, 2010-02-12 at 11:54 -0800, Jeff Schnitzer wrote: A couple days ago the Objectify team released version 2.0 of Objectify-Appengine, a mid-level open-source data persistence tier for Google App Engine. It's a comfortable level of abstraction somewhere between JDO's too complicated and the Low-Level API's too simple, allowing you to easily put(), get(), delete(), and query() your own typed objects. Why am I posting about it here? One of Objectify's goals has been to make it easier to work with GWT. In Objectify v2, all of the datastore basic types (Key, Email, Link, GeoPt, Category, Rating, etc) are made available to your GWT code. So: * You can pass your entity classes back and forth through GWT-RPC without DTOs, detaching, or any other magic. Even if you choose to use JDO or other persistence APIs, you can still use the Objectify GWT module to GWT-enable the datastore types. Objectify is a ~100k jar with no dependencies. Just add the jar to your project and this to your module: inherits name=com.googlecode.objectify.Objectify / You can find more information about Objectify here: http://code.google.com/p/objectify-appengine/ You can find specific information about using Objectify with GWT here: http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT Thanks, The Objectify-Appengine Team -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Hyperlink cause scroll
I have a Hyperlink in my application inside TreeItem and this cause the page to scroll sometimes. I can't figure out why it happens and when ! Anyone with the same problem . the problem only in FF and not in IE ! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Building GWT apps that support adjustable font sizes
Hi, I need to build an app that also works well (meaning: looks acceptable and is still usable) with different font sizes. Eg. a user with impaired vision might increase the default font size of the browser to make web pages easier readable for him. For me as a developer this means removing as many fixed sizes in my layout as possible. This seems kind of hard as a lot of the layouts, also the new ones like LayoutPanel and DockLayoutPanel use fixed sizes and do not dynamically adjust to the size of their content. As a test I increased the default font size and looked at the mail sample and it looks very unpleasant and unusable (overlapping elements). Do you have some tips/guidelines/rules how to achieve such a task? Which layouts to use, which to avoid? How to avoid overlappings? Any other tricks? Thanks for all your input! - Dennis -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Building GWT apps that support adjustable font sizes
On 13 fév, 01:30, googelybear googelyb...@gmail.com wrote: Hi, I need to build an app that also works well (meaning: looks acceptable and is still usable) with different font sizes. Eg. a user with impaired vision might increase the default font size of the browser to make web pages easier readable for him. For me as a developer this means removing as many fixed sizes in my layout as possible. This seems kind of hard as a lot of the layouts, also the new ones like LayoutPanel and DockLayoutPanel use fixed sizes and do not dynamically adjust to the size of their content. As a test I increased the default font size and looked at the mail sample and it looks very unpleasant and unusable (overlapping elements). Do you have some tips/guidelines/rules how to achieve such a task? Can't you use Unit.EM or Unit.EX? (Unit.PCT is OK too, of course) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: username/password when using GAE
really no responses on this one? On Feb 11, 11:19 pm, John V Denley johnvden...@googlemail.com wrote: There are plenty of (fairly indepth technical) conversations on here about the use of passwords and how to send the data/password to the server. It very much seems a consensus that unless you are using HTTPS/SSL then its totally pointless doing anything on the client. Given that Google App Engine does not support HTTPS/SSL, what is everyones opinion on this matter, what IS the best practice? As a side bar on this, up to now I have been using the google account login to deal with all this, but have been getting a LOT of resistance from my potential user community who get very lost and confused about the process when having to create a google account, prior to being able to create an account in my system, hence the need to look at having my own security, which scares me as I dont know anything about this subject, but I want my users logons/data to be safe and secure. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RPC with ArrayList, another hapless Ray Ryan groupie reaches out for help
Hi Trying to build out the Ray Ryan best practices sample in GWT 2.0 , having trouble with the action(command)/response objects, containing array list instances. This is Ray's sample package com.play.client; import java.util.ArrayList; public class GetDetails implements ActionGetDetailsResponse { private final ArrayListContactDetailId ids; public GetDetails(ArrayListContactDetailId ids){ this.ids = ids; } public ArrayListContactDetailId getIds(){ return ids; } } This is my latest try.. public class GetDetailsAction implements ActionGetDetailsResponse, IsSerializable { private ArrayListContactDetailId ids; public GetDetailsAction(){ } public GetDetailsAction(ArrayListContactDetailId ids){ this.ids = ids; } public ArrayListContactDetailId getIds(){ return ids; } } public class ContactDetailId implements IsSerializable{ private String id; public ContactDetailId(String id){ this.id = id; } public String getId(){ return id; } } To Explain my changes, I have:- * Changed the name because I felt like it * Added a no-parameter constructor because [ERROR] [testgwt] com.play.client.ActionT has no available instantiable subtypes. (reached via com.play.client.ActionT) * Removed the final modifier from the id's intance member because '[WARN] [testgwt] Field 'private final java.util.ArrayListcom.play.client.ContactDetailId ids' will not be serialized because it is final' My sample runs but I now get a com.google.gwt.user.client.rpc.SerializationException when I try to pass an action instance via RPC as per the talk... Any Clues? Have I missed some embarrassing and obvious point? All of the 'reference' implementations pass simple types and skirt the ArrayList thing. Michael -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Getting error $doc.getBoxObjectFor is not a function in Firefox 3.6
It worked. Thanks Nathan! On Fri, Feb 12, 2010 at 10:10 PM, Nathan Williams nlwil...@gmail.comwrote: Resolved this in GWT 1.4 (we're version locked due to WAS 6.0) by modifying the com/google/gwt/user/client/impl/DOMImplMozilla.java file in gwt-user.jar. I assume a similar strategy would work in later versions of GWT. Replace the implementations of the getAbsoluteLeft and getAbsoluteTop methods with: return elem.getBoundingClientRect().left - $doc.documentElement.getBoundingClientRect().left; and return elem.getBoundingClientRect().top - $doc.documentElement.getBoundingClientRect().top; respectively. Links I found helpful: http://stackoverflow.com/questions/1018997/gwt-javascript-exception-in-hosted-mode-result-of-expression-doc-getboxobjectfo https://bugzilla.mozilla.org/show_bug.cgi?id=409111#c14 -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: DialogBox broken in Firefox 3.6
I've tested the solution found here:- http://groups.google.com/group/google-web-toolkit/browse_thread/thread/88a8437754345092?hl=en It works! On Feb 12, 2:19 am, JY chueny...@gmail.com wrote: I've found the source of the problem. This is due to getboxobjectfor() method getting removed in Firefox 3.6. Anyone managed to find a workaround? On Feb 6, 12:29 pm,JYchueny...@gmail.com wrote: Anyone managed to find a solution to get a native GWT 1.4 Dialogbox to work properly inFirefox3.6? On Jan 30, 12:18 pm, Lee Chuen Yang, Jeremy chueny...@gmail.com wrote: Mayor, specifying a background color for the iframe solves your problem. Anyone managed to solve the non-draggable problem for dialogbox in GWT 1.4.60? (Yes, I will need to upgrade in future. Right now, I'm running a large application and migration takes time because of alignment syntax differences. Which worries me about the use of GWT - standard components get broken on new browsers and users are forced to migrate to a later GWT version each time?) On Sat, Jan 30, 2010 at 6:44 AM, El Mentecato Mayor rogelio.flo...@gmail.com wrote: I actually fixed my problem by just specifying a background color for the iframe that is behind the dialog. JY: You might want to try upgrading gwt, 1.4.60 is rather old. On Jan 28, 11:37 am, El Mentecato Mayor rogelio.flo...@gmail.com wrote: I noticed a slightly different problem a couple of days ago when I upgraded to FF3.6: I can drag fine a dialog (a specific dialog in my application, haven't tried the specific code above), but the dialog now appears below (in the Z direction) an applet on my page. Even with the shimmer solution that I posted long time ago on this forum, where the z-index is modified to be higher than both the applet and an iframe added on top of the applet, and it appears that the iframe has 0 or very small size. I noticed that the caption part of the dialog does appear above the applet, but not the rest (dialogContent). Not sure what changed in FF to break this. Can't seem to be able to fix with CSS alone. I will need to investigate and fix this, but while I get to it, if anybody knows more information about a fix or workaround, please post. On Jan 28, 5:32 am,JYchueny...@gmail.com wrote: Problem: The native DialogBox component in GWT 1.4.60 is broken inFirefox3.6. It works in FF 3.5.x and all other major browsers. Behavior: You will not be able to drag the dialogbox inFirefox3.6 Test Code: public class MyApplication implements EntryPoint { public MyApplication() { } public void onModuleLoad() { Button show = new Button(Show); final DialogBox box = new DialogBox(false, false); box.setText(Testing); box.setPopupPosition(100, 100); box.setSize(100px, 100px); VerticalPanel contents = new VerticalPanel(); contents.add(new Label(Hi)); Button close = new Button(Close); close.addClickListener(new ClickListener() { public void onClick(Widget sender) { box.hide(); } }); contents.add(close); box.setWidget(contents); show.addClickListener(new ClickListener() { public void onClick(Widget sender) { box.show(); } }); RootPanel.get().add(show); } } Other notes: I've not tried with other versions of GWT. Anyone else has this problem? Please post here if you've a solution or workaround. Thank you. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs cr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
[gwt-contrib] GWT 2.0.2
Hi, Any idea when there will be a GWT 2.0.2 ? The 2.0.1 contains a few issues that stops us from migrating (already reported and fixed), the 2.0 contains issues that were fixed in 2.0.1 ... so we must migrate. building our own version is not immediatly possible. David -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
Thinking outload... What about allowing ctors to take a HM. The other ctors use the default implementation. If you dont care for a HM then use the ctors without HM in the parameter list. That way The problem with this is that you then have to add HM to the ctor for every extension of Widget (which are many). you dont pollute the widget method list with gets/creates and sets Well, I think the current consensus is that gets and sets won't happen/aren't necessary for the use case in question. As far as polluting the Widget method list with createHM()... It is a protected method with a default implementation, so 1) You would have to extend Widget (or one of widget's subclasses) to see it. 2) You probably wouldn't see it unless you were purposefully looking for things to extend about Widget which prolly dont make sense once the thing is built. Since the HandlerManager is lazy loading (with good reason, too) the only way this sort of flexible API makes sense is to (1) provide a factory method or (2) allow for a HMFactory in the constructor. I tend towards the factory method because it is a less complex change and because of the problems with constructor extensions mentioned above. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Add the ability to change the default HandlerManager of a Widget
Updated the patch to only add a createHandlerManager which gets called by ensureHandlers. On 12 Feb., 04:22, John LaBanca jlaba...@google.com wrote: Alright, lets go with createHandlerManager() for now. Thanks for all the feedback. @sven - Would you like to update the patch by reverting the getHandlerManager() method back to a package protected method? If you don't get to it for a few days, I'll can do it for you. Thanks, John LaBanca jlaba...@google.com On Thu, Feb 11, 2010 at 9:39 PM, Nathan Wells nwwe...@gmail.com wrote: I'd say that if you wanted to implement a HandlerManager stack, it would probably be best to do that internal to the HandlerManager, rather than forcing a Widget to know how events are handled. Assuming that is possible given the current Widget implementations (others more expert than I would know this, probably), the only API I would want is createHandlerManager(). I could then manage how that more complex HandlerManager is dealt with. While we're on the subject... if you're providing this factory method, I would rather see a well-documented interface to implement rather than a semi-documented implementation of which I would probably be overriding every method. just my .02 On Feb 11, 11:05 am, Ray Ryan rj...@google.com wrote: This conversation keeps getting complicated by discussions of policy. I'm just trying to make it possible for widgets we haven't thought of yet to define policies of their own. E.g., to temporarily switch between modes that change the set of events they source, copying some handlers or not if that's appropriate (perhaps in mode B I simply am not a source of the events that would happen in mode A. Perhaps I am. Let me choose). E.g., to implement an HM stack. E.g., to try out a singleton HM (I wouldn't, but why should I stop you from trying it out). I think JohnL has hit the sweet spot with: /** * Called by default implementation of {...@link #getHM} * to lazily instantiate the HM for this widget. */ protected HM createHM(); /** * All access to the widget's HM must be made through this method. * It is an error to cache the object returned. The default implementation * returns the result of {...@link #createHM} the first time it is called. */ protected HM getHM(); If I override getHM(), I have the option to call the normal createHM() to get whatever HM the widget normally uses. Or not. If I override createHM() I can provide a custom implementation, or wrap the normal one, without having to re-implement the lazy instantiation mechanism. Am I trying to provide flexibility that no one is asking for? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] GWT 2.0.2
We should have the 2.0.2 release out by end of day today or Monday at the latest. On Fri, Feb 12, 2010 at 3:40 AM, stuckagain david.no...@gmail.com wrote: Hi, Any idea when there will be a GWT 2.0.2 ? The 2.0.1 contains a few issues that stops us from migrating (already reported and fixed), the 2.0 contains issues that were fixed in 2.0.1 ... so we must migrate. building our own version is not immediatly possible. David -- http://groups.google.com/group/Google-Web-Toolkit-Contributors -- Miguel -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: RFC: sharded linking
Where can I read a description of what -XshardPrecompile, or see the code for it, it sounds very useful to me personally? It's not in 2.0.0 as far as I can see. My concerns about the sharded linking proposal came from what I understood the original flow to be from my looking at it and from the original sharded linkin proposal. current Precompile: - parse Java and run generators - output: number of permutations, AST, generated artifacts current CompilePerms: - input: permutation id, AST - compile one permutation to JavaScript - output: JavaScript, generated artifacts current Link: - input: JavaScript from all permutations, generated artifacts - run linkers on all artifacts - emit EmittedArtifacts into the final output If this isn't what the the current flow is then what is the current flow and how does sharded linking fit into that? On Feb 11, 6:43 pm, Scott Blum sco...@google.com wrote: I have a few comments, but first I wanted to raise the point that I'm not sure why we're having this argument about maximally sharded Precompiles at all. For one thing, it's already implemented, and optional, via -XshardPrecompile. I can't think of any reason to muck with this, or why it would have any relevance to sharded linking. Can we just table that part for now, or is there something I'm missing? Okay, so now on to sharded linking itself. Here's what I love: - Love the overall goals: do more work in parallel and eliminate serialization overhead. - Love the idea of simulated sharding because it enforces consistency. - Love that the linkers all run in the same order. Here's what I don't love: - I'm not sure why development mode wouldn't run a sharded link first. Wouldn't it make sense if development mode works just like production compile, it just runs a single development mode permutation shard link before running the final link? - I dislike the whole transition period followed by having to forcibly update all linkers, unless there's a really compelling reason to do so. Maybe I'm missing some use cases, but I don't see what problems result from having some linkers run early and others run late. As Lex noted, all the linkers are largely independent of each other and mostly won't step on each other's toes. - It seems unnecessary to have to annotate Artifacts to say which ones are transferable, because I thought we already mandated that all Artifacts have to be transferable. I have in mind a different proposal that I believe addresses the same goals, but in a less-disruptive fashion. Please feel free to poke holes in it: 1) Linker was made an abstract class specifically so that it could be extended later. I propose simply adding a new method linkSharded() with the same semantics as link(). Linkers that don't override this method would simply do nothing on the shards and possibly lose out on the opportunity to shard work. Linkers that can effectively do some work on shards would override this method to do so. (We might also have a relinkSharded() for development mode.) 2) Instead of trying to do automatic thinning, we just let the linkers themselves do the thinning. For example, one of the most serialization-expensive things we do is serialize/deserialze symbolMaps. To avoid this, we update SymbolMapsLinker to do most of its work during sharding, and update IFrameLinker (et al) to remove the CompilationResult during the sharded link so it never gets sent across to the final link. The pros to this idea are (I think) that you don't break anyone... instead you opt-in to the optimization. If you don't do anything, it should still work, but maybe slower than it could. The cons are... well maybe it's too simplistic and I'm missing some of the corner cases, or ways this could break down. Thoughts? Scott -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7556 committed - Unselect the MenuItem in the top level MenuBar when auto-hiding a chil...
Revision: 7556 Author: jlaba...@google.com Date: Thu Feb 11 05:01:40 2010 Log: Unselect the MenuItem in the top level MenuBar when auto-hiding a child MenuBar. http://gwt-code-reviews.appspot.com/141804 Issue: 2458 http://code.google.com/p/google-web-toolkit/source/detail?r=7556 Modified: /trunk/user/src/com/google/gwt/user/client/ui/MenuBar.java /trunk/user/test/com/google/gwt/user/client/ui/MenuBarTest.java === --- /trunk/user/src/com/google/gwt/user/client/ui/MenuBar.java Mon Feb 1 02:58:54 2010 +++ /trunk/user/src/com/google/gwt/user/client/ui/MenuBar.java Thu Feb 11 05:01:40 2010 @@ -17,6 +17,8 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.EventTarget; +import com.google.gwt.event.dom.client.BlurEvent; +import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.logical.shared.CloseEvent; import com.google.gwt.event.logical.shared.CloseHandler; @@ -534,7 +536,7 @@ } else if ((parentMenu != null) parentMenu.vertical) { parentMenu.selectPrevItem(); } else { - close(); + close(true); } } @@ -598,14 +600,12 @@ eatEvent(event); break; case KeyCodes.KEY_ESCAPE: -closeAllParents(); -// Ensure the popup is closed even if it has not been enetered -// with the mouse or key navigation -if (parentMenu == null popup != null) { - popup.hide(); -} +closeAllParentsAndChildren(); eatEvent(event); break; + case KeyCodes.KEY_TAB: +closeAllParentsAndChildren(); +break; case KeyCodes.KEY_ENTER: if (!selectFirstItemIfNoneSelected()) { doItemAction(selectedItem, true, true); @@ -793,12 +793,26 @@ * Closes all parent menu popups. */ void closeAllParents() { -MenuBar curMenu = this; -while (curMenu.parentMenu != null) { - curMenu.close(); - curMenu = curMenu.parentMenu; +if (parentMenu != null) { + // The parent menu will recursively call closeAllParents. + close(false); +} else { + // If this is the top most menu, deselect the current item. + selectItem(null); } } + + /** + * Closes all parent and child menu popups. + */ + void closeAllParentsAndChildren() { +closeAllParents(); +// Ensure the popup is closed even if it has not been enetered +// with the mouse or key navigation +if (parentMenu == null popup != null) { + popup.hide(); +} + } /* * Performs the action associated with the given menu item. If the item has a @@ -855,6 +869,13 @@ } } } + + /** + * Visible for testing. + */ + PopupPanel getPopup() { +return popup; + } void itemOver(MenuItem item, boolean focus) { if (item == null) { @@ -952,11 +973,15 @@ /** * Closes this menu (if it is a popup). + * + * @param focus true to move focus to the parent */ - private void close() { + private void close(boolean focus) { if (parentMenu != null) { - parentMenu.popup.hide(); - parentMenu.focus(); + parentMenu.popup.hide(!focus); + if (focus) { +parentMenu.focus(); + } } } @@ -1017,6 +1042,15 @@ // Hide focus outline in IE 6/7 DOM.setElementAttribute(getElement(), hideFocus, true); + +// Deselect items when blurring without a child menu. +addDomHandler(new BlurHandler() { + public void onBlur(BlurEvent event) { +if (shownChildMenu == null) { + selectItem(null); +} + } +}, BlurEvent.getType()); } private void moveToNextItem() { @@ -1055,7 +1089,7 @@ if ((parentMenu != null) (!parentMenu.vertical)) { parentMenu.selectPrevItem(); } else { -close(); +close(true); } } } === --- /trunk/user/test/com/google/gwt/user/client/ui/MenuBarTest.java Mon Oct 26 18:35:41 2009 +++ /trunk/user/test/com/google/gwt/user/client/ui/MenuBarTest.java Thu Feb 11 05:01:40 2010 @@ -1,12 +1,12 @@ /* * Copyright 2008 Google Inc. - * + * * Licensed under the Apache License, Version 2.0 (the License); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -15,9 +15,11 @@ */ package com.google.gwt.user.client.ui; +import com.google.gwt.dom.client.Document; +import com.google.gwt.dom.client.NativeEvent; +import com.google.gwt.event.dom.client.KeyCodes; import
[gwt-contrib] [google-web-toolkit] r7559 committed - Updated the release notes for GWT 2.0.2.
Revision: 7559 Author: mmen...@google.com Date: Thu Feb 11 07:22:23 2010 Log: Updated the release notes for GWT 2.0.2. http://code.google.com/p/google-web-toolkit/source/detail?r=7559 Modified: /trunk/distro-source/core/src/release_notes.html === --- /trunk/distro-source/core/src/release_notes.html Thu Feb 4 06:19:20 2010 +++ /trunk/distro-source/core/src/release_notes.html Thu Feb 11 07:22:23 2010 @@ -30,6 +30,7 @@ p style=margin-top: 5px; margin-left: 5px; font-weight: bold; font-size: 115%;for all versions/b ul lia href=#Release_Notes_Current@GWT_VERSION@/a/li +lia href=#Release_Notes_2_0_12.0.1/a/li lia href=#Release_Notes_2_0_02.0.0/a/li lia href=#Release_Notes_2_0_0_rc22.0.0-rc2/a/li lia href=#Release_Notes_2_0_0_rc12.0.0-rc1/a/li @@ -58,6 +59,18 @@ a name=Release_Notes_Current/a h2Release Notes for @GWT_VERSION@/h2 p + This 2.0.2 release contains a couple of fixes that were not included in the 2.0.1 release. + /p + h3Noteworthy Fixed Issues/h3 + ul +liStandard.css missing new layout styles (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4429;#4429/a)/li +liUsing a PopupPanel in Internet Explorer without a history IFrame throws a NullPointerException (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4584;#4584/a)/li + /ul + + hr/ + a name=Release_Notes_2_0_1/a + h2Release Notes for 2.0.1/h2 + p This 2.0.1 release contains fixes for bugs found in the 2.0.0 release. /p h3Potentially breaking changes and fixes/h3 @@ -79,7 +92,6 @@ ul liUiBinder Image class with resource attribute, removes styles on that image (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4415;#4415/a)/li liWidgets lose focus if its placed on FocusPanel (Opera, Safari) (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=1471;#1471/a)/li - liStandard.css missing new layout styles (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4429;#4429/a)/li liRemove method in SplitLayoutPanel is broken (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4217;#4217/a)/li liSplitter constructor hard codes the background color of the splitter to white (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4335;#4335/a)/li liImage should provide method to set alternative text (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4335;#4335/a)/li -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7560 committed - Add a favorites table
Revision: 7560 Author: gwt.mirror...@gmail.com Date: Fri Feb 12 08:00:20 2010 Log: Add a favorites table http://code.google.com/p/google-web-toolkit/source/detail?r=7560 Modified: /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/DataBackedWidgets.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/StockService.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/StockServiceAsync.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/server/StockServiceImpl.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockQuote.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockRequest.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockResponse.java === --- /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/DataBackedWidgets.java Thu Feb 11 05:08:46 2010 +++ /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/DataBackedWidgets.java Fri Feb 12 08:00:20 2010 @@ -36,14 +36,12 @@ import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; -import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; -import java.util.List; /** * Entry point classes define codeonModuleLoad()/code. @@ -78,13 +76,6 @@ } }; - private ColumnStockQuote, String notesColumn = new ColumnStockQuote, String(new TextInputCell()) { -@Override -protected String getValue(StockQuote object) { - return object.getNotes(); -} - }; - private ColumnStockQuote, Integer priceColumn = new ColumnStockQuote, Integer( new CurrencyCell()) { @Override @@ -103,10 +94,13 @@ } }; - /** - * A set of user-marked 'favorite' ticker symbols. - */ - private HashSetString favoritesByTicker = new HashSetString(); + private ColumnStockQuote, String sharesColumn = new ColumnStockQuote, String( + new TextCell()) { +@Override +protected String getValue(StockQuote object) { + return + object.getSharesOwned(); +} + }; private AsyncListModelStockQuote favoritesListModel; @@ -115,12 +109,10 @@ */ private HashMapString,String notesByTicker = new HashMapString,String(); - private PagingTableListViewStockQuote resultsTable0; + private PagingTableListViewStockQuote resultsTable; private AsyncListModelStockQuote searchListModel; - private String searchQuery; - /** * The timer used to update the stock quotes. */ @@ -131,7 +123,7 @@ } }; - private Range[] searchRanges; + private PagingTableListViewStockQuote favoritesTable; /** * This is the entry point method. @@ -151,23 +143,27 @@ // Create the list models searchListModel = new AsyncListModelStockQuote(new DataSourceStockQuote() { public void requestData(AsyncListModelStockQuote listModel) { -sendSearchRequest(searchListModel.getRanges()); +update(); } }); favoritesListModel = new AsyncListModelStockQuote(new DataSourceStockQuote() { public void requestData(AsyncListModelStockQuote listModel) { -sendFavoritesRequest(favoritesListModel.getRanges()); +update(); } }); // Create the results table. -resultsTable0 = new PagingTableListViewStockQuote(searchListModel, 10); -resultsTable0.addColumn(favoriteColumn); -resultsTable0.addColumn(tickerColumn); -resultsTable0.addColumn(nameColumn); -resultsTable0.addColumn(priceColumn); -resultsTable0.addColumn(notesColumn); +resultsTable = new PagingTableListViewStockQuote(searchListModel, 10); +resultsTable.addColumn(favoriteColumn); +resultsTable.addColumn(tickerColumn); +resultsTable.addColumn(nameColumn); +resultsTable.addColumn(priceColumn); + +favoritesTable = new PagingTableListViewStockQuote(favoritesListModel, 10); +favoritesTable.addColumn(tickerColumn); +favoritesTable.addColumn(priceColumn); +favoritesTable.addColumn(sharesColumn); favoriteColumn.setMutator(new MutatorStockQuote, Boolean() { public void mutate(StockQuote object, Boolean after) { @@ -175,22 +171,18 @@ } }); -notesColumn.setMutator(new MutatorStockQuote, String() { - public void mutate(StockQuote object, String after) { -setNotes(object.getTicker(), after); - } -}); - -RootPanel.get().add(resultsTable0); +RootPanel.get().add(resultsTable); +RootPanel.get().add(new HTML(hr)); +RootPanel.get().add(favoritesTable); // Add a handler to send the name to the server queryField.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { -
[gwt-contrib] [google-web-toolkit] r7561 committed - Makes HandlerManager execute all event handlers even if one throws an...
Revision: 7561 Author: phopk...@google.com Date: Thu Feb 11 10:21:52 2010 Log: Makes HandlerManager execute all event handlers even if one throws an exception. Wraps thrown exceptions in an UmbrellaException (which is factored out of AttachDetachException). http://gwt-code-reviews.appspot.com/136805 http://code.google.com/p/google-web-toolkit/source/detail?r=7561 Added: /trunk/user/src/com/google/gwt/event/shared/UmbrellaException.java Modified: /trunk/user/src/com/google/gwt/event/shared/HandlerManager.java /trunk/user/src/com/google/gwt/user/client/ui/AttachDetachException.java /trunk/user/test/com/google/gwt/event/shared/HandlerManagerTest.java === --- /dev/null +++ /trunk/user/src/com/google/gwt/event/shared/UmbrellaException.java Thu Feb 11 10:21:52 2010 @@ -0,0 +1,49 @@ +/* + * Copyright 2010 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.event.shared; + +import java.util.Set; + +/** + * A {...@link RuntimeException} that collects a {...@link Set} of child + * {...@link Throwable}s together. Typically thrown after loop, with all of the + * exceptions thrown during that loop, but delayed so that the loop finishes + * executing. + */ +public class UmbrellaException extends RuntimeException { + + /** + * The causes of the exception. + */ + private SetThrowable causes; + + public UmbrellaException(SetThrowable causes) { +super( +One or more exceptions caught, see full set in UmbrellaException#getCauses, +causes.size() == 0 ? null : causes.toArray(new Throwable[0])[0]); +this.causes = causes; + } + + /** + * Get the set of exceptions that caused the failure. + * + * @return the set of causes + */ + public SetThrowable getCauses() { +return causes; + } + +} === --- /trunk/user/src/com/google/gwt/event/shared/HandlerManager.java Mon Nov 2 09:21:49 2009 +++ /trunk/user/src/com/google/gwt/event/shared/HandlerManager.java Thu Feb 11 10:21:52 2010 @@ -19,8 +19,10 @@ import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; /** * Manager responsible for adding handlers to event sources and firing those @@ -54,17 +56,39 @@ boolean isReverseOrder) { TypeH type = event.getAssociatedType(); int count = getHandlerCount(type); + SetThrowable causes = null; + if (isReverseOrder) { for (int i = count - 1; i = 0; i--) { H handler = this.H getHandler(type, i); - event.dispatch(handler); + try { +event.dispatch(handler); + } catch (Throwable e) { +if (causes == null) { + // create lazily to avoid excess creation in general case + causes = new HashSetThrowable(); +} +causes.add(e); + } } } else { for (int i = 0; i count; i++) { H handler = this.H getHandler(type, i); - event.dispatch(handler); + try { +event.dispatch(handler); + } catch (Throwable e) { +if (causes == null) { + // create lazily to avoid excess creation in general case + causes = new HashSetThrowable(); +} +causes.add(e); + } } } + + if (causes != null) { +throw new UmbrellaException(causes); + } } @SuppressWarnings(unchecked) @@ -162,6 +186,11 @@ * Note, any subclass should be very careful about overriding this method, as * adds/removes of handlers will not be safe except within this * implementation. + * + * Any exceptions thrown by handlers will be bundled into a + * {...@link UmbrellaException} and then re-thrown after all handlers have + * completed. An exception thrown by a handler will not prevent other handlers + * from executing. * * @param event the event */ @@ -175,6 +204,7 @@ try { firingDepth++; + // May throw an UmbrellaException. registry.fireEvent(event, isReverseOrder); } finally { @@ -182,13 +212,14 @@ if (firingDepth == 0) { handleQueuedAddsAndRemoves(); } -} -if (oldSource == null) { - // This was my event, so I should kill it now that I'm done. - event.kill(); -} else { -
[gwt-contrib] [google-web-toolkit] r7562 committed - tr...@7530,7559 was merged into this branch...
Revision: 7562 Author: jlaba...@google.com Date: Fri Feb 12 08:15:34 2010 Log: tr...@7530,7559 was merged into this branch Updates release notes for 2.0.2. svn merge -c7530,7559 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk http://code.google.com/p/google-web-toolkit/source/detail?r=7562 Modified: /releases/2.0/branch-info.txt /releases/2.0/distro-source/core/src/release_notes.html === --- /releases/2.0/branch-info.txt Wed Feb 10 08:16:46 2010 +++ /releases/2.0/branch-info.txt Fri Feb 12 08:15:34 2010 @@ -1483,3 +1483,7 @@ Adding null checks to all History methods to ensure that History is enabled. svn merge -c7542 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk +tr...@7530,7559 was merged into this branch + Updates release notes for 2.0.2. + svn merge -c7530,7559 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk + === --- /releases/2.0/distro-source/core/src/release_notes.html Fri Jan 29 13:26:48 2010 +++ /releases/2.0/distro-source/core/src/release_notes.html Fri Feb 12 08:15:34 2010 @@ -26,9 +26,11 @@ /style/head body - h1Google Web Toolkit Release Notes/h1 + h1 style=margin-bottom: 0;Google Web Toolkit Release Notes/h1 + p style=margin-top: 5px; margin-left: 5px; font-weight: bold; font-size: 115%;for all versions/b ul lia href=#Release_Notes_Current@GWT_VERSION@/a/li +lia href=#Release_Notes_2_0_12.0.1/a/li lia href=#Release_Notes_2_0_02.0.0/a/li lia href=#Release_Notes_2_0_0_rc22.0.0-rc2/a/li lia href=#Release_Notes_2_0_0_rc12.0.0-rc1/a/li @@ -57,7 +59,19 @@ a name=Release_Notes_Current/a h2Release Notes for @GWT_VERSION@/h2 p - This release contains fixes for bugs found in the 2.0.0 release. + This 2.0.2 release contains a couple of fixes that were not included in the 2.0.1 release. + /p + h3Noteworthy Fixed Issues/h3 + ul +liStandard.css missing new layout styles (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4429;#4429/a)/li +liUsing a PopupPanel in Internet Explorer without a history IFrame throws a NullPointerException (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4584;#4584/a)/li + /ul + + hr/ + a name=Release_Notes_2_0_1/a + h2Release Notes for 2.0.1/h2 + p + This 2.0.1 release contains fixes for bugs found in the 2.0.0 release. /p h3Potentially breaking changes and fixes/h3 ul @@ -78,7 +92,6 @@ ul liUiBinder Image class with resource attribute, removes styles on that image (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4415;#4415/a)/li liWidgets lose focus if its placed on FocusPanel (Opera, Safari) (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=1471;#1471/a)/li - liStandard.css missing new layout styles (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4429;#4429/a)/li liRemove method in SplitLayoutPanel is broken (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4217;#4217/a)/li liSplitter constructor hard codes the background color of the splitter to white (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4335;#4335/a)/li liImage should provide method to set alternative text (a href=http://code.google.com/p/google-web-toolkit/issues/detail?id=4335;#4335/a)/li @@ -96,12 +109,13 @@ See the GWT issue tracker for a href=http://code.google.com/p/google-web-toolkit/issues/list?can=1q=status:Fixed,FixedNotReleased%20milestone:2_0_1num=1000; the complete list of bug fixes and enhancements/a in this release. - /p + /p hr/ a name=Release_Notes_2_0_0/a h2Release Notes for 2.0.0/h2 p -This release includes some minor bug fixes found in the release candidate. See the release notes +This release includes some minor bug fixes found in the release candidate. +See a href=doc/latest/ReleaseNotes.htmlWhat's New in GWT 2.0/a plus the release notes for a href=#Release_Notes_2_0_0_rc12.0.0-rc1/a and a href=#Release_Notes_2_0_0_rc22.0.0-rc2/a for the full list of features and bugs fixes included in the GWT 2.0.0 release. /p @@ -476,7 +490,7 @@ a name=Release_Notes_1_5_0/a h2Release Notes for 1.5.0 (RC)/h2 p - This release candidate is, in a word, huge. Rather than including all the details here, please see a href=http://code.google.com/docreader/#p(google-web-toolkit-doc-1-5)t(Whatsnewin15)What's New in GWT 1.5?/a for full details. The main thing you'll want to know is that GWT 1.5 supports the Java 5 language features (generics, enumerated
[gwt-contrib] [google-web-toolkit] r7563 committed - Adding an option to buy or sell stock the datawidgets sample.
Revision: 7563 Author: gwt.mirror...@gmail.com Date: Fri Feb 12 08:17:37 2010 Log: Adding an option to buy or sell stock the datawidgets sample. http://code.google.com/p/google-web-toolkit/source/detail?r=7563 Added: /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/BuySellPopup.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/Transaction.java Modified: /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/DataBackedWidgets.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/StockService.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/StockServiceAsync.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/server/StockServiceImpl.java === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/BuySellPopup.java Fri Feb 12 08:17:37 2010 @@ -0,0 +1,134 @@ +/* + * Copyright 2010 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.sample.datawidgets.client; + +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.sample.datawidgets.shared.StockQuote; +import com.google.gwt.sample.datawidgets.shared.Transaction; +import com.google.gwt.user.client.Command; +import com.google.gwt.user.client.DeferredCommand; +import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.DialogBox; +import com.google.gwt.user.client.ui.FlexTable; +import com.google.gwt.user.client.ui.TextBox; + +/** + * A popup used for purchasing stock. + */ +public class BuySellPopup extends DialogBox { + + private StockQuote quote; + + /** + * The table used for layout. + */ + private FlexTable layout = new FlexTable(); + + /** + * The box used to change the quantity. + */ + private TextBox quantityBox = new TextBox(); + + /** + * The button used to buy or sell. + */ + private Button opButton; + + /** + * True if we are buying, false if hiding. + */ + private boolean isBuying; + + /** + * The last transaction. + */ + private Transaction transaction; + + public BuySellPopup() { +super(false, true); +setGlassEnabled(true); +setWidget(layout); + +layout.setHTML(0, 0, bTicker:/b); +layout.setHTML(1, 0, bName:/b); +layout.setHTML(2, 0, bPrice:/b); +layout.setHTML(3, 0, bQuantity:/b); +layout.setWidget(3, 1, quantityBox); + +// Buy Button. +opButton = new Button(, new ClickHandler() { + public void onClick(ClickEvent event) { +try { + int quantity = Integer.parseInt(quantityBox.getText()); + transaction = new Transaction(isBuying, quote.getTicker(), quantity); + hide(); +} catch (NumberFormatException e) { + Window.alert(You must enter a valid quantity); +} + } +}); +layout.setWidget(4, 0, opButton); + +// Cancel Button. +Button cancelButton = new Button(Cancel, new ClickHandler() { + public void onClick(ClickEvent event) { +hide(); + } +}); +layout.setWidget(4, 1, cancelButton); + } + + /** + * Get the last transaction. + * + * @return the last transaction, or null if cancelled + */ + public Transaction getTransaction() { +return transaction; + } + + /** + * Set the current {...@link StockQuote}. + * + * @param quote the stock quote to buy + * @param isBuying true if buying the stock + */ + public void setStockQuote(StockQuote quote, boolean isBuying) { +this.quote = quote; +String op = isBuying ? Buy : Sell; +setText(op + + quote.getTicker() + ( + quote.getName() + )); +layout.setHTML(0, 1, quote.getTicker()); +layout.setHTML(1, 1, quote.getName()); +layout.setHTML(2, 1, quote.getDisplayPrice()); +quantityBox.setText(0); +opButton.setText(op); +this.isBuying = isBuying; +transaction = null; + } + + @Override + protected void onLoad() { +super.onLoad(); +DeferredCommand.addCommand(new Command() { + public void execute() { +quantityBox.selectAll(); +quantityBox.setFocus(true); + } +}); + } +} === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/Transaction.java Fri Feb 12 08:17:37 2010 @@ -0,0 +1,60 @@ +/* + * Copyright 2010 Google Inc. + * +
[gwt-contrib] [google-web-toolkit] r7564 committed - Upgrade WebKit's DOM library to use textContent instead of falling bac...
Revision: 7564 Author: knor...@google.com Date: Thu Feb 11 17:33:08 2010 Log: Upgrade WebKit's DOM library to use textContent instead of falling back to the slow versions of setInnerText and getInnerText. Review by: jgw http://gwt-code-reviews.appspot.com/141808/show http://code.google.com/p/google-web-toolkit/source/detail?r=7564 Modified: /trunk/user/src/com/google/gwt/dom/client/DOMImplSafari.java === --- /trunk/user/src/com/google/gwt/dom/client/DOMImplSafari.java Wed Sep 2 07:58:52 2009 +++ /trunk/user/src/com/google/gwt/dom/client/DOMImplSafari.java Thu Feb 11 17:33:08 2010 @@ -168,6 +168,18 @@ return top; }-*/; + /* + * textContent is used over innerText for two reasons: + * 1 - It is consistent with DOMImplMozilla. textContent + * does not convert br's to new lines in WebKit. + * 2 - textContent is faster on retreival because WebKit + * does not recalculate styles as it does for innerText. + */ + @Override + public native String getInnerText(Element node) /*-{ +return node.textContent; + }-*/; + @Override public int getScrollLeft(Document doc) { // Safari always applies document scrolling to the body element, even in @@ -215,9 +227,9 @@ * elements, because their descendent elements are only one level deep. */ @Override - public native void selectClear(SelectElement select) /*-{ -select.innerText = ''; - }-*/; + public void selectClear(SelectElement select) { +select.setInnerText(); + } @Override public native int selectGetLength(SelectElement select) /*-{ @@ -234,6 +246,14 @@ select.removeChild(select.children[index]); }-*/; + /* + * See getInnerText for why textContent is used instead of innerText. + */ + @Override + public native void setInnerText(Element elem, String text) /*-{ +elem.textContent = text || ''; + }-*/; + @Override public void setScrollLeft(Document doc, int left) { // Safari always applies document scrolling to the body element, even in -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: PopupPanel.setVisible does not affect glass
Your tests don't check that the iframe shim attached to the glass element in IE6/7 is hidden/shown. http://gwt-code-reviews.appspot.com/143809/diff/1/3 File user/src/com/google/gwt/user/client/ui/PopupPanel.java (right): http://gwt-code-reviews.appspot.com/143809/diff/1/3#newcode927 Line 927: UIObject.setVisible(glass, visible); You're hiding the glass element, but not its iframe shim (in IE6/7). You need to call impl.setVisible *in addition* to hiding/showing the glass element. http://gwt-code-reviews.appspot.com/143809 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7565 committed - Abstracting out PlayerStatus to a separate class and adding the concep...
Revision: 7565 Author: jlaba...@google.com Date: Fri Feb 12 05:38:22 2010 Log: Abstracting out PlayerStatus to a separate class and adding the concept of cash. Also adds GWT checkstyle to the project and cleans up checkstyle errors. http://code.google.com/p/google-web-toolkit/source/detail?r=7565 Added: /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/server/PlayerStatus.java Modified: /trunk/bikeshed/.project /trunk/bikeshed/src/com/google/gwt/cells/client/ButtonCell.java /trunk/bikeshed/src/com/google/gwt/cells/client/Cell.java /trunk/bikeshed/src/com/google/gwt/cells/client/CheckboxCell.java /trunk/bikeshed/src/com/google/gwt/cells/client/CurrencyCell.java /trunk/bikeshed/src/com/google/gwt/cells/client/Mutator.java /trunk/bikeshed/src/com/google/gwt/cells/client/TextCell.java /trunk/bikeshed/src/com/google/gwt/cells/client/TextInputCell.java /trunk/bikeshed/src/com/google/gwt/list/client/Column.java /trunk/bikeshed/src/com/google/gwt/list/client/PagingTableListView.java /trunk/bikeshed/src/com/google/gwt/list/client/SimpleCellList.java /trunk/bikeshed/src/com/google/gwt/list/shared/AbstractListModel.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/BuySellPopup.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/DataBackedWidgets.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/client/StockQuoteCell.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/server/StockServiceImpl.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockQuote.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockRequest.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/StockResponse.java /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/shared/Transaction.java /trunk/bikeshed/war/WEB-INF/web.xml === --- /dev/null +++ /trunk/bikeshed/src/com/google/gwt/sample/datawidgets/server/PlayerStatus.java Fri Feb 12 05:38:22 2010 @@ -0,0 +1,179 @@ +/* + * Copyright 2010 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.sample.datawidgets.server; + +import java.util.HashMap; +import java.util.TreeSet; + +/** + * Game state for a single player. + */ +public class PlayerStatus { + + /** + * The initial amount of cash that the player starts with, in cents. + */ + private static final int INITIAL_CASH = 1 * 100; + + /** + * An impossible stock ticker. + */ + private static final String IMPOSSIBLE_TICKER_SYMBOL = XX; + + /** + * The amount of cash that the player has. + */ + private int cash = INITIAL_CASH; + + /** + * This players favorite stocks. + */ + private TreeSetString favorites = new TreeSetString(); + + /** + * The query used to retrieve favorites. + */ + private String favoritesQuery; + + /** + * The number of shares owned for each symbol. + */ + private HashMapString, Integer sharesOwnedBySymbol = new HashMapString, Integer(); + + public PlayerStatus() { +generateFavoritesQuery(); + } + + /** + * Add a stock to the favorites list. + * + * @param ticker the stock ticker + */ + public void addFavorite(String ticker) { +favorites.add(ticker); +generateFavoritesQuery(); + } + + /** + * Purchase stock. + * + * @param ticker the stock ticker + * @param quantity the number of shares to buy + * @param price the price of the stock + * @throws IllegalArgumentException if the stock cannot be purchased + */ + public void buy(String ticker, int quantity, int price) + throws IllegalArgumentException { +// Verify that the player can afford the stock. +int totalPrice = price * quantity; +if (cash totalPrice) { + throw new IllegalArgumentException(You cannot afford that much stock); +} + +// Update the number of shares owned. +int current = getSharesOwned(ticker); +cash -= totalPrice; +current += quantity; +sharesOwnedBySymbol.put(ticker, current); + +// Add this stock to the favorites list. +addFavorite(ticker); + } + + /** + * Get the player's current cash amount. + * + * @return the cash amount + */ + public int getCash() { +return cash; + } + + /** + * Get this players favorite query. + * + * @return the query + */ + public String getFavoritesQuery() { +return favoritesQuery; + } + + /** + * Get the number of shares
[gwt-contrib] [google-web-toolkit] r7566 committed - Edited wiki page through web user interface.
Revision: 7566 Author: jlaba...@google.com Date: Fri Feb 12 09:42:27 2010 Log: Edited wiki page through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=7566 Modified: /wiki/DataBackedWidgetsDesign.wiki === --- /wiki/DataBackedWidgetsDesign.wiki Mon Jan 25 14:48:52 2010 +++ /wiki/DataBackedWidgetsDesign.wiki Fri Feb 12 09:42:27 2010 @@ -1,37 +1,43 @@ #summary Design Doc for data backed widgets #labels Phase-Design -wiki:toc max_depth=2 / +wiki:toc max_depth=3 / = Introduction = Data backed widgets will replace the FastTree and PagingScrollTable widgets in incubator. They will incorporate models and views that efficiently display large amounts of data to users. -= Tables and Lists = - -NOTE: This is a work in progress and by no means finalized. Please leave comments if you see something that you love or hate. - +*NOTE:* This is a work in progress and by no means finalized. Please leave comments if you see something that you love or hate. + +== Bike Shed == + +We've created a new subdirectory under trunk/ where you can view the data backed widget code as we work on it. This directory and the code it contains is intended to be highly unstable, so please do not rely on it in your applications. + +Bike Shed includes a sample application (a stock trading game) that we are using to test the design. You can include the project in Eclipse. + +http://code.google.com/p/google-web-toolkit/source/browse/#svn/trunk/bikeshed + + += Tables and Lists = == !ListModel == -The ListModel will supply data to tables and lists. It has one method to add ListHandlers, which receive event when data becomes available or is updated. - -{{{ -/** - * A model for a list. - * - * @param T the data type of records in the list - */ -public interface ListModelT { - - /** - * Add a {...@link ListHandler} to the model. - * - * @param handler the {...@link ListHandler} - */ - ListRegistration addListHandler(ListHandlerT handler); -} -}}} +[http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/list/shared/ListModel.java ListModel] will supply data to tables and lists. It has one method to add ListHandlers, which receive event when data becomes available or is updated. + +=== !AbstractListModel === + +[http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/list/shared/AbstractListModel.java AbstractListModel] provides a default implementation of ListModel with convenience methods for pushing data to the Views. In particular, {{{updateDataSize}}} and {{{updateViewData}}} allow you to forward new data to the Views using data such as an RPC result. + +=== !ListListModel === + +[http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/list/shared/ListListModel.java ListListModel] is a concrete ListModel backed by a List. Any changes to the internal list, which can be accessed via {{{getList()}}} will be reflected in the model and forwarded to the views. + +We use a DeferredCommand to ensure that the Views aren't spammed if you are performing multiple List operations in a single event loop. + +=== !AsyncListModel === + +[http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/list/shared/AsyncListModel.java AsyncListModel] is a concrete class that links to an asynchronous DataSource. It allows you to connect the model to an application level controller that uses RPC requests to fetch data. + == !ListHandler == @@ -85,10 +91,6 @@ }}} -== !AbstractListModel == - -We will provide an AbstractListModel that takes care of the grunt work involved with managing and updating views. Most users will only need to specify how to get the data from the backend. - = Trees = We'll be working on this next... -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7567 committed - Edited wiki page through web user interface.
Revision: 7567 Author: jlaba...@google.com Date: Fri Feb 12 09:53:47 2010 Log: Edited wiki page through web user interface. http://code.google.com/p/google-web-toolkit/source/detail?r=7567 Modified: /wiki/DataBackedWidgetsDesign.wiki === --- /wiki/DataBackedWidgetsDesign.wiki Fri Feb 12 09:42:27 2010 +++ /wiki/DataBackedWidgetsDesign.wiki Fri Feb 12 09:53:47 2010 @@ -1,13 +1,14 @@ #summary Design Doc for data backed widgets #labels Phase-Design +*NOTE:* This is a work in progress and by no means finalized. Please leave comments if you see something that you love or hate. + wiki:toc max_depth=3 / = Introduction = Data backed widgets will replace the FastTree and PagingScrollTable widgets in incubator. They will incorporate models and views that efficiently display large amounts of data to users. -*NOTE:* This is a work in progress and by no means finalized. Please leave comments if you see something that you love or hate. == Bike Shed == @@ -18,6 +19,20 @@ http://code.google.com/p/google-web-toolkit/source/browse/#svn/trunk/bikeshed + += Cells = + +[http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/cells/client/Cell.java Cells] are the basic blocks used to render the View and interpret events. Cells are typed based on the type of data that the cell represents, and they must implement a {{{render}}} method that renders the typed value as an HTML string. In addition, cells can override {{{onBrowserEvent}}} to act as a flyweight that handles events that are fired on elements that were rendered by the cell. + + +== Mutators == + +Cells can be associated with a [http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/cells/client/Mutator.java Mutator] that allows the cell to modify an Object in response to an event fired on a rendered Cell. + +For example, in a table that represents object R (the row value), there may be multiple cells, each with a different type that represents a field in R. The first column could use a [http://code.google.com/p/google-web-toolkit/source/browse/trunk/bikeshed/src/com/google/gwt/cells/client/CheckboxCell.java CheckboxCell] to render check boxes based on some boolean inside of R. When the user clicks on one of the check boxes, CheckboxCell can inform the application controller that a certain field in R has been set to true or false. + + + = Tables and Lists = == !ListModel == @@ -91,10 +106,13 @@ }}} + = Trees = We'll be working on this next... + + = !TreeTables = We'll tackle this beast later... -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] SameParameterValueOptimizer should ignore methods called from native code.
Reviewers: Lex, Message: Lex, Please review. Description: SameParameterValueOptimizer should ignore methods called from native code. Please review this at http://gwt-code-reviews.appspot.com/141812 Affected files: M dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java M dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java Index: dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java b/dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java index c22d483e43da32c220f52633b2b0594ee45f3cba..bdbf664616d1f68f92fa5c138c6940bf37d3483b 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizer.java @@ -29,6 +29,8 @@ import com.google.gwt.dev.jjs.ast.JPrefixOperation; import com.google.gwt.dev.jjs.ast.JProgram; import com.google.gwt.dev.jjs.ast.JValueLiteral; import com.google.gwt.dev.jjs.ast.JVisitor; +import com.google.gwt.dev.jjs.ast.js.JsniMethodBody; +import com.google.gwt.dev.jjs.ast.js.JsniMethodRef; import java.util.HashSet; import java.util.IdentityHashMap; @@ -103,6 +105,13 @@ public class SameParameterValueOptimizer { } @Override +public void endVisit(JsniMethodBody x, Context ctx) { + for (JsniMethodRef methodRef : x.getJsniMethodRefs()) { +rescuedMethods.add(methodRef.getTarget()); + } +} + +@Override public boolean visit(JMethod x, Context ctx) { SetJMethod overrides = program.typeOracle.getAllOverrides(x); if (!overrides.isEmpty()) { Index: dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java diff --git a/dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java b/dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java index 036d71a2daa0362c76bfb294524d58cd2e99b114..196894be93c4fcd7ee7cea023d722bfe99c6cbae 100644 --- a/dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java +++ b/dev/core/test/com/google/gwt/dev/jjs/impl/SameParameterValueOptimizerTest.java @@ -52,6 +52,21 @@ public class SameParameterValueOptimizerTest extends OptimizerTestBase { int j = 1;, }); } + public void testJsniReferenceSaveMethod() throws Exception { +addSnippetClassDecl( +public static native void someStaticMethod() /*-{ + + var foo = @test.EntryPoint::foo(Ljava/lang/String;) + +}-*/); + +assertOptimize( +foo, +static void foo(String s) { String p = s; }, +foo(\\); foo(\\);).into( +public static void foo(String s){, + String p = s;, +}); + } + private OptimizationResult assertOptimize(String methodName, String methodDecl, String codeSnippet) throws UnableToCompleteException { addSnippetClassDecl(methodDecl); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: SameParameterValueOptimizer should ignore methods called from native code.
LGTM http://gwt-code-reviews.appspot.com/141812 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] RFC: sharded linking
On 2010-02-12, at 1:15 PM, Ray Cromwell wrote: On Thu, Feb 11, 2010 at 4:43 PM, Scott Blum sco...@google.com wrote: - I dislike the whole transition period followed by having to forcibly update all linkers, unless there's a really compelling reason to do so. In general, I'd agree, but the number of linkers in the wild appears to be small, this may be a case of trying to preserve an API that only 5 or 10 people in the world are using. +1. I've written a handful of custom linkers (including one in the public gwt-firefox-extension project), but I'm used to updating them between GWT releases to work around subtle changes in the linker contract (ie: the evolution of hosted mode, various global variable changes, etc). I'd rather have a clean linker system that changes from version to version than an awkward one with a lot of legacy interfaces. Matt. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] conditional linkers and the primary.linker property
Reviewers: robertvawter, Description: This patch adds a way that deferred bindings can be differ depending on the choice of primary linker. This general functionality is necessary to get runAsync working for the cross-site linker, because doing so requires compiler rewrites that do not apply to the standard linker. After discussing the problem with Bob, a good-looking strategy is to have the add-linker tag take conditions as an argument. For example, it could look like this: add-linker name=xs when-property-is name=primary.linker value=xs / /add-linker This tag adds the xs linker if and only if the primary.linker is set for all permutations. To help users understand how this works, if they try to enable a linker for some but not all permutations, an error message is emitted. An example error message is as follows: Linker 'xs' is enabled for some permutations but not all of them In addition to allawing linkers to be added conditionally, the recommended way to set a primary linker will change. Currently, users do this: !-- DEPRECATED -- add-linker name=xs / The new style is like this: set-property name=primary.linker value=xs / The old style will still work for any application it already works for, but will be deprecated. An example deprecation message is as follows: [WARN] Linker 'test1' is primary but was not added via primary.linker Instead of add-linker, use: set-property name='primary.linker' value='test1' / If that doesn't work, contact the linker's maintainer IMPLEMENTATION ModuleDef used to have a list of linker classes that build up as the module is parsed. Now, it has a list of conditional linkers. Once parsing is complete, ModuleDef.finalizeLinkers should be called, which makes the final choice of which linkers are enabled. Please review this at http://gwt-code-reviews.appspot.com/143811 Affected files: dev/core/src/com/google/gwt/dev/cfg/Condition.java dev/core/src/com/google/gwt/dev/cfg/ConditionAll.java dev/core/src/com/google/gwt/dev/cfg/ConditionAny.java dev/core/src/com/google/gwt/dev/cfg/ConditionNone.java dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java dev/core/src/com/google/gwt/dev/cfg/ModuleDefLoader.java dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java dev/core/test/com/google/gwt/dev/cfg/ConditionTest.java dev/core/test/com/google/gwt/dev/cfg/ModuleDefTest.java user/src/com/google/gwt/core/Core.gwt.xml user/src/com/google/gwt/core/SsoLinker.gwt.xml user/src/com/google/gwt/core/StdLinker.gwt.xml user/src/com/google/gwt/core/XSLinker.gwt.xml user/test/com/google/gwt/core/ext/IFrameLinkerTest.gwt.xml user/test/com/google/gwt/core/ext/SingleScriptLinkerTest.gwt.xml user/test/com/google/gwt/core/ext/XSLinkerTest.gwt.xml user/test/com/google/gwt/dev/cfg/LinkerTagsTest.gwt.xml user/test/com/google/gwt/dev/cfg/LinkerTagsTest.java user/test/com/google/gwt/dev/cfg/LinkerTagsTestBadA.gwt.xml user/test/com/google/gwt/dev/cfg/LinkerTagsTestUnconditionalPrimary.gwt.xml user/test/com/google/gwt/dev/cfg/PropertyTest.gwt.xml user/test/com/google/gwt/dev/cfg/TagSuite.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: GFlow cleanup
I can't review the changes right this moment, but I have added this patch to the gflow branch for convenience. http://gwt-code-reviews.appspot.com/143812 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
On Fri, Feb 12, 2010 at 9:50 AM, Alex Moffat alex.mof...@gmail.com wrote: Where can I read a description of what -XshardPrecompile, or see the code for it, it sounds very useful to me personally? -XshardPrecompile is an experiment that everyone wants to change, so it seems unlikely to be released in its current form. We can talk about it if it helps, but I would propose that we focus more on what we want to do for real. It's not in 2.0.0 as far as I can see. My concerns about the sharded linking proposal came from what I understood the original flow to be from my looking at it and from the original sharded linkin proposal. Your understanding is correct as far as I can tell. Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: RFC: sharded linking
On Thu, Feb 11, 2010 at 8:58 PM, Brendan Kenny bcke...@gmail.com wrote: If this is indeed the direction to go in (and I'm a big fan of the goals as well), it's probably also worth making a more formal definition for won't step on each other's toes. As a use case, I'm working on a PRE linker that (currently) removes CompilationResults, alters them based on information collected from across all permutations, and then emits new ones. Obviously this isn't ideal--its expensive and CompilationResults were written to be (mostly) immutable--but it's also perfectly acceptable within the current design of the artifactSet/linker chain. The primary linker only cares about the set of compilation results it receives, and if an earlier linker altered them, it need never know. Hey, Brendan, it sounds like you are already pressing the limits of what is doable with linkers.Can you describe in more detail what this linker accomplishes? For this linker to be used in distributed builds, I believe you'd really want to come up with a way to do the JS rewrites on the sharded part. Otherwise, the final link node is going to have to do the JS rewrites for the whole build sequentially. What exact information is used as input to the rewrites? It seems (and I could definitely be misinterpreting here) that in both the simulated sharding procedure and Scott's alternate proposal, there will be sections of primary and post linkers running before a non- shardable pre linker. If that's true, then neither will be able to fully honor the ordering of linkers when shardable and non-shardable linkers are mixed. That's a large part of why I suggested that we phase out non-sharded linkers. In mixed mode, there isn't a perfect ordering to choose. With all sharded linkers, the order is simple and predictable. All sharded parts run before all final parts, and within either of those groups, PRE/PRIMARY/POST are respected. Continuing to think out loud, it seems that the way to alter my linker is probably either to statically derive what all permutations will need in every shard (as opposed to just having each triggered generator emit an artifact and collecting them at the end), or keeping that the same and creating a custom primary linker, which I was hoping not to do as it would tend to limit adoption. It might help to know that both generators and linkers have access to the full set of *possible* values of a deferred binding, not just the values for the current permutation. As an example, the LocaleListLinker reads off all possible values of locale and generates a file containing them: http://code.google.com/p/google-web-toolkit-incubator/source/browse/trunk/src/com/google/gwt/libideas/linker/LocaleListLinker.java Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] RFC: sharded linking
On Thu, Feb 11, 2010 at 7:43 PM, Scott Blum sco...@google.com wrote: I have a few comments, but first I wanted to raise the point that I'm not sure why we're having this argument about maximally sharded Precompiles at all. For one thing, it's already implemented, and optional, via -XshardPrecompile. I can't think of any reason to muck with this, or why it would have any relevance to sharded linking. Can we just table that part for now, or is there something I'm missing? There are still two modes, but there's no more need for an explicit argument. For Compiler, precompile is never sharded. For the three-stage entry points, full sharding happens iff all linkers are shardable. - I'm not sure why development mode wouldn't run a sharded link first. Wouldn't it make sense if development mode works just like production compile, it just runs a single development mode permutation shard link before running the final link? Sure, we can do that. Note, though, that they will be running against an empty ArtifactSet, because there aren't any compiles for them to look at. Thus, they won't typically do anything. 2) Instead of trying to do automatic thinning, we just let the linkers themselves do the thinning. For example, one of the most serialization-expensive things we do is serialize/deserialze symbolMaps. To avoid this, we update SymbolMapsLinker to do most of its work during sharding, and update IFrameLinker (et al) to remove the CompilationResult during the sharded link so it never gets sent across to the final link. In addition to the other issues pointed out, note that this adds ordering constraints among the linkers. Any linker that deletes something must run after every linker that wants to look at it. Your example wouldn't work as is, because it would mean no POST linker can look at CompilationResults. It also wouldn't work to put the deletion in a POST linker, for the same reason. We'd have to work out a way for the deletions to happen last, after all the normal linkage activity. Suppose, continuing that idea, we add a POSTPOST order that is used only for deletion. If it's really only for deletion, then the usual link() API is overly general, because it lets linkers both add and remove artifacts during POSTPOST, which is not desired. So, we want a POSTPOST API that is only for deletion. Linkers somehow or another mark artifacts for deletion, but not anything else. At this point, though, isn't it pretty much the same as the automated thinning in the initial proposal? The pros to this idea are (I think) that you don't break anyone... instead you opt-in to the optimization. If you don't do anything, it should still work, but maybe slower than it could. The proposal that started this thread also does not break anyone. Lex -- http://groups.google.com/group/Google-Web-Toolkit-Contributors