Interface Control

All Superinterfaces:
Element, EventOwner, MessageContainer, java.io.Serializable, WebFormEventOwner
All Known Subinterfaces:
ArticleControl, AsideControl, BarcodeControl, BasicBlockControl, BootstrapColumnControl, BootstrapContainerControl, BootstrapRowControl, ButtonColumnControl, ButtonControl, CanvasControl, ContainerControl, DynamicMenuItemControl, EbaseButtonControlProperties, FieldColumnControl, FieldControl, FileUploadControl, FileUploadTextControl, FinishButtonControl, FooterControl, GridCellControl, GridControl, GroupAndPagePanelProperties, GroupPanelControl, HeaderControl, HeadingControl, HorizontalLineControl, HorizontalMenuControl, HTMLControl, HyperlinkControl, ImageColumnControl, ImageControl, IncludeControl, InitiateUploadControl, LayoutControl, ListControl, ListHyperlinkControl, ListItemControl, ListPanelControl, ListTextControl, MainControl, MenuControl, MenuItemControl, MessageControl, NavControl, NextPageButtonControl, PageBreakControl, PageControl, PageNavigationPanel, PagePanelControl, PanelControl, PrevPageButtonControl, RepeatingTableControl, RepeatingTableListControl, RepeatingTableListRowControl, RepeatingTableRowControl, RestoreButtonControl, SaveButtonControl, SectionControl, SpacerControl, StaticMenuItemControl, TabControl, TableControl, TablePageControl, TabSetControl, TextControl, TitlePanelControl, VerticalMenuControl

public interface Control
extends WebFormEventOwner
The Control interface provides the base class for all controls, with common methods and properties shared by all controls. It is overridden for specific controls.

Individual controls can be accessed via the Controls interface.

Further documentation.

