Class Input

All Implemented Interfaces:
Serializable, DynamicAttributes, IterationTag, JspTag, Tag, DynamicActionAttributes

public class Input extends StylableTag
This tag is used to make it easier to add <input> elements on a BASE web page. It is mainly used for checkboxes and radio buttons.

Example:

   <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
   <base:input type="checkbox" name="item_id" value="55" checked="true" />

Syntax:

   <base:icon
      id=...
      clazz=...
      subclass=...
      style=...
      type=...
      name=...
      value=...
      checked=...
      visible=...
      tabindex=...
      title=...
   >
Tag attributes
Attribute Default value Required Description
id - no The ID of the input element. The value of this attribute goes directly into the standard id attribute. This means that if you need a reference to the note object in your own JavaScript code, you may for example use the following code:

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

clazz - no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different inputs.
subclass - no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different inputs.
style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different inputs.
type yes The type of the input element.
name yes The name of the input element.
value no The value of the input element.
checked false no If the input element should be checked or not.
title no A short explanation that will show up as a tooltip.
visible true no If the input should be visible or not.
tabindex 0 no Tab index value to control the focus order. Use -1 to disable tabbing to the input.
Since:
3.18.1
Author:
Nicklas
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • type

      private String type
      The type of input.
    • name

      private String name
      The name of the input element. If not set, the ID is used.
    • value

      private String value
      The value of the input element.
    • checked

      private boolean checked
      TRUE if the input element is checked.
    • title

      private String title
      An optional title.
    • visible

      private boolean visible
      If the input should be visible or not.
    • tabIndex

      private int tabIndex
  • Constructor Details

    • Input

      public Input()
  • Method Details

    • setType

      public void setType(String type)
    • getType

      public String getType()
    • setName

      public void setName(String name)
    • setName

      public void setName(int name)
    • getName

      public String getName()
    • setValue

      public void setValue(String value)
    • setValue

      public void setValue(int value)
    • getValue

      public String getValue()
    • setChecked

      public void setChecked(boolean checked)
    • isChecked

      public boolean isChecked()
    • setVisible

      public void setVisible(boolean visible)
    • isVisible

      public boolean isVisible()
    • setTitle

      public void setTitle(String title)
    • getTitle

      public String getTitle()
    • setTabindex

      public void setTabindex(int tabIndex)
    • getTabindex

      public int getTabindex()
    • doStartTag

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