IDEMPIERE-5952 - Adjust to return IDColumn recordID (#2130)
* IDEMPIERE-5952 - Adjust to return IDColumn recordID * IDEMPIERE-5952 - Adjusts
This commit is contained in:
parent
e33cadc2f9
commit
7865952db2
|
@ -1717,28 +1717,20 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
||||||
} // getIntSelectedRowKey
|
} // getIntSelectedRowKey
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the keys of selected row/s based on layout defined in prepareTable
|
* Get the keys of selected rows
|
||||||
* @deprecated
|
* @return selected IDs or UUIDs
|
||||||
* @return IDs if selection present
|
|
||||||
* author ashley
|
|
||||||
*/
|
*/
|
||||||
protected ArrayList<Object> getSelectedRowKeys()
|
@SuppressWarnings("unchecked")
|
||||||
|
protected <T extends Serializable> List<T> getSelectedRowKeys()
|
||||||
{
|
{
|
||||||
ArrayList<Object> selectedDataList = new ArrayList<Object>();
|
List<T> selectedDataList = new ArrayList<>();
|
||||||
Collection<Object> lsKeyValueOfSelectedRow = getSelectedRowInfo().keySet();
|
for (Map.Entry<Object, List<Object>> rowInfo : getSelectedRowInfo().entrySet()) {
|
||||||
if (lsKeyValueOfSelectedRow.size() == 0)
|
if(rowInfo.getValue().get(0) instanceof IDColumn idColumn)
|
||||||
{
|
selectedDataList.add((T)idColumn.getRecord_ID());
|
||||||
return selectedDataList;
|
else if(rowInfo.getValue().get(0) instanceof UUIDColumn uuidColumn)
|
||||||
}
|
selectedDataList.add((T)uuidColumn.getRecord_UU());
|
||||||
|
}
|
||||||
if (p_multipleSelection)
|
return selectedDataList;
|
||||||
{
|
|
||||||
for (Object key : lsKeyValueOfSelectedRow){
|
|
||||||
selectedDataList.add(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return selectedDataList;
|
|
||||||
} // getSelectedRowKeys
|
} // getSelectedRowKeys
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue