org.kuali.rice.krad.uif.component
Class ComponentBase

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, org.springframework.core.Ordered
Direct Known Subclasses:
ContainerBase, ContentElementBase, FieldBase, RemoteFieldsHolder, WidgetBase

public abstract class ComponentBase
extends UifDictionaryBeanBase
implements Component

Base implementation of Component which other component implementations should extend

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:
Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
ComponentBase()
           
 
Method Summary
 void addCellCssClass(String cssClass)
          Add a cell css class to the cell classes list
 void addDataAttribute(String key, String value)
          Add a data attribute to the dataAttributes map - to be written to the html/jQuery data.
 void addDataAttributeIfNonEmpty(String key, String value)
          Add a data attribute to the dataAttributes map if the given value is non null or the empty string
 void addStyleClass(String styleClass)
          Adds a single style to the list of styles on this component
 void appendToStyle(String styleRules)
          Appends to the inline style set on a component
 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
 String getAlign()
          Horizontal alignment of the component within its container
 String getAllDataAttributesJs()
          A JavaScript script that will add data to this component by the element which matches its id
 String getBaseId()
          Holds the id for the component that can be used to request new instances of that component from the ComponentFactory
 List<String> getCellCssClasses()
          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 getCellStyle()
          CSS style string to be applied to the cell containing the component (only applies within table based layouts)
 String getCellStyleClassesAsString()
          Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter
 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
 String getComplexDataAttributesJs()
          Returns js that will add data to this component by the element which matches its id.
 List<ComponentModifier> getComponentModifiers()
          ComponentModifier instances that should be invoked to initialize the component
 List<Component> getComponentPrototypes()
          List of components that are maintained by the component as prototypes for creating other component instances
 ComponentSecurity getComponentSecurity()
          Security object that indicates what authorization (permissions) exist for the component
protected  Class<? extends ComponentSecurity> getComponentSecurityClass()
          Returns the security class that is associated with the component (used for initialization and validation)
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 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.
 Map<String,Object> getContext()
          Context map for the component
 List<String> getCssClasses()
          CSS style class(s) to be applied to the component
 Map<String,String> getDataAttributes()
          Get the dataAttributes setup for this component - to be written to the html/jQuery data
 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 component
 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 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
 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
 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
 int getRowSpan()
          Number of places the component should take up vertically in the container
 String getSimpleDataAttributes()
          Returns a 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()
           
 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 getWidth()
          Width the component should take up in the container
 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 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 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 isReadOnly()
          Indicates whether the component can be edited
 boolean isRefreshedByAction()
          Indicates the component can be refreshed by an action
 boolean isRender()
          Indicates whether the component should be rendered in the UI
 boolean isResetDataOnRefresh()
          Indicates whether data contained within the component should be reset (set to default) when the component is refreshed
 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.
 void performApplyModel(View view, Object model, Component 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
 void performFinalize(View view, Object model, Component 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
 void performInitialization(View view, Object model)
          The following updates are done here:
 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 setAlign(String align)
          Sets the components horizontal alignment
 void setBaseId(String baseId)
          Setter for the base id that backs the component instance
 void setCellCssClasses(List<String> cellCssClasses)
          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 setCellStyle(String cellStyle)
          Setter for the cell style attribute
 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 setContext(Map<String,Object> context)
          Setter for the context Map
 void setCssClasses(List<String> cssClasses)
          Setter for the components style classes
 void setDataAttributes(Map<String,String> dataAttributes)
          DataAttributes that will be written to the html and/or through script to be consumed by jQuery.
 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 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 setMethodToCallOnRefresh(String methodToCallOnRefresh)
          Setter for the controller method to call for a refresh or disclosure action on this component
 void setOnBlurScript(String onBlurScript)
          Setter for the components onBlur script
 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 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)
          Setter for the components onLoad script
 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 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 setRowSpan(int rowSpan)
          Setter for the component row span
 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)
           
 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 setWidth(String width)
          Setter for the components width
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
getComponentTypeName
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Constructor Detail

ComponentBase

public ComponentBase()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model)
The following updates are done here:

Specified by:
performInitialization in interface Component
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
Component.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
The following updates are done here:

