public abstract class ComponentBase extends UifDictionaryBeanBase implements Component
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.
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
templateOptions |
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
ComponentBase() |
Modifier and Type | Method and Description |
---|---|
void |
addAriaAttribute(String key,
String value)
Add an aria attribute to the ariaAttributes list
|
void |
addDataAttribute(String key,
String value)
Add a data attribute to the dataAttributes map
|
void |
addScriptDataAttribute(String key,
String value)
Add a script data attribute to the scriptDataAttributes map
|
void |
addStyleClass(String styleClass)
Adds a single style to the list of styles on this component
|
void |
addWrapperCssClass(String cssClass)
Add a cell css class to the cell classes list
|
void |
afterEvaluateExpression()
No-op implementation.
|
void |
appendToStyle(String styleRules)
Appends to the inline style set on a component
|
void |
checkMutable(boolean legalDuringInitialization)
Check for mutability on the element before modifying state.
|
ComponentBase |
clone()
Override
Object.clone() to assign the public modifier. |
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors
found in the component.
|
List<String> |
getAdditionalComponentsToRefresh()
Returns a list of componentIds which will be also be refreshed when this component is refreshed
|
String |
getAdditionalComponentsToRefreshJs()
Returns a string for representing the list of additional components to be refreshed as
a JavaScript value
|
List<String> |
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)
|
List<String> |
getAdditionalTemplates()
Gets additional templates that will be required during the rendering of this component.
|
String |
getAlign()
Horizontal alignment of the component within its container
|
Map<String,String> |
getAriaAttributes()
The aria attributes of this component and their values
(without "aria-", this is automatically appended during rendering)
|
String |
getAriaAttributesAsString()
Get the aria attributes as a String that can be used during template output
|
Boolean |
getCanCopyOnReadOnly()
Indicates whether the component should be cleared on copy
|
String |
getCellWidth()
Width setting for the cell containing the component (only applies within table based
layouts)
|
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.
|
List<ComponentModifier> |
getComponentModifiers()
ComponentModifier instances that should be invoked to
initialize the component |
ComponentSecurity |
getComponentSecurity()
Security object that indicates what authorization (permissions) exist for the component
|
String |
getConditionalRefresh()
When set if the condition is satisfied, the component will be refreshed.
|
String |
getConditionalRefreshConditionJs()
The condition to refresh this component converted to a js expression, set internally cannot
be set.
|
List<String> |
getConditionalRefreshControlNames()
Control names used to control conditional refresh, set internally cannot be set.
|
String |
getContainerIdSuffix()
A string suffix that should get applied to the id for all child components of the given element.
|
Map<String,Object> |
getContext()
Context map for the component
|
List<String> |
getCssClasses()
CSS style class(s) to be applied to the component
|
CssGridSizes |
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.
|
Map<String,String> |
getDataAttributes()
The DataAttributes that will be written to the html element for this component as data-
|
String |
getEventHandlerScript()
String containing JavaScript code for registering event handlers for this component
(blur, focus, click, etc.)
|
String |
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.
|
String |
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.
|
List<String> |
getFieldsToSendOnRefresh()
Limits the field data to send on a refresh methodToCall server call to the names/group id/field id
specified in this list.
|
List<Object> |
getFinalizeMethodAdditionalArguments()
The List of Object instances that should be passed as arguments to the finalize method
|
MethodInvokerConfig |
getFinalizeMethodInvoker()
MethodInvokerConfig instance for the method that should be invoked
for finalizing the component configuration |
String |
getFinalizeMethodToCall()
The name of the method that should be invoked for finalizing the component
configuration (full method name, without parameters or return type)
|
String |
getId()
The unique id (within a given tree) for the element.
|
List<String> |
getLibraryCssClasses()
Additional css classes that come before css classes listed in the cssClasses property
|
String |
getMethodToCallOnRefresh()
Name of a method on the controller that should be invoked as part of the component refresh
and disclosure process
|
String |
getOnBlurScript()
Script that should be executed when the component's onBlur event is fired
|
String |
getOnChangeScript()
Script that should be executed when the component's onChange event is
fired
|
String |
getOnClickScript()
Script that should be executed when the component's onClick event is
fired
|
String |
getOnCloseScript()
Script that should be executed when the component's onClose event is
fired
|
String |
getOnDblClickScript()
Script that should be executed when the component's onDblClick event is
fired
|
String |
getOnDocumentReadyScript()
Script to be run when the document ready event is triggered
|
String |
getOnFocusScript()
Script that should be executed when the component's onFocus event is
fired
|
String |
getOnInputScript()
Script that should be executed when the component's onInput event is
fired
|
String |
getOnKeyDownScript()
Script that should be executed when the component's onKeyDown event is
fired
|
String |
getOnKeyPressScript()
Script that should be executed when the component's onKeyPress event is
fired
|
String |
getOnKeyUpScript()
Script that should be executed when the component's onKeyUp event is
fired
|
String |
getOnLoadScript()
Script that should be executed when the component's onLoad event is fired
|
String |
getOnMouseDownScript()
Script that should be executed when the component's onMouseDown event is
fired
|
String |
getOnMouseMoveScript()
Script that should be executed when the component's onMouseMove event is
fired
|
String |
getOnMouseOutScript()
Script that should be executed when the component's onMouseOut event is
fired
|
String |
getOnMouseOverScript()
Script that should be executed when the component's onMouseOver event is
fired
|
String |
getOnMouseUpScript()
Script that should be executed when the component's onMouseUp event is
fired
|
String |
getOnSubmitScript()
Script that should be executed when the component's onSubmit event is
fired
|
String |
getOnUnloadScript()
Script that should be executed when the component's onUnload event is
fired
|
int |
getOrder()
Order of a component within a List of other components
|
Map<String,String> |
getPhasePathMapping()
Map of paths for this component that will be used to process a refresh (if necessary).
|
String |
getPostRenderContent()
Raw html or string content to render after this component renders
|
String |
getPreRenderContent()
Raw html or string content to render before this component renders
|
String |
getProgressiveDisclosureConditionJs()
The condition to show this component progressively converted to a js expression, set
internally cannot be set.
|
List<String> |
getProgressiveDisclosureControlNames()
Control names used to control progressive disclosure, set internally cannot be set.
|
String |
getProgressiveRender()
When set if the condition is satisfied, the component will be displayed.
|
List<Component> |
getPropertyReplacerComponents()
Returns list of components that are being held in property replacers configured for this
component
|
List<PropertyReplacer> |
getPropertyReplacers()
gets a list of
PropertyReplacer instances |
Boolean |
getReadOnly()
Indicates whether the component can be edited
|
int |
getRefreshTimer()
Time in seconds that the component will be automatically refreshed
|
List<String> |
getRefreshWhenChangedPropertyNames()
Specifies a property by name that when its value changes will automatically perform
a refresh on this component
|
String |
getRenderedHtmlOutput()
Rendering output for the component that will be sent as part of the
response (can contain static text and HTML)
|
Boolean |
getRequired()
Indicates whether the component is required
|
String |
getRole()
The role attribute of this component, use to define aria roles
|
int |
getRowSpan()
Number of places the component should take up vertically in the container
|
Map<String,String> |
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)
|
String |
getScriptDataAttributesJs()
Returns a js string that can be used to right js data attributes to for the component
|
String |
getSimpleDataAttributes()
The string that can be put into a the tag of a component to add data attributes inline
|
String |
getStyle()
CSS style string to be applied to the component
|
String |
getStyleClassesAsString()
Builds the HTML class attribute string by combining the styleClasses list with a space
delimiter
|
String |
getTemplate()
The path to the JSP file that should be called to render the component
|
String |
getTemplateName()
The name for which the template can be invoked by
|
Map<String,String> |
getTemplateOptions()
The options that are passed through to the Component renderer
|
String |
getTemplateOptionsJSString()
Builds a string from the underlying
Map of template options that will export that options as a
JavaScript Map for use in js and jQuery plugins |
String |
getTitle()
The component title
|
Tooltip |
getToolTip()
The Tooltip widget that renders a tooltip with additional information about the element on
specified trigger event
|
String |
getValign()
Vertical alignment of the component within its container
|
String |
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.
|
String |
getViewStatus()
Indicates what lifecycle phase the component instance is in
|
String |
getWidth()
Width the component should take up in the container
|
List<String> |
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.
|
String |
getWrapperCssClassesAsString()
Builds the HTML class attribute string by combining the cellStyleClasses list with a space
delimiter.
|
String |
getWrapperStyle()
CSS style string to be applied to the cell containing the component (only applies within
table based layouts)
|
protected void |
initializeComponentSecurity()
Initializes (if necessary) the component security instance for the component type
|
boolean |
isDisableSessionPersistence()
Disables the storage of the component in session (when the framework determines it needs to be due to a
refresh condition)
|
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.
|
Boolean |
isEditAuthz() |
boolean |
isFinal()
Indicates whether the component has been updated from the model and final updates made.
|
boolean |
isForceSessionPersistence()
Indicates whether the component should be stored with the session view regardless of configuration
|
boolean |
isHidden()
Indicates whether the component should be hidden in the UI
|
boolean |
isInitialized()
Indicates whether the component has been initialized.
|
boolean |
isModelApplied()
Indicates whether the component has been updated from the model.
|
boolean |
isMutable(boolean legalDuringInitialization)
Determine if this lifecycle element is mutable.
|
boolean |
isOmitFromFormPost()
Whether to omit fields from form post unless they are explicitly specified by the
Action.fieldsToSend property. |
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).
|
boolean |
isProgressiveRenderViaAJAX()
When progressiveRenderViaAJAX is true, this component will be retrieved from the server when
it first satisfies its progressive render condition.
|
boolean |
isRefreshedByAction()
Indicates the component can be refreshed by an action
|
boolean |
isRender()
Indicates whether the component should be rendered in the UI
|
boolean |
isRendered()
Indicates whether the component has been fully rendered.
|
boolean |
isResetDataOnRefresh()
Indicates whether data contained within the component should be reset (set to default) when the
component is refreshed
|
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 js
|
boolean |
isSelfRendered()
Indicates whether the component contains its own render output (through
the renderOutput property)
|
boolean |
isSkipInTabOrder()
Flag indicating that this component and its nested components must be skipped when keyboard
tabbing.
|
Boolean |
isViewAuthz() |
void |
notifyCompleted(ViewLifecyclePhase phase)
Receive notification that a lifecycle phase, and all successor phases, have been completed on
this component.
|
void |
performApplyModel(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 data
|
void |
performFinalize(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 rendered
|
void |
performInitialization(Object model)
The following updates are done here:
Invoke performInitialize on component modifiers
Initializes the component
|
void |
pushAllToContext(Map<String,Object> objects)
Places each entry of the given Map into the context for the component
|
void |
pushObjectToContext(String objectName,
Object object)
Places the given object into the context Map for the component with the given name
|
protected void |
pushToPropertyReplacerContext(String objectName,
Object object) |
void |
setAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh)
Setter for alsoRefreshComponents
|
void |
setAdditionalCssClasses(List<String> additionalCssClasses)
Set the additionalCssClasses
|
void |
setAlign(String align)
Sets the components horizontal alignment
|
void |
setAriaAttributes(Map<String,String> ariaAttributes) |
void |
setCanCopyOnReadOnly(Boolean canCopyOnReadOnly)
Setter for the canCopyOnReadOnly indicator
|
void |
setCellWidth(String cellWidth)
Setter for the containing cell width
|
void |
setColSpan(int colSpan)
Setter for the components column span
|
void |
setComponentModifiers(List<ComponentModifier> componentModifiers)
Setter for the components List of
ComponentModifier
instances |
void |
setComponentSecurity(ComponentSecurity componentSecurity)
Setter for the components security object
|
void |
setConditionalRefresh(String conditionalRefresh)
Set the conditional refresh condition
|
void |
setContainerIdSuffix(String containerIdSuffix) |
void |
setContext(Map<String,Object> context)
Setter for the context Map
|
void |
setCssClasses(List<String> cssClasses)
Setter for the components style classes
|
void |
setCssGridSizes(CssGridSizes cssGridSizes) |
void |
setDataAttributes(Map<String,String> dataAttributes)
Setter for data attributes to include for the component
|
void |
setDisableSessionPersistence(boolean disableSessionPersistence)
Setter for disabling storage of the component in session
|
void |
setDisclosedByAction(boolean disclosedByAction)
Set if this component is disclosed by some outside action
|
void |
setEditAuthz(Boolean editAuthz)
Setter for
isEditAuthz() |
void |
setExcludeIf(String excludeIf) |
void |
setExcludeUnless(String excludeUnless) |
void |
setFieldsToSendOnRefresh(List<String> fieldsToSendOnRefresh) |
void |
setFinalizeMethodAdditionalArguments(List<Object> finalizeMethodAdditionalArguments)
Setter for the finalize additional arguments list
|
void |
setFinalizeMethodInvoker(MethodInvokerConfig finalizeMethodInvoker)
Setter for the method invoker instance
|
void |
setFinalizeMethodToCall(String finalizeMethodToCall)
Setter for the finalize method
|
void |
setForceSessionPersistence(boolean forceSessionPersistence)
Setter for the indicator to force persistence of the component in session
|
void |
setHidden(boolean hidden)
Setter for the hidden indicator
|
void |
setId(String id)
Setter for the unique id (within a given tree) for the component
|
void |
setLibraryCssClasses(List<String> libraryCssClasses)
Set the libraryCssClasses
|
void |
setMethodToCallOnRefresh(String methodToCallOnRefresh)
Setter for the controller method to call for a refresh or disclosure action on this component
|
void |
setOmitFromFormPost(boolean omitFromFormPost) |
void |
setOnBlurScript(String onBlurScript)
Script that should be executed when the component's onBlur event is fired
|
void |
setOnChangeScript(String onChangeScript)
Setter for the components onChange script
|
void |
setOnClickScript(String onClickScript)
Setter for the components onClick script
|
void |
setOnCloseScript(String onCloseScript)
Setter for the components onClose script
|
void |
setOnDblClickScript(String onDblClickScript)
Setter for the components onDblClick script
|
void |
setOnDocumentReadyScript(String onDocumentReadyScript)
Setter for the components onDocumentReady script
|
void |
setOnFocusScript(String onFocusScript)
Setter for the components onFocus script
|
void |
setOnInputScript(String onInputScript)
Setter for the components onInput script
|
void |
setOnKeyDownScript(String onKeyDownScript)
Setter for the components onKeyDown script
|
void |
setOnKeyPressScript(String onKeyPressScript)
Setter for the components onKeyPress script
|
void |
setOnKeyUpScript(String onKeyUpScript)
Setter for the components onKeyUp script
|
void |
setOnLoadScript(String onLoadScript)
Script that should be executed when the component's onLoad event is fired
|
void |
setOnMouseDownScript(String onMouseDownScript)
Setter for the components onMouseDown script
|
void |
setOnMouseMoveScript(String onMouseMoveScript)
Setter for the components onMouseMove script
|
void |
setOnMouseOutScript(String onMouseOutScript)
Setter for the components onMouseOut script
|
void |
setOnMouseOverScript(String onMouseOverScript)
Setter for the components onMouseOver script
|
void |
setOnMouseUpScript(String onMouseUpScript)
Setter for the components onMouseUp script
|
void |
setOnSubmitScript(String onSubmitScript)
Setter for the components onSubmit script
|
void |
setOnUnloadScript(String onUnloadScript)
Setter for the components onUnload script
|
void |
setOrder(int order)
Setter for the component's order
|
void |
setPhasePathMapping(Map<String,String> phasePathMapping) |
void |
setPostRenderContent(String postRenderContent)
Set the postRenderContent
|
void |
setPreRenderContent(String preRenderContent)
Set the preRenderContent
|
void |
setProgressiveRender(String progressiveRender)
Setter for progressiveRender Spring EL expression
|
void |
setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh)
Set the progressive render and refresh option.
|
void |
setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX)
Setter for the progressiveRenderViaAJAX flag
|
void |
setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
Setter for the components property substitutions
|
void |
setReadOnly(Boolean readOnly)
Setter for the read only indicator
|
void |
setRefreshedByAction(boolean refreshedByAction)
Setter for the refreshed by action indicator
|
void |
setRefreshTimer(int refreshTimer)
Setter for refreshTimer
|
void |
setRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames)
Setter for the list of property names that trigger a refresh
|
void |
setRender(boolean render)
Setter for the components render indicator
|
void |
setRenderedHtmlOutput(String renderedHtmlOutput)
Setter for the component's render output
|
void |
setRequired(Boolean required)
Setter for the required indicator
|
void |
setResetDataOnRefresh(boolean resetDataOnRefresh)
Setter for the reset data on refresh indicator
|
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
|
void |
setRole(String role) |
void |
setRowSpan(int rowSpan)
Setter for the component row span
|
void |
setScriptDataAttributes(Map<String,String> scriptDataAttributes)
Setter for script data attributes to include for the component
|
void |
setSelfRendered(boolean selfRendered)
Setter for the self render indicator
|
void |
setSkipInTabOrder(boolean skipInTabOrder) |
void |
setStyle(String style)
Setter for the components style
|
void |
setTemplate(String template)
Setter for the components template
|
void |
setTemplateName(String templateName)
Setter for the name of the template (a name which can be used to invoke)
|
void |
setTemplateOptions(Map<String,String> templateOptions)
Setter for the template's options
|
void |
setTemplateOptionsJSString(String templateOptionsJSString)
Setter for the template's options
|
void |
setTitle(String title)
Setter for the component's title
|
void |
setToolTip(Tooltip toolTip)
Setter for the component tooltip widget instance
|
void |
setValign(String valign)
Setter for the component's vertical align
|
void |
setViewAuthz(Boolean viewAuthz)
Setter for
isViewAuthz() |
void |
setViewPath(String viewPath)
Setter for
LifecycleElement.getViewPath() . |
void |
setViewStatus(String status)
Setter for the view status
|
void |
setWidth(String width)
Setter for the components width
|
void |
setWrapperCssClasses(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.
|
void |
setWrapperStyle(String wrapperStyle)
Setter for the cell style attribute
|
boolean |
skipLifecycle()
Return true if the lifecycle should be skipped for this component.
|
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentTypeName
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
protected Map<String,String> templateOptions
public ComponentBase()
public boolean skipLifecycle()
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).
skipLifecycle
in interface LifecycleElement
public void checkMutable(boolean legalDuringInitialization)
LifecycleElement
checkMutable
in interface LifecycleElement
legalDuringInitialization
- True if the operation is legal during view initialization,
false if the operation is only allowed during the component lifecycle.LifecycleElement.checkMutable(boolean)
public boolean isMutable(boolean legalDuringInitialization)
LifecycleElement
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.
isMutable
in interface LifecycleElement
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.LifecycleElement.isMutable(boolean)
public String getViewStatus()
The 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
getViewStatus
in interface LifecycleElement
UifConstants.ViewStatus
public void setViewStatus(String status)
setViewStatus
in interface Component
setViewStatus
in interface LifecycleElement
status
- view statusLifecycleElement.getViewStatus()
public void notifyCompleted(ViewLifecyclePhase phase)
notifyCompleted
in interface LifecycleElement
phase
- The completed view lifecycle phasepublic boolean isInitialized()
isInitialized
in interface LifecycleElement
public boolean isModelApplied()
isModelApplied
in interface LifecycleElement
public boolean isFinal()
isFinal
in interface LifecycleElement
public boolean isRendered()
isRendered
in interface Component
public void performInitialization(Object model)
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.
performInitialization
in interface LifecycleElement
model
- - object instance containing the view dataComponentDefaultInitializeTask
public void performApplyModel(Object model, LifecycleElement parent)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel
in interface LifecycleElement
model
- - Top level object containing the data (could be the form or a
top level business object, dto)parent
- parent lifecycle elementpublic void afterEvaluateExpression()
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.
afterEvaluateExpression
in interface Component
public void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
model
- - top level object containing the dataparent
- - parent component@ViewLifecycleRestriction public List<Component> getPropertyReplacerComponents()
getPropertyReplacerComponents
in interface Component
public String getId()
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.
getId
in interface LifecycleElement
public void setId(String id)
setId
in interface LifecycleElement
id
- - string to set as the component idpublic String getContainerIdSuffix()
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.
getContainerIdSuffix
in interface LifecycleElement
SuffixIdFromContainerTask
public void setContainerIdSuffix(String containerIdSuffix)
setContainerIdSuffix
in interface LifecycleElement
LifecycleElement.getContainerIdSuffix()
public String getViewPath()
getViewPath
in interface LifecycleElement
public void setViewPath(String viewPath)
LifecycleElement.getViewPath()
.setViewPath
in interface LifecycleElement
viewPath
- The property path.public Map<String,String> getPhasePathMapping()
getPhasePathMapping
in interface LifecycleElement
public void setPhasePathMapping(Map<String,String> phasePathMapping)
setPhasePathMapping
in interface LifecycleElement
LifecycleElement.getPhasePathMapping()
public String getTemplate()
The 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'
getTemplate
in interface Component
public void setTemplate(String template)
setTemplate
in interface Component
public List<String> getAdditionalTemplates()
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.
getAdditionalTemplates
in interface Component
public String getTemplateName()
Whether 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'
getTemplateName
in interface Component
public void setTemplateName(String templateName)
setTemplateName
in interface Component
public String getTitle()
Depending 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.
public boolean isHidden()
How 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 Container
component, the hidden setting will apply to
all contained components (making a section hidden makes all fields within
the section hidden)
public void setHidden(boolean hidden)
public Boolean getReadOnly()
When readOnly the controls and widgets of Field
components
will not be rendered. If the Field has an underlying value it will be
displayed readOnly to the user.
For a Container
component, the readOnly setting will apply
to all contained components (making a section readOnly makes all fields
within the section readOnly).
getReadOnly
in interface Component
public void setReadOnly(Boolean readOnly)
setReadOnly
in interface Component
public Boolean getCanCopyOnReadOnly()
By default this property is false. ReadOnly components are cleared on a copy operation. If set this prevents the component from being cleared.
getCanCopyOnReadOnly
in interface Component
public void setCanCopyOnReadOnly(Boolean canCopyOnReadOnly)
setCanCopyOnReadOnly
in interface Component
public Boolean getRequired()
At 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.
getRequired
in interface Component
public void setRequired(Boolean required)
setRequired
in interface Component
public boolean isRender()
If set to false, the corresponding component template will not be invoked (therefore nothing will be rendered to the UI).
isRender
in interface LifecycleElement
public void setRender(boolean render)
setRender
in interface LifecycleElement
public boolean isRetrieveViaAjax()
This 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.
isRetrieveViaAjax
in interface Component
public void setRetrieveViaAjax(boolean retrieveViaAjax)
setRetrieveViaAjax
in interface Component
public int getColSpan()
All components belong to a Container
and are placed using a
LayoutManager
. 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
getColSpan
in interface Component
public void setColSpan(int colSpan)
setColSpan
in interface Component
public int getRowSpan()
All components belong to a Container
and are placed using a
LayoutManager
. 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
getRowSpan
in interface Component
public void setRowSpan(int rowSpan)
setRowSpan
in interface Component
public List<String> getWrapperCssClasses()
getWrapperCssClasses
in interface Component
public void setWrapperCssClasses(List<String> wrapperCssClasses)
setWrapperCssClasses
in interface Component
public void addWrapperCssClass(String cssClass)
addWrapperCssClass
in interface Component
cssClass
- the name of the class to addpublic String getWrapperCssClassesAsString()
public String getWrapperStyle()
e.g. 'align: right;'
getWrapperStyle
in interface Component
public void setWrapperStyle(String wrapperStyle)
setWrapperStyle
in interface Component
public String getCellWidth()
getCellWidth
in interface Component
public void setCellWidth(String cellWidth)
setCellWidth
in interface Component
public CssGridSizes getCssGridSizes()
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.
getCssGridSizes
in interface Component
public void setCssGridSizes(CssGridSizes cssGridSizes)
setCssGridSizes
in interface Component
Component.getCssGridSizes()
public String getAlign()
All components belong to a Container
and are placed using a
LayoutManager
. 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.
getAlign
in interface Component
CssConstants.TextAligns
public String getValign()
All components belong to a Container
and are placed using a
LayoutManager
. 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.
getValign
in interface Component
CssConstants.VerticalAligns
public String getWidth()
All components belong to a Container
and are placed using a
LayoutManager
. 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'
public String getStyle()
Any 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;'
public List<String> getLibraryCssClasses()
These are used by the framework for styling with a library (for example, bootstrap), and should normally not be overridden.
getLibraryCssClasses
in interface Component
public void setLibraryCssClasses(List<String> libraryCssClasses)
setLibraryCssClasses
in interface Component
public List<String> getCssClasses()
Declares 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
getCssClasses
in interface Component
public void setCssClasses(List<String> cssClasses)
setCssClasses
in interface Component
public List<String> getAdditionalCssClasses()
getAdditionalCssClasses
in interface Component
public void setAdditionalCssClasses(List<String> additionalCssClasses)
setAdditionalCssClasses
in interface Component
public String getStyleClassesAsString()
getStyleClassesAsString
in interface Component
public void addStyleClass(String styleClass)
addStyleClass
in interface Component
public void appendToStyle(String styleRules)
appendToStyle
in interface Component
public String getFinalizeMethodToCall()
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 configured
The model backing the view will be passed as the first argument method and then
the Component
instance 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 list
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.
getFinalizeMethodToCall
in interface Component
public void setFinalizeMethodToCall(String finalizeMethodToCall)
public List<Object> getFinalizeMethodAdditionalArguments()
These arguments are passed to the finalize method after the standard model and component arguments. They are passed in the order declared in the list
getFinalizeMethodAdditionalArguments
in interface Component
public void setFinalizeMethodAdditionalArguments(List<Object> finalizeMethodAdditionalArguments)
public MethodInvokerConfig getFinalizeMethodInvoker()
MethodInvokerConfig
instance for the method that should be invoked
for finalizing the component configuration
MethodInvoker 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.
getFinalizeMethodInvoker
in interface Component
public void setFinalizeMethodInvoker(MethodInvokerConfig finalizeMethodInvoker)
public boolean isSelfRendered()
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.
isSelfRendered
in interface Component
public void setSelfRendered(boolean selfRendered)
setSelfRendered
in interface Component
public String getRenderedHtmlOutput()
getRenderedHtmlOutput
in interface Component
public void setRenderedHtmlOutput(String renderedHtmlOutput)
setRenderedHtmlOutput
in interface Component
public boolean isDisableSessionPersistence()
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)
isDisableSessionPersistence
in interface Component
public void setDisableSessionPersistence(boolean disableSessionPersistence)
setDisableSessionPersistence
in interface Component
public boolean isForceSessionPersistence()
By 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
isForceSessionPersistence
in interface Component
public void setForceSessionPersistence(boolean forceSessionPersistence)
setForceSessionPersistence
in interface Component
public ComponentSecurity getComponentSecurity()
getComponentSecurity
in interface Component
public void setComponentSecurity(ComponentSecurity componentSecurity)
setComponentSecurity
in interface Component
protected void initializeComponentSecurity()
public Boolean isEditAuthz()
ComponentSecurity.isEditAuthz()
public void setEditAuthz(Boolean editAuthz)
isEditAuthz()
editAuthz
- property valuepublic Boolean isViewAuthz()
ComponentSecurity.isViewAuthz()
public void setViewAuthz(Boolean viewAuthz)
isViewAuthz()
viewAuthz
- property valuepublic List<ComponentModifier> getComponentModifiers()
ComponentModifier
instances that should be invoked to
initialize the component
These provide dynamic initialization behavior for the component and are configured through the components definition. Each initializer will get invoked by the initialize method.
getComponentModifiers
in interface Component
RunComponentModifiersTask
public void setComponentModifiers(List<ComponentModifier> componentModifiers)
ComponentModifier
instancessetComponentModifiers
in interface Component
public Map<String,Object> getContext()
Any 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, Field
instances that are part
of a collection line as receive the current line instance
Context map also provides objects to methods that are invoked for
GeneratedField
instances
The 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
getContext
in interface Component
getContext
in interface LifecycleElement
public void setContext(Map<String,Object> context)
setContext
in interface Component
setContext
in interface LifecycleElement
LifecycleElement.getContext()
public void pushObjectToContext(String objectName, Object object)
Note 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.
pushObjectToContext
in interface LifecycleElement
objectName
- - name the object should be exposed under in the context mapobject
- - object instance to place into contextprotected void pushToPropertyReplacerContext(String objectName, Object object)
public void pushAllToContext(Map<String,Object> objects)
Note 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()
pushAllToContext
in interface LifecycleElement
objects
- - Mappublic List<PropertyReplacer> getPropertyReplacers()
PropertyReplacer
instances
They will be evaluated
during the view lifecycle to conditionally set properties on the
Component
based on expression evaluations
getPropertyReplacers
in interface Component
public void setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
setPropertyReplacers
in interface Component
public int getOrder()
Lower numbers are placed higher up in the list, while higher numbers are placed lower in the list
public void setOrder(int order)
public Tooltip getToolTip()
getToolTip
in interface Component
public void setToolTip(Tooltip toolTip)
setToolTip
in interface Component
public String getEventHandlerScript()
getEventHandlerScript
in interface Component
public String getOnLoadScript()
getOnLoadScript
in interface ScriptEventSupport
public void setOnLoadScript(String onLoadScript)
ScriptEventSupport
setOnLoadScript
in interface ScriptEventSupport
onLoadScript
- JavaScript codeScriptEventSupport.setOnLoadScript(java.lang.String)
public String getOnDocumentReadyScript()
getOnDocumentReadyScript
in interface ScriptEventSupport
public void setOnDocumentReadyScript(String onDocumentReadyScript)
ScriptEventSupport
setOnDocumentReadyScript
in interface ScriptEventSupport
ScriptEventSupport.setOnDocumentReadyScript(java.lang.String)
public String getOnUnloadScript()
getOnUnloadScript
in interface ScriptEventSupport
public void setOnUnloadScript(String onUnloadScript)
ScriptEventSupport
setOnUnloadScript
in interface ScriptEventSupport
ScriptEventSupport.setOnUnloadScript(java.lang.String)
public String getOnCloseScript()
getOnCloseScript
in interface ScriptEventSupport
public void setOnCloseScript(String onCloseScript)
ScriptEventSupport
setOnCloseScript
in interface ScriptEventSupport
ScriptEventSupport.setOnCloseScript(java.lang.String)
public String getOnBlurScript()
getOnBlurScript
in interface ScriptEventSupport
public void setOnBlurScript(String onBlurScript)
ScriptEventSupport
setOnBlurScript
in interface ScriptEventSupport
onBlurScript
- JavaScript codeScriptEventSupport.setOnBlurScript(java.lang.String)
public String getOnChangeScript()
getOnChangeScript
in interface ScriptEventSupport
public void setOnChangeScript(String onChangeScript)
ScriptEventSupport
setOnChangeScript
in interface ScriptEventSupport
ScriptEventSupport.setOnChangeScript(java.lang.String)
public String getOnClickScript()
getOnClickScript
in interface ScriptEventSupport
public void setOnClickScript(String onClickScript)
ScriptEventSupport
setOnClickScript
in interface ScriptEventSupport
ScriptEventSupport.setOnClickScript(java.lang.String)
public String getOnDblClickScript()
getOnDblClickScript
in interface ScriptEventSupport
public void setOnDblClickScript(String onDblClickScript)
ScriptEventSupport
setOnDblClickScript
in interface ScriptEventSupport
ScriptEventSupport.setOnDblClickScript(java.lang.String)
public String getOnFocusScript()
getOnFocusScript
in interface ScriptEventSupport
public void setOnFocusScript(String onFocusScript)
ScriptEventSupport
setOnFocusScript
in interface ScriptEventSupport
ScriptEventSupport.setOnFocusScript(java.lang.String)
public String getOnSubmitScript()
getOnSubmitScript
in interface ScriptEventSupport
public void setOnSubmitScript(String onSubmitScript)
ScriptEventSupport
setOnSubmitScript
in interface ScriptEventSupport
ScriptEventSupport.setOnSubmitScript(java.lang.String)
public String getOnInputScript()
This differs from key press/up or change in that it will catch autocomplete, cut, and paste mouse actions on an input.
getOnInputScript
in interface ScriptEventSupport
public void setOnInputScript(String onInputScript)
ScriptEventSupport
setOnInputScript
in interface ScriptEventSupport
ScriptEventSupport.setOnInputScript(java.lang.String)
public String getOnKeyPressScript()
getOnKeyPressScript
in interface ScriptEventSupport
public void setOnKeyPressScript(String onKeyPressScript)
ScriptEventSupport
setOnKeyPressScript
in interface ScriptEventSupport
ScriptEventSupport.setOnKeyPressScript(java.lang.String)
public String getOnKeyUpScript()
getOnKeyUpScript
in interface ScriptEventSupport
public void setOnKeyUpScript(String onKeyUpScript)
ScriptEventSupport
setOnKeyUpScript
in interface ScriptEventSupport
ScriptEventSupport.setOnKeyUpScript(java.lang.String)
public String getOnKeyDownScript()
getOnKeyDownScript
in interface ScriptEventSupport
public void setOnKeyDownScript(String onKeyDownScript)
ScriptEventSupport
setOnKeyDownScript
in interface ScriptEventSupport
ScriptEventSupport.setOnKeyDownScript(java.lang.String)
public String getOnMouseOverScript()
getOnMouseOverScript
in interface ScriptEventSupport
public void setOnMouseOverScript(String onMouseOverScript)
ScriptEventSupport
setOnMouseOverScript
in interface ScriptEventSupport
ScriptEventSupport.setOnMouseOverScript(java.lang.String)
public String getOnMouseOutScript()
getOnMouseOutScript
in interface ScriptEventSupport
public void setOnMouseOutScript(String onMouseOutScript)
ScriptEventSupport
setOnMouseOutScript
in interface ScriptEventSupport
ScriptEventSupport.setOnMouseOutScript(java.lang.String)
public String getOnMouseUpScript()
getOnMouseUpScript
in interface ScriptEventSupport
public void setOnMouseUpScript(String onMouseUpScript)
ScriptEventSupport
setOnMouseUpScript
in interface ScriptEventSupport
ScriptEventSupport.setOnMouseUpScript(java.lang.String)
public String getOnMouseDownScript()
getOnMouseDownScript
in interface ScriptEventSupport
public void setOnMouseDownScript(String onMouseDownScript)
ScriptEventSupport
setOnMouseDownScript
in interface ScriptEventSupport
ScriptEventSupport.setOnMouseDownScript(java.lang.String)
public String getOnMouseMoveScript()
getOnMouseMoveScript
in interface ScriptEventSupport
public void setOnMouseMoveScript(String onMouseMoveScript)
ScriptEventSupport
setOnMouseMoveScript
in interface ScriptEventSupport
ScriptEventSupport.setOnMouseMoveScript(java.lang.String)
public Map<String,String> getTemplateOptions()
The Map key is the option name, with the Map value as the option value. See documentation on the particular widget render for available options.
getTemplateOptions
in interface Component
public void setTemplateOptions(Map<String,String> templateOptions)
setTemplateOptions
in interface Component
public String getTemplateOptionsJSString()
Map
of template options that will export that options as a
JavaScript Map for use in js and jQuery plugins
See documentation on the particular component render for available options.
getTemplateOptionsJSString
in interface Component
public void setTemplateOptionsJSString(String templateOptionsJSString)
setTemplateOptionsJSString
in interface Component
public String getProgressiveRender()
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.
getProgressiveRender
in interface Component
public void setProgressiveRender(String progressiveRender)
Component
setProgressiveRender
in interface Component
progressiveRender
- the progressiveRender to set.public String getConditionalRefresh()
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.
getConditionalRefresh
in interface Component
public void setConditionalRefresh(String conditionalRefresh)
setConditionalRefresh
in interface Component
conditionalRefresh
- the conditionalRefresh to setpublic List<String> getProgressiveDisclosureControlNames()
getProgressiveDisclosureControlNames
in interface Component
public String getProgressiveDisclosureConditionJs()
getProgressiveDisclosureConditionJs
in interface Component
public String getConditionalRefreshConditionJs()
getConditionalRefreshConditionJs
in interface Component
public List<String> getConditionalRefreshControlNames()
getConditionalRefreshControlNames
in interface Component
public boolean isProgressiveRenderViaAJAX()
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.
isProgressiveRenderViaAJAX
in interface Component
public void setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX)
Component
setProgressiveRenderViaAJAX
in interface Component
progressiveRenderViaAJAX
- the progressiveRenderViaAJAX to set.public boolean isProgressiveRenderAndRefresh()
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.
isProgressiveRenderAndRefresh
in interface Component
public void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh)
setProgressiveRenderAndRefresh
in interface Component
progressiveRenderAndRefresh
- the progressiveRenderAndRefresh to set.public List<String> getRefreshWhenChangedPropertyNames()
This 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.
getRefreshWhenChangedPropertyNames
in interface Component
public void setRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames)
setRefreshWhenChangedPropertyNames
in interface Component
public List<String> getAdditionalComponentsToRefresh()
This will be a comma separated list of componentIds that need to be refreshed when a refresh condition has been set on this component.
getAdditionalComponentsToRefresh
in interface Component
public void setAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh)
setAdditionalComponentsToRefresh
in interface Component
public String getAdditionalComponentsToRefreshJs()
getAdditionalComponentsToRefreshJs
in interface Component
public boolean isRefreshedByAction()
This is set by the framework for configured ajax action buttons, should not be set in configuration
isRefreshedByAction
in interface Component
public void setRefreshedByAction(boolean refreshedByAction)
This is set by the framework for configured ajax action buttons, should not be set in configuration
setRefreshedByAction
in interface Component
public boolean isDisclosedByAction()
isDisclosedByAction
in interface Component
public void setDisclosedByAction(boolean disclosedByAction)
setDisclosedByAction
in interface Component
public int getRefreshTimer()
This will invoke the refresh process just like the conditionalRefresh and refreshWhenChangedPropertyNames. When using this property methodToCallOnRefresh and id should also be specified
getRefreshTimer
in interface Component
public void setRefreshTimer(int refreshTimer)
setRefreshTimer
in interface Component
public boolean isResetDataOnRefresh()
isResetDataOnRefresh
in interface Component
public void setResetDataOnRefresh(boolean resetDataOnRefresh)
setResetDataOnRefresh
in interface Component
public String getMethodToCallOnRefresh()
During 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
getMethodToCallOnRefresh
in interface Component
public void setMethodToCallOnRefresh(String methodToCallOnRefresh)
public List<String> getFieldsToSendOnRefresh()
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.)
getFieldsToSendOnRefresh
in interface Component
public void setFieldsToSendOnRefresh(List<String> fieldsToSendOnRefresh)
setFieldsToSendOnRefresh
in interface Component
Component.getFieldsToSendOnRefresh()
public boolean isSkipInTabOrder()
public void setSkipInTabOrder(boolean skipInTabOrder)
isSkipInTabOrder()
public Map<String,String> getDataAttributes()
They can be access through .data() call in jQuery.
getDataAttributes
in interface Component
public void setDataAttributes(Map<String,String> dataAttributes)
setDataAttributes
in interface Component
public Map<String,String> getScriptDataAttributes()
They can be accessed through .data() call in jQuery.
getScriptDataAttributes
in interface Component
public void setScriptDataAttributes(Map<String,String> scriptDataAttributes)
setScriptDataAttributes
in interface Component
public void addDataAttribute(String key, String value)
addDataAttribute
in interface Component
public void addScriptDataAttribute(String key, String value)
addScriptDataAttribute
in interface Component
public String getSimpleDataAttributes()
getSimpleDataAttributes
in interface Component
public String getScriptDataAttributesJs()
Component
getScriptDataAttributesJs
in interface Component
public void setRole(String role)
setRole
in interface Component
Component.getRole()
public Map<String,String> getAriaAttributes()
getAriaAttributes
in interface Component
public void setAriaAttributes(Map<String,String> ariaAttributes)
setAriaAttributes
in interface Component
Component.getAriaAttributes()
public void addAriaAttribute(String key, String value)
addAriaAttribute
in interface Component
key
- the attribute (no "aria-" prefix)value
- the attribute's valuepublic String getAriaAttributesAsString()
getAriaAttributesAsString
in interface Component
public String getPreRenderContent()
getPreRenderContent
in interface Component
public void setPreRenderContent(String preRenderContent)
setPreRenderContent
in interface Component
public String getPostRenderContent()
getPostRenderContent
in interface Component
public void setPostRenderContent(String postRenderContent)
setPostRenderContent
in interface Component
public String getExcludeIf()
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.
getExcludeIf
in interface Component
ViewLifecycleUtils.isExcluded(Component)
public void setExcludeIf(String excludeIf)
getExcludeIf()
public String getExcludeUnless()
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.
getExcludeUnless
in interface Component
ViewLifecycleUtils.isExcluded(Component)
public void setExcludeUnless(String excludeUnless)
getExcludeIf()
public ComponentBase clone() throws CloneNotSupportedException
Object.clone()
to assign the public modifier.clone
in interface Copyable
clone
in class DictionaryBeanBase
Object.clone()
CloneNotSupportedException
- If Cloneable
is not implemented. This should not
be possible when using this interface.Copyable.clone()
public void completeValidation(ValidationTrace tracer)
completeValidation
in interface Component
tracer
- Record of component's locationpublic boolean isOmitFromFormPost()
Component
Action.fieldsToSend
property.isOmitFromFormPost
in interface Component
org.kuali.rice.krad.uif.container.Field#isOmitFromFormPost()
public void setOmitFromFormPost(boolean omitFromFormPost)
setOmitFromFormPost
in interface Component
isOmitFromFormPost()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.