Class Action
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,ContentElement,LifecycleElement,org.springframework.core.Ordered
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddActionDataSettingsValue(Map<String, String> valueMap, Map<String, String> defaults, String key, String value) Adds the value passed to the valueMap with the key specified, if the value does not match the value which already exists in defaults (to avoid having to write out extra data that can later be derived from the defaults in the js client-side).voidaddActionParameter(String parameterName, String parameterValue) Convenience method to add a parameter to the action parameters Map.protected voidFor confirm text without a dialog, add instance of yes no dialog to view so it is already available on the client for dynamic dialog creation.protected voidbuildActionData(View view, Object model, LifecycleElement parent) Builds the data attributes that will be read client side to determine how to handle the action and the additional data that should be submitted with the actionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Name of the event that will be set when the action is invokedGets the action icon placement.Image to use for the actionGets the action image placement.Label text for the actiongetActionParameter(String parameterName) Gets an action parameter by name.Parameters that should be sent when the action is invokedClient side javascript to be executed when this actionField is clicked.Action Security object that indicates what authorization (permissions) exist for the action.Url to open when the action item is selectedMap of additional data that will be posted when the action is invoked.Gets the return type for the ajax callDialog to use an a confirmation for the action.Text to display as a confirmation of the action.If the action is within aDialogGroupit can be configured to dismiss the dialog using this property.If the action is within aDialogGroupit can be configured to return a response using this property.Gets a list of control names to add handlers to for disable functionality, cannot be set.Get the disable condition js derived from the springEL, cannot be set.If the action field is disabled, gives a reason for why which will be displayed as a tooltip on the action field (button).Gets the property names of fields that when changed, will disable this component.Gets the property names of fields that when changed, will enable this component.Gets the script which will be invoked when the action fails due to problems in the ajax call or the return of an incident reportLimits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.The element to place focus on in the new page after the new page is retrieved.The css class (some which exist in bootstrap css) to use to render an icon for this action.Gets the id to jump to after submit.The name to jump to in the next page, the element with this name will be jumped to automatically when the new page is retrieved after a submit.Gets the loading message used by action's blockUI.Name of the method that should be called when the action is selectedFor anActionthat is part of aNavigationGroup, the navigate to page id can be set to configure the page that should be navigated to when the action is selected.Gets the script which needs to be invoked before the form is submittedId for the component that should be refreshed after the action completesProperty name for theDataFieldthat should be refreshed after the action completesGets the script which will be invoked on a successful ajax callprotected voidInitializes (if necessary) the component security instance for the component typebooleanWhen this property is set to true it will submit the form using Ajax instead of the browser submit.booleanTrue to make this action clear the dirty flag before submitting.booleanEvaluate if this action is the default action for a page, view, group, or section.booleanWhen true, this action will mark the form dirty by incrementing the dirty field count, but if this action refreshes the entire view this will be lost (most actions only refresh the page)booleanIndicates whether blocking for the action should be disabledbooleanIndicates whether the action (input or button) is disabled (doesn't allow interaction).booleanIndicates if the action response should be displayed in a lightbox.booleanEvaluate the disable condition on controls which disable it on each key up event.booleanIndicates whether or not to perform action auth.booleanIndicates whether the form data should be validated on the client side.booleanIndicates whether or not to perform dirty validation.booleanIndicates whether or not to perform line action auth.booleanWhen true, a span will be rendered around the actionLabel text.voidperformApplyModel(Object model, LifecycleElement parent) Sets the disabledExpression, if any, evaluates it and sets the disabled property.voidperformFinalize(Object model, LifecycleElement parent) The following finalization is performed: Add methodToCall action parameter if set and setup event code for setting action parameters Invoke method to build the data attributes and submit data for the action Compose the final onclick script for the action Parses the disabled expressions, if any, to equivalent javascript and evaluates the disable/enable when changed property names The following finalization is done here: progressiveRender and conditionalRefresh variables are processed if set If any of the style properties were given, sets the style string on the style property Set the skipInTabOrder flag for nested components The last phase before the view is renderedvoidsetActionEvent(String actionEvent) Setter forgetActionEvent().voidsetActionIconPlacement(String actionIconPlacement) Setter forgetActionIconPlacement().voidsetActionImage(Image actionImage) Setter for the action image field.voidsetActionImagePlacement(String actionImagePlacement) Set to TOP, BOTTOM, LEFT, RIGHT to position image at that location within the button.voidsetActionLabel(String actionLabel) Setter for the actions label.voidsetActionParameters(Map<String, String> actionParameters) Setter forgetActionParameters().voidsetActionScript(String actionScript) Setter forgetActionScript().voidsetActionUrl(UrlInfo actionUrl) Setter forgetActionUrl().voidsetAdditionalSubmitData(Map<String, String> additionalSubmitData) Setter for map holding additional data to post.voidsetAjaxReturnType(String ajaxReturnType) Setter for the type of ajax return.voidsetAjaxSubmit(boolean ajaxSubmit) Setter forisAjaxSubmit().voidsetClearDirtyOnAction(boolean clearDirtyOnAction) Setter forisClearDirtyOnAction().voidsetComponentSecurity(ComponentSecurity componentSecurity) Override to assert aActionSecurityinstance is set.voidsetConfirmationDialog(DialogGroup confirmationDialog) voidsetConfirmationPromptText(String confirmationPromptText) voidsetDefaultEnterKeyAction(boolean defaultEnterKeyAction) voidsetDialogDismissOption(String dialogDismissOption) voidsetDialogResponse(String dialogResponse) voidsetDirtyOnAction(boolean dirtyOnAction) Set to true, if this action is considered one that changes the form's data (makes the form dirty).voidsetDisableBlocking(boolean disableBlocking) Setter for disabling blocking when the action is invoked.voidsetDisabled(boolean disabled) Setter for the disabled indicator.voidsetDisabledConditionControlNames(List<String> disabledConditionControlNames) Set disabled condition control names.protected voidsetDisabledConditionJs(String disabledConditionJs) Sets the disabled condition javascript.protected voidsetDisabledExpression(String disabledExpression) Sets the disabled expression.voidsetDisabledReason(String disabledReason) Setter for the disabled reason text.voidsetDisabledWhenChangedPropertyNames(List<String> disabledWhenChangedPropertyNames) Sets the property names of fields that when changed, will disable this component.voidsetDisplayResponseInLightBox(boolean displayResponseInLightBox) Setter for indicating the response should be rendered in a lightbox.voidsetEnabledWhenChangedPropertyNames(List<String> enabledWhenChangedPropertyNames) Sets the property names of fields that when changed, will enable this component.voidsetErrorCallback(String errorCallback) Setter forgetErrorCallback().voidsetEvaluateDisabledOnKeyUp(boolean evaluateDisabledOnKeyUp) Setter forisEvaluateDisabledOnKeyUp().voidsetFieldsToSend(List<String> fieldsToSend) voidsetFocusOnIdAfterSubmit(String focusOnIdAfterSubmit) Setter forgetFocusOnIdAfterSubmit().voidsetIconClass(String iconClass) Setter forgetIconClass().voidsetJumpToIdAfterSubmit(String jumpToIdAfterSubmit) The id to jump to in the next page, the element with this id will be jumped to automatically when the new page is retrieved after a submit.voidsetJumpToNameAfterSubmit(String jumpToNameAfterSubmit) Setter forgetJumpToIdAfterSubmit().voidsetLoadingMessageText(String loadingMessageText) When this property is set, it is used in place of the loading message text used by the blockUI.voidsetMethodToCall(String methodToCall) Setter for the actions method to call.voidsetNavigateToPageId(String navigateToPageId) Setter forgetNavigateToPageId().voidsetPerformActionAuthz(boolean performActionAuthz) Setter forisPerformActionAuthz().voidsetPerformClientSideValidation(boolean performClientSideValidation) Setter for the client side validation flag.voidsetPerformDirtyValidation(boolean performDirtyValidation) Setter forisPerformDirtyValidation().voidsetPerformLineActionAuthz(boolean performLineActionAuthz) Setter forisPerformActionAuthz().voidsetPreSubmitCall(String preSubmitCall) Setter forgetPreSubmitCall().voidsetRefreshId(String refreshId) Setter for thegetRefreshId().voidsetRefreshPropertyName(String refreshPropertyName) Setter for the property name of the DataField that should be refreshed.voidsetRenderInnerTextSpan(boolean renderInnerTextSpan) Setter forisRenderInnerTextSpan().voidsetSuccessCallback(String successCallback) Setter for successCallback.protected voidsetupRefreshAction(View view) When the action is updating a component sets up the refresh script for the component (found by the given refresh id or refresh property name.Methods inherited from class org.kuali.rice.krad.uif.element.ContentElementBase
afterEvaluateExpression, getComponentTypeNameMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
Action
public Action()Sets initial field values and initializes collections.
-
-
Method Details
-
performApplyModel
Sets the disabledExpression, if any, evaluates it and sets the disabled property.- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classComponentBase- Parameters:
model- top level object containing the data (could be the form or aparent- parent component
-
addConfirmDialogToView
protected void addConfirmDialogToView()For confirm text without a dialog, add instance of yes no dialog to view so it is already available on the client for dynamic dialog creation. -
performFinalize
The following finalization is performed:- Add methodToCall action parameter if set and setup event code for setting action parameters
- Invoke method to build the data attributes and submit data for the action
- Compose the final onclick script for the action
- Parses the disabled expressions, if any, to equivalent javascript and evaluates the disable/enable when changed property names
- progressiveRender and conditionalRefresh variables are processed if set
- If any of the style properties were given, sets the style string on the style property
- Set the skipInTabOrder flag for nested components
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classComponentBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
setupRefreshAction
When the action is updating a component sets up the refresh script for the component (found by the given refresh id or refresh property name.- Parameters:
view- view instance the action belongs to
-
buildActionData
Builds the data attributes that will be read client side to determine how to handle the action and the additional data that should be submitted with the actionNote these data attributes will be exposed as a data map client side. The simple attributes (non object value) are also written out as attributes on the action element.
- Parameters:
view- view instance the action belongs tomodel- model object containing the view dataparent- component the holds the action
-
addActionDataSettingsValue
protected void addActionDataSettingsValue(Map<String, String> valueMap, Map<String, String> defaults, String key, String value) Adds the value passed to the valueMap with the key specified, if the value does not match the value which already exists in defaults (to avoid having to write out extra data that can later be derived from the defaults in the js client-side).- Parameters:
valueMap- the data map being constructeddefaults- defaults for validation messageskey- the variable name being addedvalue- the value set on this object as a String equivalent
-
getMethodToCall
Name of the method that should be called when the action is selectedFor a server side call (clientSideCall is false), gives the name of the method in the mapped controller that should be invoked when the action is selected. For client side calls gives the name of the script function that should be invoked when the action is selected
- Returns:
- name of method to call
-
setMethodToCall
Setter for the actions method to call.- Parameters:
methodToCall- method to call
-
getActionLabel
Label text for the actionThe label text is used by the template renderers to give a human readable label for the action. For buttons this generally is the button text, while for an action link it would be the links displayed text
- Returns:
- label for action
-
setActionLabel
Setter for the actions label.- Parameters:
actionLabel- action label
-
isRenderInnerTextSpan
public boolean isRenderInnerTextSpan()When true, a span will be rendered around the actionLabel text.- Returns:
- true if rendering a span around actionLabel, false otherwise
-
setRenderInnerTextSpan
public void setRenderInnerTextSpan(boolean renderInnerTextSpan) Setter forisRenderInnerTextSpan().- Parameters:
renderInnerTextSpan- property value
-
getActionImage
Image to use for the actionWhen the action image component is set (and render is true) the image will be used to present the action as opposed to the default (input submit). For action link templates the image is used for the link instead of the action link text
- Returns:
- action image
-
setActionImage
Setter for the action image field.- Parameters:
actionImage- action image
-
getIconClass
The css class (some which exist in bootstrap css) to use to render an icon for this action.- Returns:
- the icon css class
-
setIconClass
Setter forgetIconClass().- Parameters:
iconClass- property value
-
getFieldsToSend
Limits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.The names in the list should be the propertyNames of the fields sent with this request. A wildcard("*") can be used at the END of a name to specify all fields with names that begin with the string before the wildcard. If the array contains 1 item with the keyword "NONE", then no form fields are sent. In addition, A group id or field id with the "#" id selector prefix can be used to send all inputs which are nested within them. Note that this only limits the fields which exist on the form and data required by the KRAD framework is still sent (eg, methodToCall, formKey, sessionId, etc.)
- Returns:
- the only input fields to send by name with the action request
-
setFieldsToSend
- See Also:
-
getActionEvent
Name of the event that will be set when the action is invokedAction events can be looked at by the view or components in order to render differently depending on the action requested.
- Returns:
- action event name
- See Also:
-
setActionEvent
Setter forgetActionEvent().- Parameters:
actionEvent- property value
-
getAdditionalSubmitData
Map of additional data that will be posted when the action is invoked.Each entry in this map will be sent as a request parameter when the action is chosen. Note this in addition to the form data that is sent. For example, suppose the model contained a property named number and a boolean named showActive, we can send values for this properties by adding the following entries to this map: {'number':'a13', 'showActive', 'true'}
The additionalSubmitData map is different from the actionParameters map. All name/value pairs given as actionParameters populated the form map actionParameters. While name/value pair given in additionalSubmitData populate different form (model) properties.
- Returns:
- additional key/value pairs to submit
-
setAdditionalSubmitData
Setter for map holding additional data to post.- Parameters:
additionalSubmitData- property value
-
getActionParameters
Parameters that should be sent when the action is invokedAction renderer will decide how the parameters are sent for the action (via script generated hiddens, or script parameters, ...)
Can be set by other components such as the
CollectionGroupto provide the context the action is in (such as the collection name and line the action applies to)- Returns:
- action parameters
-
setActionParameters
Setter forgetActionParameters().- Parameters:
actionParameters- property value
-
addActionParameter
Convenience method to add a parameter to the action parameters Map.- Parameters:
parameterName- name of parameter to addparameterValue- value of parameter to add
-
getActionParameter
Gets an action parameter by name.- Parameters:
parameterName- parameter name- Returns:
- action parameter
-
getActionSecurity
Action Security object that indicates what authorization (permissions) exist for the action.- Returns:
- ActionSecurity instance
-
setComponentSecurity
Override to assert aActionSecurityinstance is set.- Specified by:
setComponentSecurityin interfaceComponent- Overrides:
setComponentSecurityin classComponentBase- Parameters:
componentSecurity- instance of ActionSecurity
-
initializeComponentSecurity
protected void initializeComponentSecurity()Initializes (if necessary) the component security instance for the component type- Overrides:
initializeComponentSecurityin classComponentBase
-
isPerformActionAuthz
public boolean isPerformActionAuthz()Indicates whether or not to perform action auth.- Returns:
- true to perform action auth
-
setPerformActionAuthz
public void setPerformActionAuthz(boolean performActionAuthz) Setter forisPerformActionAuthz().- Parameters:
performActionAuthz- property value
-
isPerformLineActionAuthz
public boolean isPerformLineActionAuthz()Indicates whether or not to perform line action auth.- Returns:
- true to perform line action auth
-
setPerformLineActionAuthz
public void setPerformLineActionAuthz(boolean performLineActionAuthz) Setter forisPerformActionAuthz().- Parameters:
performLineActionAuthz- property value
-
getJumpToIdAfterSubmit
Gets the id to jump to after submit.- Returns:
- the jumpToIdAfterSubmit
-
setJumpToIdAfterSubmit
The id to jump to in the next page, the element with this id will be jumped to automatically when the new page is retrieved after a submit. Using "TOP" or "BOTTOM" will jump to the top or the bottom of the resulting page. Passing in nothing for both jumpToIdAfterSubmit and jumpToNameAfterSubmit will result in this Action being jumped to by default if it is present on the new page. WARNING: jumpToIdAfterSubmit always takes precedence over jumpToNameAfterSubmit, if set.- Parameters:
jumpToIdAfterSubmit- the jumpToIdAfterSubmit to set
-
getJumpToNameAfterSubmit
The name to jump to in the next page, the element with this name will be jumped to automatically when the new page is retrieved after a submit. Passing in nothing for both jumpToIdAfterSubmit and jumpToNameAfterSubmit will result in this Action being jumped to by default if it is present on the new page. WARNING: jumpToIdAfterSubmit always takes precedence over jumpToNameAfterSubmit, if set.- Returns:
- the jumpToNameAfterSubmit
-
setJumpToNameAfterSubmit
Setter forgetJumpToIdAfterSubmit().- Parameters:
jumpToNameAfterSubmit- the jumpToNameAfterSubmit to set
-
getFocusOnIdAfterSubmit
The element to place focus on in the new page after the new page is retrieved.The following are allowed:
- A valid element id
- "FIRST" will focus on the first visible input element on the form
- "SELF" will result in this Action being focused (action bean defaults to "SELF")
- "LINE_FIRST" will result in the first input of the collection line to be focused (if available)
- "NEXT_INPUT" will result in the next available input that exists after this Action to be focused (only if this action still exists on the page)
- Returns:
- the focusOnAfterSubmit
-
setFocusOnIdAfterSubmit
Setter forgetFocusOnIdAfterSubmit().- Parameters:
focusOnIdAfterSubmit- the focusOnAfterSubmit to set
-
isPerformClientSideValidation
public boolean isPerformClientSideValidation()Indicates whether the form data should be validated on the client side.- Returns:
- true if validation should occur, false otherwise
-
setPerformClientSideValidation
public void setPerformClientSideValidation(boolean performClientSideValidation) Setter for the client side validation flag.- Parameters:
performClientSideValidation- property value
-
getActionScript
Client side javascript to be executed when this actionField is clicked.This overrides the default action for this Action so the method called must explicitly submit, navigate, etc. through js, if necessary. In addition, this js occurs AFTER onClickScripts set on this field, it will be the last script executed by the click event. Sidenote: This js is always called after hidden actionParameters and methodToCall methods are written by the js to the html form.
- Returns:
- the actionScript
-
setActionScript
Setter forgetActionScript().- Parameters:
actionScript- the actionScript to set
-
getActionUrl
Url to open when the action item is selectedThis makes the action behave like a standard link. Instead of posting the form, the configured URL will simply be opened (using window.open). For using standard post actions these does not need to be configured.
- Returns:
- Url info instance for the configuration action link
-
setActionUrl
Setter forgetActionUrl().- Parameters:
actionUrl- property value
-
setPerformDirtyValidation
public void setPerformDirtyValidation(boolean performDirtyValidation) Setter forisPerformDirtyValidation().- Parameters:
performDirtyValidation- the blockValidateDirty to set
-
isPerformDirtyValidation
public boolean isPerformDirtyValidation()Indicates whether or not to perform dirty validation.- Returns:
- true to perform dirty validation
-
isClearDirtyOnAction
public boolean isClearDirtyOnAction()True to make this action clear the dirty flag before submitting.This will clear both the dirtyForm flag on the form and the count of fields considered dirty on the client-side. This will only be performed if this action is a request based action.
- Returns:
- true if the dirty
-
setClearDirtyOnAction
public void setClearDirtyOnAction(boolean clearDirtyOnAction) Setter forisClearDirtyOnAction().- Parameters:
clearDirtyOnAction- property value
-
isDirtyOnAction
public boolean isDirtyOnAction()When true, this action will mark the form dirty by incrementing the dirty field count, but if this action refreshes the entire view this will be lost (most actions only refresh the page)This will increase count of fields considered dirty on the client-side by 1. This will only be performed if this action is a request based action.
- Returns:
- true if this action is considered dirty, false otherwise
-
setDirtyOnAction
public void setDirtyOnAction(boolean dirtyOnAction) Set to true, if this action is considered one that changes the form's data (makes the form dirty).- Parameters:
dirtyOnAction- property value
-
isDisabled
public boolean isDisabled()Indicates whether the action (input or button) is disabled (doesn't allow interaction).- Returns:
- true if the action field is disabled, false if not
-
setDisabled
public void setDisabled(boolean disabled) Setter for the disabled indicator.- Parameters:
disabled- property value
-
getDisabledReason
If the action field is disabled, gives a reason for why which will be displayed as a tooltip on the action field (button).- Returns:
- disabled reason text
- See Also:
-
setDisabledReason
Setter for the disabled reason text.- Parameters:
disabledReason- property value
-
getActionImagePlacement
Gets the action image placement.- Returns:
- action image placement
-
setActionImagePlacement
Set to TOP, BOTTOM, LEFT, RIGHT to position image at that location within the button. For the subclass ActionLinkField only LEFT and RIGHT are allowed. When set to blank/null/IMAGE_ONLY, the image itself will be the Action, if no value is set the default is ALWAYS LEFT, you must explicitly set blank/null/IMAGE_ONLY to use ONLY the image as the Action.- Parameters:
actionImagePlacement- action image placement indicator
-
getActionIconPlacement
Gets the action icon placement.- Returns:
- action icon placement
-
setActionIconPlacement
Setter forgetActionIconPlacement().- Parameters:
actionIconPlacement- property value
-
getPreSubmitCall
Gets the script which needs to be invoked before the form is submittedThe preSubmitCall can carry out custom logic for the action before the submit occurs. The value should be given as one or more lines of script and should return a boolean. If false is returned from the call, the submit is not carried out. Furthermore, the preSubmitCall can refer to the request object through the variable 'kradRequest' or 'this'. This gives full access over the request for doing such things as adding additional data
Examples 'return doFunction(kradRequest);', 'var valid=true;return valid;'
The preSubmit call will be invoked both for ajax and non-ajax submits
- Returns:
- script text that will be invoked before form submission
-
setPreSubmitCall
Setter forgetPreSubmitCall().- Parameters:
preSubmitCall- property value
-
getConfirmationPromptText
Text to display as a confirmation of the action.When this text is displayed the user will receive a confirmation when the action is taken. The user can then cancel the action, or continue. If set,
getConfirmationDialog()will be used to build the dialog. Otherwise, the dialog is created dynamically on the client.- Returns:
- text to display in a confirmation for the action
-
setConfirmationPromptText
- See Also:
-
getConfirmationDialog
Dialog to use an a confirmation for the action.For custom confirmation dialogs this can be set to any valid dialog group. It is expected that the dialog have at least one action with the dialog response of 'true' to continue the action.
- Returns:
- dialog group instance to use an a confirmation
-
setConfirmationDialog
- See Also:
-
getDialogDismissOption
If the action is within aDialogGroupit can be configured to dismiss the dialog using this property.A dialog can be dismissed at various points of the action using the values: IMMEDIATE - dismiss dialog right away (and do nothig further) PRESUBMIT - run the action presubmit (which can include validation), if successful close the dialog and do nothing further REQUEST - carry out the action request as usual and dismiss the dialog when the server request is made
Note the id for the dialog that will be dismissed is automatically associated with the action when the dialog is shown.
- Returns:
- String option for dismissing a dialog
-
setDialogDismissOption
- See Also:
-
getDialogResponse
If the action is within aDialogGroupit can be configured to return a response using this property.Dialogs can be used to get a response from a user, either a simple confirmation (true or false), or to choice from a list of options. The responses for the dialog are created with action components. The property specifies the action value that should be returned (when chosen) to the dialog response handlers. For example, in a simple confirmation one action will have a dialog response 'false', and the other will have a dialog response 'true'.
- Returns:
- String dialog response value
-
setDialogResponse
- See Also:
-
isAjaxSubmit
public boolean isAjaxSubmit()When this property is set to true it will submit the form using Ajax instead of the browser submit. Will default to updating the page contents- Returns:
- boolean
-
setAjaxSubmit
public void setAjaxSubmit(boolean ajaxSubmit) Setter forisAjaxSubmit().- Parameters:
ajaxSubmit- property value
-
getAjaxReturnType
Gets the return type for the ajax callThe ajax return type indicates how the response content will be handled in the client. Typical examples include updating a component, the page, or doing a redirect.
- Returns:
- return type
- See Also:
-
setAjaxReturnType
Setter for the type of ajax return.- Parameters:
ajaxReturnType- property value
-
isDisplayResponseInLightBox
public boolean isDisplayResponseInLightBox()Indicates if the action response should be displayed in a lightbox.- Returns:
- true if response should be rendered in a lightbox, false if not
-
setDisplayResponseInLightBox
public void setDisplayResponseInLightBox(boolean displayResponseInLightBox) Setter for indicating the response should be rendered in a lightbox.- Parameters:
displayResponseInLightBox- property value
-
getSuccessCallback
Gets the script which will be invoked on a successful ajax callThe successCallback can carry out custom logic after a successful ajax submission has been made. The value can contain one or more script statements. In addition, the response contents can be accessed through the variable 'responseContents'
Examples 'handleSuccessfulUpdate(responseContents);'
The successCallback may only be specified when
isAjaxSubmit()is true- Returns:
- script to be executed when the action is successful
-
setSuccessCallback
Setter for successCallback.- Parameters:
successCallback- property value
-
getErrorCallback
Gets the script which will be invoked when the action fails due to problems in the ajax call or the return of an incident reportThe errorCallback can carry out custom logic after a failed ajax submission. The value can contain one or more script statements. In addition, the response contents can be accessed through the variable 'responseContents'
Examples 'handleFailedUpdate(responseContents);'
The errorCallback may only be specified when
isAjaxSubmit()is true- Returns:
- script to be executed when the action is successful
-
setErrorCallback
Setter forgetErrorCallback().- Parameters:
errorCallback- property value
-
getRefreshId
Id for the component that should be refreshed after the action completesEither refresh id or refresh property name can be set to configure the component that should be refreshed after the action completes. If both are blank, the page will be refreshed
- Returns:
- valid component id
-
setRefreshId
Setter for thegetRefreshId().- Parameters:
refreshId- property value
-
getRefreshPropertyName
Property name for theDataFieldthat should be refreshed after the action completesEither refresh id or refresh property name can be set to configure the component that should be refreshed after the action completes. If both are blank, the page will be refreshed
Property name will be adjusted to use the default binding path unless it contains the form prefix
- Returns:
- valid property name with an associated DataField
- See Also:
-
setRefreshPropertyName
Setter for the property name of the DataField that should be refreshed.- Parameters:
refreshPropertyName- property value
-
getLoadingMessageText
Gets the loading message used by action's blockUI.- Returns:
- String if String is not null, used in place of loading message
-
setLoadingMessageText
When this property is set, it is used in place of the loading message text used by the blockUI.- Parameters:
loadingMessageText- property value
-
isDisableBlocking
public boolean isDisableBlocking()Indicates whether blocking for the action should be disabledBy default when an action is invoked part of the page or the entire window is blocked until the action completes. If this property is set to true the blocking will not be displayed.
Currently if an action returns a file download, this property should be set to true. If not, the blocking will never get unblocked (because the page does not get notification a file was downloaded)
- Returns:
- true if blocking should be disabled, false if not
-
setDisableBlocking
public void setDisableBlocking(boolean disableBlocking) Setter for disabling blocking when the action is invoked.- Parameters:
disableBlocking- property value
-
isEvaluateDisabledOnKeyUp
public boolean isEvaluateDisabledOnKeyUp()Evaluate the disable condition on controls which disable it on each key up event.- Returns:
- true if evaluate on key up, false otherwise
-
setEvaluateDisabledOnKeyUp
public void setEvaluateDisabledOnKeyUp(boolean evaluateDisabledOnKeyUp) Setter forisEvaluateDisabledOnKeyUp().- Parameters:
evaluateDisabledOnKeyUp- property value
-
isDefaultEnterKeyAction
public boolean isDefaultEnterKeyAction()Evaluate if this action is the default action for a page, view, group, or section.- Returns:
- true if this action is default, false otherwise
-
setDefaultEnterKeyAction
public void setDefaultEnterKeyAction(boolean defaultEnterKeyAction) - See Also:
-
getDisabledConditionJs
Get the disable condition js derived from the springEL, cannot be set.- Returns:
- the disableConditionJs javascript to be evaluated
-
setDisabledConditionJs
Sets the disabled condition javascript.- Parameters:
disabledConditionJs- property value
-
getDisabledConditionControlNames
Gets a list of control names to add handlers to for disable functionality, cannot be set.- Returns:
- control names to add handlers to for disable
-
setDisabledConditionControlNames
Set disabled condition control names.- Parameters:
disabledConditionControlNames- property value
-
getDisabledWhenChangedPropertyNames
Gets the property names of fields that when changed, will disable this component.- Returns:
- the property names to monitor for change to disable this component
-
setDisabledWhenChangedPropertyNames
Sets the property names of fields that when changed, will disable this component.- Parameters:
disabledWhenChangedPropertyNames- property value
-
getEnabledWhenChangedPropertyNames
Gets the property names of fields that when changed, will enable this component.- Returns:
- the property names to monitor for change to enable this component
-
setEnabledWhenChangedPropertyNames
Sets the property names of fields that when changed, will enable this component.- Parameters:
enabledWhenChangedPropertyNames- property value
-
setDisabledExpression
Sets the disabled expression.- Parameters:
disabledExpression- property value
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classComponentBase- Parameters:
tracer- Record of component's location
-