1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.rice.krad.uif.element;
17  
18  import java.util.ArrayList;
19  import java.util.HashMap;
20  import java.util.List;
21  import java.util.Map;
22  
23  import org.apache.commons.lang.StringUtils;
24  import org.kuali.rice.core.api.exception.RiceRuntimeException;
25  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
26  import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
27  import org.kuali.rice.krad.datadictionary.parse.BeanTags;
28  import org.kuali.rice.krad.datadictionary.validator.ValidationTrace;
29  import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
30  import org.kuali.rice.krad.uif.UifConstants;
31  import org.kuali.rice.krad.uif.UifParameters;
32  import org.kuali.rice.krad.uif.UifPropertyPaths;
33  import org.kuali.rice.krad.uif.component.Component;
34  import org.kuali.rice.krad.uif.component.ComponentSecurity;
35  import org.kuali.rice.krad.uif.field.DataField;
36  import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle;
37  import org.kuali.rice.krad.uif.lifecycle.ViewPostMetadata;
38  import org.kuali.rice.krad.uif.util.LifecycleElement;
39  import org.kuali.rice.krad.uif.util.ScriptUtils;
40  import org.kuali.rice.krad.uif.util.UrlInfo;
41  import org.kuali.rice.krad.uif.view.ExpressionEvaluator;
42  import org.kuali.rice.krad.uif.view.FormView;
43  import org.kuali.rice.krad.uif.view.View;
44  import org.kuali.rice.krad.util.KRADUtils;
45  
46  
47  
48  
49  
50  
51  
52  @BeanTags({@BeanTag(name = "action-bean", parent = "Uif-Action"),
53          @BeanTag(name = "actionImage-bean", parent = "Uif-ActionImage"),
54          @BeanTag(name = "primaryActionButton-bean", parent = "Uif-PrimaryActionButton"),
55          @BeanTag(name = "secondaryActionButton-bean", parent = "Uif-SecondaryActionButton"),
56          @BeanTag(name = "primaryActionButton-small-bean", parent = "Uif-PrimaryActionButton-Small"),
57          @BeanTag(name = "secondaryActionButton-small-bean", parent = "Uif-SecondaryActionButton-Small"),
58          @BeanTag(name = "actionLink-bean", parent = "Uif-ActionLink"),
59          @BeanTag(name = "navigationActionLink-bean", parent = "Uif-NavigationActionLink"),
60          @BeanTag(name = "navigationActionButton-bean", parent = "Uif-NavigationActionButton"),
61          @BeanTag(name = "secondaryNavigationActionButton-bean", parent = "Uif-SecondaryNavigationActionButton"),
62          @BeanTag(name = "helpAction-bean", parent = "Uif-HelpAction"),
63          @BeanTag(name = "saveAction-bean", parent = "Uif-SaveAction"),
64          @BeanTag(name = "backAction-bean", parent = "Uif-BackAction"),
65          @BeanTag(name = "cancelAction-bean", parent = "Uif-CancelAction"),
66          @BeanTag(name = "checkFormAction-bean", parent = "Uif-CheckFormAction"),
67          @BeanTag(name = "addLineAction-bean", parent = "Uif-AddLineAction"),
68          @BeanTag(name = "deleteLineAction-bean", parent = "Uif-DeleteLineAction"),
69          @BeanTag(name = "saveLineAction-bean", parent = "Uif-SaveLineAction"),
70          @BeanTag(name = "addBlankLineAction-bean", parent = "Uif-AddBlankLineAction"),
71          @BeanTag(name = "addViaLightBoxAction-bean", parent = "Uif-AddViaLightBoxAction"),
72          @BeanTag(name = "toggleRowDetailsAction-bean", parent = "Uif-ToggleRowDetailsAction"),
73          @BeanTag(name = "expandDetailsAction-bean", parent = "Uif-ExpandDetailsAction"),
74          @BeanTag(name = "expandDetailsImageAction-bean", parent = "Uif-ExpandDetailsImageAction"),
75          @BeanTag(name = "jumpToTopLink-bean", parent = "Uif-JumpToTopLink"),
76          @BeanTag(name = "jumpToBottomLink-bean", parent = "Uif-JumpToBottomLink"),
77          @BeanTag(name = "expandDisclosuresButton-bean", parent = "Uif-ExpandDisclosuresButton"),
78          @BeanTag(name = "collapseDisclosuresButton-bean", parent = "Uif-CollapseDisclosuresButton"),
79          @BeanTag(name = "showInactiveCollectionItemsButton-bean", parent = "Uif-ShowInactiveCollectionItemsButton"),
80          @BeanTag(name = "hideInactiveCollectionItemsButton-bean", parent = "Uif-HideInactiveCollectionItemsButton"),
81          @BeanTag(name = "collectionQuickFinderAction-bean", parent = "Uif-CollectionQuickFinderAction")})
82  public class Action extends ContentElementBase {
83      private static final long serialVersionUID = 1025672792657238829L;
84  
85      private String methodToCall;
86      private String actionEvent;
87      private String navigateToPageId;
88  
89      private String actionScript;
90      private UrlInfo actionUrl;
91  
92      private String actionLabel;
93      private boolean renderInnerTextSpan;
94  
95      private Image actionImage;
96      private String actionImagePlacement;
97  
98      private String iconClass;
99      private String actionIconPlacement;
100 
101     private String jumpToIdAfterSubmit;
102     private String jumpToNameAfterSubmit;
103     private String focusOnIdAfterSubmit;
104 
105     private boolean performClientSideValidation;
106     private boolean performDirtyValidation;
107     private boolean clearDirtyOnAction;
108     private boolean dirtyOnAction;
109 
110     private String preSubmitCall;
111     private boolean ajaxSubmit;
112 
113     private String ajaxReturnType;
114     private String refreshId;
115     private String refreshPropertyName;
116 
117     private String successCallback;
118     private String errorCallback;
119 
120     private String loadingMessageText;
121     private boolean disableBlocking;
122 
123     private Map<String, String> additionalSubmitData;
124     private Map<String, String> actionParameters;
125 
126     private boolean evaluateDisabledOnKeyUp;
127 
128     private boolean disabled;
129     private String disabledReason;
130     private String disabledExpression;
131     private String disabledConditionJs;
132     private List<String> disabledConditionControlNames;
133 
134     private List<String> disabledWhenChangedPropertyNames;
135     private List<String> enabledWhenChangedPropertyNames;
136 
137     
138 
139 
140     public Action() {
141         super();
142 
143         actionImagePlacement = UifConstants.Position.LEFT.name();
144         actionIconPlacement = UifConstants.Position.LEFT.name();
145 
146         ajaxSubmit = true;
147 
148         successCallback = "";
149         errorCallback = "";
150         preSubmitCall = "";
151 
152         additionalSubmitData = new HashMap<String, String>();
153         actionParameters = new HashMap<String, String>();
154 
155         disabled = false;
156         disabledWhenChangedPropertyNames = new ArrayList<String>();
157         enabledWhenChangedPropertyNames = new ArrayList<String>();
158     }
159 
160     
161 
162 
163 
164 
165 
166     public void performApplyModel(Object model, LifecycleElement parent) {
167         super.performApplyModel(model, parent);
168 
169         disabledExpression = this.getPropertyExpression("disabled");
170         if (disabledExpression != null) {
171             ExpressionEvaluator expressionEvaluator = ViewLifecycle.getExpressionEvaluator();
172 
173             disabledExpression = expressionEvaluator.replaceBindingPrefixes(ViewLifecycle.getView(), this,
174                     disabledExpression);
175             disabled = (Boolean) expressionEvaluator.evaluateExpression(this.getContext(), disabledExpression);
176         }
177 
178         if (actionUrl != null) {
179             ViewLifecycle.getExpressionEvaluator().populatePropertyExpressionsFromGraph(actionUrl, false);
180             ViewLifecycle.getExpressionEvaluator().evaluateExpressionsOnConfigurable(ViewLifecycle.getView(),
181                     actionUrl, this.getContext());
182         }
183     }
184 
185     
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199     @Override
200     public void performFinalize(Object model, LifecycleElement parent) {
201         super.performFinalize(model, parent);
202 
203         View view = ViewLifecycle.getView();
204         ExpressionEvaluator expressionEvaluator = ViewLifecycle.getExpressionEvaluator();
205 
206         if (StringUtils.isNotEmpty(disabledExpression)
207                 && !disabledExpression.equalsIgnoreCase("true")
208                 && !disabledExpression.equalsIgnoreCase("false")) {
209             disabledConditionControlNames = new ArrayList<String>();
210             disabledConditionJs = ViewLifecycle.getExpressionEvaluator().parseExpression(disabledExpression,
211                     disabledConditionControlNames, this.getContext());
212         }
213 
214         List<String> adjustedDisablePropertyNames = new ArrayList<String>();
215         for (String propertyName : disabledWhenChangedPropertyNames) {
216             adjustedDisablePropertyNames.add(expressionEvaluator.replaceBindingPrefixes(view, this, propertyName));
217         }
218         disabledWhenChangedPropertyNames = adjustedDisablePropertyNames;
219 
220         List<String> adjustedEnablePropertyNames = new ArrayList<String>();
221         for (String propertyName : enabledWhenChangedPropertyNames) {
222             adjustedEnablePropertyNames.add(expressionEvaluator.replaceBindingPrefixes(view, this, propertyName));
223         }
224         enabledWhenChangedPropertyNames = adjustedEnablePropertyNames;
225 
226         
227         if (actionImage != null && StringUtils.isNotBlank(actionImagePlacement) && StringUtils.isNotBlank(
228                 actionLabel)) {
229             actionImage.setAltText("");
230         }
231 
232         
233         if (StringUtils.isNotBlank(iconClass) && (UifConstants.ICON_ONLY_PLACEMENT.equals(actionIconPlacement)
234                 || StringUtils.isBlank(actionLabel))) {
235             getCssClasses().add(iconClass);
236 
237             
238             actionIconPlacement = UifConstants.ICON_ONLY_PLACEMENT;
239         }
240 
241         if (!actionParameters.containsKey(UifConstants.UrlParams.ACTION_EVENT) && StringUtils.isNotBlank(actionEvent)) {
242             actionParameters.put(UifConstants.UrlParams.ACTION_EVENT, actionEvent);
243         }
244 
245         if (StringUtils.isNotBlank(navigateToPageId)) {
246             actionParameters.put(UifParameters.NAVIGATE_TO_PAGE_ID, navigateToPageId);
247             if (StringUtils.isBlank(methodToCall)) {
248                 this.methodToCall = UifConstants.MethodToCallNames.NAVIGATE;
249             }
250         }
251 
252         if (!actionParameters.containsKey(UifConstants.CONTROLLER_METHOD_DISPATCH_PARAMETER_NAME) && StringUtils
253                 .isNotBlank(methodToCall)) {
254             actionParameters.put(UifConstants.CONTROLLER_METHOD_DISPATCH_PARAMETER_NAME, methodToCall);
255         }
256 
257         setupRefreshAction(view);
258 
259         
260         if (view instanceof FormView) {
261             performDirtyValidation = performDirtyValidation && ((FormView) view).isApplyDirtyCheck();
262         }
263 
264         if (StringUtils.isBlank(getActionScript()) && (actionUrl != null) && actionUrl.isFullyConfigured()) {
265             String actionScript = ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.REDIRECT, actionUrl.getHref());
266 
267             setActionScript(actionScript);
268         }
269 
270         
271         if (isRender()) {
272             for (String additionalSubmitPath : additionalSubmitData.keySet()) {
273                 ViewLifecycle.getViewPostMetadata().addAccessibleBindingPath(additionalSubmitPath);
274             }
275 
276             if (StringUtils.isNotBlank(methodToCall)) {
277                 ViewLifecycle.getViewPostMetadata().addAccessibleMethodToCall(methodToCall);
278             }
279         }
280 
281         buildActionData(view, model, parent);
282     }
283 
284     
285 
286 
287 
288 
289 
290     protected void setupRefreshAction(View view) {
291         
292         
293         if (StringUtils.isNotBlank(refreshPropertyName) || StringUtils.isNotBlank(refreshId)) {
294             ajaxReturnType = UifConstants.AjaxReturnTypes.UPDATECOMPONENT.getKey();
295         }
296 
297         
298         
299         Component refreshComponent = null;
300         if (StringUtils.isNotBlank(refreshPropertyName)) {
301             
302             if (refreshPropertyName.startsWith(UifConstants.NO_BIND_ADJUST_PREFIX)) {
303                 refreshPropertyName = StringUtils.removeStart(refreshPropertyName, UifConstants.NO_BIND_ADJUST_PREFIX);
304             } else if (StringUtils.isNotBlank(view.getDefaultBindingObjectPath())) {
305                 refreshPropertyName = view.getDefaultBindingObjectPath() + "." + refreshPropertyName;
306             }
307 
308             DataField dataField = view.getViewIndex().getDataFieldByPath(refreshPropertyName);
309             if (dataField != null) {
310                 refreshComponent = dataField;
311                 refreshId = refreshComponent.getId();
312             }
313         } else if (StringUtils.isNotBlank(refreshId)) {
314             Component component = view.getViewIndex().getComponentById(refreshId);
315             if (component != null) {
316                 refreshComponent = component;
317             }
318         }
319 
320         if (refreshComponent != null) {
321             refreshComponent.setRefreshedByAction(true);
322         }
323     }
324 
325     
326 
327 
328 
329 
330 
331 
332 
333 
334 
335 
336 
337 
338     protected void buildActionData(View view, Object model, LifecycleElement parent) {
339         HashMap<String, String> actionDataAttributes = new HashMap<String, String>();
340 
341         Map<String, String> dataDefaults =
342                 (Map<String, String>) (KRADServiceLocatorWeb.getDataDictionaryService().getDictionaryBean(
343                         UifConstants.ACTION_DEFAULTS_MAP_ID));
344 
345         
346         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.AJAX_SUBMIT,
347                 Boolean.toString(ajaxSubmit));
348         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
349                 UifConstants.ActionDataAttributes.SUCCESS_CALLBACK, this.successCallback);
350         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.ERROR_CALLBACK,
351                 this.errorCallback);
352         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
353                 UifConstants.ActionDataAttributes.PRE_SUBMIT_CALL, this.preSubmitCall);
354         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
355                 UifConstants.ActionDataAttributes.LOADING_MESSAGE, this.loadingMessageText);
356         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
357                 UifConstants.ActionDataAttributes.DISABLE_BLOCKING, Boolean.toString(this.disableBlocking));
358         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
359                 UifConstants.ActionDataAttributes.AJAX_RETURN_TYPE, this.ajaxReturnType);
360         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.REFRESH_ID,
361                 this.refreshId);
362         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.VALIDATE,
363                 Boolean.toString(this.performClientSideValidation));
364         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
365                 UifConstants.ActionDataAttributes.DIRTY_ON_ACTION, Boolean.toString(this.dirtyOnAction));
366         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.CLEAR_DIRTY,
367                 Boolean.toString(this.clearDirtyOnAction));
368         addActionDataSettingsValue(actionDataAttributes, dataDefaults,
369                 UifConstants.ActionDataAttributes.PERFORM_DIRTY_VALIDATION, Boolean.toString(
370                 this.performDirtyValidation));
371 
372         
373         Map<String, String> submitData = new HashMap<String, String>();
374         for (String key : actionParameters.keySet()) {
375             String parameterPath = key;
376             if (!key.equals(UifConstants.CONTROLLER_METHOD_DISPATCH_PARAMETER_NAME)) {
377                 parameterPath = UifPropertyPaths.ACTION_PARAMETERS + "[" + key + "]";
378             }
379             submitData.put(parameterPath, actionParameters.get(key));
380         }
381 
382         for (String key : additionalSubmitData.keySet()) {
383             submitData.put(key, additionalSubmitData.get(key));
384         }
385 
386         
387         if (focusOnIdAfterSubmit.equalsIgnoreCase(UifConstants.Order.NEXT_INPUT.toString())) {
388             focusOnIdAfterSubmit = UifConstants.Order.NEXT_INPUT.toString() + ":" + this.getId();
389         }
390 
391         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.FOCUS_ID,
392                 focusOnIdAfterSubmit);
393 
394         if (StringUtils.isNotBlank(jumpToIdAfterSubmit)) {
395             addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.ActionDataAttributes.JUMP_TO_ID,
396                     jumpToIdAfterSubmit);
397         } else if (StringUtils.isNotBlank(jumpToNameAfterSubmit)) {
398             addActionDataSettingsValue(actionDataAttributes, dataDefaults,
399                     UifConstants.ActionDataAttributes.JUMP_TO_NAME, jumpToNameAfterSubmit);
400         }
401 
402         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.DataAttributes.SUBMIT_DATA,
403                 ScriptUtils.toJSON(submitData));
404 
405         
406         String onClickScript = this.getOnClickScript();
407         if (StringUtils.isNotBlank(actionScript)) {
408             onClickScript = ScriptUtils.appendScript(onClickScript, actionScript);
409         } else {
410             onClickScript = ScriptUtils.appendScript(onClickScript, "actionInvokeHandler(this);");
411         }
412 
413         
414         if (disabled) {
415             this.addStyleClass("disabled");
416             this.setSkipInTabOrder(true);
417         }
418 
419         
420         addActionDataSettingsValue(actionDataAttributes, dataDefaults, UifConstants.DataAttributes.ONCLICK,
421                 KRADUtils.convertToHTMLAttributeSafeString(onClickScript));
422 
423         if (!actionDataAttributes.isEmpty()) {
424             this.getDataAttributes().putAll(actionDataAttributes);
425         }
426 
427         this.addDataAttribute(UifConstants.DataAttributes.ROLE, UifConstants.RoleTypes.ACTION);
428     }
429 
430     
431 
432 
433 
434 
435 
436 
437 
438 
439 
440     protected void addActionDataSettingsValue(Map<String, String> valueMap, Map<String, String> defaults, String key,
441             String value) {
442         if (StringUtils.isBlank(value)) {
443             return;
444         }
445 
446         String defaultValue = defaults.get(key);
447         if (defaultValue == null || !value.equals(defaultValue)) {
448             valueMap.put(key, value);
449         }
450     }
451 
452     
453 
454 
455 
456 
457 
458 
459 
460 
461 
462 
463 
464     @BeanTagAttribute(name = "methodToCall")
465     public String getMethodToCall() {
466         return this.methodToCall;
467     }
468 
469     
470 
471 
472 
473 
474     public void setMethodToCall(String methodToCall) {
475         this.methodToCall = methodToCall;
476     }
477 
478     
479 
480 
481 
482 
483 
484 
485 
486 
487 
488 
489     @BeanTagAttribute(name = "actionLabel")
490     public String getActionLabel() {
491         return this.actionLabel;
492     }
493 
494     
495 
496 
497 
498 
499     public void setActionLabel(String actionLabel) {
500         this.actionLabel = actionLabel;
501     }
502 
503     
504 
505 
506 
507 
508     @BeanTagAttribute(name = "renderInnerTextSpan")
509     public boolean isRenderInnerTextSpan() {
510         return renderInnerTextSpan;
511     }
512 
513     
514 
515 
516 
517 
518     public void setRenderInnerTextSpan(boolean renderInnerTextSpan) {
519         this.renderInnerTextSpan = renderInnerTextSpan;
520     }
521 
522     
523 
524 
525 
526 
527 
528 
529 
530 
531 
532 
533 
534     @BeanTagAttribute(name = "actionImage", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
535     public Image getActionImage() {
536         return this.actionImage;
537     }
538 
539     
540 
541 
542 
543 
544     public void setActionImage(Image actionImage) {
545         this.actionImage = actionImage;
546     }
547 
548     
549 
550 
551 
552 
553     @BeanTagAttribute(name = "iconClass")
554     public String getIconClass() {
555         return iconClass;
556     }
557 
558     
559 
560 
561 
562 
563     public void setIconClass(String iconClass) {
564         this.iconClass = iconClass;
565     }
566 
567     
568 
569 
570 
571 
572 
573 
574 
575 
576 
577 
578 
579 
580 
581     @BeanTagAttribute(name = "navigateToPageId")
582     public String getNavigateToPageId() {
583         return this.navigateToPageId;
584     }
585 
586     
587 
588 
589 
590 
591     public void setNavigateToPageId(String navigateToPageId) {
592         this.navigateToPageId = navigateToPageId;
593     }
594 
595     
596 
597 
598 
599 
600 
601 
602 
603 
604 
605 
606     @BeanTagAttribute(name = "actionEvent")
607     public String getActionEvent() {
608         return actionEvent;
609     }
610 
611     
612 
613 
614 
615 
616     public void setActionEvent(String actionEvent) {
617         this.actionEvent = actionEvent;
618     }
619 
620     
621 
622 
623 
624 
625 
626 
627 
628 
629 
630 
631 
632 
633 
634 
635 
636 
637 
638 
639     @BeanTagAttribute(name = "additionalSubmitData", type = BeanTagAttribute.AttributeType.MAPVALUE)
640     public Map<String, String> getAdditionalSubmitData() {
641         return additionalSubmitData;
642     }
643 
644     
645 
646 
647 
648 
649     public void setAdditionalSubmitData(Map<String, String> additionalSubmitData) {
650         this.additionalSubmitData = additionalSubmitData;
651     }
652 
653     
654 
655 
656 
657 
658 
659 
660 
661 
662 
663 
664 
665 
666 
667 
668 
669     @BeanTagAttribute(name = "actionParameters", type = BeanTagAttribute.AttributeType.MAPVALUE)
670     public Map<String, String> getActionParameters() {
671         return this.actionParameters;
672     }
673 
674     
675 
676 
677 
678 
679     public void setActionParameters(Map<String, String> actionParameters) {
680         this.actionParameters = actionParameters;
681     }
682 
683     
684 
685 
686 
687 
688 
689     public void addActionParameter(String parameterName, String parameterValue) {
690         if (actionParameters == null) {
691             this.actionParameters = new HashMap<String, String>();
692         }
693 
694         this.actionParameters.put(parameterName, parameterValue);
695     }
696 
697     
698 
699 
700 
701 
702 
703     public String getActionParameter(String parameterName) {
704         return this.actionParameters.get(parameterName);
705     }
706 
707     
708 
709 
710 
711 
712     public ActionSecurity getActionSecurity() {
713         return (ActionSecurity) super.getComponentSecurity();
714     }
715 
716     
717 
718 
719 
720 
721     @Override
722     public void setComponentSecurity(ComponentSecurity componentSecurity) {
723         if ((componentSecurity != null) && !(componentSecurity instanceof ActionSecurity)) {
724             throw new RiceRuntimeException("Component security for Action should be instance of ActionSecurity");
725         }
726 
727         super.setComponentSecurity(componentSecurity);
728     }
729 
730     
731 
732 
733     @Override
734     protected void initializeComponentSecurity() {
735         if (getComponentSecurity() == null) {
736             setComponentSecurity(KRADUtils.createNewObjectFromClass(ActionSecurity.class));
737         }
738     }
739 
740     
741 
742 
743 
744 
745     public boolean isPerformActionAuthz() {
746         initializeComponentSecurity();
747 
748         return getActionSecurity().isPerformActionAuthz();
749     }
750 
751     
752 
753 
754 
755 
756     public void setPerformActionAuthz(boolean performActionAuthz) {
757         initializeComponentSecurity();
758 
759         getActionSecurity().setPerformActionAuthz(performActionAuthz);
760     }
761 
762     
763 
764 
765 
766 
767     public boolean isPerformLineActionAuthz() {
768         initializeComponentSecurity();
769 
770         return getActionSecurity().isPerformLineActionAuthz();
771     }
772 
773     
774 
775 
776 
777 
778     public void setPerformLineActionAuthz(boolean performLineActionAuthz) {
779         initializeComponentSecurity();
780 
781         getActionSecurity().setPerformLineActionAuthz(performLineActionAuthz);
782     }
783 
784     
785 
786 
787 
788 
789     @BeanTagAttribute(name = "jumpToIdAfterSubmit")
790     public String getJumpToIdAfterSubmit() {
791         return this.jumpToIdAfterSubmit;
792     }
793 
794     
795 
796 
797 
798 
799 
800 
801 
802 
803 
804 
805     public void setJumpToIdAfterSubmit(String jumpToIdAfterSubmit) {
806         this.jumpToIdAfterSubmit = jumpToIdAfterSubmit;
807     }
808 
809     
810 
811 
812 
813 
814 
815 
816 
817 
818 
819     @BeanTagAttribute(name = "jumpToNameAfterSubmit")
820     public String getJumpToNameAfterSubmit() {
821         return this.jumpToNameAfterSubmit;
822     }
823 
824     
825 
826 
827 
828 
829     public void setJumpToNameAfterSubmit(String jumpToNameAfterSubmit) {
830         this.jumpToNameAfterSubmit = jumpToNameAfterSubmit;
831     }
832 
833     
834 
835 
836 
837 
838 
839 
840 
841 
842 
843 
844 
845 
846 
847 
848 
849 
850     @BeanTagAttribute(name = "focusOnIdAfterSubmit")
851     public String getFocusOnIdAfterSubmit() {
852         return this.focusOnIdAfterSubmit;
853     }
854 
855     
856 
857 
858 
859 
860     public void setFocusOnIdAfterSubmit(String focusOnIdAfterSubmit) {
861         this.focusOnIdAfterSubmit = focusOnIdAfterSubmit;
862     }
863 
864     
865 
866 
867 
868 
869     @BeanTagAttribute(name = "performClientSideValidation")
870     public boolean isPerformClientSideValidation() {
871         return this.performClientSideValidation;
872     }
873 
874     
875 
876 
877 
878 
879     public void setPerformClientSideValidation(boolean performClientSideValidation) {
880         this.performClientSideValidation = performClientSideValidation;
881     }
882 
883     
884 
885 
886 
887 
888 
889 
890 
891 
892 
893 
894 
895 
896 
897     @BeanTagAttribute(name = "actionScript")
898     public String getActionScript() {
899         return this.actionScript;
900     }
901 
902     
903 
904 
905 
906 
907     public void setActionScript(String actionScript) {
908         if (StringUtils.isNotBlank(actionScript) && !StringUtils.endsWith(actionScript, ";")) {
909             actionScript = actionScript + ";";
910         }
911 
912         this.actionScript = actionScript;
913     }
914 
915     
916 
917 
918 
919 
920 
921 
922 
923 
924 
925     @BeanTagAttribute(name = "actionUrl")
926     public UrlInfo getActionUrl() {
927         return actionUrl;
928     }
929 
930     
931 
932 
933 
934 
935     public void setActionUrl(UrlInfo actionUrl) {
936         this.actionUrl = actionUrl;
937     }
938 
939     
940 
941 
942 
943 
944     public void setPerformDirtyValidation(boolean performDirtyValidation) {
945         this.performDirtyValidation = performDirtyValidation;
946     }
947 
948     
949 
950 
951 
952 
953     @BeanTagAttribute(name = "performDirtyValidation")
954     public boolean isPerformDirtyValidation() {
955         return performDirtyValidation;
956     }
957 
958     
959 
960 
961 
962 
963 
964 
965 
966     @BeanTagAttribute(name = "clearDirtyOnAction")
967     public boolean isClearDirtyOnAction() {
968         return clearDirtyOnAction;
969     }
970 
971     
972 
973 
974 
975 
976     public void setClearDirtyOnAction(boolean clearDirtyOnAction) {
977         this.clearDirtyOnAction = clearDirtyOnAction;
978     }
979 
980     
981 
982 
983 
984 
985 
986 
987 
988 
989     @BeanTagAttribute(name = "dirtyOnAction")
990     public boolean isDirtyOnAction() {
991         return dirtyOnAction;
992     }
993 
994     
995 
996 
997 
998 
999     public void setDirtyOnAction(boolean dirtyOnAction) {
1000         this.dirtyOnAction = dirtyOnAction;
1001     }
1002 
1003     
1004 
1005 
1006 
1007 
1008     @BeanTagAttribute(name = "disabled")
1009     public boolean isDisabled() {
1010         return disabled;
1011     }
1012 
1013     
1014 
1015 
1016 
1017 
1018     public void setDisabled(boolean disabled) {
1019         this.disabled = disabled;
1020     }
1021 
1022     
1023 
1024 
1025 
1026 
1027 
1028 
1029     @BeanTagAttribute(name = "disabledReason")
1030     public String getDisabledReason() {
1031         return disabledReason;
1032     }
1033 
1034     
1035 
1036 
1037 
1038 
1039     public void setDisabledReason(String disabledReason) {
1040         this.disabledReason = disabledReason;
1041     }
1042 
1043     
1044 
1045 
1046 
1047 
1048     @BeanTagAttribute(name = "actionImagePlacement")
1049     public String getActionImagePlacement() {
1050         return actionImagePlacement;
1051     }
1052 
1053     
1054 
1055 
1056 
1057 
1058 
1059 
1060 
1061     public void setActionImagePlacement(String actionImagePlacement) {
1062         this.actionImagePlacement = actionImagePlacement;
1063     }
1064 
1065     
1066 
1067 
1068 
1069 
1070     @BeanTagAttribute(name = "actionIconPlacement")
1071     public String getActionIconPlacement() {
1072         return actionIconPlacement;
1073     }
1074 
1075     
1076 
1077 
1078 
1079 
1080     public void setActionIconPlacement(String actionIconPlacement) {
1081         this.actionIconPlacement = actionIconPlacement;
1082     }
1083 
1084     
1085 
1086 
1087 
1088 
1089 
1090 
1091 
1092 
1093 
1094 
1095 
1096 
1097 
1098 
1099 
1100 
1101 
1102 
1103 
1104 
1105     @BeanTagAttribute(name = "preSubmitCall")
1106     public String getPreSubmitCall() {
1107         return preSubmitCall;
1108     }
1109 
1110     
1111 
1112 
1113 
1114 
1115     public void setPreSubmitCall(String preSubmitCall) {
1116         this.preSubmitCall = preSubmitCall;
1117     }
1118 
1119     
1120 
1121 
1122 
1123 
1124 
1125     @BeanTagAttribute(name = "ajaxSubmit")
1126     public boolean isAjaxSubmit() {
1127         return ajaxSubmit;
1128     }
1129 
1130     
1131 
1132 
1133 
1134 
1135     public void setAjaxSubmit(boolean ajaxSubmit) {
1136         this.ajaxSubmit = ajaxSubmit;
1137     }
1138 
1139     
1140 
1141 
1142 
1143 
1144 
1145 
1146 
1147 
1148 
1149 
1150     @BeanTagAttribute(name = "ajaxReturnType")
1151     public String getAjaxReturnType() {
1152         return this.ajaxReturnType;
1153     }
1154 
1155     
1156 
1157 
1158 
1159 
1160     public void setAjaxReturnType(String ajaxReturnType) {
1161         this.ajaxReturnType = ajaxReturnType;
1162     }
1163 
1164     
1165 
1166 
1167 
1168 
1169     @BeanTagAttribute(name = "displayResponseInLightBox")
1170     public boolean isDisplayResponseInLightBox() {
1171         return StringUtils.equals(this.ajaxReturnType, UifConstants.AjaxReturnTypes.DISPLAYLIGHTBOX.getKey());
1172     }
1173 
1174     
1175 
1176 
1177 
1178 
1179     public void setDisplayResponseInLightBox(boolean displayResponseInLightBox) {
1180         if (displayResponseInLightBox) {
1181             this.ajaxReturnType = UifConstants.AjaxReturnTypes.DISPLAYLIGHTBOX.getKey();
1182         }
1183         
1184         else if (StringUtils.equals(this.ajaxReturnType, UifConstants.AjaxReturnTypes.DISPLAYLIGHTBOX.getKey())) {
1185             this.ajaxReturnType = UifConstants.AjaxReturnTypes.UPDATEPAGE.getKey();
1186         }
1187     }
1188 
1189     
1190 
1191 
1192 
1193 
1194 
1195 
1196 
1197 
1198 
1199 
1200 
1201 
1202 
1203 
1204 
1205 
1206 
1207 
1208     @BeanTagAttribute(name = "successCallback")
1209     public String getSuccessCallback() {
1210         return successCallback;
1211     }
1212 
1213     
1214 
1215 
1216 
1217 
1218     public void setSuccessCallback(String successCallback) {
1219         this.successCallback = successCallback;
1220     }
1221 
1222     
1223 
1224 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
1234 
1235 
1236 
1237 
1238 
1239 
1240 
1241 
1242     @BeanTagAttribute(name = "errorCallback")
1243     public String getErrorCallback() {
1244         return errorCallback;
1245     }
1246 
1247     
1248 
1249 
1250 
1251 
1252     public void setErrorCallback(String errorCallback) {
1253         this.errorCallback = errorCallback;
1254     }
1255 
1256     
1257 
1258 
1259 
1260 
1261 
1262 
1263 
1264 
1265 
1266     @BeanTagAttribute(name = "refreshId")
1267     public String getRefreshId() {
1268         return refreshId;
1269     }
1270 
1271     
1272 
1273 
1274 
1275 
1276     public void setRefreshId(String refreshId) {
1277         this.refreshId = refreshId;
1278     }
1279 
1280     
1281 
1282 
1283 
1284 
1285 
1286 
1287 
1288 
1289 
1290 
1291 
1292 
1293 
1294 
1295 
1296     @BeanTagAttribute(name = "refreshPropertyName")
1297     public String getRefreshPropertyName() {
1298         return refreshPropertyName;
1299     }
1300 
1301     
1302 
1303 
1304 
1305 
1306     public void setRefreshPropertyName(String refreshPropertyName) {
1307         this.refreshPropertyName = refreshPropertyName;
1308     }
1309 
1310     
1311 
1312 
1313 
1314 
1315     @BeanTagAttribute(name = "loadingMessageText")
1316     public String getLoadingMessageText() {
1317         return loadingMessageText;
1318     }
1319 
1320     
1321 
1322 
1323 
1324 
1325     public void setLoadingMessageText(String loadingMessageText) {
1326         this.loadingMessageText = loadingMessageText;
1327     }
1328 
1329     
1330 
1331 
1332 
1333 
1334 
1335 
1336 
1337 
1338 
1339 
1340 
1341 
1342 
1343 
1344     @BeanTagAttribute(name = "disableBlocking")
1345     public boolean isDisableBlocking() {
1346         return disableBlocking;
1347     }
1348 
1349     
1350 
1351 
1352 
1353 
1354     public void setDisableBlocking(boolean disableBlocking) {
1355         this.disableBlocking = disableBlocking;
1356     }
1357 
1358     
1359 
1360 
1361 
1362 
1363     @BeanTagAttribute(name = "evaluateDisabledOnKeyUp")
1364     public boolean isEvaluateDisabledOnKeyUp() {
1365         return evaluateDisabledOnKeyUp;
1366     }
1367 
1368     
1369 
1370 
1371 
1372 
1373     public void setEvaluateDisabledOnKeyUp(boolean evaluateDisabledOnKeyUp) {
1374         this.evaluateDisabledOnKeyUp = evaluateDisabledOnKeyUp;
1375     }
1376 
1377     
1378 
1379 
1380 
1381 
1382     public String getDisabledConditionJs() {
1383         return disabledConditionJs;
1384     }
1385 
1386     
1387 
1388 
1389 
1390 
1391     protected void setDisabledConditionJs(String disabledConditionJs) {
1392         this.disabledConditionJs = disabledConditionJs;
1393     }
1394 
1395     
1396 
1397 
1398 
1399 
1400     public List<String> getDisabledConditionControlNames() {
1401         return disabledConditionControlNames;
1402     }
1403 
1404     
1405 
1406 
1407 
1408 
1409     public void setDisabledConditionControlNames(List<String> disabledConditionControlNames) {
1410         this.disabledConditionControlNames = disabledConditionControlNames;
1411     }
1412 
1413     
1414 
1415 
1416 
1417 
1418     @BeanTagAttribute(name = "disabledWhenChangedPropertyNames", type = BeanTagAttribute.AttributeType.LISTVALUE)
1419     public List<String> getDisabledWhenChangedPropertyNames() {
1420         return disabledWhenChangedPropertyNames;
1421     }
1422 
1423     
1424 
1425 
1426 
1427 
1428     public void setDisabledWhenChangedPropertyNames(List<String> disabledWhenChangedPropertyNames) {
1429         this.disabledWhenChangedPropertyNames = disabledWhenChangedPropertyNames;
1430     }
1431 
1432     
1433 
1434 
1435 
1436 
1437     @BeanTagAttribute(name = "enabledWhenChangedPropertyNames", type = BeanTagAttribute.AttributeType.LISTVALUE)
1438     public List<String> getEnabledWhenChangedPropertyNames() {
1439         return enabledWhenChangedPropertyNames;
1440     }
1441 
1442     
1443 
1444 
1445 
1446 
1447     public void setEnabledWhenChangedPropertyNames(List<String> enabledWhenChangedPropertyNames) {
1448         this.enabledWhenChangedPropertyNames = enabledWhenChangedPropertyNames;
1449     }
1450 
1451     
1452 
1453 
1454 
1455 
1456     protected void setDisabledExpression(String disabledExpression) {
1457         this.disabledExpression = disabledExpression;
1458     }
1459 
1460     
1461 
1462 
1463     @Override
1464     public void completeValidation(ValidationTrace tracer) {
1465         tracer.addBean(this);
1466 
1467         
1468         if (getJumpToIdAfterSubmit() != null && getJumpToNameAfterSubmit() != null) {
1469             String currentValues[] = {"jumpToIdAfterSubmit =" + getJumpToIdAfterSubmit(),
1470                     "jumpToNameAfterSubmit =" + getJumpToNameAfterSubmit()};
1471             tracer.createWarning("Only 1 jumpTo property should be set", currentValues);
1472         }
1473         super.completeValidation(tracer.getCopy());
1474     }
1475 }