Store with a Database"

From Documentation
m
Line 3: Line 3:
 
The easiest way to import a project into Eclipse is to make use of the WAR file, which is provided in the SVN. We can directly import the WAR file using Eclipse’s import mechanism.
 
The easiest way to import a project into Eclipse is to make use of the WAR file, which is provided in the SVN. We can directly import the WAR file using Eclipse’s import mechanism.
  
#To start importing, please go to '''File -> Import''' in eclipse and you will see the following dialog.
+
#To start importing, please go to '''File -> Import''' in Eclipse and you will see the following dialog.
 
#:[[File:ZKEss_import.png]]
 
#:[[File:ZKEss_import.png]]
 
#Type WAR into the filter text and then select the storewithdb WAR file you just downloaded. Then, press '''Next'''.
 
#Type WAR into the filter text and then select the storewithdb WAR file you just downloaded. Then, press '''Next'''.

Revision as of 01:42, 9 February 2012

Stop.png This article is out of date, please refer to http://books.zkoss.org/zkessentials-book/master/ for more up to date information.


The easiest way to import a project into Eclipse is to make use of the WAR file, which is provided in the SVN. We can directly import the WAR file using Eclipse’s import mechanism.

  1. To start importing, please go to File -> Import in Eclipse and you will see the following dialog.
    ZKEss import.png
  2. Type WAR into the filter text and then select the storewithdb WAR file you just downloaded. Then, press Next.
    ZKEss war import.png
  3. Download the WAR file from https://zkbooks.googlecode.com/svn/trunk/zkessentials/storewithdb/storewithdb.war and place it into an accessible folder
  4. In the WAR import screen, browse for the WAR file and select it. The rest of the fields should be filled out automatically.
    ZKEss war import final.png
  5. Click Next and the WAR file will be imported.
  6. You should now have a clean project imported with no errors. At this point you can run the index.zul page on your server.
    NOTE: When importing, if eclipse is showing a lot of errors, please see the section below the Dealing with Errors label.
    ZKEss imported.png

Dealing with Errors

You may encounter a lot of errors, just like the screen below.

ZKEss many problems.png

If you see errors stating that annotations are only available in Java 1.5, please right click on one of the errors and click Quick Fix:

ZKEss annotations 1.5.png

In the following screen, please make sure change project compliance to JRE 1.5 is selected and click Finish:

ZKEss project compliance.png

Once it's done, we should have about one item left in the problems list, stating that Java compiler level does not match the version of the installed Java project facet:

ZKEss facet error.png


Right click on the error and click quick fix as before. Then in the following screen select the item Change Java project facet version to Java 5.0 and press Finish.

ZKEss change facet.png

All the errors should be fixed now and you can continue to run the application.



Last Update : 2012/02/09

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.