ADF table : EL for current row

We can use the following EL to check if a row in a table is current row.

row.row ==  bindings.MyTableVO1.currentRow

Example : To highlight the current row with green color, following inline style can be specified to all columns of the table.

#{row.row ==  bindings.MyTableVOVO1.currentRow ? ‘background-color:Green;’ : ‘default’}

Posted in ADF | Leave a comment

Webcenter 11g : Gist of my understanding

Webcenter can be used to create applications which contain web application features and portal features both at the same time and also contain capabilities of social networking and is built on SOA standards. This way, enterprises can have a new kind of applications where everything can be accessed from one place.  All legacy applications, data from different repositories, content and everything can be tied together and provided to user based on context.  Users can have their own private and public spaces where information and ideas can be stored and shared.

The following pictures show the architecture of Webcenter 11g.

Webcenter 11g is built over ADF (Application Development Framework) and it mainly consists of the following components.

  • Webcenter framework
  • Webcenter Services
  • Oracle Composer
  • Webcenter Spaces

Oracle Webcenter Framework:  This is a design time extension to jdeveloper and injects portal capabilities into ADF. Features of Webcenter framework include Content Integration, Portlet Container, Resource Catalog, Customizable Components, Portal Framework, Search Framework, Oracle JSF Portlet Bridge and Portlet Runtime.

Content Integration allows to drop content on pages from content management systems like UCM, file system, portals etc.

Portlet container is used to deploy and register portlets.

Resource Catalog allows developer to search for resources that are existing in different repositories. Ex of some resources are layouts, ADF faces, components, portlets,  task flows  and documents.

Customizable components decide whether your page is personalizable or customizable at runtime. Oracle Composer is exposed to webcenter framework for creating customizable components.

Portal Framework enables building and deploying portlets which are reusable portal components.

Search Framework allows users to search enterprise wide information from one place without shifting between applications.

The Oracle JSF Portlet Bridge enables you to easily convert any JSF pages or ADF pages or task flows into portlets (reusable portal fragments) which can be integrated into the web center application.

Portlet runtime embeds portlets in pages.

Webcenter Services provide out of the box services to enable social networking and personal productivity. These services are integrated in webcenter and are ready to use. Following are the services provided by webcenter.

Services for Social Networking:  Announcements  , Discussions , Blog, Instant Messaging and presence, Wiki.

Services for Personal Productivity: Mail, Notes, Recent Activities, RSS(Really simple syndication), Search, Worklist.

Shared services (provides benefits of both social networking and personal productivity) : Documents, Events, Links, Lists, Tags, Oracle Webcenter analytics, Oracle Webcenter Ensemble(enables users to add  portlets as UI widgets, integrate external content into portal and create light weight mashups which are  pages with data, presentation or functionality from multiple sources).

Webcenter Spaces: These are built using Webcenter Framework, Webcenter Services and Oracle Composer. They allow users to create their own spaces in the application so as to manage personal or group information. Features include Group spaces, Group space templates, Personal Spaces, Business Role pages.

Personal Spaces:  each user can have their own personal pages that they can create, change and share with others.

Business Role Pages: Pages specific to an enterprise role so that all users who belong to that role can access them.

Group Spaces: Pages specific to a particular group like group of people belonging to a particular project or department.

Group Space Templates: for consistent look and feel, an existing group space can be created as a template so that all other group spaces can be quickly created based on the template.

Powerful Localization Features:  Webcenter spaces can use multilingual capabilities.

Oracle Composer: Enables creation of personalizations and customizations as a separate layer so that even if the application version changes, the personalizations and customizations still retain. Oracle composer comes integrated with webcenter framework and webcenter services and webcenter spaces and has been leveraged extensively in webcenter spaces. Customizations can be stored either in file system or directly in database using MDS.

Using above components, we can create Portal applications or Composite Applications or combination of both. Webcenter basically erases the line between enterprise applications and portals.

Posted in Webcenter | 1 Comment

VM for Webcenter 11g

Back again after a big break…but this time with a new technology. My recent goal is to learn Webcenter. But after messing up my laptop a little with SOA related installations recently, I was thinking if there is any alternative to learn Webcenter without making my hands dirty with those installations (coz I am under strong impression that it takes less time to learn webcenter than to install it :)). I am glad Oracle has a solution for people like me :P. They have given prebuilt developer VMs (Virtual Machines) for some technologies so that we can directly start working on applications without spending time on installations. Oracle WebCenter Portal Framework 11g Hands-on VM is one of them. We just have to install this VM and we are ready to go!!

