IDEMPIERE-1258 Deleting a record is not refreshing recent items / based on patch from Richard Morales
This commit is contained in:
parent
7e347cdbfc
commit
d45691b141
|
@ -40,12 +40,12 @@ import org.osgi.service.event.Event;
|
||||||
*/
|
*/
|
||||||
public class MRecentItem extends X_AD_RecentItem
|
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 */
|
/** Recent Item Cache */
|
||||||
private static CCache<Integer,MRecentItem> s_cache = new CCache<Integer,MRecentItem>(Table_Name, 10);
|
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);
|
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();
|
IMessageService service = Service.locator().locate(IMessageService.class).getService();
|
||||||
if (service != null) {
|
if (service != null) {
|
||||||
ITopic<Integer> topic = service.getTopic(ON_RECENT_ITEM_CHANGED_TOPIC);
|
ITopic<Integer> topic = service.getTopic(ON_RECENT_ITEM_CHANGED_TOPIC);
|
||||||
|
|
|
@ -2006,6 +2006,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
|
|
||||||
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
||||||
focusToActivePanel();
|
focusToActivePanel();
|
||||||
|
MRecentItem.publishChangedEvent(Env.getAD_User_ID(ctx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2175,6 +2176,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
||||||
|
|
||||||
messagePanel.dispose();
|
messagePanel.dispose();
|
||||||
|
MRecentItem.publishChangedEvent(Env.getAD_User_ID(ctx));
|
||||||
} else {
|
} else {
|
||||||
logger.fine("cancel");
|
logger.fine("cancel");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue