Shay Shmeltzer's Oracle Development Tools Tips

Simpler Partial Page Refresh (PPR) with Dependent Fields

Shay Shmeltzer
Director of Product Management - Oracle

This entry might seem a bit trivial, but from experience I know that sometime new features that are added to the product are not detected by developers who just continue working in the "traditional way". Well here is a quick update on such a feature - PPR:

Way back in 2009 I did a blog entry that showed how to implement partial page rendering (PPR) in ADF by setting the partialTrigger attribute of a field to depend on another.

Somewhere along the way* ADF got more advanced, and today there's a simpler way to do this without the need to define the partialTrigger property for your calculated field. Instead you just define dependency between fields in the model layer (ADF BC) and your View layer automatically handles the update to the screen. This is driven by the default use of the "ppr" mode for the ChangeEventPolicy of iterators in your page's binding layer.

Here is a quick demo that shows you how to define a calculated field that depends on the values of two other fields, and have it automatically display the value when the other fields are set.

For the record here is the bit of groovy code used in the calculated field:

if (CommissionPct != null)
{return Salary * (1+CommissionPct);}
return Salary

* - I'm not exactly sure in which version of JDeveloper this became the default behavior, but I just looked in and the default changeEventPolicy is not PPR for a page - but it seems like you can change it to ppr to get it working.

Join the discussion

Comments ( 3 )
  • lLya Cyclone Friday, May 17, 2013

    Hello Shay,

    I always set iterators changeEventPolicy to none, because leaving it PPR always beings errors like "Component is not set for active data. " and other misbehavior which vanishes with changeEventPolicy none.

    Could you please comment on it?

  • Kyle Thomas Monday, May 20, 2013

    Nice Shay ... that makes it easier than having to keep track of all those partialTriggers defined in the view layer and the issues that arise when you move components around to other regions.

  • Shay Monday, May 20, 2013

    ILya - I'm not familiar with these type of errors - if you have a reproducible test case, working with Oracle support through this can help.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.