How to reset search in Oracle JDeveloper

38 Views Asked by At

There are two buttons on the page: a RESET button and a SEARCH button - if I press the SEARCH button it finds a record (by a certain field), then if I immediately press the RESET button it resets the record from the grid everything is fine! But if I sat down after the Search Command, I will sort by any field in the grid and press reset, then it displays all the records in the grid? How to fix it? According to the code, there is no request for it to take and display all records. Here is my code .jsff

`<af:query id="gsearchQ" headerText="Search" disclosed="true"
                  value="#{bindings.GeneralSearchVCriteriaQuery.queryDescriptor}"
                  model="#{bindings.GeneralSearchVCriteriaQuery.queryModel}"
                  queryListener="#{pageFlowScope.GSearchBean.gsearchQueryListener}"
                  queryOperationListener="#{pageFlowScope.GSearchBean.gsearchQueryOperationListener}"
                  partialTriggers="::t1:c4 ::t1:c18 ::t1"
                  saveQueryMode="hidden" maxColumns="2" rows="3" modeChangeVisible="false" resultComponentId="::t1"/>`

Here is my Java code:

`    public void gsearchQueryOperationListener(QueryOperationEvent queryOperationEvent){
        log.info("STEP 1: "+queryOperationEvent);
            if(queryOperationEvent.getOperation().name().toUpperCase().equals("RESET")){
                       ViewObject object = ADFUtils.findIterator("GeneralSearchV1Iterator").getViewObject();
                       object.executeEmptyRowSet();
                       oracle.jbo.ViewCriteria criteria = ADFUtils.findIterator("GeneralSearchV1Iterator").getViewCriteria();
                       object.applyViewCriteria(criteria);
                       result = false;
                   }
    }`

What could be the problem? please help.

I put down the logs and looked at what I get at each step, but this did not help me understand the reason

0

There are 0 best solutions below