Tuesday, September 25, 2012

ADF GUI : Print Navigation in showPrintablePageBehavior

One of my customer want simple print behavior. I thought it is simple with showPrintablePageBehavior component provided by ADF.

When I tried it , I noticed it will not print hyperlink and other navigation component which is correct as per definition of this component . It is common to have hyperlink in Table or Form component , But fortunately , I found the work around which made my life simple.

Develop simple page with table component and make sure where ever hyperlink is present repeat that definition of that command link with output text rendered only in print version.


Add following tag inside command or menu item which will enable print behavior of particular page. Add extra output text corresponding for each hyperlink component. This output text will be visible only when you go to page with print behavior.

Enabling Print Behavior


Printable behavior check condition

#{adfFacesContext.outputMode eq 'printable'}

In navigation component do the following.

<af:outputText value="#{row.columnname}" rendered="#{adfFacesContext.outputMode eq 'printable'}"/>

System : Disabling startup program in Window 7

Disabled startup program from window.

Open msconfig.exe


Go to startup tab and uncheck


Apply changes and restart.

Sunday, September 9, 2012

Oracle ADF : Model and View Controller Resource Bundle

In any web application we need to define labels, hints , tooltips and more. Also our application may be deployed for multiple languages users. In ADF we can achieve having bundle for each language.

Example :-

English :- Model_En.properties , ViewController_En.properties

Spanish :- Model_Sp.properties , ViewController_Sp.properties

It will be easy to dynamically switch from one bundle to another during run time.

1. Create Fusion Project and create EO/VO , We don’t see any resource bundle here.


2. By Default attribute name will come as label , Until we override this value.


3. Override the label in the control hints property of attribute , We can use any EO/VO to give control hint , but I prefer to use EO.


If we give this value and click OK , it will create following resource bundle file.



View Controller Bundle

In Product list page we will place some button and name it as “Create New” label which will come from view controller bundle.

Right click view controller project properties and set the following value in Resource Bundle


Select the command button and select following


Give following value and don’t forget to select View-Controller Bundle.



ViewController bundle contains following properties


To refer this value use

#{viewcontrollerBundle['hasim.createrow']} which will print Create Row.

This bundle is loaded in JSF with following JSF Tag.


Putting view controller bundle in faces-config.xml

Instead of giving above JSF tag in all JSPX pages , we should generalize this definition ,so that we don’t have to provide this tag on every JSF pages.

open face-config.xml and enter following properties in faces-config.xml


We can see we are referring our variable as bundle which is pointing to our view controller bundle.

Now comment the JSF tag referring to bundle.


Now click expression builder


Now you will see it is visible in following window.


Just click this which will automatically populate the expression part.

Enjoy !

Saturday, September 8, 2012

Oracle ADF : Working with DOMAIN and Validation

DOMAIN is used as datatype for Oracle ADF business component entity attributes. It is good facility provided by this framework to implement our own datatype for special purpose attributes like Email , Phone , Employee Id which require specific pattern to be followed.

Let me give me an example to portray you the power of domain.

Let us create simple EO/VO for supplier table in FOD Schema.

1. Create Domain


2.Give Domain name and don’t select check box. Then keep everything default in all screens and click finish.


3. It will generate xml and java file and We have to override validate method to write the validation.


I wrote following simplest validation logic and threw the exception.


4. Associating the Domain with entity attribute in type Drop down.


5.Now run the app module tester and give the email without @ which will throw the exception.


This concept can be extended to include much complex business rules for particular filed.

Friday, September 7, 2012

Groovy : JSR 241 for Groovy

Light weight new programming language that our JVM can understand.

For further information please read JSR and corresponding article, I mean to say keep an EYE on it.

Groovy JSR

Thursday, September 6, 2012

Jdeveloper : Oracle Public Cloud SDK


If you want fly , you have to go to cloud and you can well go to cloud from jdeveloper .


Jdeveloper : Existing Extensions and Extend Jdeveloper


You can extend your jdeveloper as per your requirement which include SOA Editor , BPM Editor , Webcenter Extension and more.


Jdeveloper : Clean Project Everytime before running


Jdeveloper has auto clean feature while running project everytime as found in other popular IDE like Eclipse.


Jdeveloper : Opening Internet Explorer from Jdev


When working with Jdeveloper we need Internet Explorer and other browser during web development work. Jdeveloper has utility to embed such regular stuff.


It will automatically pull some frequently used tool. Click “Find Tool”


You can add new tool like Chrome , Fire Fox and more using this utility.

Eventually ,It will appear as follow on jdevelopr as short cut.


Jdeveloper : Deleted File Accidently and Want to Restore


Accidently you may sometime delete the file from Jdeveloper project by mistake and Jdeveloper has provided utility to restore deleted file as follow.


Right click project and click restore from local history.


Then select the file that need to be restored and click Restore


You can control how many back file you need for each file from following configuration.


Jdeveloper : Increasing the log size


During debugging application in jdeveloper , You will sometime not see the full message as buffer will be set for 3000 lines by default. If we want more lines to be printed in jdevelopre message log window then please increase the size from following location.

Tools – Preferences – Environment – Log


Wednesday, September 5, 2012

ADF BC : Status of Data Binding & Data Access


Sorry ,Can’t blog for long time , Since I was too busy with Enterprise Architecture Migration with Clustering with Webcenter Portal , Web Tier , UCM , OBIEE , Weblogic , Database and Supporting the architecture for long time.

Please read following Status of JSR-227 on which ADF Model Data Binding is Implemented. Also, Look email conversation about this discussion on Oracle ADF EMG EMG Update on status of JSR-227.