class sap.ui.commons.PasswordField

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/commons/PasswordField
Application Component: CA-UI5-CTR

A text field with masked characters which borrows its properties and methods from TextField.


Constructor

Constructor for a new PasswordField.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

This class does not have its own settings, but all settings applicable to the base type sap.ui.commons.TextField can be used.

new sap.ui.commons.PasswordField(sId?, mSettings?)
Param Type Default Value Description
sId? string

id for the new control, generated automatically if no id is given

mSettings? object

initial settings for the new control

Borrowed Properties

Name Type Default Value Description
accessibleRole sap.ui.core.AccessibleRole Textbox

Accessibility role for the text field.

Visibility: public
design sap.ui.core.Design Standard

Font type. valid values are Standard and Monospace.

Visibility: public
editable boolean true

Switches edit state of the control. Read-only fields have different colors, depending on theme setting.

Visibility: public
enabled boolean true

Switches enabled state of the control. Disabled fields have different colors, and can not be focused.

Visibility: public
helpId string empty string

Unique identifier used for help service.

Visibility: public
imeMode sap.ui.core.ImeMode Auto

State of the Input Method Editor (IME).

Visibility: public
maxLength int 0

Maximum number of characters. Value '0' means the feature is switched off.

Visibility: public
name string

The name property to be used in the HTML code (e.g. for HTML forms that send data to the server via 'submit').

Visibility: public
placeholder string

Placeholder for the text field.

Since: 1.14.0.

Visibility: public
required boolean false

Depending on theme the TextField is shown as required. If a Label is assigned to the TextField it will visualize the requires state too.

Visibility: public
textAlign sap.ui.core.TextAlign Begin

Sets the horizontal alignment of the text.

Visibility: public
textDirection sap.ui.core.TextDirection Inherit

Direction of the text. Possible values: "rtl", "ltr".

Visibility: public
value string empty string

Text inside the TextField

Visibility: public
valueState sap.ui.core.ValueState None

Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success.

Visibility: public
width sap.ui.core.CSSSize

Width of text field. When it is set (CSS-size such as % or px), this is the exact size. When left blank, the text field length defines the width.

Visibility: public

Methods Overview

Method Description
sap.ui.commons.PasswordField.extend

Creates a new subclass of class sap.ui.commons.PasswordField with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.commons.TextField.extend.

sap.ui.commons.PasswordField.getMetadata

Returns a metadata object for class sap.ui.commons.PasswordField.

sap.ui.commons.PasswordField.extend

Creates a new subclass of class sap.ui.commons.PasswordField with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.commons.TextField.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.commons.PasswordField.getMetadata

Returns a metadata object for class sap.ui.commons.PasswordField.