This content has been marked as final. Show 9 replies
Your solution is not working. The behaivour is similar with invoking method executeQuery().
Some more clarifications might be useful:
What I have is similar with master-detail scenario:
In first tab there are some master object properties from a view object
and in the second tab associated items; this items can be deleted/inserted or modified ( this mean view object operations liek createRow(), row.remove() etc.)
So what I need is a reset only for detail items view object without reseting the edited values from master view object?
Edited by: Bogdan on Sep 16, 2010 2:58 PM
You could try a couple of approaches:
1). Expose an AM method that does:
2). Loop through each row in the detail VO and call refresh(<forget changes>) on the underlying entity(s)
getDBTransaction().clearEntityCache("<entity on which the detail rows are based>"); // repeat if more than 1 updatable entity <execute the detail VO again>
Thank you for your suggestions.
For the first one i've got the following exception:
Details about this error:
<RegistrationConfigurator><handleError> Server Exception during PPR, #1 javax.servlet.ServletException: *JBO-25303*: Cannot clear entity cache com.xyz.portal.model.eo.User2UserGroup because it has modified rows .... Caused by: oracle.jbo.InvalidOperException: JBO-25303: Leeren des Entity-Cache com.xyz.portal.model.eo.User2UserGroup nicht möglich, weil geänderte Zeilen vorhanden sind at oracle.jbo.server.DBTransactionImpl.clearECacheWithCheck(DBTransactionImpl.java:3962) at oracle.jbo.server.DBTransactionImpl.clearEntityCache(DBTransactionImpl.java:4027) ....
Cause: A dirty entity cache cannot be cleared. The client asked to clear an entity cache but some rows in the entity cache have been modified. An entity cache with modified rows cannot be cleared.
Action: Do not attempt to clear an entity cache with modified rows in it."
Is it something that i need to do before clearing the EO cache?
Here is the code:
The second option, i think it will not work for deleted rows; maybe the delete should be done with removeAndRetain.
final ViewObjectImpl selVO = ... ApplicationModuleImpl appModule = (ApplicationModuleImpl)selVO.getApplicationModule(); appModule.getDBTransaction().clearEntityCache(eOFullName); selVO.executeQuery(); ADFUtil.partialRefresh(this.selItemsTable);