private void doAction(boolean alternate) {
int row = getSelectedRow();
if ((row > -1) && (row < model.getCurrentChildren().size())) {
String id = getModel().getValueAt(getRowSorter().convertRowIndexToModel(row), ID_COLUMN).toString();
CmisObject object = model.getFromCurrentChildren(id);
if (object instanceof Document) {
if (alternate) {
ClientHelper.download(this.getParent(), (Document) object, null);
} else {
ClientHelper.open(this.getParent(), (Document) object, null);
}
} else if (object instanceof Folder) {
try {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
model.loadFolder(object.getId(), false);
} catch (Exception ex) {
ClientHelper.showError(null, ex);
return;
} finally {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));