org.kuali.rice.krad.uif.component
Interface Component

All Superinterfaces:
Configurable, org.springframework.core.Ordered, ScriptEventSupport, Serializable
All Known Subinterfaces:
Container, ContentElement, Control, Field, Widget
All Known Implementing Classes:
Action, ActionField, AjaxAction, BlockUI, BreadCrumbs, CheckboxControl, CheckboxGroupControl, CollectionGroup, ComponentBase, ContainerBase, ContentElementBase, ControlBase, DataField, DataTable, DatePicker, DialogGroup, Disclosure, DocumentView, FieldBase, FieldGroup, FieldValidationMessages, FileControl, FormView, GenericField, Group, GroupControl, GroupValidationMessages, Growls, Header, Help, HiddenControl, Iframe, Image, ImageField, InputField, Inquiry, InquiryView, Label, LightBox, Link, LinkField, LinkGroup, LookupInputField, LookupView, MaintenanceView, Message, MessageField, MultiValueControlBase, NavigationGroup, PageGroup, PageValidationMessages, QuickFinder, RadioGroupControl, RemoteFieldsHolder, Reorderer, ReorderingGroup, RichTable, Scrollpane, SelectControl, Space, SpaceField, Spinner, SpinnerControl, Suggest, TabGroup, Tabs, TextAreaControl, TextControl, Tooltip, Tree, TreeGroup, UserControl, ValidationMessages, View, WidgetBase

public interface Component
extends Configurable, Serializable, Ordered, ScriptEventSupport

Component defines basic properties and methods that all rendering element implement

All classes of the UIF that are used as a rendering element implement the component interface. All components within the framework have the following structure:

There are three basic types of components:

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Container, Field, Widget

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
 
Method Summary
 void addDataAttribute(String key, String value)
          Add a data attribute to the dataAttributes map
 void addStyleClass(String styleClass)
          Adds a single style to the list of styles on this component
 void appendToStyle(String itemStyle)
          Appends to the inline style set on a component
 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
 int getColSpan()
          Number of places the component should take up horizontally in the container
 String getComplexDataAttributesJs()
          A JavaScript script 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
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 String getComponentTypeName()
          The name for the component type
 String getConditionalRefresh()
          Spring EL expression, which when evaluates to true, causes this component to be refreshed
 String getConditionalRefreshConditionJs()
          A JavaScript expression constructed from getProgressiveRender()
 List<String> getConditionalRefreshControlNames()
          The list of control names (ids) extracted from getConditionalRefresh()
 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()
           
 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
 int getOrder()
          Order of a component within a List of other components
 String getProgressiveDisclosureConditionJs()
          A JavaScript expression constructed from getConditionalRefresh()
 List<String> getProgressiveDisclosureControlNames()
          List of control names (ids) extracted from getProgressiveRender()
 String getProgressiveRender()
          Spring EL expression, which when evaluates to true, makes this component visible
 List<Component> getPropertyReplacerComponents()
          List of components that are contained within the List of PropertyReplacer in component
 List<PropertyReplacer> getPropertyReplacers()
          gets a list of PropertyReplacer instances
 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()
          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 getTemplate()
          The path to the JSP file that should be called to render the component
 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
 boolean isDisableSessionPersistence()
          Disables the storage of the component in session (when the framework determines it needs to be due to a refresh condition)
 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()
          Determines whether the component will always be retrieved from the server and shown
 boolean isProgressiveRenderViaAJAX()
          Indicates whether the component will be stored on the client, but hidden, after the first retrieval
 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)
 void performApplyModel(View view, Object model, Component parent)
          Called after the initialize phase to perform conditional logic based on the model data
 void performFinalize(View view, Object model, Component parent)
          The last phase before the view is rendered
 void performInitialization(View view, Object model)
          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
 void setBaseId(String baseId)
          Setter for the base id that backs the component instance
 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)
          Setter for conditionalRefresh Spring EL expression
 void setContext(Map<String,Object> context)
          Setter for the context Map
 void setCssClasses(List<String> styleClasses)
          Setter for the components style classes
 void setDataAttributes(Map<String,String> dataAttributes)
          The 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 setForceSessionPersistence(boolean persistInSession)
          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 setOrder(int order)
          Setter for the component's order
 void setProgressiveRender(String progressiveRender)
          Setter for progressiveRender Spring EL expression
 void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh)
          Setter for the progressiveRenderAndRefresh flag
 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 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 renderOutput)
          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 setStyle(String style)
          Setter for the components style
 void setTemplate(String template)
          Setter for the components template
 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
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Configurable
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnLoadScript
 

