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!

Apply programmatically a view Criteria through a View Accessor

2890292Jun 28 2017 — edited Jun 28 2017

Hello Folks.

I have Jdeveloper 11.1.1.7.0

I have two view objects, one in which i created for an attribute a list of values.

When View number 1 calls list of values View number 2 it should apply just one of the three view criteria available; because there are separated process that uses in commodity this two view object.

This is the main view:

pastedImage_0.png

There are the three different view criteria to apply based in the type of process (none is selected).

pastedImage_1.png

In the main code i try to call view accessor, this is fine till i try to invoke the view criteria of the child element prompting an error:

        DCIteratorBinding dciter256 = bindingsImpl.findIteratorBinding("ResguardoView1Iterator");

        ViewObject Res = dciter256.getViewObject();

        ViewObject Accesor = Res.findAttributeDef("CctresguardoView1").getAccessorVO(Res);

        ViewCriteriaManager vcm26 = Accesor.getViewCriteriaManager(); //HERE I GET A NULLPOINTER EXCEPTION

        ViewCriteria vc26 = null;

        vc26 = vcm26.getViewCriteria("EsPaViewCriteria");

        Accesor.applyViewCriteria(vc26);

        Accesor.executeQuery();

Any idea how to invoke programmatically an accessor and apply a view criteria in its child View Object of the list of values?.

Cheers.

Jorge.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2017
Added on Jun 28 2017
1 comment
537 views