HttpSession session = request.getSession(true);
UserObject user = (UserObject) session.getAttribute("userobject");
int individualId = user.getIndividualID();
String moduleName = (request.getParameter("module") != null) ? (String) request.getParameter("module") : "Contacts";
ListPreference listPreference = user.getListPreference("CustomFields");
ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.CUSTOM_FIELDS_LIST_TYPE, ValueListConstants.customFieldsListViewMap, true);
listParameters.setExtraString(moduleName);
String filterParameter = request.getParameter("searchTextBox");
if (filterParameter != null) {
request.setAttribute("appliedSearch", filterParameter);
}
listParameters.setFilter(filterParameter);
// Get the list from the database.
ValueListHome valueListHome = (ValueListHome) CVUtility.getHomeObject("com.centraview.valuelist.ValueListHome", "ValueList");
ValueList valueList = null;
try {
valueList = valueListHome.create();