Method Detail

getId

String getId()
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

Returns:
String id

setId

void setId(String id)
Setter for the unique id (within a given tree) for the component

Parameters:
id - - string to set as the component id

getBaseId

String getBaseId()
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

Returns:
String bean id for component

setBaseId

void setBaseId(String baseId)
Setter for the base id that backs the component instance

Parameters:
baseId -

getComponentTypeName

String getComponentTypeName()
The name for the component type

This is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.

Returns:
String type name

getTemplate

String getTemplate()
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'

Returns:
String representing the template path

setTemplate

void setTemplate(String template)
Setter for the components template

Parameters:
template -

getTitle

String getTitle()
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.

Returns:
String title for component

setTitle

void setTitle(String title)
Setter for the component's title

Parameters:
title -

performInitialization

void performInitialization(View view,
                           Object model)
Initializes the component

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.

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

performApplyModel

void performApplyModel(View view,
                       Object model,
                       Component parent)
Called after the initialize phase to perform conditional logic based on the model data

Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data

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)

performFinalize

void performFinalize(View view,
                     Object model,
                     Component parent)
The last phase before the view is rendered

Here final preparations can be made based on the updated view state.

Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
parent - - parent component

getComponentsForLifecycle

List<Component> getComponentsForLifecycle()
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Returns:
List child components

getComponentPrototypes

List<Component> getComponentPrototypes()
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.

Returns:
List child component prototypes

getPropertyReplacerComponents

List<Component> getPropertyReplacerComponents()
List of components that are contained within the List of PropertyReplacer in component

Used to get all the nested components in the property replacers.

Returns:
List PropertyReplacer child components

getComponentModifiers

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.

Returns:
List of component modifiers
See Also:
ViewHelperService.performInitialization(org.kuali.rice.krad.uif.view.View, Object)

setComponentModifiers

void setComponentModifiers(List<ComponentModifier> componentModifiers)
Setter for the components List of ComponentModifier instances

Parameters:
componentModifiers -

isRender

boolean isRender()
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).

Returns:
boolean true if the component should be rendered, false if it should not be

setRender

void setRender(boolean render)
Setter for the components render indicator

Parameters:
render -

isHidden

boolean isHidden()
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)

Returns:
boolean true if the component should be hidden, false if it should be visible

setHidden

void setHidden(boolean hidden)
Setter for the hidden indicator

Parameters:
hidden -

isReadOnly

boolean isReadOnly()
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).

Returns:
boolean true if the component should be readOnly, false if is allows editing

setReadOnly

void setReadOnly(boolean readOnly)
Setter for the read only indicator

Parameters:
readOnly -

getRequired

Boolean getRequired()
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.

Returns:
boolean true if the component is required, false if it is not required

setRequired

void setRequired(Boolean required)
Setter for the required indicator

Parameters:
required -

getStyle

String getStyle()
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;'

Returns:
String css style string

setStyle

void setStyle(String style)
Setter for the components style

Parameters:
style -

getCssClasses

List<String> getCssClasses()
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

Returns:
List css style classes to appear on the 'class' attribute

setCssClasses

void setCssClasses(List<String> styleClasses)
Setter for the components style classes

Parameters:
styleClasses -

addStyleClass

void addStyleClass(String styleClass)
Adds a single style to the list of styles on this component

Parameters:
styleClass -

appendToStyle

void appendToStyle(String itemStyle)
Appends to the inline style set on a component

Parameters:
itemStyle -

getColSpan

int getColSpan()
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

Returns:
int number of columns to span

setColSpan

void setColSpan(int colSpan)
Setter for the components column span

Parameters:
colSpan -

getRowSpan

int getRowSpan()
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

Returns:
int number of rows to span

setRowSpan

void setRowSpan(int rowSpan)
Setter for the component row span

Parameters:
rowSpan -

