Sunday, September 28, 2014

Form Wizard



Time needed to complete  ~25 minutes
Prerequisite  File Upload & Saving

1.Introduction

After uploading files and write them to the file system in the previous 2 articles, now it's time to add some style to the form to look like wizard.

2.What is used in this tutorial:


1- Maven 3
2- Jdk 1.7
3- Tomcat 7.0.55
4- Eclipse Luna 4.4
5- Spring Core 3.2.9
6- jquery 1.11.1
7- FormToWizard plugin

3.Project Structure



4. Plugin and css

- FormToWizard -Home page link- is plugin that will transform form to wizard the javascript file 
for plugin is in project path /fileUpload3/src/main/webapp/js/formToWizard.js it uses style/form2wizard.css 

- Add formTowizard.js and form2wizard.css to carAdForm.jsp Listing 4.1. 

7. Deploying to tomcat

Note: don't forget to change username and password for tomcat server in pom.xml file

- Start tomcat.
- Deploy application from run configuration in goal type clean install tomcat7:redeploy
   click Apply and Run buttons.
- In browser type http://localhost:8080/fu3/carAd/show to see  step 1 of the form wizard,  picture 7.1.


- There is a validation, clicking Next button without filling data in step 1 will show error message,
fill data and click next to display the 2nd step, picture 7.2 


-Choose file(s) and submit form. This will display success page, Picture 7.3.


8. Eclipse Project

No comments:

Post a Comment