1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.widget;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
20 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
21 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26
27
28
29
30
31 @BeanTags({@BeanTag(name = "lightBox", parent = "Uif-LightBox"),
32 @BeanTag(name = "lightBoxPost", parent = "Uif-LightBoxPost")})
33 public class LightBox extends WidgetBase {
34 private static final long serialVersionUID = -4004284762546700975L;
35
36 private String height;
37 private String width;
38
39 private boolean addAppParms;
40
41 public LightBox() {
42 super();
43 }
44
45
46
47
48
49
50 @Override
51 public Map<String, String> getTemplateOptions() {
52 Map<String, String> templateOptions = super.getTemplateOptions();
53
54 if (templateOptions == null) {
55 super.setTemplateOptions(templateOptions = new HashMap<String, String>());
56 }
57
58 if (StringUtils.isNotBlank(width) && !templateOptions.containsKey("width")) {
59 templateOptions.put("width", width);
60 }
61
62 if (StringUtils.isNotBlank(height) && !templateOptions.containsKey("height")) {
63 templateOptions.put("height", height);
64 }
65
66 return templateOptions;
67 }
68
69
70
71
72 @BeanTagAttribute
73 public String getHeight() {
74 return height;
75 }
76
77
78
79
80
81
82
83 public void setHeight(String height) {
84 this.height = height;
85 }
86
87
88
89
90 @BeanTagAttribute
91 public String getWidth() {
92 return width;
93 }
94
95
96
97
98
99
100
101 public void setWidth(String width) {
102 this.width = width;
103 }
104
105
106
107
108
109
110 @BeanTagAttribute
111 public boolean isAddAppParms() {
112 return addAppParms;
113 }
114
115
116
117
118
119
120 public void setAddAppParms(boolean addAppParms) {
121 this.addAppParms = addAppParms;
122 }
123 }