getContext

Map<String,Object> getContext()
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

Returns:
Map context

setContext

void setContext(Map<String,Object> context)
Setter for the context Map

Parameters:
context -

pushObjectToContext

void pushObjectToContext(String objectName,
                         Object object)
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.

Parameters:
objectName - - name the object should be exposed under in the context map
object - - object instance to place into context

pushAllToContext

void pushAllToContext(Map<String,Object> objects)
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()

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

getPropertyReplacers

List<PropertyReplacer> getPropertyReplacers()
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

Returns:
List replacers to evaluate

setPropertyReplacers

void setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
Setter for the components property substitutions

Parameters:
propertyReplacers -

getTemplateOptions

Map<String,String> getTemplateOptions()
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.

Returns:
Map options

setTemplateOptions

void setTemplateOptions(Map<String,String> templateOptions)
Setter for the template's options

Parameters:
templateOptions -

getTemplateOptionsJSString

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

See documentation on the particular component render for available options.

Returns:
String options

setTemplateOptionsJSString

void setTemplateOptionsJSString(String templateOptionsJSString)
Setter for the template's options

Parameters:
templateOptionsJSString -

getOrder

int getOrder()
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 org.springframework.core.Ordered
Returns:
int ordering number
See Also:
Ordered.getOrder()

setOrder

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

Parameters:
order -
See Also:
org.springframework.core.Ordered.getOrder()

getToolTip

Tooltip getToolTip()
The Tooltip widget that renders a tooltip with additional information about the element on specified trigger event

Returns:
Tooltip

setToolTip

void setToolTip(Tooltip toolTip)
Setter for the component tooltip widget instance

Parameters:
toolTip -

getFinalizeMethodToCall

String getFinalizeMethodToCall()
The name of the method that should be invoked for finalizing the component configuration (full method name, without parameters or return type)

Note the method can also be set with the finalizeMethodInvoker targetMethod property. If the method is on the configured ViewHelperService, only this property needs to be 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.

Returns:
String method name

getFinalizeMethodAdditionalArguments

List<Object> getFinalizeMethodAdditionalArguments()
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

Returns:
List additional method arguments

getFinalizeMethodInvoker

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.

Returns:
MethodInvokerConfig instance

isSelfRendered

boolean isSelfRendered()
Indicates whether the component contains its own render output (through the renderOutput property)

If self rendered is true, the corresponding template for the component will not be invoked and the renderOutput String will be written to the response as is.

Returns:
boolean true if component is self rendered, false if not (renders through template)

setSelfRendered

void setSelfRendered(boolean selfRendered)
Setter for the self render indicator

Parameters:
selfRendered -

getRenderedHtmlOutput

String getRenderedHtmlOutput()
Rendering output for the component that will be sent as part of the response (can contain static text and HTML)

Returns:
String render output

setRenderedHtmlOutput

void setRenderedHtmlOutput(String renderOutput)
Setter for the component's render output

Parameters:
renderOutput -

isDisableSessionPersistence

boolean isDisableSessionPersistence()
Disables the storage of the component in session (when the framework determines it needs to be due to a refresh condition)

When the framework determines there is a condition on the component that requires it to keep around between posts, it will store the component instance in session. This flag can be set to disable this behavior (which would require custom application logic to support behavior such as refresh)

Returns:
boolean true if the component should not be stored in session, false if session storage is allowed

setDisableSessionPersistence

void setDisableSessionPersistence(boolean disableSessionPersistence)
Setter for disabling storage of the component in session

Parameters:
disableSessionPersistence -

isForceSessionPersistence

boolean isForceSessionPersistence()
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

Returns:
boolean true if the component should be stored in session, false if not

setForceSessionPersistence

void setForceSessionPersistence(boolean persistInSession)
Setter for the indicator to force persistence of the component in session

Parameters:
persistInSession -

getComponentSecurity

ComponentSecurity getComponentSecurity()
Security object that indicates what authorization (permissions) exist for the component

Returns:
ComponentSecurity instance

setComponentSecurity

void setComponentSecurity(ComponentSecurity componentSecurity)
Setter for the components security object

Parameters:
componentSecurity -

getProgressiveRender

