<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content



Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color

Related Items

Home arrow Technical Articles arrow Oracle Application Framework arrow PPR in OA Framework - What is Partial Page Rendering?
This website has now moved to http://apps2fusion.com

PPR in OA Framework - What is Partial Page Rendering? | Print |  E-mail
Written by Anil Passi   
Thursday, 21 June 2007

In this article, I will explain the concepts of PPR and this will be followed by a step by step audio visual demo of how to build a page with PPR in OA Framework.

SPEL is the basic foundation of Partial Page Rendering in OA Framework.
Hence, I request that prior to reading this article & watching this demo, you must see audio-visual presentation of SPEL, at this link.

Why PPR?

PPR is used to change the contents of the page dynamically if certain events take place.
In this article I will explain the concepts of partial page rendering and its usage with SPEL in OA Framework.
This will be followed by an audio visual demo that shows how to build one such PPR based screen.

Lets take an example

On  a screen, there is a field named UOM, presented as a drop down list.
Lets assume a business case :-
1. If the UOM from drop list changes to "Each", then a field named "Number of units" must be displayed.
2. As soon as drop down list value changes to "Box", then a field named "Box Weight" must be displayed
3. As soon as drop down list value changes to "Gallon", then a field named "Volume" must be displayed
At any given point in time, only one additional field must be displayed, depending upon the value of the dropdown list.

What makes PPR so special?
By using Partial Page Rendering, the entire page is not refreshed.
Only the changed portion of the web page will be redrawn.
This reduces the network traffic and enhances the user experience.

Where does SPEL [Simplest Possible Expression Language] fit in?
Using SPEL, you can bind(attach) certain properties of a field to a View Object[VO] attribute.
This View Object attribute will be of type Boolean.
As per Oracle documentation, the name of such view object must end with PVO.

In plain English this means [in the context of this example]:-
1. A transient view object attribute returns Boolean i.e. TRUE or FALSE
2. This view object attribute could be attached to Rendered property of a field [or any other property that support SPEL binding]
3. A change in drop down list value will initiate a partial Action, which can be trapped in Controller processFormRequest.
4. This partial action trigger will check the current values of those Boolean attributes in View Object.
5. The dependent field will either be displayed or hidden, depending upon the Boolean value of the view object attribute.
NOTE:- The Video depicting end result of this exercise can be be seen from this link

What triggers the partial page refresh?
In this case, the change to LOV Drop down list value triggers PPR.
You will find the details in audio visual demo below

Can all types of bean trigger off a Partial Action?
Not really, the list of beans that can trigger a partial action are:-
1. List box.
2. Subtabs, for example, changing from one tab to another can refresh only the relevant portion of the page
3. Context switches in Flexfields is another example of PP in OA Framework
             For full list, please refer OA Framework Documentation

Is partial page rendering the same as web2.0?
Yes, end result is similar. However PPR has limited usage in terms of full blown capabilities of web2.0/DHTML

Any special considerations?
Yes, oracle suggests that the name of the view object used for PPR, must end with PVO.

What are the steps for building one such partial page rendering enabled page?

We will go through the steps one by one in audio-video

Step 1
Create a table upon which our OA Framework screen will be based
This can be done by using command below.
Note:- it is not mandatory to use EO[Entity Object] based screen for this demo, but I am hoping that this demo will also serve the purpose of showing you "how to create a base table" screen in OA Framework.
CREATE TABLE xx_test_ppr01
 uom                          VARCHAR2(30)
,box_weight                 NUMBER
,number_of_units          NUMBER
,volume                       NUMBER
,CREATED_BY                NUMBER(15)
 ) ;

Step 2
Create java based packages for both BC4J and MDS page and its controller.
Also create an entity object, followed by a view object.
This audio/video can be seen by clicking on this link
Note: Entity Objects are not needed for such demo, but yet I have followed this approach,
        so that beginners can see how OA Framework screens can be created for Base Table.

Step 3
Create a page that is based on the view object created above.
The audio-video demo for this step can be accessed by clicking on this link

Step 4
This step consists of following sub-steps
1. Bind the Boolean attributes of PVO to the respective fields
   This will Control the runtime rendered property of these fields when partial action occurs [change in LOV]
2. Lets also make sure that changes to UOM drop down list initiates the partial action.
These steps can be seen by clicking on the link here
The audio-video demo for this step can be accessed by clicking on this link

Step 5
Prepare a controller, that does two things
initializes the record, as soon as the page is rendered on browser
Here we will make a call to the AM

Here, we will call a method in AM. Within that AM we will do the following:-
1. Get a handle to the current record on the screen ( in this case there is only one record possible)
2. From the current record, depending upon the value selected in drop down list, change the values of Boolean attributes. Keep in mind that these Boolean attributes are attached to rendered property of the respective fields.
The audio-video demo for this step can be accessed by clicking on this link

Step 6
In this step, we will write code for our Application Module, which is responsible for setting the Boolean Attributes.
Rebuild project and Test to see this working.
The audio-video demo for this step can be accessed by clicking on this link

Source code for this tutorial can be downloaded from this zip file location

Comments (8)add
written by Suneetha , June 20, 2007
This was a really good tutorial and i really learned a lot about PPR.. I have a question as to why invoke the methods in AM when to set the values for the boolean attributes that are being used in SPEL.. Can it be done in the controller code ?? Thanks for your help, Suneetha.
written by Anil Passi , June 21, 2007
Good question Suneetha.
You are right, that is another possibility. One can indeed get a handle of VO via AM within the controller itself.

There are multiple ways of doing things in OAF.

Third variation is that we simply override the get[Attribute] in VO, and in those get[Attribute] methods we return TRUE or FALSE appropriately, depending upon what getUom returns.

Anil Passi
written by Suneetha , June 22, 2007
Thanks for your quick reply Anil.. One more request.. Can we have couple of articles from you on extending the seeded pages like IProcurement or some thing like that.. The reason is still there are lot of people still facing problems on how to run seeded pages from Jdeveloper.. questions like
1.How to add server.xml file to the project and where you will find it.. I know with some releases we were not able to find.. I was told you can build the server.xml if oracle does not have one.. Is it possible if so how?
2. What needs to be copied to the local machine (My Projects and My classes directories).
3. How to import Export and Import from the server to the local machine..

I know they are documented but still very difficult to get it one place.. Hope you will take on these in your next articles..

Thanks for the great work you are doing..

written by Anil Passi , June 23, 2007
Hi Suneetha,

Indeed, that will help a lot of people. I will certainly write something up in the context

Excellent Inf
written by Dilip , July 02, 2007
Hi Anil,

Thanks for sharing the Important Information.I will be helpful for all apps developers.

Thanks Once again!!

written by Anil Neema , November 14, 2007
Dear Anil,
I am following the same approach to disable a column of a table based on the the other column of the same table which is a messageChoice but it disables the column of all the rows of the table i want to disable only the column of that particular row of which the messageChoice was selected.
Error in PPR
written by alimohd , November 26, 2007
Hi Anil,
I did above PPR example.. then I got below Error

Could not load application module 'demo.oracle.apps.ak.ppr01.server.pprAM'.

Please suggest me ASAP
THanks in Advance
Error while changing the UOM LOV to Drop Down through personalization in iProcurement...
written by Vikki , February 05, 2008
Hi Anil,

I am getting an error, while i am changing the UOM Lov to Mesaage Choice(drop down list)... can u plz help me in this... why it is happening so??

You must be logged in to a comment. Please register if you do not have an account yet.