Web Dynpro AbstractInputField API
- IWDAbstractInputField
The AbstractInputField class which implements the IWDAbstractInputField interface, is the abstract base class of input fields. The input field can be used to edit or display a single-line text. If you only want to display the text, set the property readOnly to true. You cannot only edit the value of the type String but also the value of a 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 formating – are automatically executed.
·
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 |
Automatic alignment of the text content. The alignment is specified by the usage of the UI element - for example, by the data type of the value to be represented. |
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 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. |
The default value for this property is auto.
·
length
Determines the maximum number of characters to be displayed in the input
field.
·
passwordField
Boolean value that controls the display of entered characters on 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 only read. If the value is
true, the displayed text can only be read.
·
state
Describes the status 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 Within
Web Dynpro).
·
width
Determines 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 |
Value Required |
alignment |
IWDAbstractInputField |
WDInputFieldAlignment |
auto |
bindable |
No |
IWDUIElement |
Boolean |
true |
bindable |
No |
|
length |
IWDAbstractInputField |
int |
20 |
bindable |
No |
passwordField |
IWDAbstractInputField |
Boolean |
false |
bindable |
No |
readOnly |
IWDAbstractInputField |
Boolean |
false |
bindable |
No |
state |
IWDAbstractInputField |
WDState |
normal |
bindable |
No |
textDirection |
IWDAbstractInputField |
WDTextDirection |
inherit |
bindable |
No |
IWDUIElement |
String (TranslatableText) |
|
bindable |
No |
|
value |
IWDAbstractInputField |
String |
|
bindable_mandatory |
No |
IWDUIElement |
WDVisibility |
visible |
bindable |
No |
|
width |
IWDAbstractInputField |
String |
|
bindable |
No |
·
onEnter
This property can assign the action that is executed when the user confirms
the entry by pressing ENTER.
· You must use the value property to bind the data to an input field by assigning the path of the corresponding context attribute to this property.
Method Name |
Parameter |
Return Value |
Description |
bindAlignment |
(String path) |
|
Binds the alignment property to the context node specified by a path. |
bindingOfAlignment |
|
String |
Returns the path of the context element to which the alignment property is bound. Returns NULL if no binding exists. |
bindingOfLength |
|
String |
Returns the path of the context element to which the length property is bound. Returns NULL if no binding exists. |
bindingOfPasswordField |
|
String |
Returns the path of the context element to which the passwordField property is bound. Returns NULL if no binding exists. |
bindingOfReadOnly |
|
String |
Returns the path of the context element to which the readOnly property is bound. Returns NULL if no binding exists. |
bindingOfState |
|
String |
Returns the path of the context element to which the state property is bound. Returns NULL if no binding exists. |
bindingOfTextDirection |
|
String |
Returns the path of the context element to which the textDirection property is bound. Returns NULL if no binding exists. |
bindingOfValue |
|
String |
Returns the path of the context element to which the value property is bound. Returns NULL if no binding exists. |
bindingOfWidth |
|
String |
Returns the path of the context element to which the width property is bound. Returns NULL if no binding exists. |
bindLength |
(String path) |
|
Binds the length property to the context node specified by a path. |
bindPasswordField |
(String path) |
|
Binds the passwordField property to the context node specified by a path. |
bindReadOnly |
(String path) |
|
Binds the readOnly property to the context node specified by a path. |
bindState |
(String path) |
|
Binds the state property to the context node specified by a path. |
bindTextDirection |
(String path) |
|
Binds the textDirection property to the context node specified by a path. |
bindValue |
(String path) |
|
Binds the value property to the context node specified by a path. |
bindWidth |
(String path) |
|
Binds the value of the width property to the context element specified by the path. |
getAlignment |
|
WDInputFieldAlignment |
Returns the value of the alignment property. |
getLength |
|
int |
Returns the value of the length property. |
getOnEnter |
|
IWDAction |
Returns the action that is executed when the onEnter event is triggered. |
getPasswordField |
|
boolean |
Returns the value of the passwordField property. |
getReadOnly |
|
boolean |
Returns the value of the readOnly property. |
getState |
|
WDState |
Returns the value of the state property. |
getTextDirection |
|
WDTextDirection |
Returns the value of the textDirection property. |
getValue |
|
String |
Returns the value of the value property. |
getWidth |
|
String |
Returns the value of the width property. |
mappingOfOnEnter |
|
IWDParameterMapping |
Returns the parameter mapping for the onEnter action. |
setAlignment |
(WDInputFieldAlignment alignment) |
|
Sets the value of the alignment property. |
setLength |
(int length) |
|
Sets the value of the length property. |
setOnEnter |
(IWDAction action) |
|
Sets the action that is executed when the onEnter event is triggered. |
setPasswordField |
(Boolean passwordField) |
|
Sets the value of the passwordField property. |
setReadOnly |
(boolean readOnly) |
|
Sets the value of the readOnly property. |
setState |
(WDState state) |
|
Sets the value of the state property. |
setTextDirection |
(WDTextDirection textDirection) |
|
Sets the value of the textDirection property. |
setValue |
(String value) |
|
Sets the value of the value property. |
setWidth |
(String width) |
|
Sets the value of the width property. |
Additional methods described in the following APIs are available using inheritance: IWDUIElement, IWDViewElement.

For detailed documentation of all inherited methods, see the documentation for the relevant APIs.
