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