|
Using GWTCOMP in your Projects
To use the GWTCOMP in your project, follow the steps below:
- Create your GWT project as instructed in the GWT web
site if you do not have one already.
- If you are downloaded the source distribution or downloaded
from the Subversion repository, build the project as described here. This will build the binary
distribution.
- The root directory of the GWTCOMP distribution has 2 jar
files that is of interest:
gwtcomp.jar - copy
this file into your classpath. It contains all the GWTCOMP classes you
need. You do not need to package this file into your distribution once
you have run the GWT compiler to compile the code into Javascript.
However, the GWT compiler needs this file in the classpath for
compiling.
gwtcomp-servlet.jar -
copy this file in your web (servlet) project in the WEB-INF/lib
directory. This file is optional and is needed only if you are using
some of the widgets that require a back-end servlet (like the
ServerFileBrowser), the server-side utility classes or utility
servlets. Also note that you will need to add entries into the
web deployment description - web.xml for some of the widgets and
servlets. See the javadocs for
individual classes for details.
- chronoscope-X.X.jar and
gwtexporter.jar - copy
these file into your classpath. These files contain the classes for
charting that is internally used by GWTCOMP. You will need these files
even if you are not using the live charting components.
- If you are using the FileUploadServlet or other servlets,
you will also need to include the jar files under the lib directory.
See the javadocs for individual
classes for details.
- If you are using the drag and drop widgets, you will need
to include the references to the scriptaculous javascript libraries in
your application HTML page. Please see the javadocs for individual
classes for details.
- To your GWT module XML file, add the following line:
<inherits
name="org.cafesip.gwtcomp.GWTComponents"/>
immediately after the line:
<inherits
name="com.google.gwt.user.User"/>
- If you want to use the CSS style-sheet that we have created
for the GWTCOMP widgets instead of using your own, to the GWT module
HTML file, add the following HTML segment:
<link type="text/css" rel='stylesheet'
href='gwtcomp-css/gwt-components.css'/>
A better option is to copy this file from our source distribution into
your workspace and add the CSS link pointing to your CSS file. See the javadocs for individual widgets for
details.
- Start using the GWTCOMP widgets, utility classes and
servlets. Make sure you have read the javadocs for class and method
documentation, style references, examples and screen-shots,
|