fix for bug [ 1631871 ] Multi-delete shows null for tables without ID

This commit is contained in:
kthiemann 2007-01-10 15:24:42 +00:00
parent 8dbed9f953
commit 024e35402b
1 changed files with 20 additions and 1 deletions

View File

@ -1333,7 +1333,25 @@ public final class APanel extends CPanel
int noOfRows = m_curTab.getRowCount();
for(int i=0; i<noOfRows; i++){
StringBuffer displayValue = new StringBuffer();
if("".equals(m_curTab.getKeyColumnName())){
ArrayList<String> parentColumnNames = m_curTab.getParentColumnNames();
for (Iterator iter = parentColumnNames.iterator(); iter.hasNext();) {
String columnName = (String) iter.next();
GridField field = m_curTab.getField(columnName);
if(field.isLookup()){
Lookup lookup = field.getLookup();
if (lookup != null){
displayValue = displayValue.append(lookup.getDisplay(m_curTab.getValue(i,columnName))).append(" | ");
} else {
displayValue = displayValue.append(m_curTab.getValue(i,columnName)).append(" | ");
}
} else {
displayValue = displayValue.append(m_curTab.getValue(i,columnName)).append(" | ");
}
}
} else {
displayValue = displayValue.append(m_curTab.getValue(i,m_curTab.getKeyColumnName()));
}
if(m_curTab.getField("DocumentNo")!=null){
displayValue = displayValue.append(" | ").append(m_curTab.getValue(i, "DocumentNo"));
}
@ -1350,6 +1368,7 @@ public final class APanel extends CPanel
}
list.setListData(data);
list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
messagePanel.add(scrollPane);