String getProgressiveRender()
Spring EL expression, which when evaluates to true, makes this component visible

Returns:
the SpEl expression string

setProgressiveRender

void setProgressiveRender(String progressiveRender)
Setter for progressiveRender Spring EL expression

Parameters:
progressiveRender - the progressiveRender to set

getConditionalRefresh

String getConditionalRefresh()
Spring EL expression, which when evaluates to true, causes this component to be refreshed

Returns:
the SpEl expression string

setConditionalRefresh

void setConditionalRefresh(String conditionalRefresh)
Setter for conditionalRefresh Spring EL expression

Parameters:
conditionalRefresh - the conditionalRefresh to set

getProgressiveDisclosureControlNames

List<String> getProgressiveDisclosureControlNames()
List of control names (ids) extracted from getProgressiveRender()

Returns:
the list of control names

getProgressiveDisclosureConditionJs

String getProgressiveDisclosureConditionJs()
A JavaScript expression constructed from getConditionalRefresh()

The script can be executed on the client to determine if the original exp was satisfied before interacting with the server.

Returns:
the JS script

getConditionalRefreshConditionJs

String getConditionalRefreshConditionJs()
A JavaScript expression constructed from getProgressiveRender()

The script can be executed on the client to determine if the original exp was satisfied before interacting with the server.

Returns:
the JS script

getConditionalRefreshControlNames

List<String> getConditionalRefreshControlNames()
The list of control names (ids) extracted from getConditionalRefresh()

Returns:
the list of control names

isProgressiveRenderViaAJAX

boolean isProgressiveRenderViaAJAX()
Indicates whether the component will be stored on the client, but hidden, after the first retrieval

The component will not be rendered hidden after first retrieval if this flag is set to true. The component will then be fetched via an ajax call when it should be rendered.

Returns:
the progressiveRenderViaAJAX

setProgressiveRenderViaAJAX

void setProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX)
Setter for the progressiveRenderViaAJAX flag

Parameters:
progressiveRenderViaAJAX - the progressiveRenderViaAJAX to set

isProgressiveRenderAndRefresh

boolean isProgressiveRenderAndRefresh()
Determines whether the component will always be retrieved from the server and shown

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.

Returns:
the progressiveRenderAndRefresh

setProgressiveRenderAndRefresh

void setProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh)
Setter for the progressiveRenderAndRefresh flag

Parameters:
progressiveRenderAndRefresh - the progressiveRenderAndRefresh to set

getRefreshWhenChangedPropertyNames

List<String> getRefreshWhenChangedPropertyNames()
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.

Returns:
List property names that should trigger a refresh when their values change

setRefreshWhenChangedPropertyNames

void setRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames)
Setter for the list of property names that trigger a refresh

Parameters:
refreshWhenChangedPropertyNames -

isRefreshedByAction

boolean isRefreshedByAction()
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

Returns:
boolean true if the component is refreshed by an action, false if not

setRefreshedByAction

void setRefreshedByAction(boolean refreshedByAction)
Setter for the refreshed by action indicator

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

Parameters:
refreshedByAction -

isResetDataOnRefresh

boolean isResetDataOnRefresh()
Indicates whether data contained within the component should be reset (set to default) when the component is refreshed

Returns:
boolean true if data should be refreshed, false if data should remain as is

setResetDataOnRefresh

void setResetDataOnRefresh(boolean resetDataOnRefresh)
Setter for the reset data on refresh indicator

Parameters:
resetDataOnRefresh -

addDataAttribute

void addDataAttribute(String key,
                      String value)
Add a data attribute to the dataAttributes map

Parameters:
key -
value -

getDataAttributes

Map<String,String> getDataAttributes()

setDataAttributes

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

The attributes that are complex objects (contain {}) they will be written through script. The attributes 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.

Parameters:
dataAttributes -

getComplexDataAttributesJs

String getComplexDataAttributesJs()
A JavaScript script 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 {})

Returns:
jQuery data script for adding complex data attributes

getSimpleDataAttributes

String getSimpleDataAttributes()
The 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 {}

Returns:
html string for data attributes for the simple attributes

getAllDataAttributesJs

String getAllDataAttributesJs()
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

Returns:
jQuery data script for adding all data attributes


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