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