Validation Using Built-in groovy expression

Validation Using Built-in groovy expression

ADF Groovy provides built-in expression, like adf.currentDate returns current date. In this blog I will explain how to use above built-in groovy expression to validate Hire Date attribute of Employees table.

Validation: Hire Date must be less than or equal to current Date.

  1. Select HireDate Attribute in Employees entity and go to validation tab.
  2. Then click on “Green Plus” icon to add new validation rule on attribute.
  3. On Dialog window select
    • Type=Compare
    • Operator=LessOrEqualTo
    • Comparewith=Expression

     

  4. Write expression adf.currentDate which return current date as following image
  5. On Failure Handling tab write message

 

Output:-

 

About Manish Pandey

Manish is a Project Leader at Jagran Prakashan Ltd, focused on Jdeveloper Fusion Web Application(specifically Oracle ADF). He shares his knowledge through the OTN Jdev/ADF Forum. He has written more than 50 article about Oracle ADF and Jdeveloper.

Leave a Reply