1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.element;
17
18 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20 import org.kuali.rice.krad.datadictionary.validator.ErrorReport;
21 import org.kuali.rice.krad.datadictionary.validator.Validator;
22 import org.kuali.rice.krad.datadictionary.validator.ValidationTrace;
23
24 import java.util.ArrayList;
25
26
27
28
29
30
31 @BeanTag(name = "iFrame-bean", parent = "Uif-Iframe")
32 public class Iframe extends ContentElementBase {
33 private static final long serialVersionUID = 5797473302619055088L;
34
35 private String source;
36 private String height;
37 private String frameborder;
38
39 public Iframe() {
40 super();
41 }
42
43
44
45
46
47
48 @BeanTagAttribute(name = "source")
49 public String getSource() {
50 return this.source;
51 }
52
53
54
55
56
57
58 public void setSource(String source) {
59 this.source = source;
60 }
61
62
63
64
65
66
67 @BeanTagAttribute(name = "height")
68 public String getHeight() {
69 return this.height;
70 }
71
72
73
74
75
76
77 public void setHeight(String height) {
78 this.height = height;
79 }
80
81
82
83
84
85
86 @BeanTagAttribute(name = "frameborder")
87 public String getFrameborder() {
88 return this.frameborder;
89 }
90
91
92
93
94
95
96 public void setFrameborder(String frameborder) {
97 this.frameborder = frameborder;
98 }
99
100
101
102
103 @Override
104 protected <T> void copyProperties(T component) {
105 super.copyProperties(component);
106 Iframe iframeCopy = (Iframe) component;
107 iframeCopy.setSource(this.source);
108 iframeCopy.setHeight(this.height);
109 iframeCopy.setFrameborder(this.frameborder);
110 }
111
112
113
114
115 @Override
116 public void completeValidation(ValidationTrace tracer) {
117 tracer.addBean(this);
118
119
120 if (getSource() == null) {
121 if (!Validator.checkExpressions(this, "source")) {
122 String currentValues[] = {"source =" + getSource()};
123 tracer.createError("Source must be set", currentValues);
124 }
125 }
126
127 super.completeValidation(tracer.getCopy());
128 }
129 }