Monday, 23 November 2009

ADF: popup ‘ContentDelivery’ property with value ‘lazyUncached’

I have a case in which I have a servlet who renders an image from certain database values. The servlet is called from within an ADF popup.

One of the properties of the popup is the property ‘ContentDelivery’ which default value is ‘lazy’. When this property is set to ‘lazyUncached’ the content of the popup window will be delivered fresh each time the window is shown according to the documentation.

Just what I needed!

But my experience taught me something else, the first time the image is rendered correctly as I expected but from that point on my servlet code is never called again and a cached image seems to be shown.

The work around for this error is quite simple (and obvious if you’re familiar with ADF). Just put a partial submit on the buttons or components on the page that are responsible for the changes to the image (in my case via database manipulation) and add a partial trigger to the popup to this buttons or components.

Jobs done, now when the popup is called after one of the partial submit buttons is clicked the image on the popup is rendered correctly.