1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.lookupable;
18
19 import javax.servlet.jsp.PageContext;
20
21 import org.apache.commons.lang.StringUtils;
22 import org.displaytag.decorator.DisplaytagColumnDecorator;
23 import org.displaytag.exception.DecoratorException;
24 import org.displaytag.properties.MediaTypeEnum;
25 import org.kuali.rice.kew.util.KEWConstants;
26
27
28
29
30
31
32
33
34 public class LookupColumnDecorator implements DisplaytagColumnDecorator {
35
36 public Object decorate(Object columnValue, PageContext pageContext, MediaTypeEnum media) throws DecoratorException {
37 if (columnValue == null) {
38 return KEWConstants.HTML_NON_BREAKING_SPACE;
39 }
40 if (columnValue instanceof String && StringUtils.isEmpty(((String)columnValue).trim())) {
41 return KEWConstants.HTML_NON_BREAKING_SPACE;
42 }
43 return columnValue;
44 }
45
46 }