Specified by:
performApplyModel in interface Component
Parameters:
view - - view instance to which the component belongs
model - - Top level object containing the data (could be the form or a top level business object, dto)
See Also:
Component.performApplyModel(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

performFinalize

public void performFinalize(View view,
                            Object model,
                            Component parent)
The following finalization is done here:

Specified by:
performFinalize in interface Component
Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
parent - - parent component
See Also:
Component.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: Component
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface Component
Returns:
List child components
See Also:
Component.getComponentsForLifecycle()

getComponentPrototypes

public List<Component> getComponentPrototypes()
Description copied from interface: Component
List of components that are maintained by the component as prototypes for creating other component instances

Prototypes are held for configuring how a component should be created during the lifecycle. An example of this are the fields in a collection group that are created for each collection record. They only participate in the initialize phase.

Specified by:
getComponentPrototypes in interface Component
Returns:
List child component prototypes
See Also:
Component.getComponentPrototypes()

getPropertyReplacerComponents

public List<Component> getPropertyReplacerComponents()
Returns list of components that are being held in property replacers configured for this component

Specified by:
getPropertyReplacerComponents in interface Component
Returns:
List

getId

public String getId()
Description copied from interface: Component
The unique id (within a given tree) for the component

The id 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:
getId in interface Component
Returns:
String id
See Also:
Component.getId()

setId

public void setId(String id)
Description copied from interface: Component
Setter for the unique id (within a given tree) for the component

Specified by:
setId in interface Component
Parameters:
id - - string to set as the component id
See Also:
Component.setId(java.lang.String)

getBaseId

public String getBaseId()
Description copied from interface: Component
Holds the id for the component that can be used to request new instances of that component from the ComponentFactory

During component refreshes the component is reinitialized and the lifecycle is performed again to reflect the component state based on the latest updates (data, other component state). Since the lifecycle is only performed on the component, a new instance with configured initial state needs to be retrieved. Some component instances, such as those that are nested or created in code, cannot be obtained from the spring factory. For those the initial state is captured during the perform initialize phase and the factory id generated for referencing retrieving that configuration during a refresh

Specified by:
getBaseId in interface Component
Returns:
String bean id for component
See Also:
Component.getBaseId()

setBaseId

public void setBaseId(String baseId)
Description copied from interface: Component
Setter for the base id that backs the component instance

Specified by:
setBaseId in interface Component
See Also:
Component.setBaseId(java.lang.String)

getTemplate

public String getTemplate()
Description copied from interface: Component
The path to the JSP file that should be called to render the component

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'

Specified by:
getTemplate in interface Component
Returns:
String representing the template path
See Also:
Component.getTemplate()

setTemplate

public void setTemplate(String template)
Description copied from interface: Component
Setter for the components template

Specified by:
setTemplate in interface Component
See Also:
Component.setTemplate(java.lang.String)

getTemplateName

public String getTemplateName()

setTemplateName

public void setTemplateName(String templateName)

getTitle

public String getTitle()
Description copied from interface: Component
The component title

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.

Specified by:
getTitle in interface Component
Returns:
String title for component
See Also:
Component.getTitle()

setTitle

public void setTitle(String title)
Description copied from interface: Component
Setter for the component's title

Specified by:
setTitle in interface Component
See Also:
Component.setTitle(java.lang.String)

isHidden

public boolean isHidden()
Description copied from interface: Component
Indicates whether the component should be hidden in the UI

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)

Specified by:
isHidden in interface Component
Returns:
boolean true if the component should be hidden, false if it should be visible
See Also:
Component.isHidden()

setHidden

public void setHidden(boolean hidden)
Description copied from interface: Component
Setter for the hidden indicator

Specified by:
setHidden in interface Component
See Also:
Component.setHidden(boolean)

isReadOnly

public boolean isReadOnly()
Description copied from interface: Component
Indicates whether the component can be edited

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).

Specified by:
isReadOnly in interface Component
Returns:
boolean true if the component should be readOnly, false if is allows editing
See Also:
Component.isReadOnly()

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from interface: Component
Setter for the read only indicator

Specified by:
setReadOnly in interface Component
See Also:
Component.setReadOnly(boolean)

getRequired

public Boolean getRequired()
Description copied from interface: Component
Indicates whether the component is required

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.

Specified by:
getRequired in interface Component
Returns:
boolean true if the component is required, false if it is not required
See Also:
Component.getRequired()

setRequired

public void setRequired(Boolean required)
Description copied from interface: Component
Setter for the required indicator

Specified by:
setRequired in interface Component
See Also:
Component.setRequired(java.lang.Boolean)

isRender

public boolean isRender()
Description copied from interface: Component
Indicates whether the component should be rendered in the UI

If set to false, the corresponding component template will not be invoked (therefore nothing will be rendered to the UI).

Specified by:
isRender in interface Component
Returns:
boolean true if the component should be rendered, false if it should not be
See Also:
Component.isRender()

setRender

public void setRender(boolean render)
Description copied from interface: Component
Setter for the components render indicator

Specified by:
setRender in interface Component
See Also:
Component.setRender(boolean)

getColSpan

public int getColSpan()
Description copied from interface: Component
Number of places the component should take up horizontally in the container

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

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 manager

Specified by:
getColSpan in interface Component
Returns:
int number of columns to span
See Also:
Component.getColSpan()

setColSpan

public void setColSpan(int colSpan)
Description copied from interface: Component
Setter for the components column span

Specified by:
setColSpan in interface Component
See Also:
Component.setColSpan(int)

getRowSpan

public int getRowSpan()
Description copied from interface: Component
Number of places the component should take up vertically in the container

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

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 manager

