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);
ValueListDisplay displayParameters = new ValueListDisplay(new ArrayList(), false, false, true, true, true, true);
listObject.setDisplay(displayParameters);
request.setAttribute("valueList", listObject);