Nov 24, 2011

To override the default error handler one can extend the  DCErrorHandlerImpl. In this you can process the exceptions or can choose to suppress them. In this post i will explain a way to suppress the RowValException message and display only the detail entity attribute level exception ie AttrValException. In ADF the exceptions are grouped and raised together as a single object. For example let's say that 2 of the attributes fail the mandatory validation then the exceptions raised for them will be 2 individual AttrValException these are then...

Posted on Thursday, November 24, 2011 by Unknown

Nov 17, 2011

I had a recently asked a question on bulk uploads in OTN forum. Seems the performance that i would receive for bulk update/insert scenarios isn't at par. So i created the procedure and a custom object type and table of that object type which provides far better performance. Let's say your table structure is as follows :- --     TXN_TBL ("TXN_ID" Number, "USER_NAME" VARCHAR2(50 BYTE), "TXN_DATE" DATE, "TXN_AMOUNT" NUMBER) So you can basically create a object type mirroring that structure as follows create or replace type TXN_TBL_R is...

Posted on Thursday, November 17, 2011 by Unknown

If you are using ADF11g version 11.1.1.3 and want to reset the values in the popup, you are not provided with the resetEditableValues option. But you can accomplish this using a custom javascript that i have made. All you have to do is set clientComponent="true" for all the components that you want to reset and pass the client id of the root component to use this. resetAction=function(clientId){ var component= AdfPage.PAGE.findComponentByAbsoluteId(clientId); console.log(component); var components=component.getDescendantComponents(); ...

Posted on Thursday, November 17, 2011 by Unknown

Sep 21, 2011

If you are using ADF 11g and you encounter this issue kindly check your ps_txn table. You can delete the records from this table and then you will see that this error will go away. This table is used by ADFm internally to serialize user session state to database, so this table has to be monitored and appropriate grants have to be given to the database user so that it can create the database objects. For more information kindly refer to this article by chris muir. PS_TXN...

Posted on Wednesday, September 21, 2011 by Unknown

This is a short tip on where to add the <af:resource type="javascript"> tag when you want to include javascript in your adf page fragment. The place to include the tag is inside of a root component layout like panelFormLayout or panelGroupLayout because otherwise if you place it outside of the root component the resource might not be loaded and hence your script method will not be found which can sometimes lead to issues with the user interface also because a javascript error will prevent panelStretchLayout from stretching. But if you place...

Posted on Wednesday, September 21, 2011 by Unknown

You might face a scenario where you have to reuse the same view object in different task flows. But the issue you will encounter if you are not using separate View Object instances is that changes made to view objects in one task flow will reflect in the view object in the other task flow. If you are not using separate view object instances you can either call clearCache on the view object when the region renders or call ApplicationModuleImpl clearVOCaches method.  The former method will clear cache for both transient and entity based view...

Posted on Wednesday, September 21, 2011 by Unknown

Sep 9, 2011

In this post i am sharing a utility for performing the following operations on OID using the OPSS API :- User creation  Dropping a user Getting all roles for a user Role/Roles assignment to user/users Revocation of role/roles from user/ users Changing password for a user  Resetting password for a user  Searching a User  Getting members belonging to a particular role.  The relevant code fragment is attached below. Hope this utility will be helpful for someone who wants to integrate application with OID using OPSS. import...

Posted on Friday, September 09, 2011 by Unknown

Sep 3, 2011

If you have a requirement for opening a printable page and also the print dialog and you are using page fragments then you should implement the RegionController interface rather than  PagePhaseListener. I had such a requirement and then implemented it using RegionController interface. On any page fragment that you are required to implement this functionality just add an EL expression or a fully classified name of the class that implements the region controller class in the page definition's ControllerClass attribute.  The code snippet...

Posted on Saturday, September 03, 2011 by Unknown

Aug 20, 2011

In JDeveloper 11g, if you delete the database connection, you will notice that none of the oracle domain types will  appear in the drop down when you create new objects. This happens because  type map of bc4j components is changed to JAVA. Also this will cause problem in case you try to edit a already existing bc4j component as the type is changed from oracle domain to the corresponding java type. To change the type map to oracle, just follow the steps mentioned below:- Open your *model.jpx file and find the entry for type map ie _TypeMap. Remove...

Posted on Saturday, August 20, 2011 by Unknown

May 10, 2011

SLF4J(Simple logging facade for JAVA) is a abstraction layer or facade for different logging frameworks like log4j,Logback etc which allows you to plugin the desired logging framework at deployment time. Also logback is a framework that implements the SLF4j api so it allows easy switching between different logging frameworks and it also provides more optimized logging than log4j by providing features such as parametrized logging. To learn more about these frameworks refer to the comprehensive documentation at the following sites:- 1. SLF4J 2....

Posted on Tuesday, May 10, 2011 by Unknown

Apr 25, 2011

Ideally the resources like images, flash files etc should be cached on the client browser or proxy server to reduce server load and reduce bandwidth consumption. In this post i will explain on how one can enable caching of these resources if they are exposed as restful resources using JERSEY Restful framework. To enable caching of resources by proxy server or by client you need to keep a last modified date column in your database table which is updated if you upload or modify the content. The solution that i am discussing over here is as follows...

Posted on Monday, April 25, 2011 by Unknown

Apr 23, 2011

In this post i will explain on how one can easily create a Content Management System using Tiny MCE , Richfaces and Jersey. This application as a whole can then be used to serve the content dynamically and can be integrated with your site. The usage of three components is mentioned below:- Tiny MCE :- A javascript based WYSIWYG editor  for editing HTML content. This will serve as a  HTML editor for CMS system. Jersey :- This framework will provide a way to expose the content as a Restful resource. The content will also be cached for...

Posted on Saturday, April 23, 2011 by Unknown