Specified by:
getRowSpan in interface Component
Returns:
int number of rows to span
See Also:
Component.getRowSpan()

setRowSpan

public void setRowSpan(int rowSpan)
Description copied from interface: Component
Setter for the component row span

Specified by:
setRowSpan in interface Component
See Also:
Component.setRowSpan(int)

getCellCssClasses

public List<String> getCellCssClasses()
Description copied from interface: Component
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:
getCellCssClasses in interface Component
Returns:
the css classes to apply to the wrapping td (or th) element for this component
See Also:
Component.getCellCssClasses()

setCellCssClasses

public void setCellCssClasses(List<String> cellCssClasses)
Description copied from interface: Component
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:
setCellCssClasses in interface Component
See Also:
Component.setCellCssClasses(java.util.List)

addCellCssClass

public void addCellCssClass(String cssClass)
Description copied from interface: Component
Add a cell css class to the cell classes list

Specified by:
addCellCssClass in interface Component
Parameters:
cssClass - the name of the class to add
See Also:
Component.addCellCssClass(String)

getCellStyleClassesAsString

public String getCellStyleClassesAsString()
Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter

Returns:
String class attribute string

getCellStyle

public String getCellStyle()
Description copied from interface: Component
CSS style string to be applied to the cell containing the component (only applies within table based layouts)

e.g. 'align: right;'

Specified by:
getCellStyle in interface Component
Returns:
String css style string
See Also:
Component.getCellStyle()

setCellStyle

public void setCellStyle(String cellStyle)
Description copied from interface: Component
Setter for the cell style attribute

Specified by:
setCellStyle in interface Component
See Also:
Component.setCellStyle(java.lang.String)

getCellWidth

public String getCellWidth()
Description copied from interface: Component
Width setting for the cell containing the component (only applies within table based layouts)

Specified by:
getCellWidth in interface Component
Returns:
String width ('25%', '155px')
See Also:
Component.getCellWidth()

setCellWidth

public void setCellWidth(String cellWidth)
Description copied from interface: Component
Setter for the containing cell width

Specified by:
setCellWidth in interface Component
See Also:
Component.setCellWidth(java.lang.String)

getAlign

public String getAlign()
Description copied from interface: Component
Horizontal alignment of the component within its container

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.

Specified by:
getAlign in interface Component
Returns:
String horizontal align
See Also:
Component.getAlign()

setAlign

public void setAlign(String align)
Description copied from interface: Component
Sets the components horizontal alignment

Specified by:
setAlign in interface Component
See Also:
Component.setAlign(java.lang.String)

getValign

public String getValign()
Description copied from interface: Component
Vertical alignment of the component within its container

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.

Specified by:
getValign in interface Component
Returns:
String vertical align
See Also:
Component.getValign()

setValign

public void setValign(String valign)
Description copied from interface: Component
Setter for the component's vertical align

Specified by:
setValign in interface Component
See Also:
Component.setValign(java.lang.String)

getWidth

public String getWidth()
Description copied from interface: Component
Width the component should take up in the container

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'

Specified by:
getWidth in interface Component
Returns:
String width string
See Also:
Component.getWidth()

setWidth

public void setWidth(String width)
Description copied from interface: Component
Setter for the components width

Specified by:
setWidth in interface Component
See Also:
Component.setWidth(java.lang.String)

getStyle

public String getStyle()
Description copied from interface: Component
CSS style string to be applied to the component

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;'

Specified by:
getStyle in interface Component
Returns:
String css style string
See Also:
Component.getStyle()

setStyle

public void setStyle(String style)
Description copied from interface: Component
Setter for the components style

Specified by:
setStyle in interface Component
See Also:
Component.setStyle(java.lang.String)

getCssClasses

public List<String> getCssClasses()
Description copied from interface: Component
CSS style class(s) to be applied to the component

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

Specified by:
getCssClasses in interface Component
Returns:
List css style classes to appear on the 'class' attribute
See Also:
Component.getCssClasses()

setCssClasses

public void setCssClasses(List<String> cssClasses)
Description copied from interface: Component
Setter for the components style classes

Specified by:
setCssClasses in interface Component
See Also:
Component.setCssClasses(java.util.List)

getStyleClassesAsString

public String getStyleClassesAsString()
Builds the HTML class attribute string by combining the styleClasses list with a space delimiter

Returns:
String class attribute string

addStyleClass

public void addStyleClass(String styleClass)
Description copied from interface: Component
Adds a single style to the list of styles on this component

Specified by:
addStyleClass in interface Component
See Also:
Component.addStyleClass(java.lang.String)

appendToStyle

public void appendToStyle(String styleRules)
Description copied from interface: Component
Appends to the inline style set on a component

Specified by:
appendToStyle in interface Component
See Also:
Component.appendToStyle(java.lang.String)

getFinalizeMethodToCall

public String getFinalizeMethodToCall()
Description copied from interface: Component
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 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.

