IDEMPIERE-127 Implement Recent Items dashboard

http://jira.idempiere.com/browse/IDEMPIERE-127
error trying to save when no new record saved (as pushing find on an empty new record)
This commit is contained in:
Carlos Ruiz 2012-02-03 20:11:31 -05:00
parent 47ec4aa29b
commit 714e17635b
1 changed files with 16 additions and 14 deletions

View File

@ -1564,20 +1564,22 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
if (wasChanged) { if (wasChanged) {
if (newRecord) { if (newRecord) {
if (curTabIndex == 0) { if (curTab.getRecord_ID() > 0) {
MRecentItem.addModifiedField(ctx, curTab.getAD_Table_ID(), if (curTabIndex == 0) {
curTab.getRecord_ID(), Env.getAD_User_ID(ctx), MRecentItem.addModifiedField(ctx, curTab.getAD_Table_ID(),
Env.getAD_Role_ID(ctx), curTab.getAD_Window_ID(), curTab.getRecord_ID(), Env.getAD_User_ID(ctx),
curTab.getAD_Tab_ID()); Env.getAD_Role_ID(ctx), curTab.getAD_Window_ID(),
} else { curTab.getAD_Tab_ID());
/* when a detail record is modified add header to recent items */ } else {
GridTab mainTab = gridWindow.getTab(0); /* when a detail record is modified add header to recent items */
if (mainTab != null) { GridTab mainTab = gridWindow.getTab(0);
MRecentItem.addModifiedField(ctx, mainTab.getAD_Table_ID(), if (mainTab != null) {
mainTab.getRecord_ID(), Env.getAD_User_ID(ctx), MRecentItem.addModifiedField(ctx, mainTab.getAD_Table_ID(),
Env.getAD_Role_ID(ctx), mainTab.getAD_Window_ID(), mainTab.getRecord_ID(), Env.getAD_User_ID(ctx),
mainTab.getAD_Tab_ID()); Env.getAD_Role_ID(ctx), mainTab.getAD_Window_ID(),
} mainTab.getAD_Tab_ID());
}
}
} }
} else { } else {
if (curTabIndex == 0) { if (curTabIndex == 0) {