You can find the instructions in the link below.

VM for Oracle Webcenter 11g hands on

So I finally started learning webcenter! Keep watching this space for more posts on webcenter in next few days 🙂

Posted in Webcenter | Leave a comment

steps to create a java stored procedure to invoke a web service.

Following are the steps to create a java stored procedure which invokes a web service.
Database : Oracle 11g
Jdev version :
Prerequisite : Set up oracle 11g database to call webservices . (refer my previous post)

Open jdevelepor and follow the steps below.

Step 1 : Create a generic application with no template
Step 2 : Create a project
Step 3 : Right click on project–> Go to project properties–>click technology scope
Step 3.1: Shuttle Database and Web Services technologies to right side and say ok.
Step 4 : Right click on project and click New
Step 4.1: In categories, expand business tier and select webservices
Step 4.2: Select Web Service Proxy from items on right side and say ok.
Step 4.3: In Create Web Service Proxy wizard, step1 : enter the wsdl url and check copy wsdl into project checkbox
Step 4.4: In step 5 of create web service proxy wizard, u may change the package name as u want. click on finish.
Step 5 : Select the new proxy that is created in the navigator. In structure window, you can see all the related sources.
Step 6 : Select the file that is created.
Step 7 : In this class, you can find a client method which can be called from main to test whether your webservice is working fine or not.
Step 7.1: Create a static method and get the _port object using code similar to above client method. you can use this port object to invoke the service.
Step 8 : call this new method from main method and run the java file to know if its working fine

Loading the created java classes to database as a stored procedure.
Step 1 : Right click on project and click New
Step 2 : In new gallery, click on general–> click on deployment profile –> Select Load Java and Java Stored Procedures and click ok
Step 3 : give some name to storedproc
Step 4 : Uncheck all options in Load Java Options, Privileges and Resolver tabs.
Step 5 : Under Resources, you can see a .deploy file. Right click and say Add PLSql Package and give some name to your package.
Step 6 : Right click on the plsql package and click on Add Stored Procedure and select the static client method that we created.
Step 6 : Right click on .deploy file, and click deploy to (database to which u want to deploy).
Step 7 : Check the deployment window to see if the package has been successfully created!

Package should be created successfully.
You may use the java stored procedure in this package anywhere to call the web service

PS : In my case ,in the package body created, it is not using the fully qualified name(including package) while referring the Java class.
so when I tried to call the procedure, it gave me class not found error
So I updated the created package body to include the java package name as well before the class name and could see the output correctly.

Posted in Webservices | Leave a comment

Setup for Calling Webservices from Oracle 11g database

Last weekend, I had a tough time trying to call some webservices from my oracle 11g database. I tried loading all the required jars from my jdev into the database, but still things did not work. Finally I found this wonderful post which helped me fix the things in no time. It has an excellent step by step approach for configuring the oracle11g database to call webservices.

PS : If your database is that of an apps instance and if your loadjava , update the JAVA_HOME variable in it point the correct path

Keep watching the blog to know how to call a webservice using Java Stored Procedure.

Posted in Webservices | Leave a comment

ADF Debugging : How to add custom log messages using adflogger

This post lists the steps to implement Logging in an ADF Application.
In this example, we use the ADFLogger utility to log messages to a custom file in weblogic server

Step 1 : ADFLogger configuration should be done in logging.xml file which is present in following path of weblogic server

for weblogic server integrated in jdeveloper, check for this file in C:\Documents and Settings\user\Application Data\JDeveloper\system11.\DefaultDomain\config\fmwconfig\servers\DefaultServer
open logging.xml in jdeveloper

step 2 :
This step is for logging messages in custom file (xx-diagnostic.log) ,instead of default ${weblogic.Name}-diagnostic.log file. This step can be omitted if you dont want messages in custom file