Specified by:
getFinalizeMethodToCall in interface Component
Returns:
String method name
See Also:
Component.getFinalizeMethodToCall()

setFinalizeMethodToCall

public void setFinalizeMethodToCall(String finalizeMethodToCall)
Setter for the finalize method

Parameters:
finalizeMethodToCall -

getFinalizeMethodAdditionalArguments

public List<Object> getFinalizeMethodAdditionalArguments()
Description copied from interface: Component
The List of Object instances that should be passed as arguments to the finalize method

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

Specified by:
getFinalizeMethodAdditionalArguments in interface Component
Returns:
List additional method arguments
See Also:
Component.getFinalizeMethodAdditionalArguments()

setFinalizeMethodAdditionalArguments

public void setFinalizeMethodAdditionalArguments(List<Object> finalizeMethodAdditionalArguments)
Setter for the finalize additional arguments list

Parameters:
finalizeMethodAdditionalArguments -

getFinalizeMethodInvoker

public MethodInvokerConfig getFinalizeMethodInvoker()
Description copied from interface: Component
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.

Specified by:
getFinalizeMethodInvoker in interface Component
Returns:
MethodInvokerConfig instance
See Also:
Component.getFinalizeMethodInvoker()

setFinalizeMethodInvoker

public void setFinalizeMethodInvoker(MethodInvokerConfig finalizeMethodInvoker)
Setter for the method invoker instance

Parameters:
finalizeMethodInvoker -

isSelfRendered

public boolean isSelfRendered()
Description copied from interface: Component
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:
isSelfRendered in interface Component
Returns:
boolean true if component is self rendered, false if not (renders through template)
See Also:
Component.isSelfRendered()

setSelfRendered

public void setSelfRendered(boolean selfRendered)
Description copied from interface: Component
Setter for the self render indicator

Specified by:
setSelfRendered in interface Component
See Also:
Component.setSelfRendered(boolean)

getRenderedHtmlOutput

public String getRenderedHtmlOutput()
Description copied from interface: Component
Rendering output for the component that will be sent as part of the response (can contain static text and HTML)

Specified by:
getRenderedHtmlOutput in interface Component
Returns:
String render output
See Also:
Component.getRenderedHtmlOutput()

setRenderedHtmlOutput

public void setRenderedHtmlOutput(String renderedHtmlOutput)
Description copied from interface: Component
Setter for the component's render output

Specified by:
setRenderedHtmlOutput in interface Component
See Also:
Component.setRenderedHtmlOutput(java.lang.String)

isDisableSessionPersistence

public boolean isDisableSessionPersistence()
Description copied from interface: Component
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:
isDisableSessionPersistence in interface Component
Returns:
boolean true if the component should not be stored in session, false if session storage is allowed
See Also:
Component.isDisableSessionPersistence()

setDisableSessionPersistence

public void setDisableSessionPersistence(boolean disableSessionPersistence)
Description copied from interface: Component
Setter for disabling storage of the component in session

Specified by:
setDisableSessionPersistence in interface Component
See Also:
Component.setDisableSessionPersistence(boolean)

isForceSessionPersistence

public boolean isForceSessionPersistence()
Description copied from interface: Component
Indicates whether the component should be stored with the session view regardless of configuration

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

Specified by:
isForceSessionPersistence in interface Component
Returns:
boolean true if the component should be stored in session, false if not
See Also:
Component.isForceSessionPersistence()

setForceSessionPersistence

public void setForceSessionPersistence(boolean forceSessionPersistence)
Description copied from interface: Component
Setter for the indicator to force persistence of the component in session

Specified by:
setForceSessionPersistence in interface Component
See Also:
Component.setForceSessionPersistence(boolean)

getComponentSecurity

public ComponentSecurity getComponentSecurity()
Description copied from interface: Component
Security object that indicates what authorization (permissions) exist for the component

Specified by:
getComponentSecurity in interface Component
Returns:
ComponentSecurity instance
See Also:
Component.getComponentSecurity()

setComponentSecurity

public void setComponentSecurity(ComponentSecurity componentSecurity)
Description copied from interface: Component
Setter for the components security object

Specified by:
setComponentSecurity in interface Component
See Also:
Component.setComponentSecurity(org.kuali.rice.krad.uif.component.ComponentSecurity)

getComponentSecurityClass

protected Class<? extends ComponentSecurity> getComponentSecurityClass()
Returns the security class that is associated with the component (used for initialization and validation)

Returns:
Class

getComponentModifiers

public List<ComponentModifier> getComponentModifiers()
Description copied from interface: Component
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.

Specified by:
getComponentModifiers in interface Component
Returns:
List of component modifiers
See Also:
Component.getComponentModifiers()

setComponentModifiers

public void setComponentModifiers(List<ComponentModifier> componentModifiers)
Description copied from interface: Component
Setter for the components List of ComponentModifier instances

Specified by:
setComponentModifiers in interface Component
See Also:
Component.setComponentModifiers(java.util.List)

