This is normal and expected behavior. The query model retains the criteria values, otherwise the query panel would be rendered empty if you refresh it by PPR. Depending on the configuration of the underlying search binding and ViewCriteria the values may be retained even if you exit the page and then open the page again.
If you want to clear the query criteria when you open the popup, you can implement a PopupFetchListener for the popup. PopupFetchListener is executed each time when the popup is opened. There you can get and reset the query component programmatically. Have a look at this blogpost for details how to reset it:
I have tried the approach mentioned in the blog , but still I see search values not clearing.
There is no reason the blog's approach not to work. Please, doublecheck that the <af:popup>'s contentDelivery="lazyUncached" and that you have bound the <af:query> component to the proper RichQuery variable in the managed bean. Check also if the PopupFetchListener is executed properly.
Anyway, if the approach above does not work, you can try another approach which I guaranteed to work (I had already tried it yesterday, but did not suggested it because it uses an internal class). In short, use the PopupFetchListener to clear the underlying search binding using code similar to this one:
DCBindingContainer pageDef = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
FacesCtrlSearchBinding searchBinding = (FacesCtrlSearchBinding)pageDef.findExecutableBinding("YourSearchBindingIdInPageDef");
This approach is not very good, because it uses an internal class (oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding), which is not guaranteed to remain unchanged in next ADF releases. Also it will work only if your <af:query> is based on VO ViewCriteria but not on a custom query model (where there is no search binding in the PageDef).
Observed that when I am using my own ok cancel buttons for closing this issue is not working. When we use dialog provided OK Cancel, this approach works fine.
but I have custom code on OK.