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.kuali.rice.krad.service.KRADServiceLocatorWeb;
19 import org.kuali.rice.krad.uif.view.HistoryEntry;
20 import org.kuali.rice.krad.uif.view.View;
21 import org.kuali.rice.krad.uif.component.Component;
22
23 import java.util.HashMap;
24 import java.util.List;
25 import java.util.Map;
26
27
28
29
30
31
32
33 public class BreadCrumbs extends WidgetBase {
34 private static final long serialVersionUID = -2864287914665842251L;
35
36 private boolean displayHomewardPath;
37 private boolean displayPassedHistory;
38 private boolean displayBreadcrumbsWhenOne;
39 private List<HistoryEntry> homewardPathList;
40
41
42
43
44
45
46
47
48
49
50
51 @Override
52 public void performApplyModel(View view, Object model, Component parent) {
53 super.performApplyModel(view, model, parent);
54
55 if (homewardPathList != null) {
56 Map<String, Object> context = new HashMap<String, Object>();
57 context.putAll(view.getContext());
58
59 for (HistoryEntry historyEntry : homewardPathList) {
60 KRADServiceLocatorWeb.getExpressionEvaluatorService().evaluateObjectExpressions(historyEntry, model,
61 context);
62 }
63 }
64 }
65
66
67
68
69
70
71
72
73 public boolean isDisplayHomewardPath() {
74 return this.displayHomewardPath;
75 }
76
77
78
79
80 public void setDisplayHomewardPath(boolean displayHomewardPath) {
81 this.displayHomewardPath = displayHomewardPath;
82 }
83
84
85
86
87
88
89
90
91 public boolean isDisplayPassedHistory() {
92 return this.displayPassedHistory;
93 }
94
95
96
97
98 public void setDisplayPassedHistory(boolean displayPassedHistory) {
99 this.displayPassedHistory = displayPassedHistory;
100 }
101
102
103
104
105
106
107
108
109 public List<HistoryEntry> getHomewardPathList() {
110 return this.homewardPathList;
111 }
112
113
114
115
116 public void setHomewardPathList(List<HistoryEntry> homewardPathList) {
117 this.homewardPathList = homewardPathList;
118 }
119
120
121
122
123
124
125
126 public boolean isDisplayBreadcrumbsWhenOne() {
127 return this.displayBreadcrumbsWhenOne;
128 }
129
130
131
132
133 public void setDisplayBreadcrumbsWhenOne(boolean displayBreadcrumbsWhenOne) {
134 this.displayBreadcrumbsWhenOne = displayBreadcrumbsWhenOne;
135 }
136
137 }