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