1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.util;
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.element.ContentElementBase;
22 import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle;
23 import org.kuali.rice.krad.uif.view.View;
24
25 import java.util.HashMap;
26 import java.util.Map;
27
28
29
30
31
32
33 @BeanTag(name = "breadcrumbItem-bean", parent = "Uif-BreadcrumbItem")
34 public class BreadcrumbItem extends ContentElementBase {
35 private static final long serialVersionUID = 6694853722827812544L;
36
37 private String label;
38 private UrlInfo url;
39 private Component siblingBreadcrumbComponent;
40 private boolean renderAsLink;
41
42
43
44
45
46
47
48
49
50
51 @Override
52 public void performApplyModel(Object model, LifecycleElement parent) {
53 super.performApplyModel(model, parent);
54
55 View view = ViewLifecycle.getView();
56 if (url != null) {
57 Map<String, Object> context = new HashMap<String, Object>();
58
59 Map<String, Object> viewContext = view.getContext();
60 if (viewContext != null) {
61 context.putAll(viewContext);
62 }
63
64 ViewLifecycle.getExpressionEvaluator().populatePropertyExpressionsFromGraph(url, false);
65 ViewLifecycle.getExpressionEvaluator().evaluateExpressionsOnConfigurable(view, url, context);
66 }
67 }
68
69
70
71
72
73
74 @BeanTagAttribute(name = "label")
75 public String getLabel() {
76 return label;
77 }
78
79
80
81
82
83
84
85 public void setLabel(String label) {
86 this.label = label;
87 }
88
89
90
91
92
93
94 @BeanTagAttribute(name = "url")
95 public UrlInfo getUrl() {
96 return url;
97 }
98
99
100
101
102
103
104 public void setUrl(UrlInfo urlObject) {
105 this.url = urlObject;
106 }
107
108
109
110
111
112
113
114 @BeanTagAttribute(name = "siblingBreadcrumbComponent", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
115 public Component getSiblingBreadcrumbComponent() {
116 return siblingBreadcrumbComponent;
117 }
118
119
120
121
122
123
124 public void setSiblingBreadcrumbComponent(Component siblingBreadcrumbComponent) {
125 this.siblingBreadcrumbComponent = siblingBreadcrumbComponent;
126 }
127
128
129
130
131
132
133
134 @BeanTagAttribute(name = "renderAsLink")
135 public boolean isRenderAsLink() {
136 return renderAsLink;
137 }
138
139
140
141
142
143
144 public void setRenderAsLink(boolean renderAsLink) {
145 this.renderAsLink = renderAsLink;
146 }
147 }