Google Web Toolkit integration

Development

Getting Started

Each resource type can have its own GWT code, e.g.the policy manager resource type

src/resources/policymanager/src-gwt

One can build the GWT source by running the gwt:compile ant target, e.g.

./build.sh -f src/resources/policymanager/build.xml gwt:compile

whereas please make sure that the resource type build file imports the GWT-RT.build.xml file instead the regular file resource-type.build.xml

The gwt:compile target compiles the GWT Java code to cross-browser Javascript code and saves it within the htdocs directory of the corresponding resource type, e.g.

src/resources/policymanager/htdocs/org.wyona.security.gwt.accesspolicyeditor.AccessPolicyEditor

Configuration of GWT version

The GWT version can be configured per resource type within src/build/GWT.build.properties, e.g.

src/resources/policymanager/src/build/GWT.build.properties

Speeding up development

By default the GWT source is compiled for all GWT-supported browsers. While developing this can be overridden per resource type within the module configuration (property user.agent), e.g.

src-gwt/java/org/wyona/security/gwt/accesspolicyeditor/AccessPolicyEditor.gwt.xml

There are also some more flags within src/build/resource-types/GWT-RT.build.xml which can be set and help speeding up development, such as for example the -draftCompile fiag, but please be aware that these flags depend on the GWT version you are using (see above: Configuration of GWT version).

Each src-gwt directory can contain an optional build properties file, e.g.

src/resources/policymanager/src-gwt/build.properties

containing the module names, e.g.

module.name=org.wyona.security.gwt.accesspolicyeditor.AccessPolicyEditor

which helps to speed up development, because only this specific module will be compiled. But one can have several modules per src-gwt (*.gwt.xml) directory and if one wants to compile all at once, then one should remove such build.properties files.

Misc



Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.