Tuesday 29 April 2014

ADF : How to implement dependent list of values

ADF : How to implement dependent list of values


Common requirement in ADF is to implement Dependent List of Values or Choice list. We can achieve this requirement in ADF bc. 

Business Requirement: Each employee should belong to a department and the future manager should also be from the selected department.

Technical Requirement: Restrict the Manager LOV to the current selected Department.

1. Create a View Object DepartmentVO 
















2. Create a View Object EmployeeVO 























3. Create a View Criteria for EmployeeVO








































4. Create a LOV for ManagerId under DepartmentVO











































5. Adding List DataSource & List Attribute to LOV_ManagerId (By Clicking on Add Symbol). 
Shuttle the EmployeeVO to View Accessor. Click on Edit to pass the parmeter to EmployeeVO1.




























6. Passing parameter to View Accessor on runtime by providing the parameter.



























7. Select EmployeeId as the list attribute 








































8. Adding UI Hints to the LOV.






































9. Attach the DepartmentVO to an Application Module. And test it using BC4J Tester.




























Happy Coding. :) 

Thursday 24 April 2014

How to Create JDBC datasource in Oracle Weblogic server

How to Create JDBC datasource in Oracle Weblogic server


This post shows how to create a JNDI datasource in Oracle Weblogic 11g.

To work on DB adapter in Oracle SOA suite you must create the JDBC datasource in Oracle Weblogic Server and Connection factory under DBadapter in deployments.

Steps:
1. Login to weblogic console (normal http://localhost:7001/console) as administrator.










2. Click on DataSource


3. Click New > Generic Datasources. 

4. Fill in name, JNDI name, and choose Database type, then click Next

5. Choose Database Driver > Click Next

6. Enter JDBC Connection Details

7. Review & Test the Connection. Should be connection test succeeded. 

8. Select Target Server & Click Finish