Working with spring MVC on a wizard-style complex form

Source: Internet
Author: User

Introduction

We often encounter some wizard-style form pages on the Internet, such as the first >> second >> the third step ..., basic information >> contact details >> Hobbies .... They are divided into multiple sequential pages by type to be completed. Of course, you can also list them all in a page, so that users will feel blankly, divided into priorities, may not be very good to cooperate.

However, like Struts, webwork, such as the MVC framework does not provide a similar implementation, all need to use some way to implement the wizard, you can use the layer of looming, or gradually fill in the part of the data into the session, the final summary processing. Fortunately, Spring MVC takes into account this application requirement, and it provides a org.springframework.web.servlet.mvc.AbstractWizardFormController to satisfy you.

Let's take a look at CSDN's Resume Wizard (the interface below) to do a hands-on example

The detailed steps are as follows (how to create the Spring MVC project in this case, Spring 2.0 is used, and the other version of spring is not very different, but Spring 2.0 starts with a very handy form tag, and in spring 1.0 you use the SP The combination of Ring:bind and JSTL shows that the data is really shabby, so that the MVC of Spring 1 is too immature. The code listed on this page has some non-critical points omitted, after the article has attached this example complete engineering document, may download.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.