Store with a Database"

From Documentation
m
m
Line 21: Line 21:
 
[[File:ZKEss_many_problems.png]]
 
[[File:ZKEss_many_problems.png]]
  
You should see errors referring to the fact that annotations are only available in Java 1.5. Right click on one of the errors:
+
You should see errors referring to the fact that annotations are only available in Java 1.5. Right click on one of the errors and click Quick Fix:
  
 
[[File:ZKEss_annotations_1.5.png]]
 
[[File:ZKEss_annotations_1.5.png]]
  
This is easily remedied by finding the facet error in eclipse's problem tab, if you do not have that go to "Window ->Show view -> Other" then search for "Problems", select it and press OK.
+
On the following screen make sure "change project compliance to JRE 1.5 is selected and click finish:
  
Search through the problem list and find the error named "facet blah blah" which is usually near the bottom.  
+
[[File:ZKEss_project_compliance.png]]
  
Right click on it and press "Quick fix"
+
Having done that we should have approximately 1 item left in the problems list. This should state that the Java compiler level does not match the version of the installed Java project facet:
  
In the following screen choose Java 5 and press finish
+
[[File: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.
 +
 
 +
[[File:ZKEss_change_facet.png]]
  
 
You should find that all the errors are now fixed and you can continue to run the application.
 
You should find that all the errors are now fixed and you can continue to run the application.
  
 
{{ZKEssentialsPageFooter}}
 
{{ZKEssentialsPageFooter}}

Revision as of 06:55, 10 November 2010

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


To import the project into eclipse it is easiest to make use of the WAR file which has been provided in the SVN. We can directly import the WAR file using eclipse’s import mechanism.

  1. To start go to File -> Import in eclipse and you will be presented with the following dialog
    ZKEss import.png
  2. Type WAR into the filter text then select the storewithdb WAR file you just downloaded and 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. On 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 finish 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: Having imported if eclipse is registering a lot of errors then please see the section below labelled "Dealing with Errors"
    ZKEss imported.png

Dealing with Errors

You may be seeing a lot of errors in your project say something along the lines of:

ZKEss many problems.png

You should see errors referring to the fact that annotations are only available in Java 1.5. Right click on one of the errors and click Quick Fix:

ZKEss annotations 1.5.png

On the following screen make sure "change project compliance to JRE 1.5 is selected and click finish:

ZKEss project compliance.png

Having done that we should have approximately 1 item left in the problems list. This should state that the 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

You should find that all the errors are now fixed and you can continue to run the application.



Last Update : 2010/11/10

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