Learn Java for Web Development
CHAPTER 7: Rapid Web Development with Grails 319 Note In this way you can augment the unit test for your Controller in the Contr ...
320 CHAPTER 7: Rapid Web Development with Grails Listing 7-7. Replacing the Test with an Incorrect Assertion void testSomething( ...
CHAPTER 7: Rapid Web Development with Grails 321 Creating a Domain Class At this point, the application we created doesn’t reall ...
322 CHAPTER 7: Rapid Web Development with Grails When you click Domain Class in Figure 7-19, the Grails Command Wizard window is ...
CHAPTER 7: Rapid Web Development with Grails 323 Enter the name of the domain class in the name field and click Finish. Grails c ...
324 CHAPTER 7: Rapid Web Development with Grails Listing 7-9. Book Domain Class 1.package bookstore 2. 3.class Book { 4.String b ...
CHAPTER 7: Rapid Web Development with Grails 325 Scaffolding Scaffolding lets you autogenerate a whole application for a given d ...
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 sc ...
CHAPTER 7: Rapid Web Development with Grails 327 Figure 7-24 illustrates the newly created book. Figure 7-23. Create view Figure ...
328 CHAPTER 7: Rapid Web Development with Grails Figure 7-26 illustrates the updated book. Figure 7-25. Edit view Figure 7-26. S ...
CHAPTER 7: Rapid Web Development with Grails 329 Static Scaffolding Static scaffolding provides an excellent learning tool to he ...
330 CHAPTER 7: Rapid Web Development with Grails Listing 7-12. Command for generating the application through static scaffolding ...
CHAPTER 7: Rapid Web Development with Grails 331 The first thing you will notice in the BookController code illustrated in Figur ...
332 CHAPTER 7: Rapid Web Development with Grails As illustrated in Listing 7-13, the controller, when invoked with a request to ...
CHAPTER 7: Rapid Web Development with Grails 333 Returning a Model The third option to exit a controller action is either to ret ...
334 CHAPTER 7: Rapid Web Development with Grails Listing 7-19. The List Action of the BookController def list(Integer max) { par ...
CHAPTER 7: Rapid Web Development with Grails 335 If there are errors, the user is redirected to the create() action. For this re ...
336 CHAPTER 7: Rapid Web Development with Grails Update Action The update() action is called when changes from the edit view are ...
CHAPTER 7: Rapid Web Development with Grails 337 Delete Action The delete() action is available, by default, in the edit and sho ...
338 CHAPTER 7: Rapid Web Development with Grails 5. 6. 7. 8. 9. 10. 11. 12.<link rel="shortcut icon" href="${resource(dir: 'i ...
«
12
13
14
15
16
17
18
19
20
21
»
Free download pdf