1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.apache.commons.lang.StringUtils;
22 import org.kuali.rice.kns.lookup.KualiLookupableHelperServiceImpl;
23 import org.kuali.rice.krad.bo.BusinessObject;
24
25 public class TkLookupableHelper extends KualiLookupableHelperServiceImpl {
26
27
28
29
30 private static final long serialVersionUID = 1L;
31
32 @Override
33 public List<? extends BusinessObject> getSearchResults(
34 Map<String, String> fieldValues) {
35 if (fieldValues.containsKey("workArea")
36 && StringUtils.equals(fieldValues.get("workArea"), "%")) {
37 fieldValues.put("workArea", "");
38 }
39 if (fieldValues.containsKey("jobNumber")
40 && StringUtils.equals(fieldValues.get("jobNumber"), "%")) {
41 fieldValues.put("jobNumber", "");
42 }
43 return super.getSearchResults(fieldValues);
44 }
45
46 @Override
47 protected void validateSearchParameterWildcardAndOperators(
48 String attributeName, String attributeValue) {
49 if (!StringUtils.equals(attributeValue, "%")) {
50 super.validateSearchParameterWildcardAndOperators(attributeName,
51 attributeValue);
52 }
53 }
54
55 }