Dynamic Error messages from a method in ADF BC Entity Objects

A question came up on the forum of how to be able to call an EO method to return the string for an ADF BC validation error message.  Its actually pretty easy using the power of Groovy.

1) Create your validation rule as before but for the error message just put {x}

2) This is you setting up a blank error with a parameter called x.

3) Now, for the message token X add the following Groovy expression source.returnErrorMessage() where returnErrorMessage is the name of your EO method.

4) Now you can dynamically build your error message in Java and call it from the framework.


Comments:

Could you give an example of the generated XML source taken from the definition of an EO with a simple validation rule on a column?

Posted by guest on May 30, 2011 at 05:25 PM BST #

Thank you! That was very helpful!

Posted by guest on March 29, 2013 at 10:29 AM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips, Tricks, Events and Information around Oracle JDeveloper, ADF, and Oracle Forms

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today