Pages

Friday, August 28, 2009

Clear the cached data of popup component in ADF Faces

I'v developed a project in JDevelop 11g recently.

In this project, i popped up a dialog to upload the document into Oracle UCM with self-defined metadata set on the check in form.

Each time after i check in content once in that popup dialog, i reopened it up and found the previous input were still kept there.

How to solve this problem? After going through all the properties of popup component, i found there is a property called contentDelivery, which its default value is lazy.

Here are the explanation of values of this property :
  • lazy -- the default strategy described above. The content isn't loaded until you show the popup once, but then is cached.
  • immediate -- load the content onto the page immediately, so it displays as rapidly as possible. Use this for popups that are certain to be used by all users every time they use this page.
  • lazyUncached -- the content isn't loaded until you show the popup, and then is re-fetched every subsequent time you show the popup. Use this strategy if the popup shows data that can become stale.
After setting its value as lazyUncached, my problem was fixed.

For example:

<af:popup id="noteWindow" contentdelivery="lazyUncached">
...
</af:popup>


For more info, please refer to the following document:

http://www.oracle.com/technology/products/adf/adffaces/11/doc/adf-richclient-api/tagdoc/af_popup.html

1 comment:

Osama Zien Adden said...

Great,
It was caching content, "LazyUncached" solves the issue.
Thanks ...