Showing posts with label 12c. Show all posts
Showing posts with label 12c. Show all posts

Wednesday, April 29, 2015

Consuming websevice in ADF with change in WSDL URLs between different Environments.

In projects where Web Services are consumed, most of the problems come when webservcies are deployed on different environments and url of Service/WSDL gets changed. In consuming application proxys are generated using on environment Service/WSDL and when application moves to another environments, the poxys need to consume the services deployed on that particular environment.

To achieve this requirement, there needs to be some mechanism or way where we can configure the environment Service URL in the consuming application and deploy the same to use the correct environment service.


Created a Simple Web Service and deployed it on both Local Integrated Server and Stand Alone server.



Saturday, January 31, 2015

Preselected CheckBox - SelectBooleanCheckBox in ADF Table

In this post, I will be extending the application from the post CheckBox in ADF Table and retrieve selected rows .

The use case is very common. When the table with checkbox (SelectBooleanCheckBox) in the rows is rendered, there should be preselected checkbox in the rows depending on some condition. To make it simple to understand in this post ,when the Departments Table is loaded on the page, the checkbox should be ticked for Departments IT and Marketing.


Lets get into the implementation.

For this use case, lets add a method in AMImpl class which has the logic to tick or pres elect the checkboxes for rows having department name as IT and Marketing. Below is the code in AMImpl class. Note that VOImpl and VORowImpl classes has been generated for DepartmentsVO.

CheckBox in ADF Table and retrieve selected rows

In this post I will explain a way to implement checkbox in the rows of ADF Table component. This is a generic approach and can also be used in other components but we will take example of table component for this post.

This is common requirement in many features e.g. Multiple Delete or assigning multiple things by selecting checkbox.

Lets dive into the implementation.

Created a simple ADF app with HR Schema using Departments Table. Created DepartmentsEO,VO and AM.

First since we need a checbox in every row of the Departments table, we need to add a transient attribute in DepartmentVO of Type Boolean. The value of this boolean (false or true) will render the checkbox as (checked or unchecked).

Monday, January 19, 2015

Get SelectOneChoice Code/Values in Managed Bean - ADF

The repeated question on OTN is how to get the code or value  of the selected item from SelectOneChoice. One of my post explains how we can achieve this using variable iterators in page definition. Here is the link for the post : http://rohanwalia.blogspot.sg/2013/09/retrieve-selected-value-from.html

Using the technique described in the above mentioned approach, we get hold of the id or value when we select the item from select one choice and we can use it on the page.

But the problem comes when this value is needed in a method of managed bean using ValueChange Listener . One scenario for this is that the code of selected item is required as an input to call a method exposed by ApplicationModule.

So our use case will be to get EmployeeId of selected Employee from LOV into valueChangeListener.

To start with lets quickly create a sample application. Used HR schema and created one jspx page selectOneChoice.jspx .

Go to the binding and create a new variable inside variable iterator.

Monday, December 22, 2014

Custom Exception Handling in ADF - Model Layer Generic Framework Design

I have observed that there are lot of users who asks questions on OTN and have problem in designing the custom generic exception handling framework. So in this and next some of the posts I will be describing how we can lay down a generic way to report custom exceptions to the page. These custom exceptions may be mostly for Business Specific errors for which we need to display a custom user friendly message on the page to the user.

In this post we will be seeing how we can customize the error on Model layer and take error messages from a resource bundle defined in the application.

Lets get started. We will first create a generic framework project where we will add exception handling related classes. We give it a name as FrameworkUtil. Framework util project will be dependent on model project from where custom Exceptions will be thrown in the enterprise applications.

First lets set up FrameworkUtil project - ADF Model Project 

Friday, November 28, 2014

NIAIOUG - 9th Tech Meet at Jaipur India

I will be a part of 9th NIAIOUG Tech meet at Jaipur Rajasthan India. This is for the first time NIAIOUG is organizing Oracle User Group Tech Meet in Rajasthan. I am very please to be part of this meet and look forward to a great audience at JECRC University Jaipur. Hope to see some awesome IT Professionals and Students in my session.

Aman, Nikhil and Navneet will be speaking on Database topics. This all will be very useful for DBA's as well as aspiring DBA's.

I will be speaking on ADF and Jdeveloper 12c. There will be a small demo at the end and then there will be open question answers session where anyone can ask questions as how to learn , move into Oracle ADF.

Hope to have a good time @ JECRC Jaipur.




Thanks !!