1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.lifecycle.initialize;
17
18 import java.util.List;
19
20 import org.kuali.rice.krad.uif.component.Component;
21 import org.kuali.rice.krad.uif.component.PropertyReplacer;
22 import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle;
23 import org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase;
24 import org.kuali.rice.krad.uif.modifier.ComponentModifier;
25
26
27
28
29
30
31
32 public class PopulateReplacersAndModifiersFromExpressionGraphTask extends ViewLifecycleTaskBase<Component> {
33
34
35
36
37 public PopulateReplacersAndModifiersFromExpressionGraphTask() {
38 super(Component.class);
39 }
40
41
42
43
44
45 @Override
46 protected void performLifecycleTask() {
47 Component component = (Component) getElementState().getElement();
48
49
50 List<PropertyReplacer> componentPropertyReplacers = component.getPropertyReplacers();
51 if (componentPropertyReplacers != null) {
52 for (PropertyReplacer replacer : componentPropertyReplacers) {
53 ViewLifecycle.getExpressionEvaluator().populatePropertyExpressionsFromGraph(replacer, true);
54 }
55 }
56
57 List<ComponentModifier> componentModifiers = component.getComponentModifiers();
58 if (componentModifiers != null) {
59 for (ComponentModifier modifier : component.getComponentModifiers()) {
60 ViewLifecycle.getExpressionEvaluator().populatePropertyExpressionsFromGraph(modifier, true);
61 }
62 }
63 }
64
65 }