public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException
{
String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
String forward = ".view.customer.file_list";
HttpSession session = request.getSession();
UserObject userObject = (UserObject)session.getAttribute("userobject");
int individualID = userObject.getIndividualID(); // logged in user
int entityID = userObject.getEntityId(); // logged in user's entityID
ActionErrors allErrors = new ActionErrors();
try {
ListPreference listPrefs = userObject.getListPreference("File");
String filter = "SELECT FileID FROM cvfile WHERE CustomerView='YES' AND (relateEntity = " + entityID + " OR relateIndividual = " + individualID + ")";
ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPrefs, request, ValueListConstants.CUSTOMER_FILE_LIST_TYPE, ValueListConstants.customerFileViewMap, false);
listParameters.setFilter(filter);
ValueList valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
ValueListVO listObject = valueList.getValueList(individualID, listParameters);