{"id":232,"date":"2009-02-09T23:27:00","date_gmt":"2009-02-09T23:27:00","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=232"},"modified":"2009-02-09T23:27:00","modified_gmt":"2009-02-09T23:27:00","slug":"gwt-1-6-milestone-1","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2009\/02\/gwt-1-6-milestone-1\/","title":{"rendered":"GWT 1.6 Milestone 1"},"content":{"rendered":"<div xmlns='http:\/\/www.w3.org\/1999\/xhtml'>Der erste Milestone von GWT 1.6 ist unter <a href='http:\/\/code.google.com\/p\/google-web-toolkit\/downloads\/list?can=1&amp;q=1.6.0'>http:\/\/code.google.com\/p\/google-web-toolkit\/downloads\/list?can=1&amp;q=1.6.0<\/a> verf\u00fcgbar. In einem <a href='http:\/\/groups.google.com\/group\/Google-Web-Toolkit\/browse_thread\/thread\/3e7e6cc3b35ad98a'>Google Group Beitrag<\/a> werden die Neuerungen genannt:<\/p>\n<blockquote><p>*** New Project Structure in GWT 1.6 *** <br \/>One of the biggest changes to GWT 1.6 is a new project structure. The old <br \/>output format has been replaced by the standard Java web app expanded &#8222;war&#8220; <br \/>format, and the actual directory name does default to &#8222;\/war&#8220;. Note that the <br \/>war directory is not only for compiler output; it is also intended to <br \/>contain handwritten static resources that you want to be included in your <br \/>webapp alongside GWT modules (that is, things you&#8217;d want to version <br \/>control). Please also note that the &#8222;GWTShell&#8220; and &#8222;GWTCompiler&#8220; tools will <br \/>maintain their legacy behavior, but they have been deprecated in favor of <br \/>new &#8222;HostedMode&#8220; and &#8222;Compiler&#8220; tools which use the new war output. When 1.6 <br \/>is officially released, we will be encouraging existing projects to update <br \/>to the new directory format and to use the new tools to take advantage of <br \/>new features and for compatibility with future GWT releases. <br \/>The sample projects provided in the GWT distribution provide an example of <br \/>correct new project configurations. For more details on the specifics of the <br \/>new project format, please see GWT 1.6 WAR design document ( <br \/>http:\/\/code.google.com\/p\/google-web-toolkit\/wiki\/WAR_Design_1_6). <br \/>A couple of important changes we should highlight here: <br \/>&#8211; Projects with server-side code (GWT RPC) must configure a &#8222;web.xml&#8220; file <br \/>at &#8222;\/war\/WEB-INF\/web.xml&#8220;. This web.xml file must define and publish any <br \/>servlets associated with the web application. See the included DynaTable <br \/>sample. Additionally, server-side library dependencies must be copied into <br \/>&#8222;\/war\/WEB-INF\/lib&#8220;. For example, any GWT RPC servlets must have a copy of <br \/>gwt-servlet.jar in this folder. <br \/>&#8211; HTML host pages will no longer typically be located in a GWT module&#8217;s <br \/>public path. Instead, we&#8217;ll be recommending that people take advantage of <br \/>the natural web app behavior for serving static files by placing host pages <br \/>anywhere in the war structure that makes sense. For exmaple, you might want <br \/>to load a GWT module from a JSP page located in the root of your web app. To <br \/>keep such handwritten static files separate from those produced by the GWT <br \/>compiler, the latter will be placed into module-specific subdirectories. Any <br \/>page that wishes to include a GWT module can do so via a script tag by <br \/>referencing the GWT-produced &#8222;&lt;module&gt;.nocache.js script&#8220; within that <br \/>module&#8217;s subdirectory. As of 1.6, we&#8217;ll be recommending that only <br \/>module-specific resources used directly by GWT code, such as image files <br \/>needed by widgets, should remain on the public path. See the included <br \/>Showcase sample for some examples of this distinction. <br \/>&#8211; When you do need to load resources from a module&#8217;s public path, always <br \/>construct an absolute URL by prepending GWT.getModuleBaseURL(). For example, <br \/>&#8218;GWT.getModuleBaseURL() + &#8222;dir\/file.ext&#8220;&#8218;. This advice has not changed, but <br \/>in the past it was easy to be sloppy with this, because the host page and <br \/>GWT module typically lived in the same directory, so using a relative URL <br \/>would usually do the right thing. Now that GWT modules live in a <br \/>subdirectory, you must reference public resources through <br \/>GWT.getModuleBaseURL(). <br \/>*** Hosted Mode Enhancements *** <br \/>Although the legacy GWTShell still uses an embedded Tomcat server, the new <br \/>HostedMode runs Jetty instead. There is also a new &#8222;Restart Server&#8220; button <br \/>on the main hosted mode window. Clicking this button restarts the internal <br \/>Jetty server, which allows Java code changes to take effect on the server <br \/>without having to completely exit and restart hosted mode. This is useful <br \/>when making code changes to RPC servlets, or when serializable RPC types are modified and the server and client are out of sync. <br \/>*** New EventHandler System *** <br \/>Event handlers have been added to replace the old event listeners used by <br \/>Widgets, History, and various other classes. The new system has a few <br \/>differences from the old system: <br \/>&#8211; EventHandler methods always take a single parameter: the GwtEvent that the Widget fired. For example, ClickHandler has a single method <br \/>onClick(ClickEvent). <br \/>&#8211; Each GwtEvent contains accessors relevant to the event, such as the key <br \/>that was pressed on KeyEvents. Native events provide access to the <br \/>underlying native event object. <br \/>&#8211; Each EventHandler defines only one method, so you do not need to create <br \/>empty methods just to satisfy the interface requirements. <br \/>For users who create their own Widgets, you no longer need to manage <br \/>listeners manually. Every Widget has a HandlerManager that manages all of <br \/>its handlers. For native events, such as ClickEvent, just call <br \/>addDomHandler() from within your code to register a handler and sink the <br \/>associated event on the Widget. When the native event is detected, the <br \/>handler will automatically be called. For logical events, such as <br \/>SelectionEvent, call addHandler() and fire the event manually using the <br \/>fireEvent() method. <br \/>You can see examples of EventHandler usage in many of the updated GWT <br \/>widgets and samples, or in new projects created with the new webAppCreator tool. <br \/>You can now trigger a native event on almost any Element. Create a new <br \/>native event using the Document.create*Event() methods, then dispatch it on a specific Element by calling Element.dispatchEvent(). These methods allow you to expand your test coverage in ways that were previously impossible. <br \/>*** New Widgets *** <br \/>DatePicker <br \/>The new DatePicker and DateBox widgets allow your users to select a date <br \/>from a calendar. The Showcase sample provides examples of both of these <br \/>widgets. <br \/>LazyPanel <br \/>The new LazyPanel widget allows you to delay the creation of certain <br \/>sections of your application until they are first accessed, improving <br \/>startup performance. For example, if your application has a seldom used <br \/>&#8222;Help&#8220; section, you can wrap it in a LazyPanel and create the user interface <br \/>only if and when the user tries to access it. To use the LazyPanel, extend <br \/>the class and override the abstract createWidget() method. The <br \/>createWidget() method will be called the first time you call setVisible() on <br \/>the LazyPanel. <\/p><\/blockquote>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Der erste Milestone von GWT 1.6 ist unter http:\/\/code.google.com\/p\/google-web-toolkit\/downloads\/list?can=1&amp;q=1.6.0 verf\u00fcgbar. In einem Google Group Beitrag werden die Neuerungen genannt: *** New Project Structure in GWT 1.6 *** One of the biggest changes to GWT 1.6 is a new project structure. The old output format has been replaced by the standard Java web app expanded &#8222;war&#8220; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[16,4],"tags":[],"class_list":["post-232","post","type-post","status-publish","format-standard","hentry","category-gwt","category-open-source"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}