Entering content frame

Object documentation Web Dynpro InputField API - IWDInputField Locate the document in its SAP Library structure

Definition

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 formating – are automatically executed.

Use

When using an input field, you must always add a label to ensure accessibility.

Description of the UI Element Properties

·        size
Specifies the size of the input field.

small

This graphic is explained in the accompanying text

The UI element is displayed in a small font.

standard

This graphic is explained in the accompanying text

A default size is displayed.

Note

Additional properties are defined in the corresponding superior classes. Refer to:
IWDAbstractInputField, IWDUIElement, IWDViewElement.

Overview of Inherited and Additional Properties

Name

Interface

Type

Initial Value

Bindable

Value Required

enabled

IWDUIElement

boolean

true

bindable

No

length

IWDAbstractInputField

int

20

bindable

No

passwordField

IWDAbstractInputField

boolean

false

bindable

No

readOnly

IWDAbstractInputField

boolean

false

bindable

No

size

IWDInputField

WDInputFieldSize

standard

bindable

No

state

IWDAbstractInputField

WDState

normal

bindable

No

tooltip

IWDUIElement

String (TranslatableText)

 

bindable

No

value

IWDAbstractInputField

String

 

bindable_mandatory

No

visible

IWDUIElement

WDVisibility

visible

bindable

No

Events

For information about events, refer to the description of Web Dynpro IWDAbstractInputField API.

Data Binding

You can use the value property to bind data to an input field by assigning the path of the context attribute to this property.

Mobile Characteristics

The UI element InputField supports the development of mobile applications for pocket PCs and BlackBerry wireless handhelds (see Mobile Web Dynpro).

However, several properties supported in the desktop browser cannot be used. These include:

Variances of the properties

Properties

Pocket PC

BlackBerry wireless handheld

enabled

ignored

ignored

readOnly

ignored

ignored

size

ignored

ignored

state

ignored

ignored

tooltip

ignored

ignored

Note

The readOnly property is to be used carefully, as the value true is, in contrast to a desktop PC, not considered in the display of the user interface element. The user of the mobile Web Dynpro application cannot know whether it is possible to edit the input field.

The onEnter event is also not supported.

Methods in the Web Dynpro IWDInputField API

Method Name

Parameter

Return Value

Short Description

bindingOfSize

 

String

Returns the path of the context element to which the size property is bound. Returns NULL if no binding exists.

bindSize

(String path)

 

Binds the size property to the context node specified by a path.

getSize

 

WDInputFieldSize

Returns the value of the size property.

setSize

(WDInputFieldSize value)

 

Sets the value of the size property.

Additional methods described in the following APIs are available using inheritance: IWDAbstractInputField, IWDUIElement, IWDViewElement.

Note

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

  

  

 

Leaving content frame