Tag Archives: faces

Could not Deserialize the session data

Recently there was an issue with the session not getting invalidated upon logging out in adf page. we were using the following code to invalidate the session in the logout method

FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpServletRequest req = (HttpServletRequest) ec.getRequest();
HttpServletResponse res = (HttpServletResponse) ec.getResponse();
HttpSession ses = (HttpSession) req.getSession(false);

with the above code the following exception was thrown to the user

 at oracle.adf.share.http.HttpUtil.getAttribute(HttpUtil.java:98)
 at oracle.adf.share.http.HttpSessionScopeAdapter.get(HttpSessionScopeAdapter.java:240)
 at oracle.jbo.common.ampool.SessionCookieImpl.<init>(SessionCookieImpl.java:164)
 at oracle.jbo.http.HttpSessionCookieImpl.<init>(HttpSessionCookieImpl.java:133)
 at oracle.jbo.http.HttpSessionCookieImpl.<init>(HttpSessionCookieImpl.java:124)
 at oracle.jbo.http.HttpSessionCookieFactory.createSessionCookie(HttpSessionCookieFactory.java:131)
 at oracle.jbo.common.ampool.ApplicationPoolImpl.createSessionCookie(ApplicationPoolImpl.java:452)
 at oracle.adf.model.bc4j.DataControlFactoryImpl.findOrCreateSessionCookie(DataControlFactoryImpl.java:141)
 at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:222)
 at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
 at oracle.adf.model.BindingContext.get(BindingContext.java:457)
 at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:280)
 at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:248)
 at oracle.adf.model.binding.DCUtil.findContextObject(DCUtil.java:383)
 at oracle.adf.model.binding.DCIteratorBinding.<init>(DCIteratorBinding.java:127)
 at oracle.jbo.uicli.binding.JUIteratorBinding.<init>(JUIteratorBinding.java:60)

the issue is solved using the solution given in this forum

ie. we have to release the Datacontrol also to invalidate the session

ValueBinding vb = fc.getCurrentInstance().getApplication().createValueBinding("#{data}");
BindingContext bc = (BindingContext)vb.getValue(fc.getCurrentInstance());
DataControl dc = bc.findDataControl("DataControl");

f:convertnumber for decimal numbers

I was working on to filter the decimal value using the QBE feature in the af:table but was facing an issue with the conversion and filtering the values

as you all know that we use the custom filter QBE to filter custom types other than String using the snippet



<f:facet name="filter">
 <af:inputText label="2" id="it2" value="#{vs.filterCriteria.id}">
 <f:convertNumber groupingUsed="false" integerOnly="true"/>


I thought of filtering the decimal values using the option available in af:convertNumber



<f:facet name="filter">
 <af:inputText label="2" id="it2" value="#{vs.filterCriteria.id}">
 <f:convertNumber groupingUsed="false" maxFractionDigits="2" patter="#.##" minFractionDigits="1" maxIntegerDigits="1"/>


But the above options didn’t work as expected.

Finally I found the way to filter the double values using convertor=”javax.faces.Double”



<f:facet name="filter">
 <af:inputText label="2" id="it2" value="#{vs.filterCriteria.id}" convertor="javax.faces.Double"/>


ADF JavaScript Partitioning

Most of the performance issue at the client side for the ADF application is related to large number of client side scripting files getting download which increases the download time and relatively degrading the performance of the application. Breaking up the JavaScript into small chunks will result in modularity but will increase the round trip.

To resolve this ADF Faces Framework comes up with a concept of partitioning of the huge JavaScript at the client side based on the components used in the pages. That means only limited number of scripts required for the page is loaded at the client which will increase the performance drastically.

ADF Faces groups the components JavaScript files into two groups namely partitions and features. These two groups are defined separately in two configuration files i.e. adf-js-features.xml and adf-js-partitions.xml.

The default files are location at

C:\oracle\Middleware\oracle_common\modules\oracle.adf.view_11.1.1\ adf-richclient-impl-11.jar\

If the application is loaded without using an explicit partitions then adf will use the configuration settings defined in the above specified files and does the partition.
By default, the partitioning is enabled for performance which can be disabled using the initial parameter in web.xml

<param-name> oracle.adf.view.rich.libraryPartitioning.ENABLED</param-name>







Now we will see how to create these files
•    Create adf-js-partitions.xml in public_html/WEB-INF folder of your application
•    Create adf-js-features.xml in src/META-INF folder of your application
•    The skeleton of these files looks like


<?xml version="1.0" encoding="utf-8"?>

<partitions> – root tag to define partitions, all partitions are defined inside this
<partition> – define the partition, any number of partition is allowed
<partition-name> – name of the partion. For example the javascript will be loaded as dnd-
<feature> – hook reference to the particular feature that defines to load the javascript for the component


<?xml version="1.0" encoding="utf-8"?>

<features> – root tag for the features, all features are defined inside this
<feature> – define the feature, any number of feature is allowed
<feature-name> – name of the feature that has to be referenced from the partition file
<feature-class> – javascript class for the component
<feature-dependency> – name of the feature which is extended by the javascript class


When you don’t have these files in place then the loaded scripts are

When you replicate the default content in your configuration files then the partition will be

Let’s have the partitions which defines only two partition forcomponent. It’s better to have AdfBootStrap and AdfCore as part of the partitions as these are the basic components and JavaScript to render some of the key components. You are free to research on these components to come up with your own core and booting features. You can get the base AdfBootStrap and AdfCore partitions and features configurations from

The partition file with the configuration and hook looks like

And the corresponding features are defined as

And when you run your page in internet explored 8 with Developer Tools on (F12) you can see in the script section that our partition is available as a separate script


If we refer to an invalid feature in the partition then we will get



You can download the pdf file of this from here

How to change the default text title of Detached table/treetable

have trindad-skins.xml in your web-inf folder and have the following tag

 <id>dummy.desktop</id> // you are overriding the style
 <extends>fusion.desktop</extends> // this should be from the trinidad-config.cml
 <bundle-name>oracle.view.resource.rich.SkinBundle</bundle-name> // your skin bundle to override the name

here dummy.css is used to override any visual property of the faces component defined in fusion theme
to override the label, use in the SkinBundle like (The java bundle file should be registered as a managed bean in adfc-config.xml)

package oracle.view.resource.rich;
 import java.util.ListResourceBundle;
public class SkinBundle
 extends ListResourceBundle
 public Object[] getContents()
 return _CONTENTS;

static private final Object[] _CONTENTS =
 { "af_panelCollection.LABEL_DETACH_TABLE_DLG", "Any name for the Detachable Table" },
 { "af_panelCollection.LABEL_DETACH_TREE_TABLE_DLG", "Any name for the Detachable Tree Table" }

Javascript code to fire the event

The following function can be called using the af:clientListener on any event

function showMenu(event){
 var adfRichMenu = event.getSource();