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!

Cannot filter on Read-Only ADF Table by Date only (ignoring time)

GleannFiaJul 23 2015 — edited Jul 23 2015

Hi,

I'm using JDeveloper 11g 11.1.1.7.0.

As a Proof-Of-Concept I created a read-only VO and then dropped it onto a simple page as an ADF Read-Only Table and enabled filtering & sorting.

I have one Date field in the table where I display the time component on the page.

However, I want to be able to filter by date only (without time) so that all records for a single day are retrieved regardless of the time.

I created my own class that extends OracleSQLBuilderImpl and I wrote methods to override getFormattedLHSCompareFragment (so I could TRUNC the date column)

and also the getFormattedRHSCompareFragment method (so I could apply a TO_DATE format on the bind variable that the ADF framework creates for the filter).

I configured the App Module so that the jbo.SQLBuilder property is set to the fully-qualified name of my class.

When I enable jbo logging (set to FINEST) and run the application via the integrated weblogic server, I can see that my overrided getFormattedLHSCompareFragment method is called and I can see the column is wrapped in a TRUNC function. So far so good.

However, my overridden getFormattedRHSCompareFragment method is never called and the bind variable (i.e. the value I choose from the date picker in the filter field) is appearing

as YYYY-MM-DD format. The query doesn't return any data when I filter and no error appears in the logs that I can see.

I wanted to use this approach as I want to apply this type of filtering across my entire application and I don't want to have to change every filtered screen.

Can anybody advise what is going wrong?

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2015
Added on Jul 23 2015
5 comments
645 views