IDEMPIERE-1258 Deleting a record is not refreshing recent items / based on patch from Richard Morales

This commit is contained in:
Carlos Ruiz 2013-08-08 17:58:28 -05:00
parent 7e347cdbfc
commit d45691b141
2 changed files with 6 additions and 4 deletions

View File

@ -40,12 +40,12 @@ import org.osgi.service.event.Event;
*/
public class MRecentItem extends X_AD_RecentItem
{
public static final String ON_RECENT_ITEM_CHANGED_TOPIC = "onRecentItemChanged";
/**
*
*/
private static final long serialVersionUID = 8337619537799431984L;
private static final long serialVersionUID = 6899554875745832L;
public static final String ON_RECENT_ITEM_CHANGED_TOPIC = "onRecentItemChanged";
/** Recent Item Cache */
private static CCache<Integer,MRecentItem> s_cache = new CCache<Integer,MRecentItem>(Table_Name, 10);
@ -189,7 +189,7 @@ public class MRecentItem extends X_AD_RecentItem
publishChangedEvent(AD_User_ID);
}
private static void publishChangedEvent(int AD_User_ID) {
public static void publishChangedEvent(int AD_User_ID) {
IMessageService service = Service.locator().locate(IMessageService.class).getService();
if (service != null) {
ITopic<Integer> topic = service.getTopic(ON_RECENT_ITEM_CHANGED_TOPIC);

View File

@ -2006,6 +2006,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
focusToActivePanel();
MRecentItem.publishChangedEvent(Env.getAD_User_ID(ctx));
}
}
});
@ -2175,6 +2176,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
messagePanel.dispose();
MRecentItem.publishChangedEvent(Env.getAD_User_ID(ctx));
} else {
logger.fine("cancel");
}