Quantcast
Channel: Andrej Baranovskij Blog
Viewing all articles
Browse latest Browse all 705

ADF BC Groovy with Java Imports

$
0
0
ADF BC Groovy expressions support is really great and often saves a lot of time in development of complex functionalities. It comes very handy when retrieving referenced data or calling custom ADF BC methods. There is one more hidden gem offered by ADF BC Groovy - option to import Java packages directly into Groovy and use Java functionality.

Here is the example - I'm importing java.text.SimpleDateFormat directly from Groovy expression and then using Java formatting to retrieve month and year portion from current date. This expression is defined for default value of the transient attribute:


Simple and no headache - it just works:


Here you can download sample application for this post - AdvancedGroovyApp.zip.

Viewing all articles
Browse latest Browse all 705

Trending Articles