Store with a Database"

From Documentation
m (Redirected page to ZK Essentials)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
#REDIRECT [[ZK Essentials]]
 +
 
{{ZKEssentialsPageHeader}}
 
{{ZKEssentialsPageHeader}}
  
When it comes to importing a project into eclipse, the easiest way 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.
+
===Prerequisites===
 
 
#To start importing, please go to File -> Import in eclipse and you will see the following dialog
 
#:[[File:ZKEss_import.png]]
 
#Type WAR into the filter text and then select the storewithdb WAR file you just downloaded and press '''Next'''.
 
#:[[File:ZKEss_war_import.png]]
 
#Download the WAR file from https://zkbooks.googlecode.com/svn/trunk/zkessentials/storewithdb/storewithdb.war and place it into an accessible folder
 
#In the WAR import screen, browse for the WAR file and select it. The rest of the fields should be filled out automatically
 
#:[[File:ZKEss_war_import_final.png]]
 
#Click '''Next''' and the WAR file will be imported
 
#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.
 
#:[[File:ZKEss_imported.png]]
 
 
 
===Dealing with Errors===
 
 
 
You may be seeing a lot of errors in your project say something along the lines of:
 
 
 
[[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 and click Quick Fix:
 
 
 
[[File:ZKEss_annotations_1.5.png]]
 
 
 
On the following screen make sure "change project compliance to JRE 1.5 is selected and click finish:
 
 
 
[[File: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:
 
 
 
[[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 require Maven for ZK Studio/Eclipse, if you do now have it you can follow this tutorial on [http://m2eclipse.sonatype.org/installing-m2eclipse.html installing it]
  
You should find that all the errors are now fixed and you can continue to run the application.
+
===Set-up the ZK Essentials sample===
 +
#For this section we will assume you download the application first rather than do a git checkout from Maven
 +
#Therefore [https://github.com/zkbooks/ZK-Essentials/zipball/withdb click here] to download the store without a database, and unzip to any folder you want
 +
#In ZK Studio go to New -> Import, and type "Existing Maven Projects", highlight the option and click next
 +
#:[[File:ZKEssentials_Existing_Maven_Projects.png]]
 +
#Click browse and locate the extracted zkessentials directory and press OK
 +
#:[[File:ZKEssentials_Click_Browse.png]]
 +
#Check the checkbox next to the POM and press finish
 +
#:[[File:ZKEssentials_check_the_POM.png]]
 +
#The ZK Essentials project will now be in your workspace ready to run after maven downloads all the appropriate files
  
 
{{ZKEssentialsPageFooter}}
 
{{ZKEssentialsPageFooter}}

Latest revision as of 23:55, 28 March 2013

Redirect to:

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


Prerequisites

  • You require Maven for ZK Studio/Eclipse, if you do now have it you can follow this tutorial on installing it

Set-up the ZK Essentials sample

  1. For this section we will assume you download the application first rather than do a git checkout from Maven
  2. Therefore click here to download the store without a database, and unzip to any folder you want
  3. In ZK Studio go to New -> Import, and type "Existing Maven Projects", highlight the option and click next
    ZKEssentials Existing Maven Projects.png
  4. Click browse and locate the extracted zkessentials directory and press OK
    ZKEssentials Click Browse.png
  5. Check the checkbox next to the POM and press finish
    ZKEssentials check the POM.png
  6. The ZK Essentials project will now be in your workspace ready to run after maven downloads all the appropriate files



Last Update : 2013/03/28

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