Class TabControl

  • All Implemented Interfaces:
    Serializable, DynamicAttributes, IterationTag, JspTag, Tag, DynamicActionAttributes, Renderer<TabAction>

    public class TabControl
    extends StylableTag
    implements Renderer<TabAction>
    This is the main tag for the tab control. It must always be present as the outermost tag. Use one or more Tab tags to define each tab inside the tabcontrol.

    Syntax:

       <t:tabcontrol
          id=...
          clazz=...
          subclass=...
          style=...
          contentstyle=...
          active=...
          position=...
          notabs=true|false
          extensions=...
       >
    
    Tag attributes
    Attribute Default value Required Description
    id - yes The ID of the tab control. The value of this attribute goes directly into the standard id attribute. This means that if you need a reference to the tab control object in your own JavaScript code, you may for example use the following code:

    tabcontrol = document.getElementById('<id>');

    clazz tabcontrol no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different tables.
    subclass - no Additional classes to put in the HTML class attribute. Doesn't replace the main class attribute.
    style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different tabcontrols.
    contentstyle - no The value if this attribute goes directly into the standard HTML style attribute for the content section. This allows you to apply different styles to different tabcontrols.
    active - no The id of the tab that should be active to begin with. If no value is specified the first tab is automatically made active.
    position top no The position of the tabs in relation to the content. The default value is to display the tabs at the top. The only other allowed value is bottom.
    notabs false no If the tabcontrol should display tabs or not. If false the tab control will not output any HTML except the contents of the active tab.
    extensions - no An ExtensionsInvoker for TabAction extensions. All actions will be rendered by this tabcontrol after all the normally defined tags have been rendered. Since BASE 2.17.
    Version:
    2.0
    Author:
    Nicklas
    See Also:
    Tab, Serialized Form
    • Field Detail

      • contentStyle

        private String contentStyle
        Optional style attribute for the content section
      • active

        private String active
        The ID attribute of the active tab.
      • position

        private int position
        The position of the tabs.
      • remember

        private boolean remember
        If it should try to remember the last active tab on the page
      • noTabs

        private boolean noTabs
        If the tabs should be displayed or not.
      • initialTab

        private String initialTab
        The ID of the tab that is initially active.
      • numTabs

        private int numTabs
        The number of tabs.
      • content

        private StringBuilder content
        The HTML for the contents of the tabs.
      • TOP

        public static final int TOP
        Tabs are at the top of the tab control.
        See Also:
        Constant Field Values
      • BOTTOM

        public static final int BOTTOM
        Tabs are at the bottom of the tab control.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TabControl

        public TabControl()