ADF – Stop VO execution during page render

 Back again after quite some time! My ADF journey has started and so keep watching my blog to learn ADF along with me. Just as a primer, here is a small tip learnt.

In ADF when you drag and drop a VO from Data Control to your page and run your page, the VO will by default be executed and the output is shown. no extra line of code is needed to execute the VO at all like its done in OAF. but sometimes we may dont want this to happen during page render itself. Example in a search page, we dont want the vo to be executed when we open the page. It should only be executed after a click of a button. In that case to stop VO execution during page render, do the following.

Go to page definition. –> expand executables tab –> double click on your VO iterator –> in property inspector, set the refresh condition to following :

#{adfFacesContext.postback == true}

The adfFacesContext.postback boolean property evaluates to false when a page is first rendered, or rendered due to navigation from another page. It evaluates to true when the end user has interacted with some UI control on the page, causing a postback to that page to handle the event.

Advertisements
This entry was posted in ADF, TechnoloZi. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s