It is often apparent — and frustrating for users — when an Ajax application does not integrate with browser history. For example, users expect browsers to be able to navigate back to previously visited pages using back and forward actions. Because an Ajax application is a usually a single page running JavaScript logic and not a series of pages, the browser history needs help from the application to support this use case. GWT does not provide full emulation for the date and number formatting classes such as java.
DateFormat, java. DecimalFormat, java. NumberFormat, and java. Combined with the includeSourceMapUrl config property, it is possible to set up source-level debugging outside Super Dev Mode. Changes to generated JavaScript Catching and rethrowing a JavaScript exception no longer wraps it in a Java exception so the console will print it correctly, etc. This behavior can be reverted by inheriting SynchronousFragmentLoadCallback. Class: added getSimpleName ArrayList. Type: added java.
Objects: added Java 7 java. Timer: cancel fixed for IE issue Browser permutation changes The ie6 permutation which also handles IE 7 is now disabled by default. UserAgent: new class to access user. HandlerRegistration issue Widget changes CellView: focus fix issue DataGrid fixes: style name, scroll bars issue DatePicker: lots of improvements. Grey out unused Java in source code listings on the code server. RemoteServiceServlet: the gwt. Upgraded dependencies HtmlUnit 2. Changes since 2.
Despite the fix, this is not recommended. Compiler and Linkers Minor optimization improvements. Optimization bugfixes: , , Apps built with DirectInstallLinker should work in a page where inline scripts are forbidden e. Removed GWTShell, an obsolete way of starting dev mode. Added a checkbox to automatically scroll the log.
Also, the Chrome plugin is now in the Chrome store. Super Dev Mode Added a -noprecompile option for faster startup. Added support for IE8 recompiles only, not debugging. Reduced download size by using gzip. Fixed an incompatibility with third-party JavaScript that modifies the Array prototype.
Location to return the new parameter values after a call to window. Added RequestBuilder. Currently, the only difference is that animation will use a timer. Security vulnerability from 2. The accessibility library introduced in RC1 has been cleaned up for release. Support for validation is improved, documented, and no longer considered experimental. Other fixes; see the issue tracker for more. Addition of a result caching API that generator writers can use r, r Drastic improvement in RPC performance in development mode by providing a development-mode-only implementation for RPC.
Addition of source map support. See this document for more details. Reduction of overhead of Java types in compiler output r Addition of pre-deserialization type checking to reduce the number of error messages that occur from attempts to invoke an RPC method with type mismatches r DateCell now accepts a TimeZone as a constructor arg. Improvements in reporting of JavaScriptExceptions in development mode to include the method name and arguments.
CssResource defs now support multiple values r CLDR data updated to v2. Added simple and global currency patterns r Various fixes to stabilize the compiler output on null no change recompiles. Added the -Dgwt. Added GWT emulation for Float. Added support for typed arrays r Greatly reduce symbol map size by removing already-pruned symbols from the map.
Deprecated methods AbsractCellTable. See r and r for details. See r Use Tree[Item]. GwtTransient will now work for any annotation that with that simple name for example, com. This prevents library writers from having their library depend on the GWT distribution.
This is useful for debugging and testing r The permutation mapping file is now generated as part of every compile. See r for more details. The following dependencies have been updated to the following versions: Eclipse JDT 3. The compiler metrics aspect of the Compile Report has been disabled by default. The compile report results in instability in the Compile Report. To add compiler metrics to the compilation report, use the -XcompilerMetrics flag.
The compiler. Known Issues Clicking in the navigation area but not on an actual item of the Showcase sample results in the navigation area going blank.
This results in faster startup time for iterative development. Scrolling DataGrid : The new DataGrid widget supports vertical scrolling with a fixed header above and footer below. Design Time Support : The Beans. Security vulnerability in GWT 2. It can be installed via the JBoss Update site. It is enabled by default for new Cloud-Connected Android Projects only. General Enhancements Added IE9 support.
See the IE9 - Tips and Tricks doc for more information. This warning occurs because although UiBinder HTML rendering has been updated to support SafeHtml , by default this is turned off set to false , due to some minor bugs.
You can determine whether you are affected by the known bugs by checking the public bugs , , and More information on this feature can be found here. Version 2. While Java 1. These errors can be ignored as they are related to classes that are most likely not used by your app, and will be omitted during compilation, or while running in dev mode.
Fixed Issues Image. List interface Safari 5 fails to execute non-integral right-shifts correctly Release Notes for 2. Noteworthy Fixed Issues Standard. Potentially breaking changes and fixes Fixed a bug in how code generators collect method arguments from generated source, which impacted the Messages interfaces generated for UiBinder template files. In GWT 2. Most GWT applications will be unaffected, but external systems relying on these names will need to be updated. The development mode server will, by default, only bind to localhost which will break cross-machine debugging.
You can get the old behavior by specifying -bindAddress 0. Please see issue for more details. For webAppCreator-generated ant files, you can pass this with ant -Dgwt.
The official doc is still in progress, but for an overview please see Layout Design on the wiki. UiBinder now directly supports LayoutPanel. The -web argument is now deprecated in favor of -prod , consistent with the terminology change from web mode to production mode. The junitCreator command line utility has been removed. This could break native code that looks iterates through the properties of such an object.
The generated reports are now written to the private extra directory. This eliminates an unlikely security risk of accidentally deploying compile reports to a publicly accessible location. Various Swing UI improvements. Things that are changing with GWT 2. You download the same zip file for every development platform.
This is made possible by the new plugin approach used to implement development mode see below. Development mode is supported through the use of a native-code plugin called the GWT Developer Plugin for many popular browsers. In other words, you can use development mode directly from Safari, Firefox, Internet Explorer, and Chrome.
Imagine having to download a whole movie before being able to watch it. With code splitting, you can arrange to load just the minimum script needed to get the application running and the user interacting, while the rest of the app is downloaded as needed.
Previously, widgets had to be created and assembled programmatically, requiring lots of code. Now, you can use XML to declare your UI, making the code more readable, easier to maintain, and faster to develop. The Mail sample has been updated to show a practical example of using UiBinder. Bundling of resources via ClientBundle. GWT introduced ImageBundle in 1.
ClientBundle generalizes this technique, bringing the power of combining and optimizing resources into one download to things like text files, CSS, and XML. This means fewer network round trips, which in turn can decrease application latency — especially on mobile applications. As a result, running unit tests required starting an actual browser. As of 2. Instead, it uses HtmlUnit as the built-in browser. Because HtmlUnit is written entirely in the Java language, there is no longer any native code involved in typical test-driven development.
The development mode entry point has changed a few times since GWT 1. As of GWT 2. Sorry to keep changing that on ya, but the good news is that the prior entry point still works. But, to really stay current, we recommend you switch to the new DevMode entry point. In other words, to start development mode from the command-line, type ant devmode. HtmlUnit does not attempt to emulate authentic browser layout.
Consequently, tests that are sensitive to browser layout are very likely to fail. However, since GWTTestCase supports other methods of running tests, such as Selenium, that do support accurate layout testing, it can still make sense to keep layout-sensitive tests in the same test case as non-layout-sensitive tests.
Versions of Google Plugin for Eclipse prior to 1. You can fool it by sym linking or copying gwt-dev. Strict Floating-Point : The Java language specification precisely defines floating-point support, including single-precision and double-precision numbers as well as the strictfp keyword. GWT does not support the strictfp keyword and can not ensure any particular degree of floating-point precision in translated code, so you may want to avoid calculations in client-side code that require a guaranteed level of floating-point precision.
GWT supports only a small subset of the classes available in the Java 2 Standard and Enterprise Edition libraries, as these libraries are quite large and rely on functionality that is unavailable within web browsers. Tip: You will save yourself a lot of frustration if you make sure that you use only translatable classes in your client-side code from the very beginning.
To help you identify problems early, your code is checked against the JRE emulation library whenever you run in development mode. As a result, most uses of unsupported libraries will be caught the first time you attempt to run your application. Regular Expressions : The syntax of Java regular expressions is similar, but not identical, to JavaScript regular expressions.
For example, the replaceAll and split methods use regular expressions. So, you will probably want to be careful to only use Java regular expressions that have the same meaning in JavaScript. Serialization : Java serialization relies on a few mechanisms that are not available in compiled JavaScript, such as dynamic class loading and reflection.
As a result, GWT does not support standard Java serialization. Instead, GWT has an RPC facility that provides automatic object serialization to and from the server for the purpose of invoking remote methods.
In some classes, the functionality of the class is too expensive to be emulated entirely, so a similar routine in another package is provided instead. Under the main project directory create the following directories: src folder - contains production Java source war folder - your web app; contains static resources as well as compiled output test folder - optional JUnit test code would go here Within the src package, create a project root package, and within that create a client package.
If you have server-side code, also create a server package to differentiate between the client-side code which is translated into JavaScript from the server-side code which is not. Within the project root package, place one or more module definitions. In the war directory, place any static resources such as the host page, style sheets, or images.
Within the client and server packages, you are free to organize your code into any subpackages you require. Package File Purpose com. Inherits com. User and adds an entry point class, com. Files in the public directory are copied into the same directory as the GWT compiler output.
The war directory The war directory is the deployment image of your web application. NOTE: by default this directory would be the long, fully-qualified module name com. The test directory The test directory contains the source files for any JUnit tests. Entry-Point Classes A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. Source Path Modules can specify which subpackages contain translatable source , causing the named package and its subpackages to be added to the source path.
Public Path Modules can specify which subpackages are public , causing the named package and its subpackages to be added to the public path. Create a top level module XML definition that includes all the modules you want to include.
Compile the top level module to create a single set of JavaScript output. Controlling compiler output The GWT compiler separates the act of compiling and packaging its output with the Linker subsystem. Any file appearing in this package or any of its subpackages will be treated as a publicly-accessible resource. Any number of servlets may be loaded in this manner, including those from inherited modules. Elements for Deferred Binding The following elements are used for defining deferred binding rules.
Standard Modules GWT 1. User User. JUnit JUnit. Chrome Chrome. Dark com. Dark Dark. Standard com. Standard Standard. Automatic Resource Inclusion Modules can contain references to external JavaScript and CSS files, causing them to be automatically loaded when the module itself is loaded. Including External JavaScript Script inclusion is a convenient way to automatically associate external JavaScript files with your module.
Including External Stylesheets Stylesheet inclusion is a convenient way to automatically associate external CSS files with your module.
Relative vs. Inclusion and Module Inheritance Module inheritance makes resource inclusion particularly convenient. Only the following attributes and nested elements are currently supported: The includes attribute The excludes attribute The defaultexcludes attribute The casesensitive attribute Nested include tags Nested exclude tags Other attributes and nested elements are not supported. Important The default value of defaultexcludes is true.
Most browsers will allow a maximum of two simultaneous connections for fetching resources. The body. The GWT selection script i.
0コメント