View Code
Let’s learn how the view code changes that incorporate enumerations into the application.
The enumeration application’s UI for creating a new book record will contain these four choice widgets:
- A single selection list for the attribute
originalLanguage
. - A multiple selection list for the attribute
otherAvailableLanguages
. - A radio button group for the attribute
category
. - A checkbox group for the attribute
publicationForms
.
Selection lists
We use HTML selection lists to render the enumeration attributes originalLanguage
and otherAvailableLanguages
in the createBook.html
and upateBook.html
HTML forms. Since the attribute otherAvailableLanguages
is multi-valued, we need a multiple-selection list, shown in the following HTML code:
Get hands-on with 1400+ tech skills courses.