Using Groovy expressions to resolve validation error message tokens
In this recipe, we will expand on the Using a custom validator based on a View Object accessor recipe to demonstrate how to use validation message parameter values based on Groovy expressions. Moreover, we will show how to retrieve the parameter values from a specific parameter bundle.
Groovy is a dynamic language that runs inside the Java Virtual Machine. In the context of the ADF Business Components framework, it can be used to provide declarative expressions that are interpreted at runtime. Groovy expressions can be used in validation rules, validation messages, and parameters, attribute initializations, bind variable initializations, and more.
Getting ready
This recipe builds on the Using a custom validator based on a View Object accessor recipe. It also relies on the recipes Breaking up the application in multiple workspaces and Setting up BC base classes presented in Chapter 1,Pre-requisites to Success: ADF Project...