Rechercher dans ce blog

mercredi 2 mai 2012

12. GWT Configuration

When you create a GWT application, here are a few hints.

Normally a file should be created called: your_project.gwt.xml. This file will contain the description of the GWT application. In the case of the yocto-meteo project, here is the content:
 
19    
20   <module rename-to='worldmap'> 
21       <!-- Inherit the core Web Toolkit stuff.                        --> 
22       <inherits name='com.google.gwt.user.User'/> 
23    
24       <!-- Inherit the default GWT style sheet.  You can change       --> 
25       <!-- the theme of your GWT application by uncommenting          --> 
26       <!-- any one of the following lines.                            --> 
27       <inherits name='com.google.gwt.user.theme.standard.Standard'/> 
28       <inherits name='com.google.gwt.maps.GoogleMaps'/> 
29       <inherits name="com.google.gwt.logging.Logging"/> 
30       <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> 
31       <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     --> 
32    
33       <inherits name="yoctopuce"/> 
34    
35       <set-property name="gwt.logging.logLevel" value="FINE"/> 
36       <set-property name="gwt.logging.enabled" value="FALSE"/> 
37       <set-property name="gwt.logging.consoleHandler" value="DISABLED"/> 
38    
39       <set-configuration-property name="document.compatMode" value="BackCompat"/> 
40    
41       <!-- Other module inherits                                      --> 
42    
43       <!-- Specify the app entry point class.                         --> 
44       <entry-point class='org.yocto.sample.client.WorldMap'/> 
45   </module>


  • At line 20: we specify the name of the application: it is used in the HTML file including the generated javascript
  • At line 22: we load the GWT core
  • At line 33: we inherit the content of yocto-common (that has been created as a GWT module as well)
  • At line, 28: we add two plugins: google maps in order to see the world map and the logging in order to have java.util.Logger API.
  • At line 35: we specify the logging properties, by default the logging is enabled (very useful). You can decide to disable it when you go in production
  • At line 44: we specify the entry point: the main class that must implement EntryPoint interface.


Aucun commentaire:

Enregistrer un commentaire