AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;
if(eventName.equals("drop")) {
String dragId = params.get(clientId + "_dragId");
String dropId = params.get(clientId + "_dropId");
DragDropEvent dndEvent = null;
String datasourceId = getDatasource();
if(datasourceId != null) {
UIData datasource = findDatasource(context, this, datasourceId);
String[] idTokens = dragId.split(String.valueOf(UINamingContainer.getSeparatorChar(context)));
int rowIndex = Integer.parseInt(idTokens[idTokens.length - 2]);
datasource.setRowIndex(rowIndex);
Object data = datasource.getRowData();
datasource.setRowIndex(-1);
dndEvent = new DragDropEvent(this, behaviorEvent.getBehavior(), dragId, dropId, data);
}
else {
dndEvent = new DragDropEvent(this, behaviorEvent.getBehavior(), dragId, dropId);
}
super.queueEvent(dndEvent);
}