First page Back Continue Last page Text

oracle adf workshop


Specifying Whether to Refresh Binding Executables

The Refresh property determines the phase in which to invoke the executable, whereas the RefreshCondition property determines whether to refresh the binding. Before refreshing any bindings, the ADF run-time evaluates the RefreshCondition attribute of the executables, which specifies the conditions under which the executable should be refreshed. You can specify the RefreshCondition value using a Boolean EL expression (default is true).

If an iterator binding is not refreshed during the life cycle, it is not pointing to any row set iterator for that request. This results in the value bindings related to that iterator binding not having any data to display. This can be a desirable result when, for example, you want a page, such as a search page, to initially show no data. To achieve this, you can use the expression #{adfFacesContext.isInitialRender}, which evaluates to true when a page is first rendered. So that data does not display when the page is first rendered, use a RefreshCondition of: #{!adfFacesContext.isInitialRender}.

You should set the Refresh attribute of an executable to renderModel when the RefreshCondition is dependent on the model. So if you want to use the #{adfFacesContext.isInitialRender} expression in a RefreshCondition of an executable, you must set the Refresh property to either renderModel or renderModelIfNeeded, so that the executable refreshes during the Prepare Render phase.