Class ComponentBase
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,LifecycleElement,org.springframework.core.Ordered
- Direct Known Subclasses:
ContainerBase,ContentElementBase,FieldBase,RemoteFieldsHolder,WidgetBase
Provides base component properties such as id and template. Also provides default implementation
for the ScriptEventSupport and Ordered interfaces. By default no script
events except the onDocumentReady are supported.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidaddAriaAttribute(String key, String value) Add an aria attribute to the ariaAttributes listvoidaddDataAttribute(String key, String value) Add a data attribute to the dataAttributes mapvoidaddScriptDataAttribute(String key, String value) Add a script data attribute to the scriptDataAttributes mapvoidaddStyleClass(String styleClass) Adds a single style to the list of styles on this componentvoidaddWrapperCssClass(String cssClass) Add a cell css class to the cell classes listvoidNo-op implementation.voidappendToStyle(String styleRules) Appends to the inline style set on a componentvoidcheckMutable(boolean legalDuringInitialization) Check for mutability on the element before modifying state.clone()OverrideObject.clone()to assign the public modifier.voidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Returns a list of componentIds which will be also be refreshed when this component is refreshedReturns a string for representing the list of additional components to be refreshed as a JavaScript valueConvenience property for adding css class names to the end of the list of cssClasses that may already exist on this Component (this is to avoid explicitly having to set list merge in the bean definition)Gets additional templates that will be required during the rendering of this component.getAlign()Horizontal alignment of the component within its containerThe aria attributes of this component and their values (without "aria-", this is automatically appended during rendering)Get the aria attributes as a String that can be used during template outputIndicates whether the component should be cleared on copyWidth setting for the cell containing the component (only applies within table based layouts)intNumber of places the component should take up horizontally in the container; when using a CssGridLayoutManager this is converted to the appropriate medium size.ComponentModifierinstances that should be invoked to initialize the componentSecurity object that indicates what authorization (permissions) exist for the componentWhen set if the condition is satisfied, the component will be refreshed.The condition to refresh this component converted to a js expression, set internally cannot be set.Control names used to control conditional refresh, set internally cannot be set.A string suffix that should get applied to the id for all child components of the given element.Context map for the componentCSS style class(s) to be applied to the componentCssGridSizes represent the size (width) the content's div "cell" will take up in the "row" at each screen size (extra small, small, medium, large) when using a group backed by a CssGridLayoutManager.The DataAttributes that will be written to the html element for this component as data-String containing JavaScript code for registering event handlers for this component (blur, focus, click, etc.)Names a model property path, which if set and resolves to true, indicates that this component should be excluded from the lifecycle at the initialize phase.Names a model property path, which if set and resolves to null or false, indicates that this component should be excluded from the lifecycle at the initialize phase.Limits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.The List of Object instances that should be passed as arguments to the finalize methodMethodInvokerConfiginstance for the method that should be invoked for finalizing the component configurationThe name of the method that should be invoked for finalizing the component configuration (full method name, without parameters or return type)getId()The unique id (within a given tree) for the element.Additional css classes that come before css classes listed in the cssClasses propertyName of a method on the controller that should be invoked as part of the component refresh and disclosure processScript that should be executed when the component's onBlur event is firedScript that should be executed when the component's onChange event is firedScript that should be executed when the component's onClick event is firedScript that should be executed when the component's onClose event is firedScript that should be executed when the component's onDblClick event is firedScript to be run when the document ready event is triggeredScript that should be executed when the component's onFocus event is firedScript that should be executed when the component's onInput event is firedScript that should be executed when the component's onKeyDown event is firedScript that should be executed when the component's onKeyPress event is firedScript that should be executed when the component's onKeyUp event is firedScript that should be executed when the component's onLoad event is firedScript that should be executed when the component's onMouseDown event is firedScript that should be executed when the component's onMouseMove event is firedScript that should be executed when the component's onMouseOut event is firedScript that should be executed when the component's onMouseOver event is firedScript that should be executed when the component's onMouseUp event is firedScript that should be executed when the component's onSubmit event is firedScript that should be executed when the component's onUnload event is firedintgetOrder()Order of a component within a List of other componentsMap of paths for this component that will be used to process a refresh (if necessary).Raw html or string content to render after this component rendersRaw html or string content to render before this component rendersThe condition to show this component progressively converted to a js expression, set internally cannot be set.Control names used to control progressive disclosure, set internally cannot be set.When set if the condition is satisfied, the component will be displayed.Returns list of components that are being held in property replacers configured for this componentgets a list ofPropertyReplacerinstancesIndicates whether the component can be editedintTime in seconds that the component will be automatically refreshedSpecifies a property by name that when its value changes will automatically perform a refresh on this componentRendering output for the component that will be sent as part of the response (can contain static text and HTML)Indicates whether the component is requiredgetRole()The role attribute of this component, use to define aria rolesintNumber of places the component should take up vertically in the containerThe DataAttributes that will be written to the html as a script call to data for this component (these cannot be used for jQuery selection directly)Returns a js string that can be used to right js data attributes to for the componentThe string that can be put into a the tag of a component to add data attributes inlinegetStyle()CSS style string to be applied to the componentBuilds the HTML class attribute string by combining the styleClasses list with a space delimiterThe path to the JSP file that should be called to render the componentThe name for which the template can be invoked byThe options that are passed through to the Component rendererBuilds a string from the underlyingMapof template options that will export that options as a JavaScript Map for use in js and jQuery pluginsgetTitle()The component titleThe Tooltip widget that renders a tooltip with additional information about the element on specified trigger eventVertical alignment of the component within its containerGets a property for referring to this component from the view, relative to the view, as assigned by the current or most recent lifecycle.Indicates what lifecycle phase the component instance is ingetWidth()Width the component should take up in the containerThe cellCssClasses property defines the classes that will be placed on the corresponding td (or th) elements relating to this component when used in a table backed layout.Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter.CSS style string to be applied to the cell containing the component (only applies within table based layouts)protected voidInitializes (if necessary) the component security instance for the component typebooleanDisables the storage of the component in session (when the framework determines it needs to be due to a refresh condition)booleanIf true if this component is disclosed by an action in js, a placeholder will be put in this components place if render is also false.booleanisFinal()Indicates whether the component has been updated from the model and final updates made.booleanIndicates whether the component should be stored with the session view regardless of configurationbooleanisHidden()Indicates whether the component should be hidden in the UIbooleanIndicates whether the component has been initialized.booleanIndicates whether the component has been updated from the model.booleanisMutable(boolean legalDuringInitialization) Determine if this lifecycle element is mutable.booleanWhether to omit fields from form post unless they are explicitly specified by theAction.fieldsToSendproperty.booleanIf true, when the progressiveRender condition is satisfied, the component will always be retrieved from the server and shown(as opposed to being stored on the client, but hidden, after the first retrieval as is the case with the progressiveRenderViaAJAX option).booleanWhen progressiveRenderViaAJAX is true, this component will be retrieved from the server when it first satisfies its progressive render condition.booleanIndicates the component can be refreshed by an actionbooleanisRender()Indicates whether the component should be rendered in the UIbooleanIndicates whether the component has been fully rendered.booleanIndicates whether data contained within the component should be reset (set to default) when the component is refreshedbooleanWhen true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsbooleanIndicates whether the component contains its own render output (through the renderOutput property)booleanFlag indicating that this component and its nested components must be skipped when keyboard tabbing.voidReceive notification that a lifecycle phase, and all successor phases, have been completed on this component.voidperformApplyModel(Object model, LifecycleElement parent) The following updates are done here: Evaluate the progressive render condition (if set) and combine with the current render status to set the render status Called after the initialize phase to perform conditional logic based on the model datavoidperformFinalize(Object model, LifecycleElement parent) 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 renderedvoidperformInitialization(Object model) The following updates are done here: Invoke performInitialize on component modifiers Initializes the componentvoidpushAllToContext(Map<String, Object> objects) Places each entry of the given Map into the context for the componentvoidpushObjectToContext(String objectName, Object object) Places the given object into the context Map for the component with the given nameprotected voidpushToPropertyReplacerContext(String objectName, Object object) voidsetAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh) Setter for alsoRefreshComponentsvoidsetAdditionalCssClasses(List<String> additionalCssClasses) Set the additionalCssClassesvoidSets the components horizontal alignmentvoidsetAriaAttributes(Map<String, String> ariaAttributes) voidsetCanCopyOnReadOnly(Boolean canCopyOnReadOnly) Setter for the canCopyOnReadOnly indicatorvoidsetCellWidth(String cellWidth) Setter for the containing cell widthvoidsetColSpan(int colSpan) Setter for the components column spanvoidsetComponentModifiers(List<ComponentModifier> componentModifiers) Setter for the components List ofComponentModifierinstancesvoidsetComponentSecurity(ComponentSecurity componentSecurity) Setter for the components security objectvoidsetConditionalRefresh(String conditionalRefresh) Set the conditional refresh conditionvoidsetContainerIdSuffix(String containerIdSuffix) voidsetContext(Map<String, Object> context) Setter for the context MapvoidsetCssClasses(List<String> cssClasses) Setter for the components style classesvoidsetCssGridSizes(CssGridSizes cssGridSizes) voidsetDataAttributes(Map<String, String> dataAttributes) Setter for data attributes to include for the componentvoidsetDisableSessionPersistence(boolean disableSessionPersistence) Setter for disabling storage of the component in sessionvoidsetDisclosedByAction(boolean disclosedByAction) Set if this component is disclosed by some outside actionvoidsetEditAuthz(Boolean editAuthz) Setter forisEditAuthz()voidsetExcludeIf(String excludeIf) voidsetExcludeUnless(String excludeUnless) voidsetFieldsToSendOnRefresh(List<String> fieldsToSendOnRefresh) voidsetFinalizeMethodAdditionalArguments(List<Object> finalizeMethodAdditionalArguments) Setter for the finalize additional arguments listvoidsetFinalizeMethodInvoker(MethodInvokerConfig finalizeMethodInvoker) Setter for the method invoker instancevoidsetFinalizeMethodToCall(String finalizeMethodToCall) Setter for the finalize methodvoidsetForceSessionPersistence(boolean forceSessionPersistence) Setter for the indicator to force persistence of the component in sessionvoidsetHidden(boolean hidden) Setter for the hidden indicatorvoidSetter for the unique id (within a given tree) for the componentvoidsetLibraryCssClasses(List<String> libraryCssClasses) Set the libraryCssClassesvoidsetMethodToCallOnRefresh(String methodToCallOnRefresh) Setter for the controller method to call for a refresh or disclosure action on this componentvoidsetOmitFromFormPost(boolean omitFromFormPost) voidsetOnBlurScript(String onBlurScript) Script that should be executed when the component's onBlur event is firedvoidsetOnChangeScript(String onChangeScript) Setter for the components onChange scriptvoidsetOnClickScript(String onClickScript) Setter for the components onClick scriptvoidsetOnCloseScript(String onCloseScript) Setter for the components onClose scriptvoidsetOnDblClickScript(String onDblClickScript) Setter for the components onDblClick scriptvoidsetOnDocumentReadyScript(String onDocumentReadyScript) Setter for the components onDocumentReady scriptvoidsetOnFocusScript(String onFocusScript) Setter for the components onFocus scriptvoidsetOnInputScript(String onInputScript) Setter for the components onInput scriptvoidsetOnKeyDownScript(String onKeyDownScript) Setter for the components onKeyDown scriptvoidsetOnKeyPressScript(String onKeyPressScript) Setter for the components onKeyPress scriptvoidsetOnKeyUpScript(String onKeyUpScript) Setter for the components onKeyUp scriptvoidsetOnLoadScript(String onLoadScript) Script that should be executed when the component's onLoad event is firedvoidsetOnMouseDownScript(String onMouseDownScript) Setter for the components onMouseDown scriptvoidsetOnMouseMoveScript(String onMouseMoveScript) Setter for the components onMouseMove scriptvoidsetOnMouseOutScript(String onMouseOutScript) Setter for the components onMouseOut scriptvoidsetOnMouseOverScript(String onMouseOverScript) Setter for the components onMouseOver scriptvoidsetOnMouseUpScript(String onMouseUpScript) Setter for the components onMouseUp scriptvoidsetOnSubmitScript(String onSubmitScript) Setter for the components onSubmit scriptvoidsetOnUnloadScript(String onUnloadScript) Setter for the components onUnload scriptvoidsetOrder(int order) Setter for the component's ordervoidsetPhasePathMapping(Map<String, String> phasePathMapping) voidsetPostRenderContent(String postRenderContent) Set the postRenderContentvoidsetPreRenderContent(String preRenderContent) Set the preRenderContentvoidsetProgressiveRender(String progressiveRender) Setter for progressiveRender Spring EL expressionvoidsetProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh) Set the progressive render and refresh option.voidsetProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX) Setter for the progressiveRenderViaAJAX flagvoidsetPropertyReplacers(List<PropertyReplacer> propertyReplacers) Setter for the components property substitutionsvoidsetReadOnly(Boolean readOnly) Setter for the read only indicatorvoidsetRefreshedByAction(boolean refreshedByAction) Setter for the refreshed by action indicatorvoidsetRefreshTimer(int refreshTimer) Setter for refreshTimervoidsetRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames) Setter for the list of property names that trigger a refreshvoidsetRender(boolean render) Setter for the components render indicatorvoidsetRenderedHtmlOutput(String renderedHtmlOutput) Setter for the component's render outputvoidsetRequired(Boolean required) Setter for the required indicatorvoidsetResetDataOnRefresh(boolean resetDataOnRefresh) Setter for the reset data on refresh indicatorvoidsetRetrieveViaAjax(boolean retrieveViaAjax) When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsvoidvoidsetRowSpan(int rowSpan) Setter for the component row spanvoidsetScriptDataAttributes(Map<String, String> scriptDataAttributes) Setter for script data attributes to include for the componentvoidsetSelfRendered(boolean selfRendered) Setter for the self render indicatorvoidsetSkipInTabOrder(boolean skipInTabOrder) voidSetter for the components stylevoidsetTemplate(String template) Setter for the components templatevoidsetTemplateName(String templateName) Setter for the name of the template (a name which can be used to invoke)voidsetTemplateOptions(Map<String, String> templateOptions) Setter for the template's optionsvoidsetTemplateOptionsJSString(String templateOptionsJSString) Setter for the template's optionsvoidSetter for the component's titlevoidsetToolTip(Tooltip toolTip) Setter for the component tooltip widget instancevoidSetter for the component's vertical alignvoidsetViewAuthz(Boolean viewAuthz) Setter forisViewAuthz()voidsetViewPath(String viewPath) Setter forLifecycleElement.getViewPath().voidsetViewStatus(String status) Setter for the view statusvoidSetter for the components widthvoidsetWrapperCssClasses(List<String> wrapperCssClasses) Set the cellCssClasses property which defines the classes that will be placed on the corresponding td (or th) relating to this component when used in a table backed layout.voidsetWrapperStyle(String wrapperStyle) Setter for the cell style attributebooleanReturn true if the lifecycle should be skipped for this component.Methods 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
getComponentTypeNameMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Field Details
-
templateOptions
-
-
Constructor Details
-
ComponentBase
public ComponentBase()
-
-
Method Details
-
skipLifecycle
public boolean skipLifecycle()Return true if the lifecycle should be skipped for this component.Skipping the lifecycle means do not invoke the performInitialize, performApplyModel, and performFinalize methods of this component and its children. This means that content built by those lifecycle tasks will not be processed or applied. Skipping the lifecycle on a component helps initial load/setup performance by only performing the full lifecycle when the component is requested on subsequent requests (ajax retrievals).
- Specified by:
skipLifecyclein interfaceLifecycleElement- Returns:
- true if lifecycle should be skipped for this component
-
checkMutable
public void checkMutable(boolean legalDuringInitialization) Description copied from interface:LifecycleElementCheck for mutability on the element before modifying state.- Specified by:
checkMutablein interfaceLifecycleElement- Parameters:
legalDuringInitialization- True if the operation is legal during view initialization, false if the operation is only allowed during the component lifecycle.- See Also:
-
isMutable
public boolean isMutable(boolean legalDuringInitialization) Description copied from interface:LifecycleElementDetermine if this lifecycle element is mutable.Most lifecycle element are immutable, and all are immutable expect during initialization and the during the view lifecycle. Those that have been copied within the view lifecycle, however, may be modified during the same lifecycle.
- Specified by:
isMutablein interfaceLifecycleElement- Parameters:
legalDuringInitialization- true if the current operation may be called before the lifecycle element has been cached, for example while being initialized as part of a Spring context.- Returns:
- True if the component is mutable.
- See Also:
-
getViewStatus
Indicates what lifecycle phase the component instance is inThe view lifecycle begins with the CREATED status. In this status a new instance of the view has been retrieved from the dictionary, but no further processing has been done. After the initialize phase has been run the status changes to INITIALIZED. After the model has been applied and the view is ready for render the status changes to FINAL
- Specified by:
getViewStatusin interfaceLifecycleElement- Returns:
- view status
- See Also:
-
setViewStatus
Setter for the view status- Specified by:
setViewStatusin interfaceComponent- Specified by:
setViewStatusin interfaceLifecycleElement- Parameters:
status- view status- See Also:
-
notifyCompleted
Receive notification that a lifecycle phase, and all successor phases, have been completed on this component.- Specified by:
notifyCompletedin interfaceLifecycleElement- Parameters:
phase- The completed view lifecycle phase
-
isInitialized
public boolean isInitialized()Indicates whether the component has been initialized.- Specified by:
isInitializedin interfaceLifecycleElement- Returns:
- True if the component has been initialized, false if not.
-
isModelApplied
public boolean isModelApplied()Indicates whether the component has been updated from the model.- Specified by:
isModelAppliedin interfaceLifecycleElement- Returns:
- True if the component has been updated, false if not.
-
isFinal
public boolean isFinal()Indicates whether the component has been updated from the model and final updates made.- Specified by:
isFinalin interfaceLifecycleElement- Returns:
- True if the component has been updated, false if not.
-
isRendered
public boolean isRendered()Indicates whether the component has been fully rendered.- Specified by:
isRenderedin interfaceComponent- Returns:
- True if the component has fully rendered, false if not.
-
performInitialization
The following updates are done here:- Invoke performInitialize on component modifiers
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
- Specified by:
performInitializationin interfaceLifecycleElement- Parameters:
model- - object instance containing the view data- See Also:
-
performApplyModel
The following updates are done here:- Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
- Specified by:
performApplyModelin interfaceLifecycleElement- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
afterEvaluateExpression
public void afterEvaluateExpression()No-op implementation. Override for custom behavior in subclasses. Invoked by the view lifecycle after expressions are evaluated at the apply model phase.In general, this method is preferred to
LifecycleElement.performApplyModel(Object, LifecycleElement)for populating model data via code, since it is called before client-side state is synchronize.- Specified by:
afterEvaluateExpressionin interfaceComponent
-
performFinalize
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
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Parameters:
model- - top level object containing the dataparent- - parent component
-
getPropertyReplacerComponents
Returns list of components that are being held in property replacers configured for this component- Specified by:
getPropertyReplacerComponentsin interfaceComponent- Returns:
- List
-
getId
The unique id (within a given tree) for the element.The id is used to identify an element instance within the tree, and will be used by renderers to set the HTML element id. This gives a way to find various elements for scripting. If the id is not given, a default will be generated by the framework.
- Specified by:
getIdin interfaceLifecycleElement- Returns:
- A unique ID for this lifecycle element.
-
setId
Setter for the unique id (within a given tree) for the component- Specified by:
setIdin interfaceLifecycleElement- Parameters:
id- - string to set as the component id
-
getContainerIdSuffix
A string suffix that should get applied to the id for all child components of the given element.This is mainly used within the framework to keep ids unique. For instance, for components generated for collection lines, all the components within those should get a line suffix. The framework will set this property to be '_line0', '_line1', etc. Then when the apply model phase is run on the child components their ids will be updated with this suffix.
- Specified by:
getContainerIdSuffixin interfaceLifecycleElement- Returns:
- String id suffix for child components
- See Also:
-
setContainerIdSuffix
- Specified by:
setContainerIdSuffixin interfaceLifecycleElement- See Also:
-
getViewPath
Gets a property for referring to this component from the view, relative to the view, as assigned by the current or most recent lifecycle.- Specified by:
getViewPathin interfaceLifecycleElement- Returns:
- property path
-
setViewPath
Setter forLifecycleElement.getViewPath().- Specified by:
setViewPathin interfaceLifecycleElement- Parameters:
viewPath- The property path.
-
getPhasePathMapping
Map of paths for this component that will be used to process a refresh (if necessary).- Specified by:
getPhasePathMappingin interfaceLifecycleElement- Returns:
- map of refresh paths, key represents the lifecycle phase and the value is the path for the component at that phase
-
setPhasePathMapping
- Specified by:
setPhasePathMappingin interfaceLifecycleElement- See Also:
-
getTemplate
The path to the JSP file that should be called to render the componentThe path should be relative to the web root. An attribute will be available to the component to use under the name given by the method
getComponentTypeName. Based on the component type, additional attributes could be available for use. See the component documentation for more information on such attributes.e.g. '/krad/WEB-INF/jsp/tiles/component.jsp'
- Specified by:
getTemplatein interfaceComponent- Returns:
- String representing the template path
-
setTemplate
Setter for the components template- Specified by:
setTemplatein interfaceComponent- Parameters:
template-
-
getAdditionalTemplates
Gets additional templates that will be required during the rendering of this component.If a parent or sibling component is referred to by this component's template, include that component's template here to ensure that it has been compiled already during bottom-up inline rendering.
- Specified by:
getAdditionalTemplatesin interfaceComponent- Returns:
- additional templates required during rendering
-
getTemplateName
The name for which the template can be invoked byWhether the template name is needed depends on the underlying rendering engine being used. In the example of Freemarker, the template points to the actual source file, which then loads a macro. From then on the macro is simply invoked to execute the template
e.g. 'uif_text'
- Specified by:
getTemplateNamein interfaceComponent- Returns:
- template name
-
setTemplateName
Setter for the name of the template (a name which can be used to invoke)- Specified by:
setTemplateNamein interfaceComponent- Parameters:
templateName-
-
getTitle
The component titleDepending on the component can be used in various ways. For example with a Container component the title is used to set the header text. For components like controls other other components that render an HTML element it is used to set the HTML title attribute.
-
setTitle
Setter for the component's title -
isHidden
public boolean isHidden()Indicates whether the component should be hidden in the UIHow the hidden data is maintained depends on the views persistence mode. If the mode is request, the corresponding data will be rendered to the UI but not visible. If the mode is session, the data will not be rendered to the UI but maintained server side.
For a
Containercomponent, the hidden setting will apply to all contained components (making a section hidden makes all fields within the section hidden) -
setHidden
public void setHidden(boolean hidden) Setter for the hidden indicator -
getReadOnly
Indicates whether the component can be editedWhen readOnly the controls and widgets of
Fieldcomponents will not be rendered. If the Field has an underlying value it will be displayed readOnly to the user.For a
Containercomponent, the readOnly setting will apply to all contained components (making a section readOnly makes all fields within the section readOnly).- Specified by:
getReadOnlyin interfaceComponent- Returns:
- boolean true if the component should be readOnly, false if is allows editing
-
setReadOnly
Setter for the read only indicator- Specified by:
setReadOnlyin interfaceComponent- Parameters:
readOnly-
-
getCanCopyOnReadOnly
Indicates whether the component should be cleared on copyBy default this property is false. ReadOnly components are cleared on a copy operation. If set this prevents the component from being cleared.
- Specified by:
getCanCopyOnReadOnlyin interfaceComponent- Returns:
-
setCanCopyOnReadOnly
Setter for the canCopyOnReadOnly indicator- Specified by:
setCanCopyOnReadOnlyin interfaceComponent- Parameters:
canCopyOnReadOnly-
-
getRequired
Indicates whether the component is requiredAt the general component level required means there is some action the user needs to take within the component. For example, within a section it might mean the fields within the section should be completed. At a field level, it means the field should be completed. This provides the ability for the renderers to indicate the required action.
- Specified by:
getRequiredin interfaceComponent- Returns:
- boolean true if the component is required, false if it is not required
-
setRequired
Setter for the required indicator- Specified by:
setRequiredin interfaceComponent- Parameters:
required-
-
isRender
public boolean isRender()Indicates whether the component should be rendered in the UIIf set to false, the corresponding component template will not be invoked (therefore nothing will be rendered to the UI).
- Specified by:
isRenderin interfaceLifecycleElement- Returns:
- boolean true if the component should be rendered, false if it should not be
-
setRender
public void setRender(boolean render) Setter for the components render indicator- Specified by:
setRenderin interfaceLifecycleElement- Parameters:
render-
-
isRetrieveViaAjax
public boolean isRetrieveViaAjax()When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsThis flag does not imply any automation, there must be a js call invoked for the content to be retrieved by the server, but this does mark it with a placeholder component which KRAD js uses during these calls. This placeholder component is used for ajax retrievals. In particular, this flag is useful for use in combination with the showLightboxComponent js function which will automatically retrieve the real content of a component through ajax if a placeholder component is detected. This allows for the full content to only be retrieved when the lightbox is first opened. When this flag is set to true, the forceSessionPersistence flag is set to true AUTOMATICALLY because it is implied that this component will be retrieved by an ajax call in the future. This may also be useful for direct custom calls to retrieveComponent function, as well, which also relies on the placeholder being present.
- Specified by:
isRetrieveViaAjaxin interfaceComponent- Returns:
- true if this component is being rendered as a placeholder for use in replacement during and ajax call, false otherwise
-
setRetrieveViaAjax
public void setRetrieveViaAjax(boolean retrieveViaAjax) When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the js- Specified by:
setRetrieveViaAjaxin interfaceComponent- Parameters:
retrieveViaAjax-
-
getColSpan
public int getColSpan()Number of places the component should take up horizontally in the container; when using a CssGridLayoutManager this is converted to the appropriate medium size.All components belong to a
TODO: this should not be on component interface since it only applies if the layout manager supports it, need some sort of layoutOptions map for field level options that depend on the managerContainerand are placed using aLayoutManager. This property specifies how many places horizontally the component should take up within the container. This is only applicable for table based layout managers. Default is 1- Specified by:
getColSpanin interfaceComponent- Returns:
- int number of columns to span
-
setColSpan
public void setColSpan(int colSpan) Setter for the components column span- Specified by:
setColSpanin interfaceComponent- Parameters:
colSpan-
-
getRowSpan
public int getRowSpan()Number of places the component should take up vertically in the containerAll components belong to a
TODO: this should not be on component interface since it only applies if the layout manager supports it, need some sort of layoutOptions map for field level options that depend on the managerContainerand are placed using aLayoutManager. This property specifies how many places vertically the component should take up within the container. This is only applicable for table based layout managers. Default is 1- Specified by:
getRowSpanin interfaceComponent- Returns:
- int number of rows to span
-
setRowSpan
public void setRowSpan(int rowSpan) Setter for the component row span- Specified by:
setRowSpanin interfaceComponent- Parameters:
rowSpan-
-
getWrapperCssClasses
The cellCssClasses property defines the classes that will be placed on the corresponding td (or th) elements relating to this component when used in a table backed layout. This property has no effect on other layouts.- Specified by:
getWrapperCssClassesin interfaceComponent- Returns:
- the css classes to apply to the wrapping td (or th) element for this component
-
setWrapperCssClasses
Set the cellCssClasses property which defines the classes that will be placed on the corresponding td (or th) relating to this component when used in a table backed layout. This property has no effect on other layouts.- Specified by:
setWrapperCssClassesin interfaceComponent- Parameters:
wrapperCssClasses-
-
addWrapperCssClass
Add a cell css class to the cell classes list- Specified by:
addWrapperCssClassin interfaceComponent- Parameters:
cssClass- the name of the class to add
-
getWrapperCssClassesAsString
Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter.- Returns:
- class attribute string
-
getWrapperStyle
CSS style string to be applied to the cell containing the component (only applies within table based layouts)e.g. 'align: right;'
- Specified by:
getWrapperStylein interfaceComponent- Returns:
- String css style string
-
setWrapperStyle
Setter for the cell style attribute- Specified by:
setWrapperStylein interfaceComponent- Parameters:
wrapperStyle-
-
getCellWidth
Width setting for the cell containing the component (only applies within table based layouts)- Specified by:
getCellWidthin interfaceComponent- Returns:
- String width ('25%', '155px')
-
setCellWidth
Setter for the containing cell width- Specified by:
setCellWidthin interfaceComponent- Parameters:
cellWidth-
-
getCssGridSizes
CssGridSizes represent the size (width) the content's div "cell" will take up in the "row" at each screen size (extra small, small, medium, large) when using a group backed by a CssGridLayoutManager.This object is NOT used by other layouts. For specifics of how css grids work, refer to the krad guide and bootstrap css grid documentation.
- Specified by:
getCssGridSizesin interfaceComponent- Returns:
-
setCssGridSizes
- Specified by:
setCssGridSizesin interfaceComponent- See Also:
-
getAlign
Horizontal alignment of the component within its containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies how the component should be aligned horizontally within the container. During the finalize phase the CSS text-align style will be created for the align setting. -
setAlign
Sets the components horizontal alignment -
getValign
Vertical alignment of the component within its containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies how the component should be aligned vertically within the container. During the finalize phase the CSS vertical-align style will be created for the valign setting. -
setValign
Setter for the component's vertical align -
getWidth
Width the component should take up in the containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies a width the component should take up in the Container. This is not applicable for all layout managers. During the finalize phase the CSS width style will be created for the width setting.e.g. '30%', '55px'
-
setWidth
Setter for the components width -
getStyle
CSS style string to be applied to the componentAny style override or additions can be specified with this attribute. This is used by the renderer to set the style attribute on the corresponding element.
e.g. 'color: #000000;text-decoration: underline;'
-
setStyle
Setter for the components style -
getLibraryCssClasses
Additional css classes that come before css classes listed in the cssClasses propertyThese are used by the framework for styling with a library (for example, bootstrap), and should normally not be overridden.
- Specified by:
getLibraryCssClassesin interfaceComponent- Returns:
- the library cssClasses
-
setLibraryCssClasses
Set the libraryCssClasses- Specified by:
setLibraryCssClassesin interfaceComponent
-
getCssClasses
CSS style class(s) to be applied to the componentDeclares style classes for the component. Multiple classes are specified with a space delimiter. This is used by the renderer to set the class attribute on the corresponding element. The class(s) declared must be available in the common style sheets or the style sheets specified for the view
- Specified by:
getCssClassesin interfaceComponent- Returns:
- List<String> css style classes to appear on the 'class' attribute
-
setCssClasses
Setter for the components style classes- Specified by:
setCssClassesin interfaceComponent
-
getAdditionalCssClasses
Convenience property for adding css class names to the end of the list of cssClasses that may already exist on this Component (this is to avoid explicitly having to set list merge in the bean definition)- Specified by:
getAdditionalCssClassesin interfaceComponent- Returns:
- the additionalCssClasses
-
setAdditionalCssClasses
Set the additionalCssClasses- Specified by:
setAdditionalCssClassesin interfaceComponent- Parameters:
additionalCssClasses-
-
getStyleClassesAsString
Builds the HTML class attribute string by combining the styleClasses list with a space delimiter- Specified by:
getStyleClassesAsStringin interfaceComponent- Returns:
- class attribute string
-
addStyleClass
Adds a single style to the list of styles on this component- Specified by:
addStyleClassin interfaceComponent- Parameters:
styleClass-
-
appendToStyle
Appends to the inline style set on a component- Specified by:
appendToStylein interfaceComponent- Parameters:
styleRules-
-
getFinalizeMethodToCall
The name of the method that should be invoked for finalizing the component configuration (full method name, without parameters or return type)Note the method can also be set with the finalizeMethodInvoker targetMethod property. If the method is on the configured
ViewHelperService, only this property needs to be configuredThe model backing the view will be passed as the first argument method and then the
Componentinstance as the second argument. If any additional method arguments are declared with the finalizeMethodAdditionalArguments, they will then be passed in the order declared in the listIf the component is selfRendered, the finalize method can return a string which will be set as the component's renderOutput. The selfRendered indicator will also be set to true on the component.
- Specified by:
getFinalizeMethodToCallin interfaceComponent- Returns:
- String method name
-
setFinalizeMethodToCall
Setter for the finalize method -
getFinalizeMethodAdditionalArguments
The List of Object instances that should be passed as arguments to the finalize methodThese arguments are passed to the finalize method after the standard model and component arguments. They are passed in the order declared in the list
- Specified by:
getFinalizeMethodAdditionalArgumentsin interfaceComponent- Returns:
- List<Object> additional method arguments
-
setFinalizeMethodAdditionalArguments
Setter for the finalize additional arguments list -
getFinalizeMethodInvoker
MethodInvokerConfiginstance for the method that should be invoked for finalizing the component configurationMethodInvoker can be configured to specify the class or object the method should be called on. For static method invocations, the targetClass property can be configured. For object invocations, that targetObject property can be configured
If the component is selfRendered, the finalize method can return a string which will be set as the component's renderOutput. The selfRendered indicator will also be set to true on the component.
- Specified by:
getFinalizeMethodInvokerin interfaceComponent- Returns:
- MethodInvokerConfig instance
-
setFinalizeMethodInvoker
Setter for the method invoker instance -
isSelfRendered
public boolean isSelfRendered()Indicates whether the component contains its own render output (through the renderOutput property)If self rendered is true, the corresponding template for the component will not be invoked and the renderOutput String will be written to the response as is.
- Specified by:
isSelfRenderedin interfaceComponent- Returns:
- boolean true if component is self rendered, false if not (renders through template)
-
setSelfRendered
public void setSelfRendered(boolean selfRendered) Setter for the self render indicator- Specified by:
setSelfRenderedin interfaceComponent- Parameters:
selfRendered-
-
getRenderedHtmlOutput
Rendering output for the component that will be sent as part of the response (can contain static text and HTML)- Specified by:
getRenderedHtmlOutputin interfaceComponent- Returns:
- String render output
-
setRenderedHtmlOutput
Setter for the component's render output- Specified by:
setRenderedHtmlOutputin interfaceComponent- Parameters:
renderedHtmlOutput-
-
isDisableSessionPersistence
public boolean isDisableSessionPersistence()Disables the storage of the component in session (when the framework determines it needs to be due to a refresh condition)When the framework determines there is a condition on the component that requires it to keep around between posts, it will store the component instance in session. This flag can be set to disable this behavior (which would require custom application logic to support behavior such as refresh)
- Specified by:
isDisableSessionPersistencein interfaceComponent- Returns:
- boolean true if the component should not be stored in session, false if session storage is allowed
-
setDisableSessionPersistence
public void setDisableSessionPersistence(boolean disableSessionPersistence) Setter for disabling storage of the component in session- Specified by:
setDisableSessionPersistencein interfaceComponent- Parameters:
disableSessionPersistence-
-
isForceSessionPersistence
public boolean isForceSessionPersistence()Indicates whether the component should be stored with the session view regardless of configurationBy default the framework nulls out any components that do not have a refresh condition or are needed for collection processing. This can be a problem if custom application code is written to refresh a component without setting the corresponding component flag. In this case this property can be set to true to force the framework to keep the component in session. Defaults to false
- Specified by:
isForceSessionPersistencein interfaceComponent- Returns:
- boolean true if the component should be stored in session, false if not
-
setForceSessionPersistence
public void setForceSessionPersistence(boolean forceSessionPersistence) Setter for the indicator to force persistence of the component in session- Specified by:
setForceSessionPersistencein interfaceComponent- Parameters:
forceSessionPersistence-
-
getComponentSecurity
Security object that indicates what authorization (permissions) exist for the component- Specified by:
getComponentSecurityin interfaceComponent- Returns:
- ComponentSecurity instance
-
setComponentSecurity
Setter for the components security object- Specified by:
setComponentSecurityin interfaceComponent- Parameters:
componentSecurity-
-
initializeComponentSecurity
protected void initializeComponentSecurity()Initializes (if necessary) the component security instance for the component type -
isEditAuthz
- See Also:
-
setEditAuthz
Setter forisEditAuthz()- Parameters:
editAuthz- property value
-
isViewAuthz
- See Also:
-
setViewAuthz
Setter forisViewAuthz()- Parameters:
viewAuthz- property value
-
getComponentModifiers
ComponentModifierinstances that should be invoked to initialize the componentThese provide dynamic initialization behavior for the component and are configured through the components definition. Each initializer will get invoked by the initialize method.
- Specified by:
getComponentModifiersin interfaceComponent- Returns:
- List of component modifiers
- See Also:
-
setComponentModifiers
Setter for the components List ofComponentModifierinstances- Specified by:
setComponentModifiersin interfaceComponent- Parameters:
componentModifiers-
-
getContext
Context map for the componentAny el statements configured for the components properties (e.g. title="@{foo.property}") are evaluated using the el context map. This map will get populated with default objects like the model, view, and request from the
ViewHelperService. Other components can push further objects into the context so that they are available for use with that component. For example,Fieldinstances that are part of a collection line as receive the current line instanceContext map also provides objects to methods that are invoked for
GeneratedFieldinstancesThe Map key gives the name of the variable that can be used within expressions, and the Map value gives the object instance for which expressions containing the variable should evaluate against
NOTE: Calling getContext().putAll() will skip updating any configured property replacers for the component. Instead you should call #pushAllToContextDeep
- Specified by:
getContextin interfaceComponent- Specified by:
getContextin interfaceLifecycleElement- Returns:
- Mapinvalid input: '<'String, Object> context
-
setContext
Setter for the context Map- Specified by:
setContextin interfaceComponent- Specified by:
setContextin interfaceLifecycleElement- Parameters:
context-- See Also:
-
pushObjectToContext
Places the given object into the context Map for the component with the given nameNote this also will push context to property replacers configured on the component. To place multiple objects in the context, you should use #pushAllToContextDeep since that will call this method for each and update property replacers. Using
Component.getContext().putAll()will bypass property replacers.- Specified by:
pushObjectToContextin interfaceLifecycleElement- Parameters:
objectName- - name the object should be exposed under in the context mapobject- - object instance to place into context
-
pushToPropertyReplacerContext
-
pushAllToContext
Places each entry of the given Map into the context for the componentNote this will call #pushObjectToContextDeep for each entry which will update any configured property replacers as well. This should be used in place of getContext().putAll()
- Specified by:
pushAllToContextin interfaceLifecycleElement- Parameters:
objects- - Mapinvalid input: '<'String, Object> objects to add to context, where the entry key will be the context key and the entry value will be the context value
-
getPropertyReplacers
gets a list ofPropertyReplacerinstancesThey will be evaluated during the view lifecycle to conditionally set properties on the
Componentbased on expression evaluations- Specified by:
getPropertyReplacersin interfaceComponent- Returns:
- List<PropertyReplacer> replacers to evaluate
-
setPropertyReplacers
Setter for the components property substitutions- Specified by:
setPropertyReplacersin interfaceComponent
-
getOrder
public int getOrder()Order of a component within a List of other componentsLower numbers are placed higher up in the list, while higher numbers are placed lower in the list
-
setOrder
public void setOrder(int order) Setter for the component's order -
getToolTip
The Tooltip widget that renders a tooltip with additional information about the element on specified trigger event- Specified by:
getToolTipin interfaceComponent- Returns:
- Tooltip
-
setToolTip
Setter for the component tooltip widget instance- Specified by:
setToolTipin interfaceComponent- Parameters:
toolTip-
-
getEventHandlerScript
String containing JavaScript code for registering event handlers for this component (blur, focus, click, etc.)- Specified by:
getEventHandlerScriptin interfaceComponent- Returns:
- JS event handler script
-
getOnLoadScript
Script that should be executed when the component's onLoad event is fired- Specified by:
getOnLoadScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnLoadScript
Description copied from interface:ScriptEventSupportScript that should be executed when the component's onLoad event is fired- Specified by:
setOnLoadScriptin interfaceScriptEventSupport- Parameters:
onLoadScript- JavaScript code- See Also:
-
getOnDocumentReadyScript
Script to be run when the document ready event is triggered- Specified by:
getOnDocumentReadyScriptin interfaceScriptEventSupport- Returns:
- the onDocumentReadyScript
-
setOnDocumentReadyScript
Description copied from interface:ScriptEventSupportSetter for the components onDocumentReady script- Specified by:
setOnDocumentReadyScriptin interfaceScriptEventSupport- Parameters:
onDocumentReadyScript-- See Also:
-
getOnUnloadScript
Script that should be executed when the component's onUnload event is fired- Specified by:
getOnUnloadScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnUnloadScript
Description copied from interface:ScriptEventSupportSetter for the components onUnload script- Specified by:
setOnUnloadScriptin interfaceScriptEventSupport- Parameters:
onUnloadScript-- See Also:
-
getOnCloseScript
Script that should be executed when the component's onClose event is fired- Specified by:
getOnCloseScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnCloseScript
Description copied from interface:ScriptEventSupportSetter for the components onClose script- Specified by:
setOnCloseScriptin interfaceScriptEventSupport- Parameters:
onCloseScript-- See Also:
-
getOnBlurScript
Script that should be executed when the component's onBlur event is fired- Specified by:
getOnBlurScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnBlurScript
Description copied from interface:ScriptEventSupportScript that should be executed when the component's onBlur event is fired- Specified by:
setOnBlurScriptin interfaceScriptEventSupport- Parameters:
onBlurScript- JavaScript code- See Also:
-
getOnChangeScript
Script that should be executed when the component's onChange event is fired- Specified by:
getOnChangeScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnChangeScript
Description copied from interface:ScriptEventSupportSetter for the components onChange script- Specified by:
setOnChangeScriptin interfaceScriptEventSupport- Parameters:
onChangeScript-- See Also:
-
getOnClickScript
Script that should be executed when the component's onClick event is fired- Specified by:
getOnClickScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnClickScript
Description copied from interface:ScriptEventSupportSetter for the components onClick script- Specified by:
setOnClickScriptin interfaceScriptEventSupport- Parameters:
onClickScript-- See Also:
-
getOnDblClickScript
Script that should be executed when the component's onDblClick event is fired- Specified by:
getOnDblClickScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnDblClickScript
Description copied from interface:ScriptEventSupportSetter for the components onDblClick script- Specified by:
setOnDblClickScriptin interfaceScriptEventSupport- Parameters:
onDblClickScript-- See Also:
-
getOnFocusScript
Script that should be executed when the component's onFocus event is fired- Specified by:
getOnFocusScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnFocusScript
Description copied from interface:ScriptEventSupportSetter for the components onFocus script- Specified by:
setOnFocusScriptin interfaceScriptEventSupport- Parameters:
onFocusScript-- See Also:
-
getOnSubmitScript
Script that should be executed when the component's onSubmit event is fired- Specified by:
getOnSubmitScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnSubmitScript
Description copied from interface:ScriptEventSupportSetter for the components onSubmit script- Specified by:
setOnSubmitScriptin interfaceScriptEventSupport- Parameters:
onSubmitScript-- See Also:
-
getOnInputScript
Script that should be executed when the component's onInput event is firedThis differs from key press/up or change in that it will catch autocomplete, cut, and paste mouse actions on an input.
- Specified by:
getOnInputScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnInputScript
Description copied from interface:ScriptEventSupportSetter for the components onInput script- Specified by:
setOnInputScriptin interfaceScriptEventSupport- Parameters:
onInputScript-- See Also:
-
getOnKeyPressScript
Script that should be executed when the component's onKeyPress event is fired- Specified by:
getOnKeyPressScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnKeyPressScript
Description copied from interface:ScriptEventSupportSetter for the components onKeyPress script- Specified by:
setOnKeyPressScriptin interfaceScriptEventSupport- Parameters:
onKeyPressScript-- See Also:
-
getOnKeyUpScript
Script that should be executed when the component's onKeyUp event is fired- Specified by:
getOnKeyUpScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnKeyUpScript
Description copied from interface:ScriptEventSupportSetter for the components onKeyUp script- Specified by:
setOnKeyUpScriptin interfaceScriptEventSupport- Parameters:
onKeyUpScript-- See Also:
-
getOnKeyDownScript
Script that should be executed when the component's onKeyDown event is fired- Specified by:
getOnKeyDownScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnKeyDownScript
Description copied from interface:ScriptEventSupportSetter for the components onKeyDown script- Specified by:
setOnKeyDownScriptin interfaceScriptEventSupport- Parameters:
onKeyDownScript-- See Also:
-
getOnMouseOverScript
Script that should be executed when the component's onMouseOver event is fired- Specified by:
getOnMouseOverScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnMouseOverScript
Description copied from interface:ScriptEventSupportSetter for the components onMouseOver script- Specified by:
setOnMouseOverScriptin interfaceScriptEventSupport- Parameters:
onMouseOverScript-- See Also:
-
getOnMouseOutScript
Script that should be executed when the component's onMouseOut event is fired- Specified by:
getOnMouseOutScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnMouseOutScript
Description copied from interface:ScriptEventSupportSetter for the components onMouseOut script- Specified by:
setOnMouseOutScriptin interfaceScriptEventSupport- Parameters:
onMouseOutScript-- See Also:
-
getOnMouseUpScript
Script that should be executed when the component's onMouseUp event is fired- Specified by:
getOnMouseUpScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnMouseUpScript
Description copied from interface:ScriptEventSupportSetter for the components onMouseUp script- Specified by:
setOnMouseUpScriptin interfaceScriptEventSupport- Parameters:
onMouseUpScript-- See Also:
-
getOnMouseDownScript
Script that should be executed when the component's onMouseDown event is fired- Specified by:
getOnMouseDownScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnMouseDownScript
Description copied from interface:ScriptEventSupportSetter for the components onMouseDown script- Specified by:
setOnMouseDownScriptin interfaceScriptEventSupport- Parameters:
onMouseDownScript-- See Also:
-
getOnMouseMoveScript
Script that should be executed when the component's onMouseMove event is fired- Specified by:
getOnMouseMoveScriptin interfaceScriptEventSupport- Returns:
- String JavaScript code
-
setOnMouseMoveScript
Description copied from interface:ScriptEventSupportSetter for the components onMouseMove script- Specified by:
setOnMouseMoveScriptin interfaceScriptEventSupport- Parameters:
onMouseMoveScript-- See Also:
-
getTemplateOptions
The options that are passed through to the Component rendererThe Map key is the option name, with the Map value as the option value. See documentation on the particular widget render for available options.
- Specified by:
getTemplateOptionsin interfaceComponent- Returns:
- Mapinvalid input: '<'String, String> options
-
setTemplateOptions
Setter for the template's options- Specified by:
setTemplateOptionsin interfaceComponent- Parameters:
templateOptions-
-
getTemplateOptionsJSString
Builds a string from the underlyingMapof template options that will export that options as a JavaScript Map for use in js and jQuery pluginsSee documentation on the particular component render for available options.
- Specified by:
getTemplateOptionsJSStringin interfaceComponent- Returns:
- String options
-
setTemplateOptionsJSString
Setter for the template's options- Specified by:
setTemplateOptionsJSStringin interfaceComponent- Parameters:
templateOptionsJSString-
-
getProgressiveRender
When set if the condition is satisfied, the component will be displayed. The component MUST BE a container or field type. progressiveRender is defined in a limited Spring EL syntax. Only valid form property names, and, or, logical comparison operators (non-arithmetic), #listContains, #emptyList, matches clause are allowed. String and regex values must use single quotes ('), booleans must be either true or false, numbers must be a valid double, either negative or positive.DO NOT use progressiveRender and a conditional refresh statement on the same component unless it is known that the component will always be visible in all cases when a conditional refresh happens (ie conditional refresh has progressiveRender's condition anded with its own condition).
If a component should be refreshed every time it is shown, use the progressiveRenderAndRefresh option with this property instead.
- Specified by:
getProgressiveRenderin interfaceComponent- Returns:
- progressiveRender expression
-
setProgressiveRender
Description copied from interface:ComponentSetter for progressiveRender Spring EL expression- Specified by:
setProgressiveRenderin interfaceComponent- Parameters:
progressiveRender- the progressiveRender to set.
-
getConditionalRefresh
When set if the condition is satisfied, the component will be refreshed.The component MUST BE a container or field type. conditionalRefresh is defined in a limited Spring EL syntax. Only valid form property names, and, or, logical comparison operators (non-arithmetic), #listContains, #emptyList, and the matches clause are allowed. String and regex values must use single quotes ('), booleans must be either true or false, numbers must be a valid double either negative or positive.
DO NOT use progressiveRender and conditionalRefresh on the same component unless it is known that the component will always be visible in all cases when a conditionalRefresh happens (ie conditionalRefresh has progressiveRender's condition anded with its own condition). If a component should be refreshed every time it is shown, use the progressiveRenderAndRefresh option with this property instead.
- Specified by:
getConditionalRefreshin interfaceComponent- Returns:
- the conditionalRefresh
-
setConditionalRefresh
Set the conditional refresh condition- Specified by:
setConditionalRefreshin interfaceComponent- Parameters:
conditionalRefresh- the conditionalRefresh to set
-
getProgressiveDisclosureControlNames
Control names used to control progressive disclosure, set internally cannot be set.- Specified by:
getProgressiveDisclosureControlNamesin interfaceComponent- Returns:
- the progressiveDisclosureControlNames
-
getProgressiveDisclosureConditionJs
The condition to show this component progressively converted to a js expression, set internally cannot be set.- Specified by:
getProgressiveDisclosureConditionJsin interfaceComponent- Returns:
- the progressiveDisclosureConditionJs
-
getConditionalRefreshConditionJs
The condition to refresh this component converted to a js expression, set internally cannot be set.- Specified by:
getConditionalRefreshConditionJsin interfaceComponent- Returns:
- the conditionalRefreshConditionJs
-
getConditionalRefreshControlNames
Control names used to control conditional refresh, set internally cannot be set.- Specified by:
getConditionalRefreshControlNamesin interfaceComponent- Returns:
- the conditionalRefreshControlNames
-
isProgressiveRenderViaAJAX
public boolean isProgressiveRenderViaAJAX()When progressiveRenderViaAJAX is true, this component will be retrieved from the server when it first satisfies its progressive render condition.After the first retrieval, it is hidden/shown in the html by the js when its progressive condition result changes. By default, this is false, so components with progressive render capabilities will always be already within the client html and toggled to be hidden or visible.
- Specified by:
isProgressiveRenderViaAJAXin interfaceComponent- Returns:
- the progressiveRenderViaAJAX
-
setProgressiveRenderViaAJAX
public void setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX) Description copied from interface:ComponentSetter for the progressiveRenderViaAJAX flag- Specified by:
setProgressiveRenderViaAJAXin interfaceComponent- Parameters:
progressiveRenderViaAJAX- the progressiveRenderViaAJAX to set.
-
isProgressiveRenderAndRefresh
public boolean isProgressiveRenderAndRefresh()If true, when the progressiveRender condition is satisfied, the component will always be retrieved from the server and shown(as opposed to being stored on the client, but hidden, after the first retrieval as is the case with the progressiveRenderViaAJAX option).By default, this is false, so components with progressive render capabilities will always be already within the client html and toggled to be hidden or visible.
- Specified by:
isProgressiveRenderAndRefreshin interfaceComponent- Returns:
- the progressiveRenderAndRefresh
-
setProgressiveRenderAndRefresh
public void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh) Set the progressive render and refresh option.- Specified by:
setProgressiveRenderAndRefreshin interfaceComponent- Parameters:
progressiveRenderAndRefresh- the progressiveRenderAndRefresh to set.
-
getRefreshWhenChangedPropertyNames
Specifies a property by name that when its value changes will automatically perform a refresh on this componentThis can be a comma separated list of multiple properties that require this component to be refreshed when any of them change.
DO NOT use with progressiveRender unless it is know that progressiveRender condition will always be satisfied before one of these fields can be changed.- Specified by:
getRefreshWhenChangedPropertyNamesin interfaceComponent- Returns:
- List property names that should trigger a refresh when their values change
-
setRefreshWhenChangedPropertyNames
Setter for the list of property names that trigger a refresh- Specified by:
setRefreshWhenChangedPropertyNamesin interfaceComponent- Parameters:
refreshWhenChangedPropertyNames-
-
getAdditionalComponentsToRefresh
Returns a list of componentIds which will be also be refreshed when this component is refreshedThis will be a comma separated list of componentIds that need to be refreshed when a refresh condition has been set on this component.
- Specified by:
getAdditionalComponentsToRefreshin interfaceComponent- Returns:
- List<String>
-
setAdditionalComponentsToRefresh
Setter for alsoRefreshComponents- Specified by:
setAdditionalComponentsToRefreshin interfaceComponent
-
getAdditionalComponentsToRefreshJs
Returns a string for representing the list of additional components to be refreshed as a JavaScript value- Specified by:
getAdditionalComponentsToRefreshJsin interfaceComponent- Returns:
- String representation of the list of componentIds for the components that need to be refreshed
-
isRefreshedByAction
public boolean isRefreshedByAction()Indicates the component can be refreshed by an actionThis is set by the framework for configured ajax action buttons, should not be set in configuration
- Specified by:
isRefreshedByActionin interfaceComponent- Returns:
- boolean true if the component is refreshed by an action, false if not
-
setRefreshedByAction
public void setRefreshedByAction(boolean refreshedByAction) Setter for the refreshed by action indicatorThis is set by the framework for configured ajax action buttons, should not be set in configuration
- Specified by:
setRefreshedByActionin interfaceComponent- Parameters:
refreshedByAction-
-
isDisclosedByAction
public boolean isDisclosedByAction()If true if this component is disclosed by an action in js, a placeholder will be put in this components place if render is also false.- Specified by:
isDisclosedByActionin interfaceComponent- Returns:
- true if this component is disclosed by an action
-
setDisclosedByAction
public void setDisclosedByAction(boolean disclosedByAction) Set if this component is disclosed by some outside action- Specified by:
setDisclosedByActionin interfaceComponent- Parameters:
disclosedByAction-
-
getRefreshTimer
public int getRefreshTimer()Time in seconds that the component will be automatically refreshedThis will invoke the refresh process just like the conditionalRefresh and refreshWhenChangedPropertyNames. When using this property methodToCallOnRefresh and id should also be specified
- Specified by:
getRefreshTimerin interfaceComponent- Returns:
- refreshTimer
-
setRefreshTimer
public void setRefreshTimer(int refreshTimer) Setter for refreshTimer- Specified by:
setRefreshTimerin interfaceComponent- Parameters:
refreshTimer-
-
isResetDataOnRefresh
public boolean isResetDataOnRefresh()Indicates whether data contained within the component should be reset (set to default) when the component is refreshed- Specified by:
isResetDataOnRefreshin interfaceComponent- Returns:
- boolean true if data should be refreshed, false if data should remain as is
-
setResetDataOnRefresh
public void setResetDataOnRefresh(boolean resetDataOnRefresh) Setter for the reset data on refresh indicator- Specified by:
setResetDataOnRefreshin interfaceComponent- Parameters:
resetDataOnRefresh-
-
getMethodToCallOnRefresh
Name of a method on the controller that should be invoked as part of the component refresh and disclosure processDuring the component refresh or disclosure process it might be necessary to perform other operations, such as preparing data or executing a business process. This allows the configuration of a method on the underlying controller that should be called for the component refresh action. In this method, the necessary logic can be performed and then the base component update method invoked to carry out the component refresh.
Controller method to invoke must accept the form, binding result, request, and response arguments
- Specified by:
getMethodToCallOnRefreshin interfaceComponent- Returns:
- valid controller method name
-
setMethodToCallOnRefresh
Setter for the controller method to call for a refresh or disclosure action on this component -
getFieldsToSendOnRefresh
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 input data 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.)
- Specified by:
getFieldsToSendOnRefreshin interfaceComponent- Returns:
- the only input fields to send by name with the action request
-
setFieldsToSendOnRefresh
- Specified by:
setFieldsToSendOnRefreshin interfaceComponent- See Also:
-
isSkipInTabOrder
public boolean isSkipInTabOrder()Flag indicating that this component and its nested components must be skipped when keyboard tabbing.- Returns:
- the skipInTabOrder flag
-
setSkipInTabOrder
public void setSkipInTabOrder(boolean skipInTabOrder) - See Also:
-
getDataAttributes
The DataAttributes that will be written to the html element for this component as data-They can be access through .data() call in jQuery.
- Specified by:
getDataAttributesin interfaceComponent- Returns:
- map of data attributes, where key is data attribute name and the map value is the data attribute value
-
setDataAttributes
Setter for data attributes to include for the component- Specified by:
setDataAttributesin interfaceComponent- Parameters:
dataAttributes-
-
getScriptDataAttributes
The DataAttributes that will be written to the html as a script call to data for this component (these cannot be used for jQuery selection directly)They can be accessed through .data() call in jQuery.
- Specified by:
getScriptDataAttributesin interfaceComponent- Returns:
- map of data attributes, where key is data attribute name and the map value is the data attribute value
-
setScriptDataAttributes
Setter for script data attributes to include for the component- Specified by:
setScriptDataAttributesin interfaceComponent- Parameters:
scriptDataAttributes-
-
addDataAttribute
Add a data attribute to the dataAttributes map- Specified by:
addDataAttributein interfaceComponent- Parameters:
key-value-
-
addScriptDataAttribute
Add a script data attribute to the scriptDataAttributes map- Specified by:
addScriptDataAttributein interfaceComponent- Parameters:
key-value-
-
getSimpleDataAttributes
The string that can be put into a the tag of a component to add data attributes inline- Specified by:
getSimpleDataAttributesin interfaceComponent- Returns:
- html string for data attributes as html formatted element attributes
-
getScriptDataAttributesJs
Description copied from interface:ComponentReturns a js string that can be used to right js data attributes to for the component- Specified by:
getScriptDataAttributesJsin interfaceComponent- Returns:
- html string for the js required to add the script data attributes
-
getRole
The role attribute of this component, use to define aria roles -
setRole
-
getAriaAttributes
The aria attributes of this component and their values (without "aria-", this is automatically appended during rendering)- Specified by:
getAriaAttributesin interfaceComponent- Returns:
- the aria attributes of this component
-
setAriaAttributes
- Specified by:
setAriaAttributesin interfaceComponent- See Also:
-
addAriaAttribute
Add an aria attribute to the ariaAttributes list- Specified by:
addAriaAttributein interfaceComponent- Parameters:
key- the attribute (no "aria-" prefix)value- the attribute's value
-
getAriaAttributesAsString
Get the aria attributes as a String that can be used during template output- Specified by:
getAriaAttributesAsStringin interfaceComponent- Returns:
- the aria attributes as a string
-
getPreRenderContent
Raw html or string content to render before this component renders- Specified by:
getPreRenderContentin interfaceComponent- Returns:
- the preRenderContent string
-
setPreRenderContent
Set the preRenderContent- Specified by:
setPreRenderContentin interfaceComponent- Parameters:
preRenderContent-
-
getPostRenderContent
Raw html or string content to render after this component renders- Specified by:
getPostRenderContentin interfaceComponent- Returns:
- the postRenderContent string
-
setPostRenderContent
Set the postRenderContent- Specified by:
setPostRenderContentin interfaceComponent- Parameters:
postRenderContent-
-
getExcludeIf
Names a model property path, which if set and resolves to true, indicates that this component should be excluded from the lifecycle at the initialize phase.If prefixed with the '#' character, this path will be relative to the view's "pre-model" context rather than the model.
This property is superseded by
Component.getExcludeUnless(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.- Specified by:
getExcludeIfin interfaceComponent- Returns:
- model property path
- See Also:
-
setExcludeIf
- See Also:
-
getExcludeUnless
Names a model property path, which if set and resolves to null or false, indicates that this component should be excluded from the lifecycle at the initialize phase.If prefixed with the '#' character, this path will be relative to the view's "pre-model" context rather than the model.
This property supersedes
Component.getExcludeIf(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.- Specified by:
getExcludeUnlessin interfaceComponent- Returns:
- model property path
- See Also:
-
setExcludeUnless
- See Also:
-
clone
OverrideObject.clone()to assign the public modifier.- Specified by:
clonein interfaceCopyable- Overrides:
clonein classDictionaryBeanBase- Returns:
Object.clone()- Throws:
CloneNotSupportedException- IfCloneableis not implemented. This should not be possible when using this interface.- See Also:
-
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- Parameters:
tracer- Record of component's location
-
isOmitFromFormPost
public boolean isOmitFromFormPost()Description copied from interface:ComponentWhether to omit fields from form post unless they are explicitly specified by theAction.fieldsToSendproperty.- Specified by:
isOmitFromFormPostin interfaceComponent- Returns:
- whether fields will be omitted from form post
- See Also:
-
setOmitFromFormPost
public void setOmitFromFormPost(boolean omitFromFormPost) - Specified by:
setOmitFromFormPostin interfaceComponent- See Also:
-