Class Header

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, Ordered, ScriptEventSupport, ContentElement, LifecycleElement, org.springframework.core.Ordered
Direct Known Subclasses:
ApplicationHeader, ViewHeader

public class Header extends ContentElementBase
Content element that renders a header element and optionally a Group to present along with the header text

Generally the group is used to display content to the right of the header, such as links for the group or other information

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • Header

      public Header()
  • Method Details

    • performApplyModel

      public void performApplyModel(Object model, LifecycleElement parent)
      Sets up rich message content for the label, if any exists 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
      Overrides:
      performApplyModel in class ComponentBase
      Parameters:
      model - - Top level object containing the data (could be the form or a top level business object, dto)
      parent - parent lifecycle element
    • performFinalize

      public void performFinalize(Object model, LifecycleElement parent)
      The following finalization is performed:
      • Set render on header group to false if no items are configured
      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
      Overrides:
      performFinalize in class ComponentBase
      Parameters:
      model - - top level object containing the data
      parent - - parent component
    • 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
      Overrides:
      getAdditionalTemplates in class ComponentBase
      Returns:
      additional templates required during rendering
    • getHeaderText

      public String getHeaderText()
      Text that should be displayed on the header
      Returns:
      header text
    • setHeaderText

      public void setHeaderText(String headerText)
      Setter for the header text
      Parameters:
      headerText -
    • getHeaderLevel

      public String getHeaderLevel()
      HTML header level (h1 ... h6) that should be applied to the header text
      Returns:
      header level
    • setHeaderLevel

      public void setHeaderLevel(String headerLevel)
      Setter for the header level
      Parameters:
      headerLevel -
    • getHeaderTagCssClasses

      public List<String> getHeaderTagCssClasses()
      Style classes that should be applied to the header text (h tag)

      Note the style class given here applies to only the header text. The style class property inherited from the Component interface can be used to set the class for the whole field div (which could include a nested Group)

      Returns:
      list of style classes
      See Also:
    • setHeaderTagCssClasses

      public void setHeaderTagCssClasses(List<String> headerTagCssClasses)
      Setter for the list of classes to apply to the header h tag
      Parameters:
      headerTagCssClasses -
    • getHeaderStyleClassesAsString

      public String getHeaderStyleClassesAsString()
      Builds the HTML class attribute string by combining the headerStyleClasses list with a space delimiter
      Returns:
      class attribute string
    • getHeaderTagStyle

      public String getHeaderTagStyle()
      Style that should be applied to the header h tag

      Note the style given here applies to only the header text. The style property inherited from the Component interface can be used to set the style for the whole header div (which could include a nested Group)

      Returns:
      header style
      See Also:
    • setHeaderTagStyle

      public void setHeaderTagStyle(String headerTagStyle)
      Setter for the header h tag style
      Parameters:
      headerTagStyle -
    • isHeaderTagOnly

      public boolean isHeaderTagOnly()
    • setHeaderTagOnly

      public void setHeaderTagOnly(boolean headerTagOnly)
    • getUpperGroup

      public Group getUpperGroup()
      Nested group instance that can be used to render contents above the header text

      The header group is useful for adding content such as links or actions that is presented with the header

      Returns:
      Group instance
    • setUpperGroup

      public void setUpperGroup(Group upperGroup)
      Setter for the header group instance that is rendered above the header text
      Parameters:
      upperGroup -
    • getRightGroup

      public Group getRightGroup()
      Nested group instance that can be used to render contents to the right of the header text

      The header group is useful for adding content such as links or actions that is presented with the header

      Returns:
      Group instance
    • setRightGroup

      public void setRightGroup(Group rightGroup)
      Setter for the header group instance that is rendered to the right of the header text
      Parameters:
      rightGroup -
    • getLowerGroup

      public Group getLowerGroup()
      Nested group instance that can be used to render contents below the header text

      The header group is useful for adding content such as links or actions that is presented with the header

      Returns:
      Group instance
    • setLowerGroup

      public void setLowerGroup(Group lowerGroup)
      Setter for the header group instance that is rendered below the header text
      Parameters:
      lowerGroup -
    • getItems

      @ViewLifecycleRestriction public List<? extends Component> getItems()
      List of Component instances contained in the lower header group

      Convenience method for configuration to get the items List from the lower header group

      Returns:
      Listinvalid input: '<'? extends Component> items
    • setItems

      public void setItems(List<? extends Component> items)
      Setter for the lower group's items

      Convenience method for configuration to set the items List for the lower header group

      Parameters:
      items -
    • getRichHeaderMessage

      public Message getRichHeaderMessage()
      Gets the Message that represents the rich message content of the header if headerText is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.
      Returns:
      rich message structure, null if no rich message structure
    • setRichHeaderMessage

      public void setRichHeaderMessage(Message richHeaderMessage)
      Sets the Message that represents the rich message content of the header if headerText is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.
      Parameters:
      richHeaderMessage -
    • getInlineComponents

      public List<Component> getInlineComponents()
      Gets the inlineComponents used by index in a Header that has rich message component index tags in its headerText
      Returns:
      the Label's inlineComponents
    • setInlineComponents

      public void setInlineComponents(List<Component> inlineComponents)
      Sets the inlineComponents used by index in a Header that has rich message component index tags in its headerText
      Parameters:
      inlineComponents -
    • 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
      Overrides:
      completeValidation in class ComponentBase
      Parameters:
      tracer - Record of component's location