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 org.kuali.rice.krad.service.KRADServiceLocatorWeb;
19 import org.kuali.rice.krad.uif.UifConstants;
20 import org.kuali.rice.krad.uif.component.Component;
21 import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle.LifecycleEvent;
22 import org.kuali.rice.krad.uif.util.LifecycleElement;
23
24
25
26
27
28
29 public class PreProcessElementPhase extends ViewLifecyclePhaseBase {
30
31
32
33
34 @Override
35 public LifecycleEvent getEventToNotify() {
36 return null;
37 }
38
39
40
41
42 @Override
43 public String getStartViewStatus() {
44 return UifConstants.ViewStatus.CREATED;
45 }
46
47
48
49
50 @Override
51 public String getEndViewStatus() {
52 return UifConstants.ViewStatus.CACHED;
53 }
54
55
56
57
58 @Override
59 public String getViewPhase() {
60 return UifConstants.ViewPhases.PRE_PROCESS;
61 }
62
63
64
65
66 @Override
67 protected ViewLifecyclePhase initializeSuccessor(LifecycleElement nestedElement, String nestedPath,
68 Component nestedParent) {
69 if (nestedElement != null && !UifConstants.ViewStatus.CACHED.equals(nestedElement.getViewStatus())) {
70 ViewLifecyclePhase preProcessPhase = KRADServiceLocatorWeb.getViewLifecyclePhaseBuilder().buildPhase(
71 UifConstants.ViewPhases.PRE_PROCESS, nestedElement, nestedParent, nestedPath, getRefreshPaths());
72 return preProcessPhase;
73 }
74
75 return null;
76 }
77
78 }