WebUserPreferences preferences = user.getWebPreferences();
AddResourcesForm addForm = (AddResourcesForm) form;
ActionForward forward = checkSubmit(request, mapping, form, Constants.USER_PARAM, user.getId());
if (forward != null) {
BaseValidatorForm spiderForm = (BaseValidatorForm) form;
if (spiderForm.isCancelClicked() || spiderForm.isResetClicked()) {
log.trace("removing pending resources list");
SessionUtils.removeList(session, Constants.PENDING_RESOURCES_SES_ATTR);
} else if (spiderForm.isAddClicked()) {
log.trace("adding to pending resources list");
SessionUtils.addToList(session, Constants.PENDING_RESOURCES_SES_ATTR, addForm.getAvailableResources());
} else if (spiderForm.isRemoveClicked()) {
log.trace("removing from pending resources list");
SessionUtils.removeFromList(session, Constants.PENDING_RESOURCES_SES_ATTR, addForm
.getPendingResources());
}