Interface UIExpandCollapseBlock


public interface UIExpandCollapseBlock
In the context of a form, specifies an expand/collapse block specification.

By default, this specification represents a collapsed block with an empty title.

To write it into a form, use UIComponentWriter.startExpandCollapseBlock(UIExpandCollapseBlock).

Note: The expand/collapse block must be terminated using UIComponentWriter.endExpandCollapseBlock().

Since:
5.8.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Makes the block rendered collapsed.
    void
    Makes the block rendered expanded.
    Returns the id previously defined, or null.
    Returns the previously defined label, or an empty one if none was defined.
    boolean
    Returns true if the component is configured to be rendered collapsed.
    void
    setId(String anId)
    Sets an id for the expand/collapse block.
    void
    Sets the label of the expand/collapse block.
    void
    setLabel(String aLabel)
    Sets the label of the expand/collapse block.
  • Method Details

    • setLabel

      void setLabel(String aLabel)
      Sets the label of the expand/collapse block.

      aLabel must not be null.

      Parameters:
      aLabel - the label to set
    • setLabel

      void setLabel(UserMessage aLabel)
      Sets the label of the expand/collapse block.

      aLabel must not be null.

      Parameters:
      aLabel - the label to set
    • getLabel

      UserMessage getLabel()
      Returns the previously defined label, or an empty one if none was defined.

      Never returns null.

    • expand

      void expand()
      Makes the block rendered expanded.
    • collapse

      void collapse()
      Makes the block rendered collapsed.
    • isCollapsed

      boolean isCollapsed()
      Returns true if the component is configured to be rendered collapsed.

      If expand() nor collapse() have not been called yet, returns true.

    • setId

      void setId(String anId)
      Sets an id for the expand/collapse block.

      When components ordering is dynamic over pages refresh (that is, their order depends on the record state, or any other parameter), it is recommended to invoke this method with a stable identifier, to ensure the block state remains the same if the page is redisplayed after a page submit.

      Parameters:
      anId - The id to set for the block; the id attribute must respect the W3C Recommendation (in particular, by being unique in the page).
      See Also:
    • getId

      String getId()
      Returns the id previously defined, or null.