getContext

public Map<String,Object> getContext()
Description copied from interface: Component
Context map for the component

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 #pushAllToContext

Specified by:
getContext in interface Component
Returns:
Map context
See Also:
Component.getContext()

setContext

public void setContext(Map<String,Object> context)
Description copied from interface: Component
Setter for the context Map

Specified by:
setContext in interface Component
See Also:
Component.setContext(java.util.Map)

pushObjectToContext

public void pushObjectToContext(String objectName,
                                Object object)
Description copied from interface: Component
Places the given object into the context Map for the component with the given name

Note this also will push context to property replacers configured on the component. To place multiple objects in the context, you should use #pushAllToContext since that will call this method for each and update property replacers. Using #getContext().putAll() will bypass property replacers.

Specified by:
pushObjectToContext in interface Component
Parameters:
objectName - - name the object should be exposed under in the context map
object - - object instance to place into context
See Also:
Component.pushObjectToContext(java.lang.String, java.lang.Object)

pushToPropertyReplacerContext

protected void pushToPropertyReplacerContext(String objectName,
                                             Object object)

pushAllToContext

public void pushAllToContext(Map<String,Object> objects)
Description copied from interface: Component
Places each entry of the given Map into the context for the component

Note this will call #pushObjectToContext for each entry which will update any configured property replacers as well. This should be used in place of getContext().putAll()

Specified by:
pushAllToContext in interface Component
Parameters:
objects - - Map objects to add to context, where the entry key will be the context key and the entry value will be the context value
See Also:
pushAllToContext(java.util.Map)

getPropertyReplacers

public List<PropertyReplacer> getPropertyReplacers()
Description copied from interface: Component
gets a list of PropertyReplacer instances

They will be evaluated during the view lifecycle to conditionally set properties on the Component based on expression evaluations

Specified by:
getPropertyReplacers in interface Component
Returns:
List replacers to evaluate
See Also:
Component.getPropertyReplacers()

setPropertyReplacers

public void setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
Description copied from interface: Component
Setter for the components property substitutions

Specified by:
setPropertyReplacers in interface Component
See Also:
Component.setPropertyReplacers(java.util.List)

getOrder

public int getOrder()
Description copied from interface: Component
Order of a component within a List of other components

Lower numbers are placed higher up in the list, while higher numbers are placed lower in the list

Specified by:
getOrder in interface Component
Specified by:
getOrder in interface org.springframework.core.Ordered
Returns:
int ordering number
See Also:
Ordered.getOrder()

setOrder

public void setOrder(int order)
Setter for the component's order

Specified by:
setOrder in interface Component
Parameters:
order -
See Also:
org.springframework.core.Ordered.getOrder()

getToolTip

public Tooltip getToolTip()
Description copied from interface: Component
The Tooltip widget that renders a tooltip with additional information about the element on specified trigger event

Specified by:
getToolTip in interface Component
Returns:
Tooltip
See Also:
Component.getToolTip()

setToolTip

public void setToolTip(Tooltip toolTip)
Description copied from interface: Component
Setter for the component tooltip widget instance

Specified by:
setToolTip in interface Component
See Also:
Component.setToolTip(Tooltip)

getOnLoadScript

public String getOnLoadScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onLoad event is fired

Specified by:
getOnLoadScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnLoadScript()

setOnLoadScript

public void setOnLoadScript(String onLoadScript)
Setter for the components onLoad script

Specified by:
setOnLoadScript in interface ScriptEventSupport
Parameters:
onLoadScript -

getOnDocumentReadyScript

public String getOnDocumentReadyScript()
Description copied from interface: ScriptEventSupport
Script to be run when the document ready event is triggered

Specified by:
getOnDocumentReadyScript in interface ScriptEventSupport
Returns:
the onDocumentReadyScript
See Also:
ScriptEventSupport.getOnDocumentReadyScript()

setOnDocumentReadyScript

public void setOnDocumentReadyScript(String onDocumentReadyScript)
Setter for the components onDocumentReady script

Parameters:
onDocumentReadyScript -

getOnUnloadScript

public String getOnUnloadScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onUnload event is fired

Specified by:
getOnUnloadScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnUnloadScript()

setOnUnloadScript

public void setOnUnloadScript(String onUnloadScript)
Setter for the components onUnload script

Parameters:
onUnloadScript -

getOnCloseScript

public String getOnCloseScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onClose event is fired

Specified by:
getOnCloseScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnCloseScript()

setOnCloseScript

public void setOnCloseScript(String onCloseScript)
Setter for the components onClose script

Parameters:
onCloseScript -

getOnBlurScript

public String getOnBlurScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onBlur event is fired

Specified by:
getOnBlurScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnBlurScript()

setOnBlurScript

public void setOnBlurScript(String onBlurScript)
Setter for the components onBlur script

