1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.container;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.kuali.rice.core.api.config.property.ConfigurationService;
20 import org.kuali.rice.krad.service.KRADServiceLocator;
21 import org.kuali.rice.krad.uif.component.Component;
22 import org.kuali.rice.krad.uif.view.FormView;
23 import org.kuali.rice.krad.uif.view.View;
24 import org.kuali.rice.krad.uif.widget.Growls;
25 import org.kuali.rice.krad.util.ErrorMessage;
26 import org.kuali.rice.krad.util.GlobalVariables;
27 import org.kuali.rice.krad.util.MessageMap;
28 import org.springframework.util.AutoPopulatingList;
29
30 import java.text.MessageFormat;
31 import java.util.List;
32
33
34
35
36 public class PageGroup extends Group {
37 private static final long serialVersionUID = 7571981300587270274L;
38
39 private boolean autoFocus;
40
41
42
43
44
45
46
47
48 @Override
49 public void performFinalize(View view, Object model, Component parent) {
50 super.performFinalize(view, model, parent);
51
52 String prefixScript = "";
53 if (this.getOnDocumentReadyScript() != null) {
54 prefixScript = this.getOnDocumentReadyScript();
55 }
56
57 if (view instanceof FormView && ((FormView) view).isValidateClientSide()) {
58 this.setOnDocumentReadyScript(prefixScript + "\nsetupPage(true);");
59 }
60 else{
61 this.setOnDocumentReadyScript(prefixScript + "\nsetupPage(false);");
62 }
63 }
64
65
66
67
68
69
70
71
72
73 public boolean isAutoFocus() {
74 return this.autoFocus;
75 }
76
77
78
79
80 public void setAutoFocus(boolean autoFocus) {
81 this.autoFocus = autoFocus;
82 }
83
84 }