All Implemented Interfaces:
Serializable, BodyTag, DynamicAttributes, IterationTag, JspTag, Tag, DynamicActionAttributes, TabAction, Action

This tag defines the title and contents of a single tab inside a tab control.

Syntax:

   <t:tab
      id=...
      clazz=...
      style=...
      title=...
      tooltip=...
      visible=true|false
      helpid=...
      tabindex=...
   >
Tag attributes
Attribute Default value Required Description
id tabcontrol1 yes The ID of the tab. The value of this attribute goes directly into the standard HTML id attribute. This means that if you need a reference to the tab object in your own JavaScript code, you may for example use the following code:

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

clazz button no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different tables.
style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different notes.
title - yes The title of the tab.
tooltip - no An optional tooltip that is shown as a popup text while the user is pointing the mouse over the tab's title. Not supported by all browsers.
visible true no If this tab should be visible or not.
helpid no Optional ID for the help text associated with this tab. See the Help taglib for more information.
tabindex 0 no Tab index value to control the focus order. Use -1 to disable tabbing.
Version:
2.0
Author:
Nicklas
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • tc

      private TabControl tc
      The parent TabControl object.
    • dynamicAttributes

      private Map<String,DynamicActionAttribute> dynamicAttributes
    • clazz

      private String clazz
      Optional class attribute.
      Since:
      2.17
    • style

      private String style
      Optional style attribute
    • title

      private String title
      The title of the tab.
    • tooltip

      private String tooltip
      A popup tooltip text.
    • visible

      private boolean visible
      If the tab should be visible or not.
    • helpid

      private String helpid
      The help ID for this tab.
    • tabIndex

      private int tabIndex
  • Constructor Details

    • Tab

      public Tab()
  • Method Details

    • setClazz

      public void setClazz(String clazz)
      Since:
      2.17
    • getClazz

      public String getClazz()
      Description copied from interface: TabAction
      Class attribute of the main tab tag.
      Specified by:
      getClazz in interface TabAction
      Returns:
      Class attribute, or null to not add any class attribute
      Since:
      2.17
    • setStyle

      public void setStyle(String style)
    • getStyle

      public String getStyle()
      Description copied from interface: TabAction
      Extra CSS style attributes that will be added to the style attribute of the main tab tag.
      Specified by:
      getStyle in interface TabAction
      Returns:
      Style attributes, or null
    • setTitle

      public void setTitle(String title)
    • getTitle

      public String getTitle()
      Description copied from interface: TabAction
      Get the title of the tab.
      Specified by:
      getTitle in interface TabAction
    • setTooltip

      public void setTooltip(String tooltip)
    • getTooltip

      public String getTooltip()
      Description copied from interface: TabAction
      A tooltip that is shown as a yellow popup when the user points the mouse at the tab.
      Specified by:
      getTooltip in interface TabAction
      Returns:
      The tooltip or null to not display any tooltip
    • setVisible

      public void setVisible(boolean visible)
    • isVisible

      public boolean isVisible()
      Description copied from interface: TabAction
      If the tab should be visible or not.
      Specified by:
      isVisible in interface TabAction
    • setHelpid

      public void setHelpid(String helpid)
    • getHelpid

      public String getHelpid()
    • setTabindex

      public void setTabindex(int tabIndex)
    • getTabindex

      public int getTabindex()
    • setDynamicAttribute

      public void setDynamicAttribute(String uri, String name, Object value) throws JspException
      Specified by:
      setDynamicAttribute in interface DynamicAttributes
      Throws:
      JspException
    • getDynamicActionAttributes

      public Iterator<DynamicActionAttribute> getDynamicActionAttributes()
      Description copied from interface: DynamicActionAttributes
      Get an iterator that return all dynamic attributes. If no dynamic attributes have been defined, the method may return null or an iterator that doesn't return any elements.
      Specified by:
      getDynamicActionAttributes in interface DynamicActionAttributes
      Returns:
      An iterator or null
    • setPageContext

      public void setPageContext(PageContext pageContext)
      Reset the dynamic attributes to make sure old ones are not included in case the tag object is reused.
      Specified by:
      setPageContext in interface Tag
      Overrides:
      setPageContext in class TagSupport
      Since:
      3.10
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class BodyTagSupport
      Throws:
      JspException
    • doEndTag

      public int doEndTag() throws JspException
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class BodyTagSupport
      Throws:
      JspException
    • getHelpId

      public String getHelpId()
      Description copied from interface: TabAction
      The external id of a help text that the user can display to get more information about how to use the information in this tab. See Help.getExternalId().
      Specified by:
      getHelpId in interface TabAction
      Returns:
      The help id or null to not display any help
    • getTabIndex

      public int getTabIndex()
      Description copied from interface: TabAction
      Get the tab index used to control focus order when tabbing. Use -1 to disable.
      Specified by:
      getTabIndex in interface TabAction
    • getContent

      public String getContent()
      Description copied from interface: TabAction
      Get the (HTML) contents of the tab.
      Specified by:
      getContent in interface TabAction