}
public ActionForward search(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
HttpServletResponse response) {
final ExternalUnitsSearchBean searchBean = getRenderedObject();
request.setAttribute("searchBean", searchBean);
if (StringUtils.isEmpty(searchBean.getUnitName())) {
addActionMessage("error", request, "error.externalUnits.invalid.unit.name");
} else {
searchBean.clearResults();
searchUnits(searchBean);
searchExternalCurricularCourses(searchBean);
Collections.sort(searchBean.getResults(), new BeanComparator("fullName"));
searchBean.setEarthUnit(UnitUtils.readEarthUnit());
}
return mapping.findForward("searchExternalUnits");
}