An framed area that allows user input in a toolbar. The toolbarInputField can be displayed with default input. A user can type new text or edit the existing text.
enabled
A boolean value that defines if the inputField allows input. A disabled inputField (enabled = "FALSE") has a different background color.
design
Defines the size of the input field. The value for this attribute can be "STANDARD" or "SMALL".
id
Identification name of the inputField.
maxlength
Defines the maximum amount of characters allowed for the inputField. If the type attribute is set for example, to date or time the 'maxlength' has to take care of the characters delivered by this format and local settings.
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 therefore 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'.
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.
Attributes |
M |
Values |
Usage |
---|---|---|---|
enabled |
FALSE TRUE (d) |
Taglib enabled="TRUE" Classlib setEnabled(false) |
|
id |
* |
String (cs) |
Taglib id="GetInput" Classlib setId("GetInput") |
invalid |
FALSE (d) TRUE |
Taglib invalid="TRUE" Classlib setInvalid(true) |
|
maxlength |
Numeric (25) |
Taglib maxlength="25" Classlib setMaxlength(25) |
|
size |
Numeric (30) |
Taglib size="35" Classlib setSize("35") |
|
type |
BCD BOOLEAN DATE INTEGER STRING TIME |
Taglib type="INTEGER" Classlib setType(DataType.INTEGER) |
|
value |
String |
Taglib value="Your name here" Classlib setValue("Your name here") |
|
width |
Unit |
Taglib width="200" Classlib setWidth("200") |
using the taglib
<hbj:toolbarInputField id="Scale" value="100%" width="50px" />
using the classlib
ToolbarInputField input = new ToolbarInputField("Scale"); input.setType(DataType.STRING); input.setWidth("50px"); input.setValue("100%");
Result
The toolbar input field has to be used in the toolbar control. See the " toolbar " control description for the result.