Hi,
I used that solution already, but I thought there would be a more convenient way to do it.
What i did: (keys and dataList) are variables fed by the system when clicking on a Datalist Bean Shell action.
Keys are the primary keys of the selected items
datalist is the whole datalist (of selected AND unselected items)
public void completeSubculture(String[] keys, DataList dataList) {
DataListService dataListService = (DataListService) AppUtil.getApplicationContext().getBean("dataListService");
String sql = "";
Connection con = null;
DataListCollection rows = dataList.getRows();
for (String key : keys) {
String activityName = "";
for (int i = 0; i < rows.size(); i++) {
if (key.equals(dataListService.evaluateColumnValueFromRow(rows.get(i),"id"))){
activityName = dataListService.evaluateColumnValueFromRow(rows.get(i),"activityName");
System.out.println(activityName);
}
}
}
}
What i find fastidious is that the only way of retrieving a row is by comparing primary keys.
But it works so... great!
Cheers
Baptiste