Learn Java for Web Development

(Tina Meador) #1

326 CHAPTER 7: Rapid Web Development with Grails


You can create or add a new book by clicking New Book. Figure 7-22 shows the screen for creating
a new book. Figure 7-22 also shows validation in action for which you did not have to write any
code. The code for this validation was included in the domain class Book, as illustrated in Listing 7-9
on lines 8 to 11.


Figure 7-21. Book List view


Figure 7-22. Create view with validation in action


Figure 7-23 illustrates creating a new book by fulfilling all validations.

Free download pdf