Tuesday 9 February 2016

GWT Tutorial:: FAQ on Module Descriptor

GWT Module Descriptor:

GWT Module is a configuration file which is used to configure the GWT application.
It contain with the file extension *.gwt.xml.
* is the name of the application and this file should be reside inside the project's root.
For Example If the project name is MyApp then the Module name will be MyApp.gwt.xml.

Below is the sample example which will explain about the Module Descriptor,

<?xml version="1.0" encoding="utf-8"?>
<module rename-to='MyApp'>
   <!-- inherit the core web toolkit stuff.  -->
   <inherits name='com.google.gwt.user.user'/>

   <!-- inherit the default gwt style sheet. -->
   <inherits name='com.google.gwt.user.theme.clean.Clean'/>

   <!-- specify the app entry point class. -->
   <entry-point class='com.example.client.MyApp'/>

   <!-- specify the paths for translatable code (the below folders get complied to JS)  -->
   <source path='client'/>
   <source path='shared'/>

   <!-- specify the paths for static files like html, css etc. -->
   <public path='...'/>
   <public path='...'/>

   <!-- specify the paths for external javascript files -->
   <script src="js-url" />
   <script src="js-url" />

   <!-- specify the paths for external style sheet files  -->
   <stylesheet  src="css-url" />
   <stylesheet  src="css-url" />

</module>


Even More then one entry point class can be defined in Module Descriptor which will be executed one by one.
GWT provides this default themes
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<inherits name="com.google.gwt.user.theme.chrome.Chrome"/> 
<inherits name="com.google.gwt.user.theme.dark.Dark"/>

No comments:

CSS Selectors

  CSS Selectors In CSS, selectors are patterns used to select the element(s) you want to style There are 3 different types of CSS selectors ...