Interface Component
- All Superinterfaces:
Cloneable,Copyable,DictionaryBean,LifecycleElement,Ordered,org.springframework.core.Ordered,ScriptEventSupport,Serializable,UifDictionaryBean
- All Known Subinterfaces:
CollectionGroup,Container,ContentElement,Control,DataBinding,DataField,Field,Group,InputField,PageGroup,SelectControl,TextControl,Widget
- All Known Implementing Classes:
Accordion,AccordionGroup,Action,ActionField,ApplicationHeader,BlockUI,BreadcrumbItem,Breadcrumbs,CheckboxControl,CheckboxGroupControl,CollectionGroupBase,ComponentBase,ContainerBase,Content,ContentElementBase,ControlBase,DataFieldBase,DataTable,DatePicker,DialogGroup,Disclosure,Div,DocumentView,FieldBase,FieldGroup,FileControl,FormView,GenericField,GroupBase,GroupControl,GroupLinkField,Growls,Header,HeadLink,Help,HiddenControl,Icon,Iframe,IframeView,Image,ImageField,InputFieldBase,Inquiry,InquiryView,Label,LightBox,LightTable,Link,LinkField,LinkGroup,LocationSuggest,LookupInputField,LookupView,MaintenanceDocumentView,Message,MessageField,MessageView,MetaTag,MockView,MultiFileUploadCollection,MultiValueControlBase,NavigationBar,NextPager,NumberedPager,OptionListControl,PageGroupBase,Pager,PasswordControl,ProgressBar,ProgressBarField,QuickFinder,RadioGroupControl,RemoteFieldsHolder,RichTable,RoleLinkField,Scrollpane,SelectControlBase,SidebarNavigationGroup,Space,SpaceField,Spinner,SpinnerControl,StepProgressBar,Suggest,SyntaxHighlighter,TabGroup,TabNavigationGroup,Tabs,TextAreaControl,TextControlBase,ToggleMenu,Tooltip,TransactionalDocumentView,Tree,TreeGroup,UserControl,UserLinkField,View,ViewHeader,WidgetBase
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:
- Dictionary Configuration/Composition
- Java Class (the Component implementation
- >JSP Template Renderer
There are three basic types of components:
- Container Components:
View,Group - Field Components:
Field - Widget Components:
Widget
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAriaAttribute(String key, String value) Add an aria attribute to the ariaAttributes listvoidaddDataAttribute(String key, String value) Add a data attribute to the dataAttributes mapvoidaddScriptDataAttribute(String key, String value) Add a script data attribute to the scriptDataAttributes mapvoidaddStyleClass(String styleClass) Adds a single style to the list of styles on this componentvoidaddWrapperCssClass(String cssClass) Add a cell css class to the cell classes listvoidInvoked by the view lifecycle after expressions are evaluated at the apply model phase.voidappendToStyle(String itemStyle) Appends to the inline style set on a componentvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Returns a list of componentIds which will be also be refreshed when this component is refreshedReturns a string for representing the list of additional components to be refreshed as a JavaScript valueConvenience property for adding css class names to the end of the list of cssClasses that may already exist on this Component (this is to avoid explicitly having to set list merge in the bean definition)Gets additional templates that will be required during the rendering of this component.getAlign()Horizontal alignment of the component within its containerThe aria attributes of this component and their values (without "aria-", this is automatically appended during rendering)Get the aria attributes as a String that can be used during template outputIndicates whether the component should be cleared on copyWidth setting for the cell containing the component (only applies within table based layouts)intNumber of places the component should take up horizontally in the container; when using a CssGridLayoutManager this is converted to the appropriate medium size.ComponentModifierinstances that should be invoked to initialize the componentSecurity object that indicates what authorization (permissions) exist for the componentThe name for the component typeSpring EL expression, which when evaluates to true, causes this component to be refreshedA JavaScript expression constructed fromgetProgressiveRender()The list of control names (ids) extracted fromgetConditionalRefresh()Context map for the componentCSS style class(s) to be applied to the componentCssGridSizes represent the size (width) the content's div "cell" will take up in the "row" at each screen size (extra small, small, medium, large) when using a group backed by a CssGridLayoutManager.The DataAttributes that will be written to the html element for this component as data-String containing JavaScript code for registering event handlers for this component (blur, focus, click, etc.)Names a model property path, which if set and resolves to true, indicates that this component should be excluded from the lifecycle at the initialize phase.Names a model property path, which if set and resolves to null or false, indicates that this component should be excluded from the lifecycle at the initialize phase.Limits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.The List of Object instances that should be passed as arguments to the finalize methodMethodInvokerConfiginstance for the method that should be invoked for finalizing the component configurationThe name of the method that should be invoked for finalizing the component configuration (full method name, without parameters or return type)Gets the method to call on refresh.intgetOrder()Order of a component within a List of other componentsRaw html or string content to render after this component rendersRaw html or string content to render before this component rendersA JavaScript expression constructed fromgetConditionalRefresh()List of control names (ids) extracted fromgetProgressiveRender()Spring EL expression, which when evaluates to true, makes this component visibleList of components that are contained within the List ofPropertyReplacerin componentgets a list ofPropertyReplacerinstancesIndicates whether the component can be editedintTime in seconds after which the component is automatically refreshedSpecifies a property by name that when its value changes will automatically perform a refresh on this componentRendering output for the component that will be sent as part of the response (can contain static text and HTML)Indicates whether the component is requiredgetRole()The role attribute of this component, use to define aria rolesintNumber of places the component should take up vertically in the containerThe DataAttributes that will be written to the html as a script call to data for this component (these cannot be used for jQuery selection directly)Returns a js string that can be used to right js data attributes to for the componentThe string that can be put into a the tag of a component to add data attributes inlinegetStyle()CSS style string to be applied to the componentGets a string representing all CSS style classes.The path to the JSP file that should be called to render the componentThe name for which the template can be invoked byThe options that are passed through to the Component rendererBuilds a string from the underlyingMapof template options that will export that options as a JavaScript Map for use in js and jQuery pluginsgetTitle()The component titleThe Tooltip widget that renders a tooltip with additional information about the element on specified trigger eventVertical alignment of the component within its containergetWidth()Width the component should take up in the containerThe cellCssClasses property defines the classes that will be placed on the corresponding td (or th) elements relating to this component when used in a table backed layout.CSS style string to be applied to the cell containing the component (only applies within table based layouts)booleanDisables the storage of the component in session (when the framework determines it needs to be due to a refresh condition)booleanIf true if this component is disclosed by an action in js, a placeholder will be put in this components place if render is also false.booleanIndicates whether the component should be stored with the session view regardless of configurationbooleanisHidden()Indicates whether the component should be hidden in the UIbooleanWhether to omit fields from form post unless they are explicitly specified by theAction.fieldsToSendproperty.booleanDetermines whether the component will always be retrieved from the server and shownbooleanIndicates whether the component will be stored on the client, but hidden, after the first retrievalbooleanIndicates the component can be refreshed by an actionbooleanIndicates whether the component has been fully rendered.booleanIndicates whether data contained within the component should be reset (set to default) when the component is refreshedbooleanWhen true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsbooleanIndicates whether the component contains its own render output (through the renderOutput property)voidsetAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh) Setter for alsoRefreshComponentsvoidsetAdditionalCssClasses(List<String> styleClasses) Set the additionalCssClassesvoidSets the components horizontal alignmentvoidsetAriaAttributes(Map<String, String> ariaAttributes) voidsetCanCopyOnReadOnly(Boolean canCopyOnReadOnly) Setter for the canCopyOnReadOnly indicatorvoidsetCellWidth(String cellWidth) Setter for the containing cell widthvoidsetColSpan(int colSpan) Setter for the components column spanvoidsetComponentModifiers(List<ComponentModifier> componentModifiers) Setter for the components List ofComponentModifierinstancesvoidsetComponentSecurity(ComponentSecurity componentSecurity) Setter for the components security objectvoidsetConditionalRefresh(String conditionalRefresh) Setter for conditionalRefresh Spring EL expressionvoidsetContext(Map<String, Object> context) Setter for the context MapvoidsetCssClasses(List<String> styleClasses) Setter for the components style classesvoidsetCssGridSizes(CssGridSizes cssGridSizes) voidsetDataAttributes(Map<String, String> dataAttributes) Setter for data attributes to include for the componentvoidsetDisableSessionPersistence(boolean disableSessionPersistence) Setter for disabling storage of the component in sessionvoidsetDisclosedByAction(boolean disclosedByAction) Set if this component is disclosed by some outside actionvoidsetFieldsToSendOnRefresh(List<String> fieldsToSendOnRefresh) voidsetForceSessionPersistence(boolean persistInSession) Setter for the indicator to force persistence of the component in sessionvoidsetHidden(boolean hidden) Setter for the hidden indicatorvoidsetLibraryCssClasses(List<String> libraryCssClasses) voidsetOmitFromFormPost(boolean omitFromFormPost) voidsetOrder(int order) Setter for the component's ordervoidsetPostRenderContent(String postRenderContent) Set the postRenderContentvoidsetPreRenderContent(String preRenderContent) Set the preRenderContentvoidsetProgressiveRender(String progressiveRender) Setter for progressiveRender Spring EL expressionvoidsetProgressiveRenderAndRefresh(boolean progressiveRenderAndRefresh) Setter for the progressiveRenderAndRefresh flagvoidsetProgressiveRenderViaAJAX(boolean progressiveRenderViaAJAX) Setter for the progressiveRenderViaAJAX flagvoidsetPropertyReplacers(List<PropertyReplacer> propertyReplacers) Setter for the components property substitutionsvoidsetReadOnly(Boolean readOnly) Setter for the read only indicatorvoidsetRefreshedByAction(boolean refreshedByAction) Setter for the refreshed by action indicatorvoidsetRefreshTimer(int refreshTimer) Setter for refreshTimervoidsetRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames) Setter for the list of property names that trigger a refreshvoidsetRenderedHtmlOutput(String renderOutput) Setter for the component's render outputvoidsetRequired(Boolean required) Setter for the required indicatorvoidsetResetDataOnRefresh(boolean resetDataOnRefresh) Setter for the reset data on refresh indicatorvoidsetRetrieveViaAjax(boolean useAjaxCallForContent) When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsvoidvoidsetRowSpan(int rowSpan) Setter for the component row spanvoidsetScriptDataAttributes(Map<String, String> dataAttributes) Setter for script data attributes to include for the componentvoidsetSelfRendered(boolean selfRendered) Setter for the self render indicatorvoidSetter for the components stylevoidsetTemplate(String template) Setter for the components templatevoidsetTemplateName(String templateName) Setter for the name of the template (a name which can be used to invoke)voidsetTemplateOptions(Map<String, String> templateOptions) Setter for the template's optionsvoidsetTemplateOptionsJSString(String templateOptionsJSString) Setter for the template's optionsvoidSetter for the component's titlevoidsetToolTip(Tooltip toolTip) Setter for the component tooltip widget instancevoidSetter for the component's vertical alignvoidsetViewStatus(String status) Set the view lifecycle processing status for this component, explicitly.voidSetter for the components widthvoidsetWrapperCssClasses(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.voidsetWrapperStyle(String cellStyle) Setter for the cell style attributeMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, performFinalize, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Method Details
-
getComponentTypeName
String getComponentTypeName()The name for the component typeThis 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
-
isRendered
boolean isRendered()Indicates whether the component has been fully rendered.- Returns:
- True if the component has fully rendered, false if not.
-
afterEvaluateExpression
void afterEvaluateExpression()Invoked by the view lifecycle after expressions are evaluated at the apply model phase.In general, this method is preferred to
LifecycleElement.performApplyModel(Object, LifecycleElement)for populating model data via code, since it is called before client-side state is synchronize. -
setViewStatus
Set the view lifecycle processing status for this component, explicitly.- Specified by:
setViewStatusin interfaceLifecycleElement- Parameters:
status- The view status for this component.- See Also:
-
getTemplate
String getTemplate()The path to the JSP file that should be called to render the componentThe path should be relative to the web root. An attribute will be available to the component to use under the name given by the method
getComponentTypeName. Based on the component type, additional attributes could be available for use. See the component documentation for more information on such attributes.e.g. '/krad/WEB-INF/jsp/tiles/component.jsp'
- Returns:
- String representing the template path
-
setTemplate
Setter for the components template- Parameters:
template-
-
getAdditionalTemplates
Gets additional templates that will be required during the rendering of this component.If a parent or sibling component is referred to by this component's template, include that component's template here to ensure that it has been compiled already during bottom-up inline rendering.
- Returns:
- additional templates required during rendering
-
getTemplateName
String getTemplateName()The name for which the template can be invoked byWhether the template name is needed depends on the underlying rendering engine being used. In the example of Freemarker, the template points to the actual source file, which then loads a macro. From then on the macro is simply invoked to execute the template
e.g. 'uif_text'
- Returns:
- template name
-
setTemplateName
Setter for the name of the template (a name which can be used to invoke)- Parameters:
templateName-
-
getTitle
String getTitle()The component titleDepending on the component can be used in various ways. For example with a Container component the title is used to set the header text. For components like controls other other components that render an HTML element it is used to set the HTML title attribute.
- Returns:
- String title for component
-
setTitle
Setter for the component's title- Parameters:
title-
-
getPropertyReplacerComponents
List of components that are contained within the List ofPropertyReplacerin componentUsed to get all the nested components in the property replacers.
- Returns:
- List<Component>
PropertyReplacerchild components
-
getComponentModifiers
List<ComponentModifier> getComponentModifiers()ComponentModifierinstances that should be invoked to initialize the componentThese provide dynamic initialization behavior for the component and are configured through the components definition. Each initializer will get invoked by the initialize method.
- Returns:
- List of component modifiers
- See Also:
-
setComponentModifiers
Setter for the components List ofComponentModifierinstances- Parameters:
componentModifiers-
-
isRetrieveViaAjax
boolean isRetrieveViaAjax()When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the jsThis flag does not imply any automation, there must be a js call invoked for the content to be retrieved by the server, but this does mark it with a placeholder component which KRAD js uses during these calls. This placeholder component is used for ajax retrievals. In particular, this flag is useful for use in combination with the showLightboxComponent js function which will automatically retrieve the real content of a component through ajax if a placeholder component is detected. This allows for the full content to only be retrieved when the lightbox is first opened. When this flag is set to true, the forceSessionPersistence flag is set to true AUTOMATICALLY because it is implied that this component will be retrieved by an ajax call in the future. This may also be useful for direct custom calls to retrieveComponent function, as well, which also relies on the placeholder being present.
- Returns:
- true if this component is being rendered as a placeholder for use in replacement during and ajax call, false otherwise
-
setRetrieveViaAjax
void setRetrieveViaAjax(boolean useAjaxCallForContent) When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the js- Parameters:
useAjaxCallForContent-
-
isHidden
boolean isHidden()Indicates whether the component should be hidden in the UIHow the hidden data is maintained depends on the views persistence mode. If the mode is request, the corresponding data will be rendered to the UI but not visible. If the mode is session, the data will not be rendered to the UI but maintained server side.
For a
Containercomponent, the hidden setting will apply to all contained components (making a section hidden makes all fields within the section hidden)- 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-
-
getReadOnly
Boolean getReadOnly()Indicates whether the component can be editedWhen readOnly the controls and widgets of
Fieldcomponents will not be rendered. If the Field has an underlying value it will be displayed readOnly to the user.For a
Containercomponent, the readOnly setting will apply to all contained components (making a section readOnly makes all fields within the section readOnly).- Returns:
- boolean true if the component should be readOnly, false if is allows editing
-
setReadOnly
Setter for the read only indicator- Parameters:
readOnly-
-
getCanCopyOnReadOnly
Boolean getCanCopyOnReadOnly()Indicates whether the component should be cleared on copyBy default this property is false. ReadOnly components are cleared on a copy operation. If set this prevents the component from being cleared.
- Returns:
-
setCanCopyOnReadOnly
Setter for the canCopyOnReadOnly indicator- Parameters:
canCopyOnReadOnly-
-
getRequired
Boolean getRequired()Indicates whether the component is requiredAt the general component level required means there is some action the user needs to take within the component. For example, within a section it might mean the fields within the section should be completed. At a field level, it means the field should be completed. This provides the ability for the renderers to indicate the required action.
- Returns:
- boolean true if the component is required, false if it is not required
-
setRequired
Setter for the required indicator- Parameters:
required-
-
getAlign
String getAlign()Horizontal alignment of the component within its containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies how the component should be aligned horizontally within the container. During the finalize phase the CSS text-align style will be created for the align setting.- Returns:
- String horizontal align
- See Also:
-
setAlign
Sets the components horizontal alignment- Parameters:
align-
-
getValign
String getValign()Vertical alignment of the component within its containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies how the component should be aligned vertically within the container. During the finalize phase the CSS vertical-align style will be created for the valign setting.- Returns:
- String vertical align
- See Also:
-
setValign
Setter for the component's vertical align- Parameters:
valign-
-
getWidth
String getWidth()Width the component should take up in the containerAll components belong to a
Containerand are placed using aLayoutManager. This property specifies a width the component should take up in the Container. This is not applicable for all layout managers. During the finalize phase the CSS width style will be created for the width setting.e.g. '30%', '55px'
- Returns:
- String width string
-
setWidth
Setter for the components width- Parameters:
width-
-
getStyle
String getStyle()CSS style string to be applied to the componentAny style override or additions can be specified with this attribute. This is used by the renderer to set the style attribute on the corresponding element.
e.g. 'color: #000000;text-decoration: underline;'
- Returns:
- String css style string
-
setStyle
Setter for the components style- Parameters:
style-
-
getLibraryCssClasses
-
setLibraryCssClasses
-
getCssClasses
CSS style class(s) to be applied to the componentDeclares style classes for the component. Multiple classes are specified with a space delimiter. This is used by the renderer to set the class attribute on the corresponding element. The class(s) declared must be available in the common style sheets or the style sheets specified for the view
- Returns:
- List<String> css style classes to appear on the 'class' attribute
-
setCssClasses
Setter for the components style classes -
getAdditionalCssClasses
Convenience property for adding css class names to the end of the list of cssClasses that may already exist on this Component (this is to avoid explicitly having to set list merge in the bean definition)- Returns:
- the additionalCssClasses
-
setAdditionalCssClasses
Set the additionalCssClasses- Parameters:
styleClasses-
-
addStyleClass
Adds a single style to the list of styles on this component- Parameters:
styleClass-
-
appendToStyle
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; when using a CssGridLayoutManager this is converted to the appropriate medium size.All components belong to a
TODO: this should not be on component interface since it only applies if the layout manager supports it, need some sort of layoutOptions map for field level options that depend on the managerContainerand are placed using aLayoutManager. This property specifies how many places horizontally the component should take up within the container. This is only applicable for table based layout managers. Default is 1- 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 containerAll components belong to a
TODO: this should not be on component interface since it only applies if the layout manager supports it, need some sort of layoutOptions map for field level options that depend on the managerContainerand are placed using aLayoutManager. This property specifies how many places vertically the component should take up within the container. This is only applicable for table based layout managers. Default is 1- Returns:
- int number of rows to span
-
setRowSpan
void setRowSpan(int rowSpan) Setter for the component row span- Parameters:
rowSpan-
-
getWrapperCssClasses
The cellCssClasses property defines the classes that will be placed on the corresponding td (or th) elements relating to this component when used in a table backed layout. This property has no effect on other layouts.- Returns:
- the css classes to apply to the wrapping td (or th) element for this component
-
setWrapperCssClasses
Set the cellCssClasses property which defines the classes that will be placed on the corresponding td (or th) relating to this component when used in a table backed layout. This property has no effect on other layouts.- Parameters:
cellCssClasses-
-
addWrapperCssClass
Add a cell css class to the cell classes list- Parameters:
cssClass- the name of the class to add
-
getWrapperStyle
String getWrapperStyle()CSS style string to be applied to the cell containing the component (only applies within table based layouts)e.g. 'align: right;'
- Returns:
- String css style string
-
setWrapperStyle
Setter for the cell style attribute- Parameters:
cellStyle-
-
getCellWidth
String getCellWidth()Width setting for the cell containing the component (only applies within table based layouts)- Returns:
- String width ('25%', '155px')
-
setCellWidth
Setter for the containing cell width- Parameters:
cellWidth-
-
getCssGridSizes
CssGridSizes getCssGridSizes()CssGridSizes represent the size (width) the content's div "cell" will take up in the "row" at each screen size (extra small, small, medium, large) when using a group backed by a CssGridLayoutManager.This object is NOT used by other layouts. For specifics of how css grids work, refer to the krad guide and bootstrap css grid documentation.
- Returns:
-
setCssGridSizes
- See Also:
-
getContext
Context map for the componentAny el statements configured for the components properties (e.g. title="@{foo.property}") are evaluated using the el context map. This map will get populated with default objects like the model, view, and request from the
ViewHelperService. Other components can push further objects into the context so that they are available for use with that component. For example,Fieldinstances that are part of a collection line as receive the current line instanceContext map also provides objects to methods that are invoked for
GeneratedFieldinstancesThe Map key gives the name of the variable that can be used within expressions, and the Map value gives the object instance for which expressions containing the variable should evaluate against
NOTE: Calling getContext().putAll() will skip updating any configured property replacers for the component. Instead you should call #pushAllToContextDeep
- Specified by:
getContextin interfaceLifecycleElement- Returns:
- Mapinvalid input: '<'String, Object> context
-
setContext
Setter for the context Map- Specified by:
setContextin interfaceLifecycleElement- Parameters:
context-- See Also:
-
getPropertyReplacers
List<PropertyReplacer> getPropertyReplacers()gets a list ofPropertyReplacerinstancesThey will be evaluated during the view lifecycle to conditionally set properties on the
Componentbased on expression evaluations- Returns:
- List<PropertyReplacer> replacers to evaluate
-
setPropertyReplacers
Setter for the components property substitutions -
getTemplateOptions
The options that are passed through to the Component rendererThe Map key is the option name, with the Map value as the option value. See documentation on the particular widget render for available options.
- Returns:
- Mapinvalid input: '<'String, String> options
-
setTemplateOptions
Setter for the template's options- Parameters:
templateOptions-
-
getTemplateOptionsJSString
String getTemplateOptionsJSString()Builds a string from the underlyingMapof template options that will export that options as a JavaScript Map for use in js and jQuery pluginsSee documentation on the particular component render for available options.
- Returns:
- String options
-
setTemplateOptionsJSString
Setter for the template's options- Parameters:
templateOptionsJSString-
-
getOrder
int getOrder()Order of a component within a List of other componentsLower numbers are placed higher up in the list, while higher numbers are placed lower in the list
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
- int ordering number
- See Also:
-
setOrder
void setOrder(int order) Setter for the component's order -
getToolTip
Tooltip getToolTip()The Tooltip widget that renders a tooltip with additional information about the element on specified trigger event- Returns:
- Tooltip
-
setToolTip
Setter for the component tooltip widget instance- Parameters:
toolTip-
-
getEventHandlerScript
String getEventHandlerScript()String containing JavaScript code for registering event handlers for this component (blur, focus, click, etc.)- Returns:
- JS event handler script
-
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 configuredThe model backing the view will be passed as the first argument method and then the
Componentinstance as the second argument. If any additional method arguments are declared with the finalizeMethodAdditionalArguments, they will then be passed in the order declared in the listIf the component is selfRendered, the finalize method can return a string which will be set as the component's renderOutput. The selfRendered indicator will also be set to true on the component.
- Returns:
- String method name
-
getFinalizeMethodAdditionalArguments
The List of Object instances that should be passed as arguments to the finalize methodThese arguments are passed to the finalize method after the standard model and component arguments. They are passed in the order declared in the list
- Returns:
- List<Object> additional method arguments
-
getFinalizeMethodInvoker
MethodInvokerConfig getFinalizeMethodInvoker()MethodInvokerConfiginstance for the method that should be invoked for finalizing the component configurationMethodInvoker can be configured to specify the class or object the method should be called on. For static method invocations, the targetClass property can be configured. For object invocations, that targetObject property can be configured
If the component is selfRendered, the finalize method can return a string which will be set as the component's renderOutput. The selfRendered indicator will also be set to true on the component.
- 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
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 configurationBy default the framework nulls out any components that do not have a refresh condition or are needed for collection processing. This can be a problem if custom application code is written to refresh a component without setting the corresponding component flag. In this case this property can be set to true to force the framework to keep the component in session. Defaults to false
- 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
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
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
Setter for conditionalRefresh Spring EL expression- Parameters:
conditionalRefresh- the conditionalRefresh to set
-
getProgressiveDisclosureControlNames
List of control names (ids) extracted fromgetProgressiveRender()- Returns:
- the list of control names
-
getProgressiveDisclosureConditionJs
String getProgressiveDisclosureConditionJs()A JavaScript expression constructed fromgetConditionalRefresh()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 fromgetProgressiveRender()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
The list of control names (ids) extracted fromgetConditionalRefresh()- Returns:
- the list of control names
-
isProgressiveRenderViaAJAX
boolean isProgressiveRenderViaAJAX()Indicates whether the component will be stored on the client, but hidden, after the first retrievalThe 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 shownIf 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
Specifies a property by name that when its value changes will automatically perform a refresh on this componentThis can be a comma separated list of multiple properties that require this component to be refreshed when any of them change.
DO NOT use with progressiveRender unless it is know that progressiveRender condition will always be satisfied before one of these fields can be changed.- Returns:
- List property names that should trigger a refresh when their values change
-
setRefreshWhenChangedPropertyNames
Setter for the list of property names that trigger a refresh- Parameters:
refreshWhenChangedPropertyNames-
-
getAdditionalComponentsToRefresh
Returns a list of componentIds which will be also be refreshed when this component is refreshedThis will be a comma separated list of componentIds that need to be refreshed when a refresh condition has been set on this component.
- Returns:
- List<String>
-
setAdditionalComponentsToRefresh
Setter for alsoRefreshComponents -
getAdditionalComponentsToRefreshJs
String getAdditionalComponentsToRefreshJs()Returns a string for representing the list of additional components to be refreshed as a JavaScript value- Returns:
- String representation of the list of componentIds for the components that need to be refreshed
-
isRefreshedByAction
boolean isRefreshedByAction()Indicates the component can be refreshed by an actionThis is set by the framework for configured ajax action buttons, should not be set in configuration
- 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 indicatorThis is set by the framework for configured ajax action buttons, should not be set in configuration
- Parameters:
refreshedByAction-
-
isDisclosedByAction
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.- Returns:
- true if this component is disclosed by an action
-
setDisclosedByAction
void setDisclosedByAction(boolean disclosedByAction) Set if this component is disclosed by some outside action- Parameters:
disclosedByAction-
-
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-
-
getRefreshTimer
int getRefreshTimer()Time in seconds after which the component is automatically refreshed- Returns:
- time in seconds
-
setRefreshTimer
void setRefreshTimer(int refreshTimer) Setter for refreshTimer- Parameters:
refreshTimer-
-
getDataAttributes
The DataAttributes that will be written to the html element for this component as data-They can be access through .data() call in jQuery.
- Returns:
- map of data attributes, where key is data attribute name and the map value is the data attribute value
-
setDataAttributes
Setter for data attributes to include for the component- Parameters:
dataAttributes-
-
setScriptDataAttributes
Setter for script data attributes to include for the component- Parameters:
dataAttributes-
-
getScriptDataAttributes
The DataAttributes that will be written to the html as a script call to data for this component (these cannot be used for jQuery selection directly)They can be accessed through .data() call in jQuery.
- Returns:
- map of data attributes, where key is data attribute name and the map value is the data attribute value
-
addDataAttribute
Add a data attribute to the dataAttributes map- Parameters:
key-value-
-
addScriptDataAttribute
Add a script data attribute to the scriptDataAttributes map- Parameters:
key-value-
-
getSimpleDataAttributes
String getSimpleDataAttributes()The string that can be put into a the tag of a component to add data attributes inline- Returns:
- html string for data attributes as html formatted element attributes
-
getScriptDataAttributesJs
String getScriptDataAttributesJs()Returns a js string that can be used to right js data attributes to for the component- Returns:
- html string for the js required to add the script data attributes
-
getRole
String getRole()The role attribute of this component, use to define aria roles- Returns:
- the role attribute
-
setRole
- See Also:
-
getAriaAttributes
The aria attributes of this component and their values (without "aria-", this is automatically appended during rendering)- Returns:
- the aria attributes of this component
-
setAriaAttributes
- See Also:
-
addAriaAttribute
Add an aria attribute to the ariaAttributes list- Parameters:
key- the attribute (no "aria-" prefix)value- the attribute's value
-
getAriaAttributesAsString
String getAriaAttributesAsString()Get the aria attributes as a String that can be used during template output- Returns:
- the aria attributes as a string
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Parameters:
tracer- Record of component's location
-
getPreRenderContent
String getPreRenderContent()Raw html or string content to render before this component renders- Returns:
- the preRenderContent string
-
setPreRenderContent
Set the preRenderContent- Parameters:
preRenderContent-
-
getPostRenderContent
String getPostRenderContent()Raw html or string content to render after this component renders- Returns:
- the postRenderContent string
-
setPostRenderContent
Set the postRenderContent- Parameters:
postRenderContent-
-
getMethodToCallOnRefresh
String getMethodToCallOnRefresh()Gets the method to call on refresh.- Returns:
- method to call
-
getFieldsToSendOnRefresh
Limits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.The names in the list should be the propertyNames of the fields sent with this request. A wildcard("*") can be used at the END of a name to specify all fields with names that begin with the string before the wildcard. If the array contains 1 item with the keyword "NONE", then no form fields are sent. In addition, a group id or field id with the "#" id selector prefix can be used to send all input data which are nested within them. Note that this only limits the fields which exist on the form and data required by the KRAD framework is still sent (eg, methodToCall, formKey, sessionId, etc.)
- Returns:
- the only input fields to send by name with the action request
-
setFieldsToSendOnRefresh
- See Also:
-
getStyleClassesAsString
String getStyleClassesAsString()Gets a string representing all CSS style classes.- Returns:
- string representation of CSS classes
-
getExcludeIf
String getExcludeIf()Names a model property path, which if set and resolves to true, indicates that this component should be excluded from the lifecycle at the initialize phase.If prefixed with the '#' character, this path will be relative to the view's "pre-model" context rather than the model.
This property is superseded by
getExcludeUnless(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.- Returns:
- model property path
- See Also:
-
getExcludeUnless
String getExcludeUnless()Names a model property path, which if set and resolves to null or false, indicates that this component should be excluded from the lifecycle at the initialize phase.If prefixed with the '#' character, this path will be relative to the view's "pre-model" context rather than the model.
This property supersedes
getExcludeIf(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.- Returns:
- model property path
- See Also:
-
isOmitFromFormPost
boolean isOmitFromFormPost()Whether to omit fields from form post unless they are explicitly specified by theAction.fieldsToSendproperty.- Returns:
- whether fields will be omitted from form post
-
setOmitFromFormPost
void setOmitFromFormPost(boolean omitFromFormPost) - See Also:
-