Sunday Aug 02, 2015

Programmatically Select all values in ADF BC based selectMany (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle) component by Ashish Awasthi

clip_image002

Previously i have posted a lot about component that supports multiple selection in ADF Faces (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)
- Multiple Selection in ADF Faces
This post is about selecting all values in a component programmatically on a event like button click, value change event etc.
Note that this post is designed for ADF BC (viewObject) based components , to set values in bean based component check this-
Programmatically populate values in ADF Faces multiSelect component (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)
So for this i have just dropped Departments viewObject as multiSelect component on page
(af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)

Page bindings section looks like this-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

Thursday May 28, 2015

ADF BC Web Service – Return List of Complex Types by Rohan Walia

clip_image002ADF Business Components can be exposed as SOAP Services. Application Module provides Service Interfaces as a way to define operations for the services to be exposed. Custom methods written in AMImpl class can also be exposed as operation of web services.
But one of the limitation is that there is restriction on return types from the services exposed as service interface from Application Module.
In this post we will see how easily we can develop a web service using ADF BC Service Interface and can tweak/use one of the given returnType List to return list of complex type object.
Use case here is to create an operation in ApplicationModuleImpl class to return List of Object consiting of three variables -  DepartmentName,ManagerId,IsManagerFlag and expose the operation as ADF BC Service Interface SOAP Service. (Jdeveloper 11.1.1.7)
So Lets get started
Created a simple ADF Web Application using HR Schema and created DepartmentsEO , VO and AM and there respective Java Classes.
Create a Programmatic VO - WSResultPVO which will be returned from the operation of the WebService.
Now Add three variables in the PVO. DepartmentName,ManagerId and IsManagerFlag. 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 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 Jan 27, 2015

ADF BC View Object SQL Query Customization with MDS by Andrejus Baranovskis

clip_image002This post is based on my previous article about MDS Seeded Customization - MDS Seeded Customization Approach with Empty External Project. Today I will focus on explaining how to customise SQL query for read-only VO. This is not so obvious as it sounds. However, it is doable - I will explain how.
Sample application - MDSCustomizationsApp_v2.zip contains both main and customisation projects. Main project implements read-only VO for Jobs data, it doesn't include Job Title attribute: 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

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






Sunday Jul 06, 2014

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

Following my previous post Using ADF BC Declarative Built-in Rules: Collection Validator I would like to cover another declarative build-in rule, the "Unique Key Validator".
The "Unique Key Validator" is an entity level validator that ensures that primary key values for an entity object are always unique. For example, in the Employees table in the HR schema you can create a "Unique Key Validator" on the "EMPLOYEE_ID" (since this is the primary key) to ensure that an employee should have a unique employee id. If a key (in this example an employee id) is found in either the entity's cache or the database a "TooManyObjectsException" is thrown. Let's see how you can define a "Unique Key Validator" on the EMPLOYEE_ID column of the EMPLOYEES HR table.
I've created a new ADF Application "UniqueKeyValidatorDemo" using the "Fusion Web Application (ADF)" template and using the "Business Components from Tables" wizard I've created an Entity "EmployeesEO" based on the EMPLOYEES table, a view "EmployeesVO" based on the "EmployeesEO" entity and an Application Module "UniqueKeyValidatorAM". 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

Sunday Feb 09, 2014

WebLogic Stuck Thread Case – Large Fetch Generated by Get Row ADF BC Method by Andrejus Baranovskis

This post is not about a bug, but rather about hidden underwater stone to avoid. Based on my previous use case for WebLogic Stuck Thread - Reproducing WebLogic Stuck Threads with ADF CreateInsert Operation and ORDER BY Clause, I will describe one more possible scenario for the same issue. This will be related to ADF BC API misuse, often it is unclear what side effect could produce at first friendly looking method. This method - getRow(key).
Please download complete sample application, if you are interested to reproduce it in your environment - LargeFetchApp_v3.zip.
This sample provides a method to generate dummy data for regions, around 10000 rows. View Object is using ORDER BY to display records in ascending order:

There is custom method created in AM implementation class. This method is calling ADF BC API getRow(key) method. Nothing dangerous at first, but here I'm using a key of the last record from the rowset - 10099. You may think, this is just a method to get a row by key. Yes true, but what it does for you - before returning one row by key, it will fetch all rows until this row into memory. It travels through each row one by one, until it gets a row with defined key. This may consume a lot of memory, especially if rowset is large and row with defined key is somewhere at the end of the rowset. Example of such method. 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 Jan 17, 2014

Reusing and extending ADF BC entities from common model by Red Samurai

This post is about ADF architecture and better application structuring with EO reuse from common model. I describe how to implement additional requirements to common model in extended ADF BC Entities. Great power of ADF framework - reusability. You should reuse as much as possible, this would simplify maintenance and future development of your application. I will be talking about ADF BC Entity Objects (EOs) reuse in this post. I would recommend to keep EOs in common model project and reuse them across the application. Fair requirement would be to have slightly different EO for specific use case - instead of creating new EO for the same DB table, we could extend original EO and implement specific changes. As for example, we may have different set of business rules, different doDML logic.
Sample application developed for this post includes Common Model library and Main application - eoreuse.zip. Common model library is based on Employees and Jobs EOs, associations and EO implementation generic class. 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
« August 2015
SunMonTueWedThuFriSat
      
21
28
29
30
31
     
Today