IDEMPIERE-127 Implement Recent Items dashboard / Let modified items appear on top

This commit is contained in:
Carlos Ruiz 2013-03-01 19:27:49 -05:00
parent eb26659562
commit 893530a9b9
1 changed files with 15 additions and 4 deletions

View File

@ -170,11 +170,22 @@ public class MRecentItem extends X_AD_RecentItem
ri.setAD_Table_ID(AD_Table_ID); ri.setAD_Table_ID(AD_Table_ID);
ri.setRecord_ID(Record_ID); ri.setRecord_ID(Record_ID);
ri.setAD_User_ID(AD_User_ID); ri.setAD_User_ID(AD_User_ID);
}
ri.setAD_Role_ID(AD_Role_ID); ri.setAD_Role_ID(AD_Role_ID);
ri.setAD_Window_ID(AD_Window_ID); ri.setAD_Window_ID(AD_Window_ID);
ri.setAD_Tab_ID(AD_Tab_ID); ri.setAD_Tab_ID(AD_Tab_ID);
ri.saveEx(); ri.saveEx();
} else {
if ( ri.getAD_Role_ID() != AD_Role_ID
|| ri.getAD_Window_ID() != AD_Window_ID
|| ri.getAD_Tab_ID() != AD_Tab_ID) {
ri.setAD_Role_ID(AD_Role_ID);
ri.setAD_Window_ID(AD_Window_ID);
ri.setAD_Tab_ID(AD_Tab_ID);
ri.saveEx();
} else {
DB.executeUpdateEx("UPDATE AD_RecentItem SET Updated=SYSDATE WHERE AD_RecentItem_ID=?", new Object[] {ri.getAD_RecentItem_ID()}, null);
}
}
publishChangedEvent(AD_User_ID); publishChangedEvent(AD_User_ID);
} }