// check for a page cursor navigation event
getPageCursorPanel().checkActionEvent(event, true);
// prepare the publisher
Publisher publisher = new Publisher(context);
// determine and execute the command
UIComponent component = event.getComponent();
String sCommand = Val.chkStr((String) component.getAttributes().get("command"));
if (sCommand.equals("")) {
// set the sort option
} else if (sCommand.equals("sort")) {
String sCol = (String) component.getAttributes().get("column");
String sDir = (String) component.getAttributes().get("defaultDirection");
getQueryCriteria().getSortOption().setColumnKey(sCol, true, sDir);
// execute an action
} else if (sCommand.equals("executeAction")) {
String sAction = actionCriteria.getActionKey();
boolean applyToAll = Val.chkBool((String) component.getAttributes().get("applyToAll"), false);
boolean bRequiresAdmin = sAction.equalsIgnoreCase("transfer")
|| sAction.equalsIgnoreCase("setApproved")
|| sAction.equalsIgnoreCase("setDisapproved")
|| sAction.equalsIgnoreCase("setReviewed")
|| applyToAll;
if (bRequiresAdmin && !publisher.getIsAdministrator()) {
throw new NotAuthorizedException("Not authorized.");
}
executeAction(event, context, actionCriteria, publisher, applyToAll);
} else if (sCommand.equals("synchronize")) {
executeSynchronization(event, context, actionCriteria);