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!

How to reset the VO after executing it's ViewCriteria?

GadoMar 26 2017 — edited Mar 27 2017

Hello experts,

I'm using JDev 11.1.1.7.0

I have a view object  "ProductsVO" with a view criteria "ProductsSearchVC"

The ProductsVO is droped on the Products page fragment as and adf query with table.

I have a use case to filter the products based on some values to return the prodPrice.

So i created another viewCriteria "getProductById".

Created a method in the ProductsVo to execute the VC "getProductById".

Exposed the method and then droped it on page.

All is working fine except after using the method operation and go to the Products page instead of showing all the products it is showing the filtered products returned from executing the VC "getProductById".

So my question is how can i reset the VO query to remove the filtering caused by the view criteria?

This is the code i'm using in the service method:

ViewCriteria vc =  this.getViewCriteria("getProductById_VOCriteria");

vc.resetCriteria();

this.setP_prodId(prodId);

this.applyViewCriteria(vc);

this.executeQuery();

this.resetExecuted();

if (this.first() != null) {

     ......

}

Thank you for your time

Gado

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2017
Added on Mar 26 2017
3 comments
1,653 views