1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.lifecycle;
17
18 import java.util.Queue;
19
20 import org.kuali.rice.krad.uif.UifConstants;
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.container.InitializeContainerFromHelperTask;
23 import org.kuali.rice.krad.uif.container.ProcessRemoteFieldsHolderTask;
24 import org.kuali.rice.krad.uif.field.InitializeDataFieldFromDictionaryTask;
25 import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.LifecycleEvent;
26 import org.kuali.rice.krad.uif.lifecycle.initialize.AssignIdsTask;
27 import org.kuali.rice.krad.uif.lifecycle.initialize.ComponentDefaultInitializeTask;
28 import org.kuali.rice.krad.uif.lifecycle.initialize.HelperCustomInitializeTask;
29 import org.kuali.rice.krad.uif.lifecycle.initialize.PopulateComponentFromExpressionGraphTask;
30 import org.kuali.rice.krad.uif.lifecycle.initialize.PopulatePathTask;
31 import org.kuali.rice.krad.uif.lifecycle.initialize.PopulateReplacersAndModifiersFromExpressionGraphTask;
32 import org.kuali.rice.krad.uif.util.LifecycleElement;
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 public class InitializeComponentPhase extends ViewLifecyclePhaseBase {
54
55
56
57
58
59
60 @Override
61 public String getViewPhase() {
62 return UifConstants.ViewPhases.INITIALIZE;
63 }
64
65
66
67
68
69 @Override
70 public String getStartViewStatus() {
71 return UifConstants.ViewStatus.CREATED;
72 }
73
74
75
76
77
78
79 @Override
80 public String getEndViewStatus() {
81 return UifConstants.ViewStatus.INITIALIZED;
82 }
83
84
85
86
87 @Override
88 public LifecycleEvent getEventToNotify() {
89 return null;
90 }
91
92
93
94
95
96 @Override
97 protected void initializePendingTasks(Queue<ViewLifecycleTask<?>> tasks) {
98 tasks.offer(LifecycleTaskFactory.getTask(AssignIdsTask.class, this));
99 tasks.offer(LifecycleTaskFactory.getTask(PopulatePathTask.class, this));
100 tasks.offer(LifecycleTaskFactory.getTask(PopulateComponentFromExpressionGraphTask.class, this));
101 tasks.offer(LifecycleTaskFactory.getTask(ComponentDefaultInitializeTask.class, this));
102 tasks.offer(LifecycleTaskFactory.getTask(PopulateReplacersAndModifiersFromExpressionGraphTask.class, this));
103 tasks.offer(LifecycleTaskFactory.getTask(InitializeContainerFromHelperTask.class, this));
104 tasks.offer(LifecycleTaskFactory.getTask(ProcessRemoteFieldsHolderTask.class, this));
105 tasks.offer(LifecycleTaskFactory.getTask(InitializeDataFieldFromDictionaryTask.class, this));
106 getElement().initializePendingTasks(this, tasks);
107 tasks.offer(LifecycleTaskFactory.getTask(RunComponentModifiersTask.class, this));
108 tasks.offer(LifecycleTaskFactory.getTask(HelperCustomInitializeTask.class, this));
109 }
110
111
112
113
114 @Override
115 protected ViewLifecyclePhase initializeSuccessor(LifecycleElement nestedElement, String nestedPath,
116 Component parent) {
117 return LifecyclePhaseFactory.initialize(nestedElement, getModel(), nestedPath, getRefreshPaths(), parent, null);
118 }
119
120 }