Thursday, January 27, 2011

EOs with transient Attributes - will they be locked if no other change?

Found this post on an internal forum and thought of putting it down here :-

Problem :
We have some EOs with some attributes not mapped to any DB Table Column whereas some other attributes are mapped to DB Table columns. During runtime, sometimes we set only these "transient" attributes in the underlying EO and not the Column-mapped Attributes.
The question is, if we call am.commit(), will ADF Framework try to lock()/commit() these EOs with only changes in transient attributes?

Solution:
1.Modifying an attribute marks the entity as changed whether it's transient or not. To avoid this, you can use populateAttribute instead of setAttribute to set the transient attributes. If they are set from the UI, you can override setAttribute to call populateAttribute. The overview for EntityImpl javadoc here has a good explanation of set and populate methods. Same methods available in the view row.

2.Run time would mark the specific EO instance as dirty (STATUS_MODIFIED), and will take the EO through normal Txn cycle. However only those modified persistable attributes are posted back to DB

Thursday, January 20, 2011

InvalidOperException : JBO-25221

Requirement: AUTO-COLLAPSE OF REGIONAL AREA WHEN IN THE INSIDE FORECAST AREA (which is the main area). In my case, the Regional area and main area taskflows belong to different projects.

Implementation: This requires methodAction bindings to be added in the page definition files where the collapse and disclose needs to be implemented. Also, a separate RegionController bean which will have the method call.

Exception : At run time, I faced an exception which looked something like this :-
JBO-25221: Method FndUIShellController.dataProvider.collapseRegionalArea() not supported
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2

Solution:
The issue got resolved after I added the following to the dataBindings.cpx file :-
<dc id="FndUIShellController"
path="oracle.apps.fnd.applcore.uicomponents.view.FndUIShellController"/>

Sunday, January 16, 2011

Composition Associations



A composition association represents a relationship between entities, such as an entity A (eg: DepartmentEO) referenced by an entity B(eg:EmployeeEO) or a entity C(eg:BonusEO) contained in an entity B(eg:EmployeeEO). When you create composition associations, it is useful to know about the kinds of relationships you can represent, and the various options.

Associations between entity objects can represent two styles of relationships depending on whether the source entity:

* References the destination entity
* Contains the destination entity as a logical, nested part

For example, an EmployeeEO entry references a DepartmentEO. This relationship represents the first kind of association, reflecting that a DepartmentEO or an EmployeeEO entity object can exist independent from each other. In addition, the removal of an Employee does not imply the cascade removal of the Department to which it was referring.

In contrast, the relationship between EmployeeEO and its collection of related BonusEO details is stronger than a simple reference. The BonusEO entries comprise a logical part of the overall EmployeeEO. In other words, a EmployeeEO is composed of BonusEO entries. It does not make sense for a BonusEO entity row to exist independently from an EmployeeEO, and when an EmployeeEO is removed — assuming the removal is allowed — all of its composed parts should be removed as well. This kind of logical containership represents the second kind of association, called a composition association.

Wednesday, January 12, 2011

Steps to deploy a simple standalone test application to a standalone server

1. Create a sample standalone test application say Application1 as per the steps in

http://myadfexperiences.blogspot.com/2010/12/steps-for-creating-sample-fusion-web.html

2. Create a new Application server connection to the standalone server (to which you want to deploy
the application) using the Resource palette IDE connections ->Application Server connections.
3. Right click on the Application and choose deploy. Deploy to the Application Server. Here you
should be able to see the connection which you created in the previous step to the standalone
Application Server. Go through the wizard to complete the required steps.
4. Once the deployment completes successfully, you should be able to see your application in the
list of deployments in the Application Server console.