The InputField UI element allows the user to edit or display a single-line text. You cannot only edit the value of the type String but also the value of any simple data type using an input field. The conversion of the string representation into the data type – known as parsing – and the conversion of the data type into the string presentation – known as formatting – are automatically executed.
When using an input field, you must always add a label to ensure accessibility.
● alignment
Specifies the horizontal alignment of the UI element in the grid. The default value of this property is auto. The alignment property can take the following values and is represented by the list type WDInputFieldAlignment:
auto |
The alignment is specified by the usage of the UI element - for example, by the displayed data type. |
beginOfLine |
The text content is always displayed at the beginning of line. Therefore, the text content for the value ltr of the textDirection property is left-justified. The text content for the value rtl is right-justified. |
center |
Centered alignment. |
endOfLine |
The text content is always displayed at the end of the line. Therefore, the text content for the value ltr of the textDirection property is right-justified. The text content for the value rtl is left-justified. |
forcedLeft |
The text content is always left-justified, regardless of whether the value is ltr or rtl for the textDirection property. |
forcedRight |
The text content is always right-justified, regardless of whether the value is ltr or rtl for the textDirection property. |
left |
Left-justified alignment. This value is deprecated. Use beginOfLine instead. |
right |
Right-justified alignment. This value is deprecated. Use forcedRight instead. |
● explanation
determines the explanation text. explanation is maintained by the documentation developer in the Web Dynpro Authoring environment.
· imeMode
An Input Method Editor (IME) allows users to enter and edit Chinese, Japanese, and Korean characters. The IME is an essential component for writing Chinese, Japanese, and Korean scripts. These writing systems have more characters than can be encoded for a regular keyboard. The IMEs for these languages use sequences of base characters that describe an individual character or group of characters to enter a larger set of characters. Base characters can be component letters from Hangul syllables, phonetic components for Japanese Kanji characters, or various combinations for Chinese characters.
To compose text with an IME, the user generally uses dictionary lookup and contextual analysis, especially in languages where homonyms are frequent, as in Japanese. A user typically starts by entering a few component characters, optionally selecting from various choices, and a confirmation command.
The imeMode property can be filled with the following values and is represented by the enumeration type WDIMEMode:
¡ auto (default)
¡ active
¡ inactive
¡ disabled
● length
Specifies the maximum number of characters to be displayed in the input field.
● passwordField
Boolean value that controls the display of entered characters on the screen. If the value is true, the entered characters on screen are echoed with an asterisk (*). This attribute is usually used for password input fields.
● readOnly
Specifies whether the input field can be edited or read only. If the value is true, the displayed text can only be read.
● size
This property is deprecated and can no longer be used.
● state
Describes the state of the UI element. The data type of this property corresponds to the enumeration type WDState. You can use the following values in the application:
Describes the default state of the UI element. |
|
Specifies whether the entered value is required. |
● textDirection
Specifies the text direction and allows you to use input fields for texts in languages which require a specific text direction. The textDirection property can be filled with the following values and is represented by the enumeration type WDTextDirection.
The text direction is inherited from the parent element. Therefore, the text direction is identical to the one of the parent element. |
|
The default value for this property is inherit.
● value
Specifies the character string displayed in the input field area. This property must be bound to a context attribute (see Data Binding of UI Element Properties).
● width
Specifies the width of the input field that you can specify in CSS sizes, such as em, ex, pixels or percentage values.
Name |
Interface |
Type |
Initial Value |
Bindable |
alignment |
IWDAbstractInputField |
WDInputFieldAlignment |
auto |
bindable |
IWDUIElement |
boolean |
true |
bindable |
|
explanation |
IWDInputField |
String (Translatable Text) |
|
not_bindable |
imeMode |
IWDInputField |
WDIMEMode |
auto |
bindable |
length |
IWDAbstractInputField |
int |
20 |
bindable |
passwordField |
IWDAbstractInputField |
boolean |
false |
bindable |
readOnly |
IWDAbstractInputField |
boolean |
false |
bindable |
state |
IWDAbstractInputField |
State |
normal |
bindable |
textDirection |
IWDAbstractInputField |
WDTextDirection |
inherit |
bindable |
tooltip |
IWDUIElement |
String (TranslatableText) |
|
bindable |
value |
IWDAbstractInputField |
String |
|
bindable_mandatory |
visible |
IWDUIElement |
WDVisibility |
visible |
bindable |
width |
IWDAbstractInputField |
String |
|
bindable |
This event onEnter is triggered when the user chooses ENTER.
You can use the value property to bind data to an input field by assigning the path of the context attribute to this property.