Class ComponentBase

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, Ordered, ScriptEventSupport, LifecycleElement, org.springframework.core.Ordered
Direct Known Subclasses:
ContainerBase, ContentElementBase, FieldBase, RemoteFieldsHolder, WidgetBase

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:
  • Field Details

  • Constructor Details

    • ComponentBase

      public ComponentBase()
  • Method Details

    • skipLifecycle

      public boolean skipLifecycle()
      Return true if the lifecycle should be skipped for this component.

      Skipping the lifecycle means do not invoke the performInitialize, performApplyModel, and performFinalize methods of this component and its children. This means that content built by those lifecycle tasks will not be processed or applied. Skipping the lifecycle on a component helps initial load/setup performance by only performing the full lifecycle when the component is requested on subsequent requests (ajax retrievals).

      Specified by:
      skipLifecycle in interface LifecycleElement
      Returns:
      true if lifecycle should be skipped for this component
    • checkMutable

      public void checkMutable(boolean legalDuringInitialization)
      Description copied from interface: LifecycleElement
      Check for mutability on the element before modifying state.
      Specified by:
      checkMutable in interface LifecycleElement
      Parameters:
      legalDuringInitialization - True if the operation is legal during view initialization, false if the operation is only allowed during the component lifecycle.
      See Also:
    • isMutable

      public boolean isMutable(boolean legalDuringInitialization)
      Description copied from interface: LifecycleElement
      Determine if this lifecycle element is mutable.

      Most lifecycle element are immutable, and all are immutable expect during initialization and the during the view lifecycle. Those that have been copied within the view lifecycle, however, may be modified during the same lifecycle.

      Specified by:
      isMutable in interface LifecycleElement
      Parameters:
      legalDuringInitialization - true if the current operation may be called before the lifecycle element has been cached, for example while being initialized as part of a Spring context.
      Returns:
      True if the component is mutable.
      See Also:
    • getViewStatus

      public String getViewStatus()
      Indicates what lifecycle phase the component instance is in

      The view lifecycle begins with the CREATED status. In this status a new instance of the view has been retrieved from the dictionary, but no further processing has been done. After the initialize phase has been run the status changes to INITIALIZED. After the model has been applied and the view is ready for render the status changes to FINAL

      Specified by:
      getViewStatus in interface LifecycleElement
      Returns:
      view status
      See Also:
    • setViewStatus

      public void setViewStatus(String status)
      Setter for the view status
      Specified by:
      setViewStatus in interface Component
      Specified by:
      setViewStatus in interface LifecycleElement
      Parameters:
      status - view status
      See Also:
    • notifyCompleted

      public void notifyCompleted(ViewLifecyclePhase phase)
      Receive notification that a lifecycle phase, and all successor phases, have been completed on this component.
      Specified by:
      notifyCompleted in interface LifecycleElement
      Parameters:
      phase - The completed view lifecycle phase
    • isInitialized

      public boolean isInitialized()
      Indicates whether the component has been initialized.
      Specified by:
      isInitialized in interface LifecycleElement
      Returns:
      True if the component has been initialized, false if not.
    • isModelApplied

      public boolean isModelApplied()
      Indicates whether the component has been updated from the model.
      Specified by:
      isModelApplied in interface LifecycleElement
      Returns:
      True if the component has been updated, false if not.
    • isFinal

      public boolean isFinal()
      Indicates whether the component has been updated from the model and final updates made.
      Specified by:
      isFinal in interface LifecycleElement
      Returns:
      True if the component has been updated, false if not.
    • isRendered

      public boolean isRendered()
      Indicates whether the component has been fully rendered.
      Specified by:
      isRendered in interface Component
      Returns:
      True if the component has fully rendered, false if not.
    • performInitialization

      public void performInitialization(Object model)
      The following updates are done here:
      • Invoke performInitialize on component modifiers
      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.

      Specified by:
      performInitialization in interface LifecycleElement
      Parameters:
      model - - object instance containing the view data
      See Also:
    • performApplyModel

      public void performApplyModel(Object model, LifecycleElement parent)
      The following updates are done here:
      • Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
      Called after the initialize phase to perform conditional logic based on the model data

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

      Specified by:
      performApplyModel in interface LifecycleElement
      Parameters:
      model - - Top level object containing the data (could be the form or a top level business object, dto)
      parent - parent lifecycle element
    • afterEvaluateExpression

      public void afterEvaluateExpression()
      No-op implementation. Override for custom behavior in subclasses. Invoked by the view lifecycle after expressions are evaluated at the apply model phase.

      In general, this method is preferred to LifecycleElement.performApplyModel(Object, LifecycleElement) for populating model data via code, since it is called before client-side state is synchronize.

      Specified by:
      afterEvaluateExpression in interface Component
    • performFinalize

      public void performFinalize(Object model, LifecycleElement parent)
      The following finalization is done here:
      • progressiveRender and conditionalRefresh variables are processed if set
      • If any of the style properties were given, sets the style string on the style property
      • Set the skipInTabOrder flag for nested components
      The last phase before the view is rendered

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

      Specified by:
      performFinalize in interface LifecycleElement
      Parameters:
      model - - top level object containing the data
      parent - - parent component
    • getPropertyReplacerComponents

      @ViewLifecycleRestriction 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()
      The unique id (within a given tree) for the element.

      The id is used to identify an element instance within the tree, and will be used by renderers to set the HTML element id. This gives a way to find various elements for scripting. If the id is not given, a default will be generated by the framework.

      Specified by:
      getId in interface LifecycleElement
      Returns:
      A unique ID for this lifecycle element.
    • setId

      public void setId(String id)
      Setter for the unique id (within a given tree) for the component
      Specified by:
      setId in interface LifecycleElement
      Parameters:
      id - - string to set as the component id
    • getContainerIdSuffix

      public String getContainerIdSuffix()
      A string suffix that should get applied to the id for all child components of the given element.

      This is mainly used within the framework to keep ids unique. For instance, for components generated for collection lines, all the components within those should get a line suffix. The framework will set this property to be '_line0', '_line1', etc. Then when the apply model phase is run on the child components their ids will be updated with this suffix.

      Specified by:
      getContainerIdSuffix in interface LifecycleElement
      Returns:
      String id suffix for child components
      See Also:
    • setContainerIdSuffix

      public void setContainerIdSuffix(String containerIdSuffix)
      Specified by:
      setContainerIdSuffix in interface LifecycleElement
      See Also:
    • getViewPath

      public String getViewPath()
      Gets a property for referring to this component from the view, relative to the view, as assigned by the current or most recent lifecycle.
      Specified by:
      getViewPath in interface LifecycleElement
      Returns:
      property path
    • setViewPath

      public void setViewPath(String viewPath)
      Specified by:
      setViewPath in interface LifecycleElement
      Parameters:
      viewPath - The property path.
    • getPhasePathMapping

      public Map<String,String> getPhasePathMapping()
      Map of paths for this component that will be used to process a refresh (if necessary).
      Specified by:
      getPhasePathMapping in interface LifecycleElement
      Returns:
      map of refresh paths, key represents the lifecycle phase and the value is the path for the component at that phase
    • setPhasePathMapping

      public void setPhasePathMapping(Map<String,String> phasePathMapping)
      Specified by:
      setPhasePathMapping in interface LifecycleElement
      See Also:
    • getTemplate

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

      Specified by:
      getTemplate in interface Component
      Returns:
      String representing the template path
    • setTemplate

      public void setTemplate(String template)
      Setter for the components template
      Specified by:
      setTemplate in interface Component
      Parameters:
      template -
    • getAdditionalTemplates

      public List<String> getAdditionalTemplates()
      Gets additional templates that will be required during the rendering of this component.

      If a parent or sibling component is referred to by this component's template, include that component's template here to ensure that it has been compiled already during bottom-up inline rendering.

      Specified by:
      getAdditionalTemplates in interface Component
      Returns:
      additional templates required during rendering
    • getTemplateName

      public String getTemplateName()
      The name for which the template can be invoked by

      Whether the template name is needed depends on the underlying rendering engine being used. In the example of Freemarker, the template points to the actual source file, which then loads a macro. From then on the macro is simply invoked to execute the template

      e.g. 'uif_text'

      Specified by:
      getTemplateName in interface Component
      Returns:
      template name
    • setTemplateName

      public void setTemplateName(String templateName)
      Setter for the name of the template (a name which can be used to invoke)
      Specified by:
      setTemplateName in interface Component
      Parameters:
      templateName -
    • getTitle

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

      Specified by:
      getTitle in interface Component
      Returns:
      String title for component
    • setTitle

      public void setTitle(String title)
      Setter for the component's title
      Specified by:
      setTitle in interface Component
      Parameters:
      title -
    • isHidden

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

      Specified by:
      isHidden in interface Component
      Returns:
      boolean true if the component should be hidden, false if it should be visible
    • setHidden

      public void setHidden(boolean hidden)
      Setter for the hidden indicator
      Specified by:
      setHidden in interface Component
      Parameters:
      hidden -
    • getReadOnly

      public Boolean getReadOnly()
      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:
      getReadOnly in interface Component
      Returns:
      boolean true if the component should be readOnly, false if is allows editing
    • setReadOnly

      public void setReadOnly(Boolean readOnly)
      Setter for the read only indicator
      Specified by:
      setReadOnly in interface Component
      Parameters:
      readOnly -
    • getCanCopyOnReadOnly

      public Boolean getCanCopyOnReadOnly()
      Indicates whether the component should be cleared on copy

      By default this property is false. ReadOnly components are cleared on a copy operation. If set this prevents the component from being cleared.

      Specified by:
      getCanCopyOnReadOnly in interface Component
      Returns:
    • setCanCopyOnReadOnly

      public void setCanCopyOnReadOnly(Boolean canCopyOnReadOnly)
      Setter for the canCopyOnReadOnly indicator
      Specified by:
      setCanCopyOnReadOnly in interface Component
      Parameters:
      canCopyOnReadOnly -
    • getRequired

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

      Specified by:
      getRequired in interface Component
      Returns:
      boolean true if the component is required, false if it is not required
    • setRequired

      public void setRequired(Boolean required)
      Setter for the required indicator
      Specified by:
      setRequired in interface Component
      Parameters:
      required -
    • isRender

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

      Specified by:
      isRender in interface LifecycleElement
      Returns:
      boolean true if the component should be rendered, false if it should not be
    • setRender

      public void setRender(boolean render)
      Setter for the components render indicator
      Specified by:
      setRender in interface LifecycleElement
      Parameters:
      render -
    • isRetrieveViaAjax

      public boolean isRetrieveViaAjax()
      When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the js

      This flag does not imply any automation, there must be a js call invoked for the content to be retrieved by the server, but this does mark it with a placeholder component which KRAD js uses during these calls. This placeholder component is used for ajax retrievals. In particular, this flag is useful for use in combination with the showLightboxComponent js function which will automatically retrieve the real content of a component through ajax if a placeholder component is detected. This allows for the full content to only be retrieved when the lightbox is first opened. When this flag is set to true, the forceSessionPersistence flag is set to true AUTOMATICALLY because it is implied that this component will be retrieved by an ajax call in the future. This may also be useful for direct custom calls to retrieveComponent function, as well, which also relies on the placeholder being present.

      Specified by:
      isRetrieveViaAjax in interface Component
      Returns:
      true if this component is being rendered as a placeholder for use in replacement during and ajax call, false otherwise
    • setRetrieveViaAjax

      public void setRetrieveViaAjax(boolean retrieveViaAjax)
      When true, this component will render as a placeholder component instead of rendering normally because the content will be later retrieved through manually ajax retrieval calls in the js
      Specified by:
      setRetrieveViaAjax in interface Component
      Parameters:
      retrieveViaAjax -
    • getColSpan

      public int getColSpan()
      Number of places the component should take up horizontally in the container; when using a CssGridLayoutManager this is converted to the appropriate medium size.

      All components belong to a 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
    • setColSpan

      public void setColSpan(int colSpan)
      Setter for the components column span
      Specified by:
      setColSpan in interface Component
      Parameters:
      colSpan -
    • getRowSpan

      public 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
      Specified by:
      getRowSpan in interface Component
      Returns:
      int number of rows to span
    • setRowSpan

      public void setRowSpan(int rowSpan)
      Setter for the component row span
      Specified by:
      setRowSpan in interface Component
      Parameters:
      rowSpan -
    • getWrapperCssClasses

      public List<String> getWrapperCssClasses()
      The cellCssClasses property defines the classes that will be placed on the corresponding td (or th) elements relating to this component when used in a table backed layout. This property has no effect on other layouts.
      Specified by:
      getWrapperCssClasses in interface Component
      Returns:
      the css classes to apply to the wrapping td (or th) element for this component
    • setWrapperCssClasses

      public void setWrapperCssClasses(List<String> wrapperCssClasses)
      Set the cellCssClasses property which defines the classes that will be placed on the corresponding td (or th) relating to this component when used in a table backed layout. This property has no effect on other layouts.
      Specified by:
      setWrapperCssClasses in interface Component
      Parameters:
      wrapperCssClasses -
    • addWrapperCssClass

      public void addWrapperCssClass(String cssClass)
      Add a cell css class to the cell classes list
      Specified by:
      addWrapperCssClass in interface Component
      Parameters:
      cssClass - the name of the class to add
    • getWrapperCssClassesAsString

      public String getWrapperCssClassesAsString()
      Builds the HTML class attribute string by combining the cellStyleClasses list with a space delimiter.
      Returns:
      class attribute string
    • getWrapperStyle

      public String getWrapperStyle()
      CSS style string to be applied to the cell containing the component (only applies within table based layouts)

      e.g. 'align: right;'

      Specified by:
      getWrapperStyle in interface Component
      Returns:
      String css style string
    • setWrapperStyle

      public void setWrapperStyle(String wrapperStyle)
      Setter for the cell style attribute
      Specified by:
      setWrapperStyle in interface Component
      Parameters:
      wrapperStyle -
    • getCellWidth

      public String getCellWidth()
      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')
    • setCellWidth

      public void setCellWidth(String cellWidth)
      Setter for the containing cell width
      Specified by:
      setCellWidth in interface Component
      Parameters:
      cellWidth -
    • getCssGridSizes

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

      Specified by:
      getCssGridSizes in interface Component
      Returns:
    • setCssGridSizes

      public void setCssGridSizes(CssGridSizes cssGridSizes)
      Specified by:
      setCssGridSizes in interface Component
      See Also:
    • getAlign

      public String getAlign()
      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:
    • setAlign

      public void setAlign(String align)
      Sets the components horizontal alignment
      Specified by:
      setAlign in interface Component
      Parameters:
      align -
    • getValign

      public String getValign()
      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:
    • setValign

      public void setValign(String valign)
      Setter for the component's vertical align
      Specified by:
      setValign in interface Component
      Parameters:
      valign -
    • getWidth

      public String getWidth()
      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
    • setWidth

      public void setWidth(String width)
      Setter for the components width
      Specified by:
      setWidth in interface Component
      Parameters:
      width -
    • getStyle

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

      Specified by:
      getStyle in interface Component
      Returns:
      String css style string
    • setStyle

      public void setStyle(String style)
      Setter for the components style
      Specified by:
      setStyle in interface Component
      Parameters:
      style -
    • getLibraryCssClasses

      public List<String> getLibraryCssClasses()
      Additional css classes that come before css classes listed in the cssClasses property

      These are used by the framework for styling with a library (for example, bootstrap), and should normally not be overridden.

      Specified by:
      getLibraryCssClasses in interface Component
      Returns:
      the library cssClasses
    • setLibraryCssClasses

      public void setLibraryCssClasses(List<String> libraryCssClasses)
      Set the libraryCssClasses
      Specified by:
      setLibraryCssClasses in interface Component
    • getCssClasses

      public 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

      Specified by:
      getCssClasses in interface Component
      Returns:
      List<String> css style classes to appear on the 'class' attribute
    • setCssClasses

      public void setCssClasses(List<String> cssClasses)
      Setter for the components style classes
      Specified by:
      setCssClasses in interface Component
    • getAdditionalCssClasses

      public List<String> getAdditionalCssClasses()
      Convenience property for adding css class names to the end of the list of cssClasses that may already exist on this Component (this is to avoid explicitly having to set list merge in the bean definition)
      Specified by:
      getAdditionalCssClasses in interface Component
      Returns:
      the additionalCssClasses
    • setAdditionalCssClasses

      public void setAdditionalCssClasses(List<String> additionalCssClasses)
      Set the additionalCssClasses
      Specified by:
      setAdditionalCssClasses in interface Component
      Parameters:
      additionalCssClasses -
    • getStyleClassesAsString

      public String getStyleClassesAsString()
      Builds the HTML class attribute string by combining the styleClasses list with a space delimiter
      Specified by:
      getStyleClassesAsString in interface Component
      Returns:
      class attribute string
    • addStyleClass

      public void addStyleClass(String styleClass)
      Adds a single style to the list of styles on this component
      Specified by:
      addStyleClass in interface Component
      Parameters:
      styleClass -
    • appendToStyle

      public void appendToStyle(String styleRules)
      Appends to the inline style set on a component
      Specified by:
      appendToStyle in interface Component
      Parameters:
      styleRules -
    • getFinalizeMethodToCall

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

      Specified by:
      getFinalizeMethodToCall in interface Component
      Returns:
      String method name
    • setFinalizeMethodToCall

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

      public 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

      Specified by:
      getFinalizeMethodAdditionalArguments in interface Component
      Returns:
      List<Object> additional method arguments
    • setFinalizeMethodAdditionalArguments

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

      public MethodInvokerConfig getFinalizeMethodInvoker()
      MethodInvokerConfig instance for the method that should be invoked for finalizing the component configuration

      MethodInvoker can be configured to specify the class or object the method should be called on. For static method invocations, the targetClass property can be configured. For object invocations, that targetObject property can be configured

      If the component is selfRendered, the finalize method can return a string which will be set as the component's renderOutput. The selfRendered indicator will also be set to true on the component.

      Specified by:
      getFinalizeMethodInvoker in interface Component
      Returns:
      MethodInvokerConfig instance
    • setFinalizeMethodInvoker

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

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

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

      Specified by:
      isSelfRendered in interface Component
      Returns:
      boolean true if component is self rendered, false if not (renders through template)
    • setSelfRendered

      public void setSelfRendered(boolean selfRendered)
      Setter for the self render indicator
      Specified by:
      setSelfRendered in interface Component
      Parameters:
      selfRendered -
    • getRenderedHtmlOutput

      public String getRenderedHtmlOutput()
      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
    • setRenderedHtmlOutput

      public void setRenderedHtmlOutput(String renderedHtmlOutput)
      Setter for the component's render output
      Specified by:
      setRenderedHtmlOutput in interface Component
      Parameters:
      renderedHtmlOutput -
    • isDisableSessionPersistence

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

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

      Specified by:
      isDisableSessionPersistence in interface Component
      Returns:
      boolean true if the component should not be stored in session, false if session storage is allowed
    • setDisableSessionPersistence

      public void setDisableSessionPersistence(boolean disableSessionPersistence)
      Setter for disabling storage of the component in session
      Specified by:
      setDisableSessionPersistence in interface Component
      Parameters:
      disableSessionPersistence -
    • isForceSessionPersistence

      public 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

      Specified by:
      isForceSessionPersistence in interface Component
      Returns:
      boolean true if the component should be stored in session, false if not
    • setForceSessionPersistence

      public void setForceSessionPersistence(boolean forceSessionPersistence)
      Setter for the indicator to force persistence of the component in session
      Specified by:
      setForceSessionPersistence in interface Component
      Parameters:
      forceSessionPersistence -
    • getComponentSecurity

      public ComponentSecurity getComponentSecurity()
      Security object that indicates what authorization (permissions) exist for the component
      Specified by:
      getComponentSecurity in interface Component
      Returns:
      ComponentSecurity instance
    • setComponentSecurity

      public void setComponentSecurity(ComponentSecurity componentSecurity)
      Setter for the components security object
      Specified by:
      setComponentSecurity in interface Component
      Parameters:
      componentSecurity -
    • initializeComponentSecurity

      protected void initializeComponentSecurity()
      Initializes (if necessary) the component security instance for the component type
    • isEditAuthz

      public Boolean isEditAuthz()
      See Also:
    • setEditAuthz

      public void setEditAuthz(Boolean editAuthz)
      Setter for isEditAuthz()
      Parameters:
      editAuthz - property value
    • isViewAuthz

      public Boolean isViewAuthz()
      See Also:
    • setViewAuthz

      public void setViewAuthz(Boolean viewAuthz)
      Setter for isViewAuthz()
      Parameters:
      viewAuthz - property value
    • getComponentModifiers

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

      Specified by:
      getComponentModifiers in interface Component
      Returns:
      List of component modifiers
      See Also:
    • setComponentModifiers

      public void setComponentModifiers(List<ComponentModifier> componentModifiers)
      Setter for the components List of ComponentModifier instances
      Specified by:
      setComponentModifiers in interface Component
      Parameters:
      componentModifiers -
    • getContext

      public 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 #pushAllToContextDeep

      Specified by:
      getContext in interface Component
      Specified by:
      getContext in interface LifecycleElement
      Returns:
      Mapinvalid input: '<'String, Object> context
    • setContext

      public void setContext(Map<String,Object> context)
      Setter for the context Map
      Specified by:
      setContext in interface Component
      Specified by:
      setContext in interface LifecycleElement
      Parameters:
      context -
      See Also:
    • pushObjectToContext

      public 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 #pushAllToContextDeep since that will call this method for each and update property replacers. Using Component.getContext().putAll() will bypass property replacers.

      Specified by:
      pushObjectToContext in interface LifecycleElement
      Parameters:
      objectName - - name the object should be exposed under in the context map
      object - - object instance to place into context
    • pushToPropertyReplacerContext

      protected void pushToPropertyReplacerContext(String objectName, Object object)
    • pushAllToContext

      public void pushAllToContext(Map<String,Object> objects)
      Places each entry of the given Map into the context for the component

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

      Specified by:
      pushAllToContext in interface LifecycleElement
      Parameters:
      objects - - Mapinvalid input: '<'String, Object> objects to add to context, where the entry key will be the context key and the entry value will be the context value
    • getPropertyReplacers

      public 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

      Specified by:
      getPropertyReplacers in interface Component
      Returns:
      List<PropertyReplacer> replacers to evaluate
    • setPropertyReplacers

      public void setPropertyReplacers(List<PropertyReplacer> propertyReplacers)
      Setter for the components property substitutions
      Specified by:
      setPropertyReplacers in interface Component
    • getOrder

      public 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 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
      Specified by:
      setOrder in interface Ordered
      Parameters:
      order -
      See Also:
      • Ordered.getOrder()
    • getToolTip

      public Tooltip getToolTip()
      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
    • setToolTip

      public void setToolTip(Tooltip toolTip)
      Setter for the component tooltip widget instance
      Specified by:
      setToolTip in interface Component
      Parameters:
      toolTip -
    • getEventHandlerScript

      public String getEventHandlerScript()
      String containing JavaScript code for registering event handlers for this component (blur, focus, click, etc.)
      Specified by:
      getEventHandlerScript in interface Component
      Returns:
      JS event handler script
    • getOnLoadScript

      public String getOnLoadScript()
      Script that should be executed when the component's onLoad event is fired
      Specified by:
      getOnLoadScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnLoadScript

      public void setOnLoadScript(String onLoadScript)
      Description copied from interface: ScriptEventSupport
      Script that should be executed when the component's onLoad event is fired
      Specified by:
      setOnLoadScript in interface ScriptEventSupport
      Parameters:
      onLoadScript - JavaScript code
      See Also:
    • getOnDocumentReadyScript

      public String getOnDocumentReadyScript()
      Script to be run when the document ready event is triggered
      Specified by:
      getOnDocumentReadyScript in interface ScriptEventSupport
      Returns:
      the onDocumentReadyScript
    • setOnDocumentReadyScript

      public void setOnDocumentReadyScript(String onDocumentReadyScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onDocumentReady script
      Specified by:
      setOnDocumentReadyScript in interface ScriptEventSupport
      Parameters:
      onDocumentReadyScript -
      See Also:
    • getOnUnloadScript

      public String getOnUnloadScript()
      Script that should be executed when the component's onUnload event is fired
      Specified by:
      getOnUnloadScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnUnloadScript

      public void setOnUnloadScript(String onUnloadScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onUnload script
      Specified by:
      setOnUnloadScript in interface ScriptEventSupport
      Parameters:
      onUnloadScript -
      See Also:
    • getOnCloseScript

      public String getOnCloseScript()
      Script that should be executed when the component's onClose event is fired
      Specified by:
      getOnCloseScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnCloseScript

      public void setOnCloseScript(String onCloseScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onClose script
      Specified by:
      setOnCloseScript in interface ScriptEventSupport
      Parameters:
      onCloseScript -
      See Also:
    • getOnBlurScript

      public String getOnBlurScript()
      Script that should be executed when the component's onBlur event is fired
      Specified by:
      getOnBlurScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnBlurScript

      public void setOnBlurScript(String onBlurScript)
      Description copied from interface: ScriptEventSupport
      Script that should be executed when the component's onBlur event is fired
      Specified by:
      setOnBlurScript in interface ScriptEventSupport
      Parameters:
      onBlurScript - JavaScript code
      See Also:
    • getOnChangeScript

      public String getOnChangeScript()
      Script that should be executed when the component's onChange event is fired
      Specified by:
      getOnChangeScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnChangeScript

      public void setOnChangeScript(String onChangeScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onChange script
      Specified by:
      setOnChangeScript in interface ScriptEventSupport
      Parameters:
      onChangeScript -
      See Also:
    • getOnClickScript

      public String getOnClickScript()
      Script that should be executed when the component's onClick event is fired
      Specified by:
      getOnClickScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnClickScript

      public void setOnClickScript(String onClickScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onClick script
      Specified by:
      setOnClickScript in interface ScriptEventSupport
      Parameters:
      onClickScript -
      See Also:
    • getOnDblClickScript

      public String getOnDblClickScript()
      Script that should be executed when the component's onDblClick event is fired
      Specified by:
      getOnDblClickScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnDblClickScript

      public void setOnDblClickScript(String onDblClickScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onDblClick script
      Specified by:
      setOnDblClickScript in interface ScriptEventSupport
      Parameters:
      onDblClickScript -
      See Also:
    • getOnFocusScript

      public String getOnFocusScript()
      Script that should be executed when the component's onFocus event is fired
      Specified by:
      getOnFocusScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnFocusScript

      public void setOnFocusScript(String onFocusScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onFocus script
      Specified by:
      setOnFocusScript in interface ScriptEventSupport
      Parameters:
      onFocusScript -
      See Also:
    • getOnSubmitScript

      public String getOnSubmitScript()
      Script that should be executed when the component's onSubmit event is fired
      Specified by:
      getOnSubmitScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnSubmitScript

      public void setOnSubmitScript(String onSubmitScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onSubmit script
      Specified by:
      setOnSubmitScript in interface ScriptEventSupport
      Parameters:
      onSubmitScript -
      See Also:
    • getOnInputScript

      public String getOnInputScript()
      Script that should be executed when the component's onInput event is fired

      This differs from key press/up or change in that it will catch autocomplete, cut, and paste mouse actions on an input.

      Specified by:
      getOnInputScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnInputScript

      public void setOnInputScript(String onInputScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onInput script
      Specified by:
      setOnInputScript in interface ScriptEventSupport
      Parameters:
      onInputScript -
      See Also:
    • getOnKeyPressScript

      public String getOnKeyPressScript()
      Script that should be executed when the component's onKeyPress event is fired
      Specified by:
      getOnKeyPressScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnKeyPressScript

      public void setOnKeyPressScript(String onKeyPressScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onKeyPress script
      Specified by:
      setOnKeyPressScript in interface ScriptEventSupport
      Parameters:
      onKeyPressScript -
      See Also:
    • getOnKeyUpScript

      public String getOnKeyUpScript()
      Script that should be executed when the component's onKeyUp event is fired
      Specified by:
      getOnKeyUpScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnKeyUpScript

      public void setOnKeyUpScript(String onKeyUpScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onKeyUp script
      Specified by:
      setOnKeyUpScript in interface ScriptEventSupport
      Parameters:
      onKeyUpScript -
      See Also:
    • getOnKeyDownScript

      public String getOnKeyDownScript()
      Script that should be executed when the component's onKeyDown event is fired
      Specified by:
      getOnKeyDownScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnKeyDownScript

      public void setOnKeyDownScript(String onKeyDownScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onKeyDown script
      Specified by:
      setOnKeyDownScript in interface ScriptEventSupport
      Parameters:
      onKeyDownScript -
      See Also:
    • getOnMouseOverScript

      public String getOnMouseOverScript()
      Script that should be executed when the component's onMouseOver event is fired
      Specified by:
      getOnMouseOverScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnMouseOverScript

      public void setOnMouseOverScript(String onMouseOverScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onMouseOver script
      Specified by:
      setOnMouseOverScript in interface ScriptEventSupport
      Parameters:
      onMouseOverScript -
      See Also:
    • getOnMouseOutScript

      public String getOnMouseOutScript()
      Script that should be executed when the component's onMouseOut event is fired
      Specified by:
      getOnMouseOutScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnMouseOutScript

      public void setOnMouseOutScript(String onMouseOutScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onMouseOut script
      Specified by:
      setOnMouseOutScript in interface ScriptEventSupport
      Parameters:
      onMouseOutScript -
      See Also:
    • getOnMouseUpScript

      public String getOnMouseUpScript()
      Script that should be executed when the component's onMouseUp event is fired
      Specified by:
      getOnMouseUpScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnMouseUpScript

      public void setOnMouseUpScript(String onMouseUpScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onMouseUp script
      Specified by:
      setOnMouseUpScript in interface ScriptEventSupport
      Parameters:
      onMouseUpScript -
      See Also:
    • getOnMouseDownScript

      public String getOnMouseDownScript()
      Script that should be executed when the component's onMouseDown event is fired
      Specified by:
      getOnMouseDownScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnMouseDownScript

      public void setOnMouseDownScript(String onMouseDownScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onMouseDown script
      Specified by:
      setOnMouseDownScript in interface ScriptEventSupport
      Parameters:
      onMouseDownScript -
      See Also:
    • getOnMouseMoveScript

      public String getOnMouseMoveScript()
      Script that should be executed when the component's onMouseMove event is fired
      Specified by:
      getOnMouseMoveScript in interface ScriptEventSupport
      Returns:
      String JavaScript code
    • setOnMouseMoveScript

      public void setOnMouseMoveScript(String onMouseMoveScript)
      Description copied from interface: ScriptEventSupport
      Setter for the components onMouseMove script
      Specified by:
      setOnMouseMoveScript in interface ScriptEventSupport
      Parameters:
      onMouseMoveScript -
      See Also:
    • getTemplateOptions

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

      Specified by:
      getTemplateOptions in interface Component
      Returns:
      Mapinvalid input: '<'String, String> options
    • setTemplateOptions

      public void setTemplateOptions(Map<String,String> templateOptions)
      Setter for the template's options
      Specified by:
      setTemplateOptions in interface Component
      Parameters:
      templateOptions -
    • 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

      See documentation on the particular component render for available options.

      Specified by:
      getTemplateOptionsJSString in interface Component
      Returns:
      String options
    • setTemplateOptionsJSString

      public void setTemplateOptionsJSString(String templateOptionsJSString)
      Setter for the template's options
      Specified by:
      setTemplateOptionsJSString in interface Component
      Parameters:
      templateOptionsJSString -
    • 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:
      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()
      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
    • setRefreshWhenChangedPropertyNames

      public void setRefreshWhenChangedPropertyNames(List<String> refreshWhenChangedPropertyNames)
      Setter for the list of property names that trigger a refresh
      Specified by:
      setRefreshWhenChangedPropertyNames in interface Component
      Parameters:
      refreshWhenChangedPropertyNames -
    • getAdditionalComponentsToRefresh

      public List<String> getAdditionalComponentsToRefresh()
      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<String>
    • setAdditionalComponentsToRefresh

      public void setAdditionalComponentsToRefresh(List<String> additionalComponentsToRefresh)
      Setter for alsoRefreshComponents
      Specified by:
      setAdditionalComponentsToRefresh in interface Component
    • getAdditionalComponentsToRefreshJs

      public String getAdditionalComponentsToRefreshJs()
      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
    • isRefreshedByAction

      public 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

      Specified by:
      isRefreshedByAction in interface Component
      Returns:
      boolean true if the component is refreshed by an action, false if not
    • setRefreshedByAction

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

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

      Specified by:
      setRefreshedByAction in interface Component
      Parameters:
      refreshedByAction -
    • isDisclosedByAction

      public boolean isDisclosedByAction()
      If true if this component is disclosed by an action in js, a placeholder will be put in this components place if render is also false.
      Specified by:
      isDisclosedByAction in interface Component
      Returns:
      true if this component is disclosed by an action
    • setDisclosedByAction

      public void setDisclosedByAction(boolean disclosedByAction)
      Set if this component is disclosed by some outside action
      Specified by:
      setDisclosedByAction in interface Component
      Parameters:
      disclosedByAction -
    • 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()
      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
    • setResetDataOnRefresh

      public void setResetDataOnRefresh(boolean resetDataOnRefresh)
      Setter for the reset data on refresh indicator
      Specified by:
      setResetDataOnRefresh in interface Component
      Parameters:
      resetDataOnRefresh -
    • 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

      Specified by:
      getMethodToCallOnRefresh in interface Component
      Returns:
      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
    • getFieldsToSendOnRefresh

      public List<String> getFieldsToSendOnRefresh()
      Limits the field data to send on a refresh methodToCall server call to the names/group id/field id specified in this list.

      The names in the list should be the propertyNames of the fields sent with this request. A wildcard("*") can be used at the END of a name to specify all fields with names that begin with the string before the wildcard. If the array contains 1 item with the keyword "NONE", then no form fields are sent. In addition, a group id or field id with the "#" id selector prefix can be used to send all input data which are nested within them. Note that this only limits the fields which exist on the form and data required by the KRAD framework is still sent (eg, methodToCall, formKey, sessionId, etc.)

      Specified by:
      getFieldsToSendOnRefresh in interface Component
      Returns:
      the only input fields to send by name with the action request
    • setFieldsToSendOnRefresh

      public void setFieldsToSendOnRefresh(List<String> fieldsToSendOnRefresh)
      Specified by:
      setFieldsToSendOnRefresh in interface Component
      See Also:
    • isSkipInTabOrder

      public boolean isSkipInTabOrder()
      Flag indicating that this component and its nested components must be skipped when keyboard tabbing.
      Returns:
      the skipInTabOrder flag
    • setSkipInTabOrder

      public void setSkipInTabOrder(boolean skipInTabOrder)
      See Also:
    • getDataAttributes

      public Map<String,String> getDataAttributes()
      The DataAttributes that will be written to the html element for this component as data-

      They can be access through .data() call in jQuery.

      Specified by:
      getDataAttributes in interface Component
      Returns:
      map of data attributes, where key is data attribute name and the map value is the data attribute value
    • setDataAttributes

      public void setDataAttributes(Map<String,String> dataAttributes)
      Setter for data attributes to include for the component
      Specified by:
      setDataAttributes in interface Component
      Parameters:
      dataAttributes -
    • getScriptDataAttributes

      public Map<String,String> getScriptDataAttributes()
      The DataAttributes that will be written to the html as a script call to data for this component (these cannot be used for jQuery selection directly)

      They can be accessed through .data() call in jQuery.

      Specified by:
      getScriptDataAttributes in interface Component
      Returns:
      map of data attributes, where key is data attribute name and the map value is the data attribute value
    • setScriptDataAttributes

      public void setScriptDataAttributes(Map<String,String> scriptDataAttributes)
      Setter for script data attributes to include for the component
      Specified by:
      setScriptDataAttributes in interface Component
      Parameters:
      scriptDataAttributes -
    • addDataAttribute

      public void addDataAttribute(String key, String value)
      Add a data attribute to the dataAttributes map
      Specified by:
      addDataAttribute in interface Component
      Parameters:
      key -
      value -
    • addScriptDataAttribute

      public void addScriptDataAttribute(String key, String value)
      Add a script data attribute to the scriptDataAttributes map
      Specified by:
      addScriptDataAttribute in interface Component
      Parameters:
      key -
      value -
    • getSimpleDataAttributes

      public String getSimpleDataAttributes()
      The string that can be put into a the tag of a component to add data attributes inline
      Specified by:
      getSimpleDataAttributes in interface Component
      Returns:
      html string for data attributes as html formatted element attributes
    • getScriptDataAttributesJs

      public String getScriptDataAttributesJs()
      Description copied from interface: Component
      Returns a js string that can be used to right js data attributes to for the component
      Specified by:
      getScriptDataAttributesJs in interface Component
      Returns:
      html string for the js required to add the script data attributes
    • getRole

      public String getRole()
      The role attribute of this component, use to define aria roles
      Specified by:
      getRole in interface Component
      Returns:
      the role attribute
    • setRole

      public void setRole(String role)
      Specified by:
      setRole in interface Component
      See Also:
    • getAriaAttributes

      public Map<String,String> getAriaAttributes()
      The aria attributes of this component and their values (without "aria-", this is automatically appended during rendering)
      Specified by:
      getAriaAttributes in interface Component
      Returns:
      the aria attributes of this component
    • setAriaAttributes

      public void setAriaAttributes(Map<String,String> ariaAttributes)
      Specified by:
      setAriaAttributes in interface Component
      See Also:
    • addAriaAttribute

      public void addAriaAttribute(String key, String value)
      Add an aria attribute to the ariaAttributes list
      Specified by:
      addAriaAttribute in interface Component
      Parameters:
      key - the attribute (no "aria-" prefix)
      value - the attribute's value
    • getAriaAttributesAsString

      public String getAriaAttributesAsString()
      Get the aria attributes as a String that can be used during template output
      Specified by:
      getAriaAttributesAsString in interface Component
      Returns:
      the aria attributes as a string
    • getPreRenderContent

      public String getPreRenderContent()
      Raw html or string content to render before this component renders
      Specified by:
      getPreRenderContent in interface Component
      Returns:
      the preRenderContent string
    • setPreRenderContent

      public void setPreRenderContent(String preRenderContent)
      Set the preRenderContent
      Specified by:
      setPreRenderContent in interface Component
      Parameters:
      preRenderContent -
    • getPostRenderContent

      public String getPostRenderContent()
      Raw html or string content to render after this component renders
      Specified by:
      getPostRenderContent in interface Component
      Returns:
      the postRenderContent string
    • setPostRenderContent

      public void setPostRenderContent(String postRenderContent)
      Set the postRenderContent
      Specified by:
      setPostRenderContent in interface Component
      Parameters:
      postRenderContent -
    • getExcludeIf

      public 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 Component.getExcludeUnless(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.

      Specified by:
      getExcludeIf in interface Component
      Returns:
      model property path
      See Also:
    • setExcludeIf

      public void setExcludeIf(String excludeIf)
      See Also:
    • getExcludeUnless

      public 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 Component.getExcludeIf(); when both resolve to true, the component will be included. When neither property is set, the component is unconditionally included.

      Specified by:
      getExcludeUnless in interface Component
      Returns:
      model property path
      See Also:
    • setExcludeUnless

      public void setExcludeUnless(String excludeUnless)
      See Also:
    • clone

      Override Object.clone() to assign the public modifier.
      Specified by:
      clone in interface Copyable
      Overrides:
      clone in class DictionaryBeanBase
      Returns:
      Object.clone()
      Throws:
      CloneNotSupportedException - If Cloneable is not implemented. This should not be possible when using this interface.
      See Also:
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      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
    • isOmitFromFormPost

      public boolean isOmitFromFormPost()
      Description copied from interface: Component
      Whether to omit fields from form post unless they are explicitly specified by the Action.fieldsToSend property.
      Specified by:
      isOmitFromFormPost in interface Component
      Returns:
      whether fields will be omitted from form post
      See Also:
      • invalid reference
        org.kuali.rice.krad.uif.container.Field#isOmitFromFormPost()
    • setOmitFromFormPost

      public void setOmitFromFormPost(boolean omitFromFormPost)
      Specified by:
      setOmitFromFormPost in interface Component
      See Also: