dataServiceLocator.getOpportunityService().searchOpportunities(opportunityCriteria);
if (opportunityList.size() == 0) {
MessageUtils.addErrorMessage("error.dataSource");
} else if (opportunityList.size() == 1) {
opportunityVO = (OpportunityVO) opportunityList.get(0);
opportunityDetailForm = new OpportunityDetailForm();
CustomerMapperFactory.getOpportunityMapper().mapToBean(opportunityVO, opportunityDetailForm);
setForm(OPPORTUNITY_DETAIL_FORM, opportunityDetailForm);
} else {
opportunityListForm = (OpportunityListForm) getForm(OPPORTUNITY_LIST_FORM);
opportunityListForm.setOpportunityList(opportunityList);