Thursday 29 June 2006

OAF - Tables and PPR

It has just taken me two days to implement PPR on a table, yes 2. I might be a little slow but the developers guide was of very little help and I was unable to find any worthwhile examples.

When planning to implement PPR in tables it is very important to decide early on what type of PPR you want to implement. Let’s take a step back, when implementing PPR on normal fields outside a table, there is only one instance of each field to modify. But when working in a table there might exist an infinite amount of rows each with an instance of the specific field.

If functionality requires that all instances of the PPR field behaves in the same fashion, PPR using SPEL bindings will work perfectly, and is very quick and easy to implement. On the other hand if you require each instance of the PPR field to act independently based on another value in its table row, you will have to look at Bound Values or Content Switcher.

In this post I will focus on Bound Values as this is the solution I implemented, the Dev guide specifies the following consideration when having to decide which solution to use:

“You should limit your use of Switchers to within tables, particularly when you want to switch between different kinds of web beans, such as a poplist or a checkbox. When you have only one type of web bean, but the value of an attribute on that web bean varies at runtime, then you should implement that attribute as a bound value rather than as a Switcher.”

PPR using Bound Values:
  • Add a transient attribute to your table view object; you will bind this attribute to the value of the PPR column’s RENDERED attribute.
  • Modify the transient attribute getter method to change the value depending on your PPR requirement. In my case I needed to render the Supplier Name field based on the value of the SupplierYn attribute in the table view object:

public Boolean getSupplierNameRendered()
{
String yn = getSupplierYn();
Boolean tf = Boolean.TRUE;

if ("Y".equals(yn))
{
tf = Boolean.TRUE;
}
else if ("N".equals(yn))
{
tf = Boolean.FALSE;
}

return (Boolean) tf;
}
  • Now bind the Supplier Name attribute to the transient attribute in the page controller’s processRequest method:
OAMessageLovInputBean supplierNameBean = (OAMessageLovInputBean) webBean.findIndexedChildRecursive(
"SupplierName");

supplierNameBean.setAttributeValue(
RENDERED_ATTR,
new OADataBoundValueViewObject(supplierNameBean,
"SupplierNameRendered", "SupplierVO1",
false));
  • The rendering of my attribute was based on the value of the attribute “SupplierYn” in the view object; to enable the updating change “Action Type” attribute to “fireAction”:

There it is four easy steps to enable PPR on a table.

Thursday 22 June 2006

Viva le Resistance, Viva Mozilla!

Many of us are content to use IE for all our browser needs, but few know that there is an alternative. Mozilla Firefox is a open-source browser that some ten percent of the web uses, and which has been certified for use with Oracle EBS 11i.

I have been using Firefox for just more then a year, it is a very stable and well tested product that can be installed and immediately used as your main browser. There is also a number of plugin’s and extensions, Eddie Awad created a very useful plugin that allows you to search Metalink and Oracle Docs direct from your browser.

So, help stem the tide, go ahead, check it out.

Monday 19 June 2006

Find the right JDeveloper Patch for OAF development

I have read a number of questions regarding what JDeveloper version should be used for OAF development. After a recent upgrade of our development system from 11.5.9 to 11.5.10 CU2, I did some research on Metalink and found the following info regarding JDeveloper versions:

Current JDeveloper patches:

  1. Patch 4045639 - 9IJDEVELOPER WITH OA EXTENSION ARU FOR FWK.H
  2. Patch 4141787 - 9IJDEVELOPER WITH OA EXTENSION ARU FOR CU1
  3. Patch 4573517 - Oracle9i JDeveloper with OA Extension for 11.5.10 CU2
  4. Patch 4725670 - 9IJDEVELOPER WITH OA EXTENSION ARU FOR 11i10 RUP3

To determine which patch to use, you can simply check the framework version in your instance by using http://host:port/OA_HTML/OAInfo.jsp, then choose the matched one.

11.5.10K = patch 4045639
11.5.101CU = patch 4141787
11.5.102CU = patch 4573517
11.5.103CU = patch 4725670

It would be interesting to have a survey regarding what framework versions are being used for OAF development. Please post your current development version in a comment; I will publish the results at a later stage.

Checkout Metalink note 416708.1 for the up to date list of OAF releases.

Blogging

The main aim of this Blog is to share my experiences as an Oracle e-Business Suite (EBS) developer. I will also from time to time blog about any subject that made me laugh, cry, angry or I feel would be of interest.

Just to get everybody thinking here is a short list of EBS topics I will be covering:

  • Oracle Application Framework Development, Extension and Personalization
  • Database Performance (Development Specific)
  • SQL & PL/SQL Concurrent Development
  • Open Interfaces and API's
  • Forms, Reports, CUSTOM Library development and customization
  • Workflow Development and Customization
  • Development Tools (JDev, Forms, Reports, TOAD, etc.)

All comments, anonymous or otherwise, fully appreciated.