IDEMPIERE-152 Show UUID value on Record Info - Fixed issues with dataNew and dataIgnore

This commit is contained in:
Heng Sin Low 2012-07-02 12:23:37 +08:00
parent 476034403c
commit c19853b0ad
2 changed files with 13 additions and 5 deletions

View File

@ -1116,6 +1116,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
public void dataIgnore() public void dataIgnore()
{ {
log.fine("#" + m_vo.TabNo); log.fine("#" + m_vo.TabNo);
if (m_mTable.isInserting())
{
m_currentRow--;
}
m_mTable.dataIgnore(); m_mTable.dataIgnore();
setCurrentRow(m_currentRow, false); // re-load data setCurrentRow(m_currentRow, false); // re-load data
@ -2344,12 +2348,15 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
StringBuffer info = new StringBuffer(getTableName()); StringBuffer info = new StringBuffer(getTableName());
/* get UUID */ /* get UUID */
PO po = m_mTable.getPO(m_currentRow); if (!e.isInserting() && e.getCurrentRow() >= 0)
{
PO po = m_mTable.getPO(e.getCurrentRow());
if (po != null) { if (po != null) {
String uuidcol = po.getUUIDColumnName(); String uuidcol = po.getUUIDColumnName();
String uuid = po.get_ValueAsString(uuidcol); String uuid = po.get_ValueAsString(uuidcol);
info.append("\n ").append(uuidcol).append("=").append(uuid); info.append("\n ").append(uuidcol).append("=").append(uuid);
} }
}
// We have a key column // We have a key column
if (m_keyColumnName != null && m_keyColumnName.length() > 0) if (m_keyColumnName != null && m_keyColumnName.length() > 0)

View File

@ -2098,6 +2098,7 @@ public final class APanel extends CPanel
m_curAPanelTab.loadData(); m_curAPanelTab.loadData();
} }
m_curTab.dataIgnore(); m_curTab.dataIgnore();
m_curTab.dataRefresh(true);
m_curGC.dynamicDisplay(0); m_curGC.dynamicDisplay(0);
} // cmd_ignore } // cmd_ignore