Monday, May 14, 2012

ADF : Open pdf file in New window or in Popup using InlineFrame

This is a draft version of ADF sample application for opening PDF file in New Window or Inline Frame.
You can download the code from here / here

Birds eye view of the app:

To Show the contents of the file, we are registering a servlet(ShowPdfServlet)  in web.xml which takes care of reading and displaying .
On the same lines, we can tweak the code to read from data base or any other place.

Application assumes, the existence of file "c:\\webcenter.pdf". Hence before you run the application make sure you place a pdf with above name. ( : 44 hard coded value says the same)

To open the file in new window, I have followed ADF Code Corner Example (33).

The task flow enabled for url-invoke allowed and it should be bounded taskflow "with pages". More info @ ADF Code Corner Example.

Sample output when opens in popup.

Soon will come out with detailed post.


Tuesday, April 17, 2012

To reflect changes in the ADF Deployed app on Stand alone weblogic server (

I feel it is painfull task to deploy the monstrous application for **minor changes**.

Though I know that I can use hudson/CI to automate the boring deployment process(as developer this is what I feel), our team yet to sponsor good amount of time for Hudson hands on.

So we started using the following copy paste approach ( a true developer approach) to reflect the changes on the server.

Locally we generate the jar files for which changes available. We also make sure all the dependent libraries are in sync with the latest changes.

These are the locations with respect to Jdeveloper based stand alone server.

For UI changes:
1) Go to system_folder: In Windows Run --> %Appdata% --> Jdeveloper --> system xxx folder 
2) cd DomainName/servers/ServerName/tmp/_WL_user/AppliactionName/z88prt/war/WEB-INF/lib
3) replace the ui jar and dependent jars you wish to overwrite.
4) restart the server

For UI Model/Model changes:
1) Go to system_folder: In Windows Run --> %Appdata% --> Jdeveloper --> system xxx folder 
2) cd DomainName/servers/ServerName/tmp/_WL_user/AppliactionName/z88prt/hvo6ly/APP-INF/lib
3) replace the model/uiModel jar and dependent jars you wish to overwrite.
4) restart the server

However, If there are changes to application files (say, adf-config.xml) I have to go through the complete deployment process to see the changes.
Hope it helps.


Friday, March 30, 2012

Get the selected Value from SelectOneChoice(LOV) in Bean

To get the selected Value from selectOneChoice (LOV) in Bean

<af:selectOneChoice value="#{row.bindings.LevelType.inputValue}"
<f:selectItems value="#{row.bindings.LevelType.items}" id="si3"/>
<f:attribute name="rowIndexVal" value="#{row.bindings.LevelType.items[row.bindings.LevelType.inputValue].label}"/>

public void onSubtypLvllTypValChnge(ValueChangeEvent valueChangeEvent) {

        Map p = ((UIComponent)valueChangeEvent.getSource()).getAttributes();
        System.out.println("Selected Value"+p.get("rowIndexVal"));

One can find a different other approaches here..

Tuesday, March 27, 2012

Access Resource Bundle in Bean

    To access resource bundle in bean

    public String getTextProp(){
        String bundle_name= "com.gppsuite.view.ViewControllerBundle";
        ResourceBundle resourceBundle =   BundleFactory.getBundle(bundle_name);
        String txt =null;
        if(resourceBundle != null)
        txt = resourceBundle.getString("string_id");
        return txt;

Thanks Lakshman for your comments.
Including your comments in the post for the benefit of others.


We can also use
java.util.ResourceBundle rb = ResourceBundle.getBundle("com/oracle/,,,,/Bundle1");
String txt = rb.getString("prop1");

public String readPropertiesFile(String property){
String configureURL = null;
InputStream is = ConfigureBean.class.getResourceAsStream("");
Properties prop = new Properties();
configureURL = prop.getProperty(property);
/* code to use values read from the file*/
}catch(Exception e){

return configureURL;

Monday, March 26, 2012

Sources for WebServices with ADF learning

Building and Using Web Services With JDeveloper 11g

Here is the one which talks discusses.. WebServices at galance

Other articles can be found here.. Those are nice


Developing RIA Web Applications with Oracle ADF



ADF best practice to give webservice calls: A good read 

Web Services with Complex Data Types in ADF 11g

Getting old/previous value of an ADF BC attribute

Getting old/previous value of an attribute notes from the Source  Oracle Insider Article

Groovy expression to get old value:

1) Create a transient attribute and generate eoimpl or voimpl. Override the getter method with the following

return getPostedAttribute(model.EmployeeImpl.SALARY)

Posted value is which is submitted.

2) To use as part of validations we can use implicit objects available as part of groovy expression.


newValue - OldValue < oldValue *.1

Tuesday, January 31, 2012

ADF integration with Configurator

Following posts  are very nice for integrating Configurator with ADF application.

Configurator Overview

Embedding Oracle Configurator in WebCenter / ADF Applications

ADF tries to launch a URL from the taskflow. Usually the url will be a servlet which acts as mediator for calling Configurator page.
Places the user credentials and landing page info as parameters in the request  and invokes a Configurator app.
Once the task is done with Configurator, it returns a value.

Soon I will try to attach the sample that I am working on.
Protected by Copyscape Unique Content Check