Control API for Input Field (inputField)

An framed area that allows user input. The inputField can be displayed with default input. A user can type new text or edit the existing text.

  • design
    Defines the size of the input field. The value for this attribute can be "STANDARD" or "SMALL".
  • disabled
    A boolean value that defines if the inputField allows input. A disabled inputField has a different background color.
  • firstDayOfWeek
    Controls the date navigator. The value for the firstDayOfWeek has to be between 1 (=Monday) and 7 (=Sunday). If the value is set e.g. to 3 the datenavigator starts with Wednesday when activated.
    To work with the firstDayofWeek attribute the attribute showHelp must be set to true and the attribute type must be set to date.
  • id
    Identification name of the inputField.
  • invalid
    A boolean value that controls the frame of the inputField.
  • invalid="true": InputField is displayed with a red frame.
    invalid="false": InputField is displayed with the regular frame color

  • maxlength
    Defines the maximum amount of characters allowed for the inputField. If the type attribute is set e.g. to date or time the 'maxlength' has to take care of the characters delivered by this format and local settings.
  • password
    A boolean value that controls the echo of the inputField. If set to "true" the typed in characters are echoed - displayed as asterisks (*). A common use for this attribute is to inquire passwords.
  • required
    This attribute sets a different style sheet class for a required inputField (that is a inputField that has to be filled out by the user). That gives you the opportunity do create a complete different look for a required inputfield (e.g. light blue background). Use the 'label' control to indicate with a acharacter that the inputField is required (e.g. an asterisk).
  • showHelp
    A boolean value that activates a help button when set to "true". 'showHelp' shows effect only when 'type' is set to "date". The help button pops up the date navigator allowing selection of the date by clicking on to the required day.
    If you define a textView before the inputfield (to explain the meaning of the inputField) and than an inputField with enabled showHelp it is recommended to place the textView and the inputField in a grid or a tableView for better formatting.
    If textView is not placed in a grid or tableView a line wrap between textView and inputField will occur.
  • size
    Defines the width of the inputField in characters. The frame of the inputField is adjusted accordingly considering the actual text font and the design attribute.
    The inputField width can also be set by the attribute 'width'. If 'size' and 'width' are set the 'width' attribute has priority and overwrites the 'size' setting.
  • type
    If 'type' is set to date a help button to call the dateNavigator can be generated (see 'showHelp'). Other than that this attribute has no further effect on the client side. It can be used later on when the form gets processed.
    Note: The type INTEGER is not null save and will therefor cause an exception when the field is empty. We recommend to use type STRING instead.
  • value
    Default string that is displayed in the inputField frame. The 'maxlength' attribute has no effect on the 'value' attribute. The 'value' string is not truncated to 'maxlength'.
  • visible
    A boolean value that defines if the inputField is visible or invisible.
  • width
    Defines the width of the inputField in pixel or percent. This attribute allows better adjustment of the inputField in a form.
    The inputField width can also be set by the attribute 'width'. If 'size' and 'width' are set the 'width' attribute has priority and overwrites the 'size' setting.
attribute req. values default case sens. JSP taglib classlib
design no STANDARD
SMALL
STANDARD yes design="SMALL" setDesign(InputFieldDesign.SMALL)
disabled no FALSE
TRUE
FALSE yes disabled="TRUE" setDisabled(true)
firstDayOfWeek no range 1 to 7 1 - firstDayOfWeek="3" setFirstDayOfWeek(3)
id yes String none yes id="GetInput"  
invalid no FALSE
TRUE
FALSE no invalid="TRUE" setInvalid(true)
maxlength no Numeric 25 no maxlength="25" setMaxlength(25)
password no FALSE
TRUE
FALSE no password="TRUE" setPassword(true)
required no FALSE
TRUE
FALSE yes required="FALSE" setRequired(false)
showHelp no FALSE
TRUE
FALSE yes showHelp="TRUE"
only effective if type is set to "date"
setShowHelp(true)
only effective if type is set to "date"
size no Numeric 30 - size="30" setSize(30)
type no BCD
BOOLEAN
DATE
INTEGER
STRING
TIME
STRING yes type="INTEGER" setType(DataType.INTEGER)
value no String none no value="Your name here" setValue("Your name here")
visible no FALSE
TRUE
TRUE yes visible="FALSE" setVisible(false)
width no Unit 150 - width="200" setWidth("200")

 

Example
<hbj:inputField
           id="InputName"
           type="string"
           maxlength="100"
           value="Your name here"

/>

Result