ArrayList workLocations = null;  Object args[] = {}; try { workLocations = (ArrayList) ServiceUtils.executeService(userView, "ReadAllWorkLocations", args); } catch (FenixServiceException e) { throw new FenixActionException(e); }  if (workLocations != null) if (workLocations.isEmpty() == false) { ArrayList workLocationsValueBeanList = new ArrayList(); Iterator it = workLocations.iterator(); InfoWorkLocation infoWorkLocation = null;  while (it.hasNext()) { infoWorkLocation = (InfoWorkLocation) it.next(); workLocationsValueBeanList.add( new LabelValueBean( infoWorkLocation.getName(), infoWorkLocation.getIdInternal().toString())); }  request.setAttribute(SessionConstants.WORK_LOCATIONS_LIST, workLocationsValueBeanList); }
ArrayList workLocations = getWorkLocations(request);
	public ActionForward prepare(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception	{		IUserView userView = SessionUtils.getUserView(request);		ActionErrors actionErrors = new ActionErrors();		ArrayList workLocations = null;		Object args[] = {};		try		{			workLocations =				(ArrayList) ServiceUtils.executeService(userView, "ReadAllWorkLocations", args);		}		catch (FenixServiceException e)		{			throw new FenixActionException(e);		}		if (workLocations != null)			if (workLocations.isEmpty() == false)			{				ArrayList workLocationsValueBeanList = new ArrayList();				Iterator it = workLocations.iterator();				InfoWorkLocation infoWorkLocation = null;				while (it.hasNext())				{					infoWorkLocation = (InfoWorkLocation) it.next();					workLocationsValueBeanList.add(						new LabelValueBean(							infoWorkLocation.getName(),							infoWorkLocation.getIdInternal().toString()));				}				request.setAttribute(SessionConstants.WORK_LOCATIONS_LIST, workLocationsValueBeanList);			}		if ((workLocations == null) || (workLocations.isEmpty()))			actionErrors.add(				"label.masterDegree.administrativeOffice.searchResultsEmpty",				new ActionError("label.masterDegree.administrativeOffice.searchResultsEmpty"));		saveErrors(request, actionErrors);		return mapping.findForward("start");	}