Skip to main content

Posts

Showing posts from March, 2013

A utility method to print the ViewCriteria returned by the search binding

A couple of years back I blogged about retrieving ViewCriteria(VC) from a custom queryListener method. This post in in continuation of the above said post. Recently while working on an example that deals with af:query component backed up by a VC, I noticed that it may also help developers to narrow down certain issues if they can print the ViewCrtieria returned by the search component. You can use the following code snippet in such scenarios. This may also help you to understand how framework construct ViewCriteria from af:query component. Here is the code snippet:

//In managed bean - TestBean //The customQueryListener(..) is the custom //queryListener specified for the af:query public void customQueryListener(QueryEvent queryEvent) { //Read Query Descriptor QueryDescriptor qd = queryEvent.getDescriptor(); DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); /** The below call get ViewCriteri…

My tiny bundle of joy has arrived

My tiny bundle of joy has arrived on 6 March 2013. Our little angel keeps me and my wife Remya busy these days. Look like she is not as naughty as her elder brother ;)

Preventing unwanted query executions in ADF BC when used in Non-UI applications

Oracle ADF enables you to build rich enterprise applications very rapidly. The UI aware model and tooling support doubles your productivity and removes a lot of boilerplate code from your application. However, when you plan to reuse ADF Business Components built for a UI centric application( e.g a web application), in non UI application (e.g a console or a batch application) you can play smartly which may avoid some unwanted query executions. This post is meant for addressing few such scenarios with some simple tricks.

When you use ADF BC in Non-UI app, a couple of points that you need to be aware of are :
If you have an LOV(choice list) enabled attribute in a view object, then framework will kick off query for reading list of values whenever you set value for this attribute( if the list is not yet populated). This is desirable when use in a web application. It also make sense if the LOV returns multiple values so that all LOV derived attributes will get populated when you set new val…