Groovy makes ADF applications quicker to write than Oracle Forms!
By Grant Ronald on Oct 21, 2010
Ok, maybe not it all cases but the following came up while doing a rewrite of some Forms code in ADF. In Forms I had the following code:
The essence of this code is that if the use selects a payement type of CREDIT, then we need to select the customer's credit rating from the database and then compare that with whether it is "GOOD" or "EXCELLENT". If not, then the order has to be a cash order.
In ADF Business Components I was able to implement the same code with this Groovy expression (the condition for executing the validator is under the "Validation Execution" tag and is newValue == "CREDIT")
This uses an association accessor to get the credit rating for the current customer and then I can use the Groovy "in" operator to check that that value is within the permitted.
Of course, not a huge difference in the number of lines of code but fundementally a cleaner implementation with the added benefit that the ADF solution would detect if you had changed the customer's credit rating but not yet commited to the database. The Forms solution wouldn't pick that up.