Groovy expression

ADF Business Components utilize Groovy expressions to support scripting. Groovy is an open source, Java-like scripting language that can be stored in an XML definition file. For instance, the attribute name for the employee name Ename can directly be used in a Groovy expression to represent the value of the Ename attribute.

Groovy follows the same JavaBeans way of accessing the methods of an entity object that is defined in the Java class. Following are some of the ways to call the method of entity objects in a Groovy expression:

Java method

Groovy expression

isEmployee()

employee

getEmployee()

employee

getEmpNo(int n)

source.emp(5)

checkEmployeeName()

source.checkEmployeeName()

checkEmployeeNo(int n) ...

Get Oracle ADF 11gR2 Development Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.