Sunday Apr 19, 2015

Using ADF BC Declarative Built-in Rules (Part 9 of 10): Script Expression validator by Antonis Antoniou

clip_image002The last set of validators consist of the "Script Expression" validator and the "Method" validator which can be defined either at the entity level or the attribute level to validate either the entire entity object or a specific entity attribute. The "Script Expression" validator enables you to validate either the entire entity object or a specific entity attribute using a Groovy expression that returns either true, meaning that the validation is successful or false to define that the validation has failed.
The "Script Expression" validator has some very interesting characteristics which we will see in practice using an example by Frank Nimphius
I will be using the HR schema and the employees table to define an attribute level validation using a "Script Expression" to define a departmental salary budget and to ensure that the cumulative salary of employees per department does not exceed their respective departmental salary budget.
I have created an ADF Fusion Web Application and created the basic business components that I will be using in this demo; two entity objects based on the Employees and Departments HR tables, default view objects based on the two entity objects and a default application module. Read the whole article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday Dec 30, 2014

Using ADF BC Declarative Built-in Rules (Part 6 of 10): List validator by Antonis Antoniou

clip_image002Using ADF BC Declarative Built-in Rules (Part 6 of 10): List validator

The "List Validator" is yet another validator that can be defined at either the entity level or the attribute level but pertains to an entity object attribute to ensure that a value is either in a list or not.
So the "List Validator" compares an attribute against a list of
a) literal values ensuring that the value is in or not in the list of literal values that you define,
b) against an SQL query ensuring that the value is in or not in the first column of the query's result set,
c) against a view attribute ensuring that the value is in or not in the attribute of the specified view object or
d) against a view accessor ensuring that the value is in or not in the specified attribute in all rows of the view object retrieved by the view accessor.
Let's see a demo of the "List Validator". I have created a new ADF Fusion Web Application and created the basic business components that I will be using in this demo, an entity object based on the Departments HR table, a view object based on the Departments entity object and a default application module. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Sunday Nov 09, 2014

Using ADF BC Declarative Built-in Rules (Part 4 of 10): Key Exists Validator by Antonis Antoniou

The “Key Exists” Validator is validator that can be defined at either the entity level or the attribute level but pertains to an entity object attribute to check whether a key exists based on a primary key, foreign key or an alternate key. The “Key Exists” validator will check first the cache querying rows not committed yet to the database and if the key is not found in the cache will run a check in the database.
So let’s start by creating a new ADF Fusion Web Application and create the basic business components that we will be using in this demo, two entity objects based on the Countries and Regions HR tables, their associated view objects and a default application module. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki






Friday Apr 25, 2014

Using ADF BC Declarative Built-in Rules: Collection Validator by Antonis Antoniou

I recently gave an ADF training and realized that many people where having difficulties using the predefined validation rules in ADF Business Components so i decided to write a series of blog posts describing the the types of validation available to ADF BC applications. There are various options for handling validation in ADF applications. You can either define validations on your business service layer or directly on your user interface.
Validations options on your business service layer consist of declarative and programmatic ADF BC validations and validations defined on your database. Validation options on your user interface consist of built-in validation capabilities on components such as input components and select components. Please make sure though that validations defined on the user interface are also defined on your business service layer to leverage the validations defined on your business service layer when you choose to expose your model in other ways.
Validations can be defined at either the entity level or on a specific attribute. I will be covering in posts that will follow all validation rules. In this post i will explain how you can use the collection validator.
The collection validator is an entity level validator used to compute an aggregate value on an attribute in a child of the current entity object using an aggregate function such as Sum, Count, Average, Min and Max.
I will be using the HR schema to demo the Collection Validator and let's assume the following requirement. A department has a specific budget (let's say 20,000 Euros) comprised of the sum of its employees' salary.
I've created an application, "Collection Validator" using the "Fusion Web Applications (ADF)" template and accepting all the default settings (i just provided my own package name). Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Friday Mar 28, 2014

Working with the select Many Checkbox component by Antonis Antoniou

I recently came across a simple, yet not so straightforward use case as it seems for many ADF developers on the JDeveloper & ADF forum so I decided to blog about it.

The requirement was to use the selectManyCheckbox component and to save the selection in the database in a varchar2 column of type.

So I created a custom table in the HR schema, MY_EMPLOYEES with 3 columns; ID (number), NAME (varchar2) and DEPARTMENTS (varchar2).

I then created the basic ADFBC objects (an entity MyEmployees based on the MY_EMPLOYEES table, a view MyEmployeesView based on the MyEmployees entity and an application module AppModule that has the MyEmployeesView selected in the data model). Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
2
3
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
31
 
       
Today