In structure window, expand log-handlers. check for log_handler with name ‘odl-handler’
create a copy of existing odl-handler.
change the name from odl-handler to some custom name ,say xx-handler.
in the property called path, change the default name ${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log to ${domain.home}/servers/${weblogic.Name}/logs/xx-diagnostic.log

step 3 :
In the overview tab of logging.xml file,click on add symbol to add a persistent logger.
In the logger name select the class file or package for which you want to use this logger. example :
select a level based on the severity you need. Select Trace 32 for finest level.

step 4 : expand Root Logger and select the custom logger that is just created
expand the Handler Declarations below
select add button and select the the xx-handler.
if you dont want custom log file, omit this step and just select use parent handlers check box.

step 5 : Now select your project in jdeveloper.
Right click on project –> open project properties.
select Run/Debug/Profile.
In Run configurations , select the default configuration and edit
In launch settings–> Java Options , enter the following text.

With this the setup is completed. Now open the file (AM, bean or any java class) which belongs to above package and add log messages as shown in below sample file.

public class CustomAMImpl extends ApplicationModuleImpl implements CustomAM {
private static ADFLogger logger = ADFLogger.createADFLogger(CustomAMImpl.class);
public void logMessage()
logger.log("This method will be logged in the diagnostic log file");

Now you can see log messages in the log file.

JDev version used :

Posted in ADF | 10 Comments

ADF Table : disable reordering of columns

Q : How to disable reordering of columns in table
A: ADF table has many user friendly features like detaching the table, viewing or hiding columns, reordering table columns by just drag and drop etc. Though these features are excellent, at times they might be unnecessary. In one of my tables, I am supposed to disable the reordering feature of my table columns. To do this, we need to add the following attribute to af:table tag in the source of your page.

Jdev used : Jdev 11g R1

Posted in ADF, TechnoloZi | 2 Comments

ADF – Dependent LOV and ‘Attempt to set a parameter that doesnt exist …’ Issue

Scenario :
There is a dependent LOV. The dependency is implemented by creating the viewcrieteria and passing parent item as a bind parameter. When I click on the torch , lov is working fine and showing the values related to parent item.
But if I enter partial value and tab out, instead of doing autocomplete, the page is throwing a strange error similar to –
SQLException : Attempt to set a parameter name that does not exist in the SQL

Solution :
Open the LOV View object.
Open the ViewCritera used.
Select each criteria and make Validation as Optional and uncheck ignore null values check box.

Posted in ADF | 2 Comments

ADF – LOV Auto Complete defaults to first value in the list

One very useful feature that I like in both OAF and ADF is the list of Values. Specially the autocomplete functionality makes it more worthy!
In ADF, to achieve this autocomplete feature, you just need to mark the autosubmit property as true for the inputListOfValues component, which invokes the autoCompleteValue() method of ListOfValuesModelImpl.

Today, I faced a strange issue related to this autocomplete feature in one of my lovs.
I have a List of values field in my page. When I enter a partial value and tab out…if only one value exists which starts with the entered partial value, that value is supposed to be defautled.
But incredibly, the first value of the lov is defaulted in the field instead of the selected value.
I could not stop laughing at myself when I found the reason for this strange behaviour. After wasting more than 4 hours, I found out that the Lov VO has no primary key marked! 🙂

The more you learn!! the more stupid u become!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 🙂 🙂 🙂

Posted in ADF | 7 Comments

Create a domain in Weblogic server

Steps to create a new domain in the weblogic server which is embedded in your jdeveloper (Windows).
Jdev version used :

1. Go to WL_HOME/common/bin folder (ex : D:\Oracle\Middleware\wlserver_10.3\common\bin)
2. Run config.cmd . Fusion Middleware configuration wizard opens automatically.
3. Select “create a new weblogic domain” option and click next.

4. Select “Generate a domain configured automatically to support following products” option.

5. Ensure Oracle JRF – [oracle_common] option is selected if you have ADF application to be deployed. Otherwise your deployment will fail due to lack of some libraries.
6. Enter a name for your domain.

7. Give a admin username and password. You must use these credentials to login to admin console of this domain.

8. Select next –>next–> and Create.
9. Go and verify in the entered folder (ex : D:\Oracle\Middleware\user_projects\domains) whether a folder with the entered domain name is created or not.
10. If you want to delete a domain, you just have to delete this folder.
11. To start the weblogic server of this domain, go to domain home (ex : D:\Oracle\Middleware\user_projects\domains\base_domain) and run startWebLogic.cmd

Posted in Jdev and Weblogic | 1 Comment