Specified by:
setOnBlurScript in interface ScriptEventSupport
Parameters:
onBlurScript -

getOnChangeScript

public String getOnChangeScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onChange event is fired

Specified by:
getOnChangeScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnChangeScript()

setOnChangeScript

public void setOnChangeScript(String onChangeScript)
Setter for the components onChange script

Parameters:
onChangeScript -

getOnClickScript

public String getOnClickScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onClick event is fired

Specified by:
getOnClickScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnClickScript()

setOnClickScript

public void setOnClickScript(String onClickScript)
Setter for the components onClick script

Parameters:
onClickScript -

getOnDblClickScript

public String getOnDblClickScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onDblClick event is fired

Specified by:
getOnDblClickScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnDblClickScript()

setOnDblClickScript

public void setOnDblClickScript(String onDblClickScript)
Setter for the components onDblClick script

Parameters:
onDblClickScript -

getOnFocusScript

public String getOnFocusScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onFocus event is fired

Specified by:
getOnFocusScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnFocusScript()

setOnFocusScript

public void setOnFocusScript(String onFocusScript)
Setter for the components onFocus script

Parameters:
onFocusScript -

getOnSubmitScript

public String getOnSubmitScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onSubmit event is fired

Specified by:
getOnSubmitScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnSubmitScript()

setOnSubmitScript

public void setOnSubmitScript(String onSubmitScript)
Setter for the components onSubmit script

Parameters:
onSubmitScript -

getOnKeyPressScript

public String getOnKeyPressScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onKeyPress event is fired

Specified by:
getOnKeyPressScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnKeyPressScript()

setOnKeyPressScript

public void setOnKeyPressScript(String onKeyPressScript)
Setter for the components onKeyPress script

Parameters:
onKeyPressScript -

getOnKeyUpScript

public String getOnKeyUpScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onKeyUp event is fired

Specified by:
getOnKeyUpScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnKeyUpScript()

setOnKeyUpScript

public void setOnKeyUpScript(String onKeyUpScript)
Setter for the components onKeyUp script

Parameters:
onKeyUpScript -

getOnKeyDownScript

public String getOnKeyDownScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onKeyDown event is fired

Specified by:
getOnKeyDownScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnKeyDownScript()

setOnKeyDownScript

public void setOnKeyDownScript(String onKeyDownScript)
Setter for the components onKeyDown script

Parameters:
onKeyDownScript -

getOnMouseOverScript

public String getOnMouseOverScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onMouseOver event is fired

Specified by:
getOnMouseOverScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnMouseOverScript()

setOnMouseOverScript

public void setOnMouseOverScript(String onMouseOverScript)
Setter for the components onMouseOver script

Parameters:
onMouseOverScript -

getOnMouseOutScript

public String getOnMouseOutScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onMouseOut event is fired

Specified by:
getOnMouseOutScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnMouseOutScript()

setOnMouseOutScript

public void setOnMouseOutScript(String onMouseOutScript)
Setter for the components onMouseOut script

Parameters:
onMouseOutScript -

getOnMouseUpScript

public String getOnMouseUpScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onMouseUp event is fired

Specified by:
getOnMouseUpScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnMouseUpScript()

setOnMouseUpScript

public void setOnMouseUpScript(String onMouseUpScript)
Setter for the components onMouseUp script

Parameters:
onMouseUpScript -

getOnMouseDownScript

public String getOnMouseDownScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onMouseDown event is fired

Specified by:
getOnMouseDownScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnMouseDownScript()

setOnMouseDownScript

public void setOnMouseDownScript(String onMouseDownScript)
Setter for the components onMouseDown script

Parameters:
onMouseDownScript -

getOnMouseMoveScript

public String getOnMouseMoveScript()
Description copied from interface: ScriptEventSupport
Script that should be executed when the component's onMouseMove event is fired

Specified by:
getOnMouseMoveScript in interface ScriptEventSupport
Returns:
String JavaScript code
See Also:
ScriptEventSupport.getOnMouseMoveScript()

setOnMouseMoveScript

public void setOnMouseMoveScript(String onMouseMoveScript)
Setter for the components onMouseMove script

Parameters:
onMouseMoveScript -

getTemplateOptions

public Map<String,String> getTemplateOptions()
Description copied from interface: Component
The options that are passed through to the Component renderer

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.

Specified by:
getTemplateOptions in interface Component
Returns:
Map options
See Also:
Component.getTemplateOptions()

setTemplateOptions

public void setTemplateOptions(Map<String,String> templateOptions)
Description copied from interface: Component
Setter for the template's options

Specified by:
setTemplateOptions in interface Component
See Also:
Component.setTemplateOptions(java.util.Map)

getTemplateOptionsJSString

public 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

Specified by:
getTemplateOptionsJSString in interface Component
Returns:
String of widget options formatted as JS Map

setTemplateOptionsJSString

