Chapter 6. Advanced web applications

 

This chapter covers

  • Customizing Spring Roo scaffolds
  • Customizing Roo UI elements
  • Localization

In the last chapter, we discussed how to build Spring MVC web applications, apply scaffolding to automatically generate your controllers and views, and how the Roo custom tag libraries add dynamic behaviors such as client-side validation.

Push-In the Scaffolds for Full Control

When you’re ready to diverge from the standard scaffolding, you can choose to either start with a new controller and views, or use the scaffolding as a baseline. To do the latter, use your IDE (STS or IntelliJ) to push-in every method so that all of the controller code resides in the controller itself. You can then simply remove the @RooWebScaffold annotation and begin to customize your forms directly.

Once the scaffold has been pushed in, you can do anything you want. The z= view tags won’t be used anymore, so you can make changes to the views in any way you see fit. Keep in mind that your views will no longer be maintained against your entity, so any new fields you add must be manually added to your view code.

6.1. Customizing Roo CRUD views

6.2. Advanced customization

6.3. View layouts, theming, and localization

6.4. Summary

6.5. Resources