Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Prevent table from querying data until desired

jm42Sep 13 2024

I am using ADF 12.2.1.4 and have a filterable af:table component that I would like to prevent from loading any data until some action occurs.

I have accomplished this with a non-fitlerable af:table component by setting the refresh and refreshCondition attributes of the iterator binding to “ifNeeded” and a session bean property, respectively:

<iterator Binds="MyAppView1" RangeSize="50" DataControl="MyAppModuleDataControl" id="MyAppView1Iterator"
Refresh="ifNeeded"
RefreshCondition="#{!sessionScope.MySessionData.myInitialLoad}"
ChangeEventPolicy="none"/>

However, if I make the table filterable, it seems the searchRegion binding forces execution anyway. I have tried various combinations of the below to try and make the searchRegion binding behave the same as the iterator binding without success:

<searchRegion Binds="MyAppView1Iterator" Criteria="" Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
id="MyAppView1Query"
RefreshCondition="#{!sessionScope.MySessionData.myInitialLoad}" Refresh="ifNeeded"
RefreshAfter="MyAppView1Iterator" TrackQueryPerformed="Page" InitialQueryOverridden="true"/>

My understanding from the docs is that InitialQueryOverridden="true" on the searchRegion binding, possibly even without the refresh attributes(?), should prevent the initial query. It is not working for me, however. Does that attribute perhaps only have an affect if you are within a bounded flow? The default TrackQueryPerformed value is pageFlowScope, which if I recall docs I am not finding at the moment, only exists within a bounded task flow(?). Should TrackQueryPerformed="Page" work for me or will that not work in an unbounded flow either? IS there something else pertinent to this approach I might be missing?

Is there some other standard approach I could use to accomplish this? As a last resort, I expect something like using a default ViewCriteria of 0=1 and removing it when desired could work, but I'd like to avoid that approach if possible.

Comments
Post Details
Added on Sep 13 2024
3 comments
99 views