public void setTemplateOptionsJSString(String templateOptionsJSString)
Description copied from interface: Component
Setter for the template's options

Specified by:
setTemplateOptionsJSString in interface Component

getProgressiveRender

public String 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:
getProgressiveRender in interface Component
Returns:
String progressiveRender expression

setProgressiveRender

public void setProgressiveRender(String progressiveRender)
Description copied from interface: Component
Setter for progressiveRender Spring EL expression

Specified by:
setProgressiveRender in interface Component
Parameters:
progressiveRender - the progressiveRender to set

getConditionalRefresh

public String 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:
getConditionalRefresh in interface Component
Returns:
the conditionalRefresh

setConditionalRefresh

public void setConditionalRefresh(String conditionalRefresh)
Set the conditional refresh condition

Specified by:
setConditionalRefresh in interface Component
Parameters:
conditionalRefresh - the conditionalRefresh to set

getProgressiveDisclosureControlNames

public List<String> getProgressiveDisclosureControlNames()
Control names used to control progressive disclosure, set internally cannot be set.

Specified by:
getProgressiveDisclosureControlNames in interface Component
Returns:
the progressiveDisclosureControlNames

getProgressiveDisclosureConditionJs

public String getProgressiveDisclosureConditionJs()
The condition to show this component progressively converted to a js expression, set internally cannot be set.

Specified by:
getProgressiveDisclosureConditionJs in interface Component
Returns:
the progressiveDisclosureConditionJs

getConditionalRefreshConditionJs

public String getConditionalRefreshConditionJs()
The condition to refresh this component converted to a js expression, set internally cannot be set.

Specified by:
getConditionalRefreshConditionJs in interface Component
Returns:
the conditionalRefreshConditionJs

getConditionalRefreshControlNames

public List<String> getConditionalRefreshControlNames()
Control names used to control conditional refresh, set internally cannot be set.

Specified by:
getConditionalRefreshControlNames in interface Component
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:
isProgressiveRenderViaAJAX in interface Component
Returns:
the progressiveRenderViaAJAX

setProgressiveRenderViaAJAX

public void setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX)
Description copied from interface: Component
Setter for the progressiveRenderViaAJAX flag

Specified by:
setProgressiveRenderViaAJAX in interface Component
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:
isProgressiveRenderAndRefresh in interface Component
Returns:
the progressiveRenderAndRefresh

setProgressiveRenderAndRefresh

public void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh)
Set the progressive render and refresh option.

Specified by:
setProgressiveRenderAndRefresh in interface Component
Parameters:
progressiveRenderAndRefresh - the progressiveRenderAndRefresh to set

getRefreshWhenChangedPropertyNames

public List<String> getRefreshWhenChangedPropertyNames()
Description copied from interface: Component
Specifies a property by name that when its value changes will automatically perform a refresh on this component

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.

Specified by:
getRefreshWhenChangedPropertyNames in interface Component
Returns:
List property names that should trigger a refresh when their values change
See Also:
Component.getRefreshWhenChangedPropertyNames()

setRefreshWhenChangedPropertyNames

public void setRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames)
Description copied from interface: Component
Setter for the list of property names that trigger a refresh

Specified by:
setRefreshWhenChangedPropertyNames in interface Component
See Also:
org.kuali.rice.krad.uif.component.Component#setRefreshWhenChangedPropertyNames(java.util.List)

getAdditionalComponentsToRefresh

public List<String> getAdditionalComponentsToRefresh()
Description copied from interface: Component
Returns a list of componentIds which will be also be refreshed when this component is refreshed

This 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:
getAdditionalComponentsToRefresh in interface Component
Returns:
List
See Also:
Component.getAdditionalComponentsToRefresh()

setAdditionalComponentsToRefresh

public void setAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh)
Description copied from interface: Component
Setter for alsoRefreshComponents

Specified by:
setAdditionalComponentsToRefresh in interface Component
See Also:
org.kuali.rice.krad.uif.component.Component#setAdditionalComponentsToRefresh(java.util.List)

isRefreshedByAction

public boolean isRefreshedByAction()
Description copied from interface: Component
Indicates the component can be refreshed by an action

This is set by the framework for configured ajax action buttons, should not be set in configuration

Specified by:
isRefreshedByAction in interface Component
Returns:
boolean true if the component is refreshed by an action, false if not
See Also:
Component.isRefreshedByAction()

setRefreshedByAction

public void setRefreshedByAction(boolean refreshedByAction)
Description copied from interface: Component
Setter for the refreshed by action indicator

This is set by the framework for configured ajax action buttons, should not be set in configuration

Specified by:
setRefreshedByAction in interface Component
See Also:
Component.setRefreshedByAction(boolean)

isDisclosedByAction

public boolean isDisclosedByAction()
Description copied from interface: Component
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:
isDisclosedByAction in interface Component
Returns:
true if this component is disclosed by an action
See Also:
Component.isDisclosedByAction()

setDisclosedByAction

