main.setContent(myContent);
}
if (source == tableCtr && event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
TableEvent te = (TableEvent)event;
Quota q = quotaTableModel.getRowData(te.getRowId());
if (te.getActionId().equals("qf.edit")) {
// clean up old controller first
if (quotaEditCtr != null) removeAsListenerAndDispose(quotaEditCtr);
// start edit workflow in dedicated quota edit controller
quotaEditCtr = new GenericQuotaEditController(ureq, getWindowControl(), q);
listenTo(quotaEditCtr);
main.setContent(quotaEditCtr.getInitialComponent());
} else if (te.getActionId().equals("qf.del")) {
// try to delete quota
boolean deleted = QuotaManager.getInstance().deleteCustomQuota(q);
if (deleted) {
quotaTableModel.refresh();
tableCtr.setTableDataModel(quotaTableModel);
showInfo("qf.deleted", q.getPath());
} else {
// default quotas can not be qf.cannot.del.default")deleted
showError("qf.cannot.del.default");
}
}