OAF Partial Page Rendering on Table and Form (PPR)

Share Button

Hello,

In this tutorial, I will post about partial page rendering on OAF forms and tables.

1. Run the following database setup query in order to create database objects for using in the tutorial.

2.  Open a JDeveloper which has already prepared for initial setup. Right Click to your project and click New. Go To Business Tier-> ADF Business Componenets -> Business Components from Tables and click Ok button.

ppr_001

3. Do the following steps in order to generate BC4J objects.

ppr_002

ppr_003

ppr_004

ppr_005

ppr_006

4. Final structure for BC4J model:

ppr_007

5. Overwrite create method for XxPprSingleEO ve XxPprTableEO Entity Objects.

ppr_008

ppr_009

PPR For Single Row Forms

This section will be about PPR on Single Row Forms. Partial View Objects are used in order to provide dynamic interface for OAF pages. There are four properties that can be changed by dynamically. These 4 properties are:

  • Rendered (true or false): Dynamic Visibility
  • Disabled (true or false): Dynamic disabling
  • Read-Only (true or false): Dynamically making items read-only.
  • Required (yes, no, uiOnly, validaterOnly): Dynamically making items required.

Do the following steps.

1. Create a new PVO in server package. Partial View Objects are neither generated from a SQL Query not Entity Object. Partial View Objects should have two attributes which are created declaratively or programmatically.

These attributes are:

  • Key Attribute: Number
  • Property Attribute: Depending on property it can be String or Boolean. If it is required property, then String must be used otherwise Boolean must be used.

Partial View Objects must be initialized on process request method and must have at least&most one row in it. However that initially created one row property attribute may be change depending on the actions that trigger partial page rendering. In addition, property attributes will be used with SPEL language on the item properties that we want to dynamically change.

ppr_010

ppr_011

ppr_012

ppr_013

ppr_014

ppr_015

2. Add partial view object into the application module.

ppr_016

3. Create a new OAF page and pageLayoutRegion controller class.

ppr_017

ppr_018

ppr_019

ppr_020

4. Edit pageLayoutRegion properties with the following information:

ıd window tıtle tıtle AM Defınıtıon
PageLayoutRN PPR Example PPR Example xxntc.oracle.apps.per.ppr.server.XxPprAM

5. We will be using one attribute as a trigger for the other attribute. Therefore, it is much more make sense to use a combo box. In order to provide values for combo box, create a new Read-Only View object and add it into application module.

 

 

ppr_025

ppr_026

ppr_027

ppr_028

SQL Query:

6. Create a new defaultSingleColumn form region under pageLayoutRegion.

ppr_021

ppr_022

ppr_023

ppr_024

7. Edit Attr1 and Attr2 properties with the following information:

ıtem Style Pıcklıst Vıew Defınıtıon Pıcklıst Dısplay Attrıbute Pıcklıst Value Attrıbute Actıon Type Event
messageChoice xxntc.oracle.apps.per.ppr.poplist.server.XxPprAttr1LovVO Value Value firePartialAction onAttr1Change
Dısabled
${oa.XxPprSingleAttr2PVO1.Attr2Disabled}

8. Apply the following code changes in java files.

XxPprSingleEOImpl.java

 XxPprPGCO.java

 

 XxPprAMImpl.java

9. Run the page and test it.

ppr_029

PPR for Tables

1. Create a new page and pageLayoutRegion Controller class.

ppr_030

ppr_034

ppr_032

2. Edit pageLayoutRegion properties with the following information.

ıd wındow tıtle tıtle AM Defınıtıon
PageLayoutRN Table PPR Table PPR xxntc.oracle.apps.per.ppr.server.XxPprAM

3. Edit XxPprTableEOVO view object and move on SQL Statement section. Check “Expert Mode” check box and modify the SQL by adding two null columns as SELECTED and ATTR1_DISABLED. Move on to the Attributes section and change Attr1Disabled attribute type as Boolean. Also make sure that both attributes are updatable always.

 

ppr_033

ppr_039

ppr_040

ppr_041

SQL Query:

4. Add new table region using wizard with the following steps.

ppr_034

ppr_035

ppr_036

ppr_037

ppr_038

5. Make following modifications for Selected Check Box item.

Inıtıal Value Checked Value Unchecked Value Actıon Type Event
N Y N firePartialAction onCheckBoxChange

6. Apply the following code changes in java files.

XxPprTableEOImpl.java

XxPprTablePGCO.java

XxPprAMImpl.java

7. Run the page and test it. Attr1 should be row-level disabled or enabled depending on Selected check box.

ppr_042That’s all,

Regards 🙂