Session Scope in ADF

If you want to display the text entered in the current page in other pages, it is simpler to do it by using of Session Scope variable.

A Sample Code is given below

Current Page Code: <af:inputText value=”#{sessionScope.ravi}” label=”EmailID:” autoSubmit=”true” /> 

input

Here what ever the user enters as input will store into Session Scope Variable ‘ravi‘ , which can be used in any other pages and even in java class too.

Code to display the entered string stored in Session Scope  <af:outputText value=”#{sessionScope.ravi}”/>

output

You can Access the Session Scope variable in Java class using below given sample code:

String sessvalue = ADFContext.getCurrent().getSessionScope().get(“ravi”).toString();

java

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s