public void setDisclosedByAction(boolean disclosedByAction)
Description copied from interface: Component
Set if this component is disclosed by some outside action

Specified by:
setDisclosedByAction in interface Component
See Also:
Component.setDisclosedByAction(boolean)

getRefreshTimer

public int getRefreshTimer()
Time in seconds that the component will be automatically refreshed

This will invoke the refresh process just like the conditionalRefresh and refreshWhenChangedPropertyNames. When using this property methodToCallOnRefresh and id should also be specified

Specified by:
getRefreshTimer in interface Component
Returns:
refreshTimer

setRefreshTimer

public void setRefreshTimer(int refreshTimer)
Setter for refreshTimer

Specified by:
setRefreshTimer in interface Component
Parameters:
refreshTimer -

isResetDataOnRefresh

public boolean isResetDataOnRefresh()
Description copied from interface: Component
Indicates whether data contained within the component should be reset (set to default) when the component is refreshed

Specified by:
isResetDataOnRefresh in interface Component
Returns:
boolean true if data should be refreshed, false if data should remain as is
See Also:
Component.isResetDataOnRefresh()

setResetDataOnRefresh

public void setResetDataOnRefresh(boolean resetDataOnRefresh)
Description copied from interface: Component
Setter for the reset data on refresh indicator

Specified by:
setResetDataOnRefresh in interface Component
See Also:
Component.setResetDataOnRefresh(boolean)

getMethodToCallOnRefresh

public String getMethodToCallOnRefresh()
Name of a method on the controller that should be invoked as part of the component refresh and disclosure process

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

Returns:
String valid controller method name

setMethodToCallOnRefresh

public void setMethodToCallOnRefresh(String methodToCallOnRefresh)
Setter for the controller method to call for a refresh or disclosure action on this component

Parameters:
methodToCallOnRefresh -

setSkipInTabOrder

public void setSkipInTabOrder(boolean skipInTabOrder)
Parameters:
skipInTabOrder - flag

isSkipInTabOrder

public boolean isSkipInTabOrder()
Flag indicating that this component and its nested components must be skipped when keyboard tabbing.

Returns:
the skipInTabOrder flag

getDataAttributes

public Map<String,String> getDataAttributes()
Get the dataAttributes setup for this component - to be written to the html/jQuery data

The attributes that are complex objects (contain {}) they will be written through script. The attritubes that are simple (contain no objects) will be written directly to the html of the component using standard data-. Either way they can be access through .data() call in jQuery

Specified by:
getDataAttributes in interface Component
Returns:
map of dataAttributes

setDataAttributes

public void setDataAttributes(Map<String,String> dataAttributes)
DataAttributes that will be written to the html and/or through script to be consumed by jQuery.

Specified by:
setDataAttributes in interface Component
Parameters:
dataAttributes - the data attributes to set for this component

addDataAttribute

public void addDataAttribute(String key,
                             String value)
Add a data attribute to the dataAttributes map - to be written to the html/jQuery data.

Specified by:
addDataAttribute in interface Component
Parameters:
key - key of the data attribute
value - value of the data attribute

addDataAttributeIfNonEmpty

public void addDataAttributeIfNonEmpty(String key,
                                       String value)
Add a data attribute to the dataAttributes map if the given value is non null or the empty string

Parameters:
key - - key for the data attribute entry
value - - value for the data attribute

getComplexDataAttributesJs

public String getComplexDataAttributesJs()
Returns js that will add data to this component by the element which matches its id. This will return script for only the complex data elements (containing {});

Specified by:
getComplexDataAttributesJs in interface Component
Returns:
jQuery data script for adding complex data attributes

getSimpleDataAttributes

public String getSimpleDataAttributes()
Returns a string that can be put into a the tag of a component to add data attributes inline. This does not include the complex attributes which contain {}

Specified by:
getSimpleDataAttributes in interface Component
Returns:
html string for data attributes for the simple attributes

getAllDataAttributesJs

public String getAllDataAttributesJs()
Description copied from interface: Component
A JavaScript script that will add data to this component by the element which matches its id

This will return script for all the complex data elements. This method is useful for controls that are implemented as spring form tags

Specified by:
getAllDataAttributesJs in interface Component
Returns:
jQuery data script for adding all data attributes
See Also:
Component.getAllDataAttributesJs()

getAdditionalComponentsToRefreshJs

public String getAdditionalComponentsToRefreshJs()
Description copied from interface: Component
Returns a string for representing the list of additional components to be refreshed as a JavaScript value

Specified by:
getAdditionalComponentsToRefreshJs in interface Component
Returns:
String representation of the list of componentIds for the components that need to be refreshed
See Also:
Component.getAdditionalComponentsToRefreshJs()

completeValidation

public void completeValidation(ValidationTrace tracer)
Description copied from interface: Component
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.

Specified by:
completeValidation in interface Component
Parameters:
tracer - Record of component's location
See Also:
Component.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.