IDEMPIERE-152 Show UUID value on Record Info

This commit is contained in:
Carlos Ruiz 2012-06-27 18:19:10 -05:00
parent 2fe8ea2a91
commit d2ab5564bf
2 changed files with 28 additions and 14 deletions

View File

@ -105,9 +105,9 @@ import org.compiere.util.ValueNamePair;
public class GridTab implements DataStatusListener, Evaluatee, Serializable
{
/**
*
*
*/
private static final long serialVersionUID = -3825605601192688998L;
private static final long serialVersionUID = 6841849146086698231L;
public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate";
@ -2342,10 +2342,19 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
e.Record_ID = getValue(m_keyColumnName);
// Info
StringBuffer info = new StringBuffer(getTableName());
/* get UUID */
PO po = m_mTable.getPO(m_currentRow);
if (po != null) {
String uuidcol = po.getUUIDColumnName();
String uuid = po.get_ValueAsString(uuidcol);
info.append("\n ").append(uuidcol).append("=").append(uuid);
}
// We have a key column
if (m_keyColumnName != null && m_keyColumnName.length() > 0)
{
info.append(" - ")
info.append("\n ")
.append(m_keyColumnName).append("=").append(e.Record_ID);
}
else // we have multiple parents
@ -2353,7 +2362,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
for (int i = 0; i < m_parents.size(); i++)
{
String keyCol = (String)m_parents.get(i);
info.append(" - ")
info.append(i == 0 ? "\n " : " - ")
.append(keyCol).append("=").append(getValue(keyCol));
}
}

View File

@ -90,10 +90,10 @@ public class GridTable extends AbstractTableModel
implements Serializable, SystemIDs
{
/**
* generated
*
*/
private static final long serialVersionUID = 7799823493936826600L;
private static final long serialVersionUID = 4648364477309024202L;
public static final String DATA_REFRESH_MESSAGE = "Refreshed";
/**
@ -2568,13 +2568,7 @@ public class GridTable extends AbstractTableModel
MSort sort = (MSort)m_sort.get(row);
Object[] rowData = getDataAtRow(row);
//
MTable table = MTable.get (m_ctx, m_AD_Table_ID);
PO po = null;
int Record_ID = getKeyID(row);
if (Record_ID != -1)
po = table.getPO(Record_ID, null);
else // Multi - Key
po = table.getPO(getWhereClause(rowData), null);
PO po = getPO(row);
// Delete via PO
if (po != null)
@ -3698,5 +3692,16 @@ public class GridTable extends AbstractTableModel
}
return bChanged;
}
public PO getPO(int row) {
MTable table = MTable.get (m_ctx, m_AD_Table_ID);
PO po = null;
int Record_ID = getKeyID(row);
if (Record_ID != -1)
po = table.getPO(Record_ID, null);
else // Multi - Key
po = table.getPO(getWhereClause(getDataAtRow(row)), null);
return po;
}
}