Book Image

SPRING COOKBOOK

Book Image

SPRING COOKBOOK

Overview of this book

Table of Contents (19 chapters)
Spring Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 5. Using Forms

In this chapter, we will cover the following recipes:

  • Displaying and processing a form

  • Getting a submitted form value using a controller method argument

  • Setting a form's default values using a model object

  • Saving form data in an object automatically

  • Using text, textarea, password, and hidden fields

  • Using a select field

  • Using a checkbox

  • Using a list of checkboxes

  • Using a list of radio buttons

  • Validating a form using annotations

  • Uploading a file