Since:
V4.4
  • Method Summary

    Modifier and Type Method Description
    void addCssClass​(java.lang.String cssClass)
    Adds one or more CSS classes to the list of classes applied to the control, retaining any existing classes.
    Control getAll()
    Returns a control object of the same type as the control object on which this method is invoked, that gives access to all occurrences of this control on the page.
    java.lang.String getCssClass()
    Returns the list of CSS classes configured for the control.
    java.lang.String getErrorMsgClass()
    Returns the list of CSS classes configured for error messages when the messages are displayed locally to the control.
    java.lang.String getErrorMsgStyle()
    Returns the inline CSS style configured for error messages when the messages are displayed locally to the control.
    java.lang.String getInfoMsgClass()
    Returns the list of CSS classes configured for info messages when the messages are displayed locally to the control.
    java.lang.String getInfoMsgStyle()
    Returns the inline CSS style configured for info messages when the messages are displayed locally to the control.
    LayoutCell getLayoutCell()
    Returns the LayoutCell object which can be used to override properties of the parent control's layout as applied to this control.
    Control getNextSiblingControl()
    Returns the control that appears after this control within the same parent, or null if no such control exists.
    Page getPage()
    Returns the Page where this control is located.
    Control getParentControl()
    Returns this control's parent control or null if no such parent exists.
    Control getPreviousSiblingControl()
    Returns the control that appears before this control within the same parent, or null if no such control exists.
    HtmlElementProperties getRootHtmlElementProperties()
    Return the root HTMLElementProperties for the Control
    java.lang.String getStyle()
    Returns the inline CSS style configured for the control.
    java.lang.String getWarningMsgClass()
    Returns the list of CSS classes configured for warning messages when the messages are displayed locally to the control.
    java.lang.String getWarningMsgStyle()
    Returns the inline CSS style configured for warning messages when the messages are displayed locally to the control.
    boolean hasModifier​(java.lang.String modifier)
    Returns true if the control has the specified modifier, otherwise returns false.
    void hide()
    Hides the control, this is equivalent to setting property hidden to true.
    boolean isContainer()
    Returns true if this control is a container control i.e.
    boolean isDisplayOnly()
    Returns true if the control is marked as display only, otherwise returns false.
    boolean isDisplayOnlyIncludingParents()
    Returns true if the control or any of its parents is marked as display only, otherwise returns false.
    boolean isEventField()
    Returns true if the control is an event field i.e.
    boolean isHidden()
    Returns true if the control is marked as hidden, otherwise returns false.
    boolean isInheritMsg()
    Returns true if Use parent control setting is checked in the Message Options properties for the control, otherwise returns false.
    boolean isLocalMsg()
    Returns true if Local Message is checked in the Message Options properties for the control, otherwise returns false.
    boolean isNewLine()
    Returns the new line property.
    boolean isShowing()
    Returns true if the control will be included in the web page when it's next displayed to the user, otherwise returns false.
    void refresh()
    Refreshes this control in the user's browser when the page is next displayed.
    void removeCssClass​(java.lang.String cssClass)
    Removes one or more CSS classes from the control.
    void requestFocus()
    Sets the browser focus to the control.
    void setCssClass​(java.lang.String cssClass)
    Sets one or more CSS classes to be applied to the control.
    void setDisplayOnly​(boolean displayOnly)
    Marks the control and all its children as display only (when displayOnly is true) or enterable (when displayOnly is false).
    void setErrorMsgClass​(java.lang.String errorMsgClass)
    Sets one or more CSS classes to be applied to error messages when the messages are displayed locally to the control.
    void setErrorMsgStyle​(java.lang.String errorMsgStyle)
    Sets inline CSS style to be applied to error messages when the messages are displayed locally to the control.
    void setHidden​(boolean hidden)
    Hides or shows the control and all its children.
    void setInfoMsgClass​(java.lang.String infoMsgClass)
    Sets one or more CSS classes to be applied to info messages when the messages are displayed locally to the control.
    void setInfoMsgStyle​(java.lang.String infoMsgStyle)
    Sets inline CSS style to be applied to info messages when the messages are displayed locally to the control.
    void setNewLine​(boolean newLine)
    Sets or unsets the control's new line property.
    void setStyle​(java.lang.String style)
    Sets inline CSS style to be applied to the control.
    void setWarningMsgClass​(java.lang.String warningMsgClass)
    Sets one or more CSS classes to be applied to warning messages when the messages are displayed locally to the control.
    void setWarningMsgStyle​(java.lang.String warningMsgStyle)
    Sets inline CSS style to be applied to warning messages when the messages are displayed locally to the control.
    void show()
    Shows the control, this is equivalent to setting property hidden to false.

    Methods inherited from interface com.ebasetech.xi.api.Element

    getElementName, getElementType
  • Method Details

    • hide

      void hide()
      Hides the control, this is equivalent to setting property hidden to true. Hidden controls are not displayed to the user. Note that a control is considered to be hidden if the control or any of its parents are marked as hidden. This action can be reversed using method show().
      Since:
      V4.4
    • show

      void show()
      Shows the control, this is equivalent to setting property hidden to false. Note that a control is considered to be hidden if the control or any of its parents are marked as hidden. This action can be reversed using method hide().
      Since:
      V4.4
    • requestFocus

      void requestFocus()
      Sets the browser focus to the control. This method overrides all other circumstances by which focus might be set: display of error messages, click of button etc. The focus for each page is reset after the page has been displayed to the user. Focus can be removed by either setting the focus to another control or using method Page.clearFocus().

      Further documentation.

      Since:
      V4.4
      See Also:
      Page.clearFocus()
    • refresh

      void refresh()
      Refreshes this control in the user's browser when the page is next displayed. This method is only meaningful when Ajax is used for client/server communication i.e. the Use Ajax checkbox in Form Properties is checked.

      When Ajax is used, the system automatically detects which controls need to be refreshed based on changes to the form's state. This method provides a way of overriding this mechanism to ensure that a control is refreshed when the page is next displayed.

      Since:
      V4.4
    • getAll

      Control getAll()
      Returns a control object of the same type as the control object on which this method is invoked, that gives access to all occurrences of this control on the page. This is only meaningful when the control appears more than once i.e. it is located inside either a Repeater Control or a Table Control. For example,
       controls.BUTTONCONTROL1.all.backgroundColor = "Red";
       
      changes the background color of all occurrences of a Button Control, whereas:
       controls.BUTTONCONTROL1.backgroundColor = "Red";
       
      changes only a single Button Control. Both Repeater Controls and Table Controls are linked to a Table and the Button Control changed will be the one on the current row of the linked table.
      Returns:
      a control object of the same type as the control object on which this method is invoked
      Since:
      V4.4
    • getParentControl

      Control getParentControl()
      Returns this control's parent control or null if no such parent exists.
      Returns:
      parent control
      Since:
      V4.4
    • getNextSiblingControl

      Control getNextSiblingControl()
      Returns the control that appears after this control within the same parent, or null if no such control exists.
      Returns:
      the next sibling control
      Since:
      V4.4
    • getPreviousSiblingControl

      Control getPreviousSiblingControl()
      Returns the control that appears before this control within the same parent, or null if no such control exists.
      Returns:
      the previous sibling control
      Since:
      V4.4
    • getPage

      Page getPage()
      Returns the Page where this control is located.
      Returns:
      owning page
      Since:
      V4.4
    • isHidden

      boolean isHidden()
      Returns true if the control is marked as hidden, otherwise returns false. This method only returns true if this specific control has been marked as hidden, and does not check if the control is hidden because one of its parents has been marked as hidden. Use method isShowing() to check whether the control will be included in the web page displayed to the user.
      Since:
      V4.4
      See Also:
      isShowing(), setHidden(boolean)
    • setHidden

      void setHidden​(boolean hidden)
      Hides or shows the control and all its children. Note that a control is considered to be hidden if the control or any of its parents are marked as hidden.
      Since:
      V4.4
    • isShowing

      boolean isShowing()
      Returns true if the control will be included in the web page when it's next displayed to the user, otherwise returns false. This method checks the hidden status of this control and all its parents to determine whether the control is visible. This is in contrast to method isHidden() which just checks the status of this control and does not include its parents
      Since:
      V4.5.1
      See Also:
      isHidden()
    • isDisplayOnly

      boolean isDisplayOnly()
      Returns true if the control is marked as display only, otherwise returns false. This method only returns true if this specific control has been marked as display only, and does not check if the control is display only because one of its parents has been marked as display only. Use method isDisplayOnlyIncludingParents() to check whether the control will be displayed on the page as display only.
      Since:
      V4.4
      See Also:
      setDisplayOnly(boolean)
    • isDisplayOnlyIncludingParents

      boolean isDisplayOnlyIncludingParents()
      Returns true if the control or any of its parents is marked as display only, otherwise returns false. This method returns true if the control will be displayed as display only
      Since:
      V4.5.1
      See Also:
      isDisplayOnly(), setDisplayOnly(boolean)
    • setDisplayOnly

      void setDisplayOnly​(boolean displayOnly)
      Marks the control and all its children as display only (when displayOnly is true) or enterable (when displayOnly is false). Note that a control is considered to be display only if the control or any of its parents are marked as display only.

      This property can be set on all controls but only has meaning where the control or its child controls allow data to be entered i.e. the control is a Field Control or a Table Column Control.

      Since:
      V4.4
    • isEventField

      boolean isEventField()
      Returns true if the control is an event field i.e. it's not visible and represents a place holder for the execution of events.
      Since:
      V4.5.1
    • isNewLine

      boolean isNewLine()
      Returns the new line property.

      Further documentation

      Since:
      V4.4
      See Also:
      setNewLine(boolean)
    • setNewLine

      void setNewLine​(boolean newLine)
      Sets or unsets the control's new line property.

      This property only applies when the control is inside a container with Field Grid layout, and indicates that the control should be placed on a new line. This property is only supported for controls that support the new line option i.e. the new line property can be set in the designer. See Field Grid Layout for more information.

      Further documentation

      Since:
      V4.4
    • getCssClass

      java.lang.String getCssClass()
      Returns the list of CSS classes configured for the control.

      These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.

      Further documentation.

      Since:
      V4.4
      See Also:
      addCssClass(String), removeCssClass(String), setCssClass(String)
    • addCssClass

      void addCssClass​(java.lang.String cssClass)
      Adds one or more CSS classes to the list of classes applied to the control, retaining any existing classes. Exactly how these classes are applied varies depending on the control. See the documentation for each control for further details. Multiple classes can be added by using a space between the class names.

      Further documentation.

      Since:
      V5.3
      See Also:
      removeCssClass(String)
    • removeCssClass

      void removeCssClass​(java.lang.String cssClass)
      Removes one or more CSS classes from the control. Exactly how the remaining classes are applied varies depending on the control. See the documentation for each control for further details. Multiple classes can be removed by using a space between the class names.

      Further documentation.

      Since:
      V5.3
      See Also:
      addCssClass(String)
    • setCssClass

      void setCssClass​(java.lang.String cssClass)
      Sets one or more CSS classes to be applied to the control. Exactly how these classes are applied varies depending on the control. See the documentation for each control for further details. Multiple classes are specified by using a space between the class names, as per the HTML class parameter.

      These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.

      Further documentation.

      Since:
      V4.4
      See Also:
      addCssClass(String), removeCssClass(String)
    • getStyle

      java.lang.String getStyle()
      Returns the inline CSS style configured for the control.

      This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant. Further documentation.

      Since:
      V4.4
      See Also:
      setStyle(String)
    • setStyle

      void setStyle​(java.lang.String style)
      Sets inline CSS style to be applied to the control. Exactly how this style is applied varies depending on the control. See the documentation for each control for further details. Style is entered as for the HTML style parameter.

      This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant.

      Further documentation.

      Since:
      V4.4
    • isInheritMsg

      boolean isInheritMsg()
      Returns true if Use parent control setting is checked in the Message Options properties for the control, otherwise returns false.

      Further documentation.

      Since:
      V4.4
    • isLocalMsg

      boolean isLocalMsg()
      Returns true if Local Message is checked in the Message Options properties for the control, otherwise returns false.

      Further documentation.

      Since:
      V4.4
    • getInfoMsgClass

      java.lang.String getInfoMsgClass()
      Returns the list of CSS classes configured for info messages when the messages are displayed locally to the control.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V5.3
      See Also:
      setInfoMsgClass(String)
    • setInfoMsgClass

      void setInfoMsgClass​(java.lang.String infoMsgClass)
      Sets one or more CSS classes to be applied to info messages when the messages are displayed locally to the control. Multiple classes are specified by using a space between the class names, as per the HTML class parameter.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V5.3
    • getInfoMsgStyle

      java.lang.String getInfoMsgStyle()
      Returns the inline CSS style configured for info messages when the messages are displayed locally to the control.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V5.3
      See Also:
      setInfoMsgStyle(String)
    • setInfoMsgStyle

      void setInfoMsgStyle​(java.lang.String infoMsgStyle)
      Sets inline CSS style to be applied to info messages when the messages are displayed locally to the control. Style is entered as for the HTML style parameter.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V5.3
    • getWarningMsgClass

      java.lang.String getWarningMsgClass()
      Returns the list of CSS classes configured for warning messages when the messages are displayed locally to the control.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
      See Also:
      setWarningMsgClass(String)
    • setWarningMsgClass

      void setWarningMsgClass​(java.lang.String warningMsgClass)
      Sets one or more CSS classes to be applied to warning messages when the messages are displayed locally to the control. Multiple classes are specified by using a space between the class names, as per the HTML class parameter.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
    • getWarningMsgStyle

      java.lang.String getWarningMsgStyle()
      Returns the inline CSS style configured for warning messages when the messages are displayed locally to the control.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
      See Also:
      setWarningMsgStyle(String)
    • setWarningMsgStyle

      void setWarningMsgStyle​(java.lang.String warningMsgStyle)
      Sets inline CSS style to be applied to warning messages when the messages are displayed locally to the control. Style is entered as for the HTML style parameter.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
    • getErrorMsgClass

      java.lang.String getErrorMsgClass()
      Returns the list of CSS classes configured for error messages when the messages are displayed locally to the control.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation

      Since:
      V4.4
      See Also:
      setErrorMsgClass(String)
    • setErrorMsgClass

      void setErrorMsgClass​(java.lang.String errorMsgClass)
      Sets one or more CSS classes to be applied to error messages when the messages are displayed locally to the control. Multiple classes are specified by using a space between the class names, as per the HTML class parameter.

      These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
    • getErrorMsgStyle

      java.lang.String getErrorMsgStyle()
      Returns the inline CSS style configured for error messages when the messages are displayed locally to the control.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
      See Also:
      setErrorMsgStyle(String)
    • setErrorMsgStyle

      void setErrorMsgStyle​(java.lang.String errorMsgStyle)
      Sets inline CSS style to be applied to error messages when the messages are displayed locally to the control. Style is entered as for the HTML style parameter.

      This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.

      Further documentation.

      Since:
      V4.4
    • getLayoutCell

      LayoutCell getLayoutCell()
      Returns the LayoutCell object which can be used to override properties of the parent control's layout as applied to this control. Returns null if no layout is configured on the parent control. The specific object returned will be an extension of LayoutCell that corresponds to the parent control's layout e.g. HorizontalBoxLayoutCell for Horizontal Box layout etc.

      Further documentation.

      Since:
      V4.4
    • hasModifier

      boolean hasModifier​(java.lang.String modifier)
      Returns true if the control has the specified modifier, otherwise returns false.
      Parameters:
      modifier - name of the modifier
      Returns:
      true or false
      Since:
      V4.5.1
      See Also:
      Page.getControlsByModifier(String)
    • isContainer

      boolean isContainer()
      Returns true if this control is a container control i.e. the control can have children.
      Since:
      V5.5
    • getRootHtmlElementProperties

      HtmlElementProperties getRootHtmlElementProperties()
      Return the root HTMLElementProperties for the Control
      Since:
      V5.9