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.uif.component.Component;
21 import org.kuali.rice.krad.uif.container.Group;
22
23 import java.util.List;
24
25
26
27
28
29
30 @BeanTag(name = "navbar", parent = "Uif-NavigationBar")
31 public class NavigationBar extends ContentElementBase {
32 private static final long serialVersionUID = -2061519100931559642L;
33
34 private String brandText;
35 private Image brandImage;
36 private String brandUrl;
37
38 private Group navigationBarGroup;
39
40 public NavigationBar() {
41 super();
42 this.brandUrl = "#";
43 }
44
45
46
47
48
49
50
51
52
53 @BeanTagAttribute
54 public String getBrandText() {
55 return brandText;
56 }
57
58
59
60
61 public void setBrandText(String brandText) {
62 this.brandText = brandText;
63 }
64
65
66
67
68
69
70
71
72
73 @BeanTagAttribute
74 public Image getBrandImage() {
75 return brandImage;
76 }
77
78
79
80
81 public void setBrandImage(Image brandImage) {
82 this.brandImage = brandImage;
83 }
84
85
86
87
88
89
90 @BeanTagAttribute
91 public String getBrandUrl() {
92 return brandUrl;
93 }
94
95
96
97
98 public void setBrandUrl(String brandUrl) {
99 this.brandUrl = brandUrl;
100 }
101
102
103
104
105
106
107 @BeanTagAttribute
108 public Group getNavigationBarGroup() {
109 return navigationBarGroup;
110 }
111
112
113
114
115 public void setNavigationBarGroup(Group navigationBarGroup) {
116 this.navigationBarGroup = navigationBarGroup;
117 }
118
119
120
121
122
123
124 @BeanTagAttribute
125 public List<? extends Component> getItems() {
126 if (this.navigationBarGroup != null) {
127 return this.navigationBarGroup.getItems();
128 }
129
130 return null;
131 }
132
133
134
135
136
137
138 public void setItems(List<Component> items) {
139 if (this.navigationBarGroup == null) {
140 throw new RuntimeException("Unable to set navigation items because navigation group is null");
141 } else {
142 this.navigationBarGroup.setItems(items);
143 }
144 }
145 }