com.sap.ui.commons.client
Class TextField

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.TextField
All Implemented Interfaces:
ToolbarItem
Direct Known Subclasses:
ComboBox, DatePicker, PasswordField, TextArea

public class TextField
extends com.sap.ui.core.client.Control
implements ToolbarItem

The class TextField is the GWT wrapper for the Phoenix control: sap.ui.commons.TextField.

Control is used to enter text.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.TextField)

Constructor Summary
protected TextField()
          constructs the class TextField
hidden due to JavaScriptObject restriction
 
Method Summary
 TextField attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
 TextField bindValue(String path)
          Binder for property value.
 TextField bindValue(String path, com.sap.ui.core.client.Formatter formatter)
          Binder for property value.
static TextField create()
          creates a new instance of the class TextField
static TextField create(String idOrConfig)
          creates a new instance of the class TextField
static TextField create(String id, String config)
          creates a new instance of the class TextField
 TextField detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
 void focus()
          Puts the focus to this control.
 String getAccessibleDescription()
          Getter for property accessibleDescription Accessibility description for the text field.
 String getAccessibleName()
          Getter for property accessibleName Accessibility name for the text field.
 com.sap.ui.core.client.AccessibleRole getAccessibleRole()
          Getter for property accessibleRole Accessibility role for the text field.
 com.sap.ui.core.client.Design getDesign()
          Getter for property design Font type.
 String getHelpId()
          Getter for property helpId Unique identifier used for help service.
 com.sap.ui.core.client.ImeMode getImeMode()
          Getter for property imeMode State of the Input Method Editor (IME).
 int getMaxLength()
          Getter for property maxLength Maximum number of characters.
 com.sap.ui.core.client.TextAlign getTextAlign()
          Getter for property textAlign Sets the horizontal alignment of the text.
 com.sap.ui.core.client.TextDirection getTextDirection()
          Getter for property textDirection Direction of the text.
 String getValue()
          Getter for property value Text inside the textfield
 com.sap.ui.core.client.ValueState getValueState()
          Getter for property valueState Visualizes warnings or errors related to the text field.
 String getWidth()
          Getter for property width Width of text field.
 boolean isEditable()
          Getter for property editable Switches edit state of the control.
 boolean isEnabled()
          Getter for property enabled Switches enabled state of the control.
 boolean isRequired()
          Getter for property required Depending on theme the TextField is shown as required.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 TextField setAccessibleDescription(String value)
          Setter for property accessibleDescription
Default value is: ''
 TextField setAccessibleName(String value)
          Setter for property accessibleName
Default value is: ''
 TextField setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
          Setter for property accessibleRole
Default value is: Textbox
 TextField setDesign(com.sap.ui.core.client.Design value)
          Setter for property design
Default value is: Standard
 TextField setEditable(boolean value)
          Setter for property editable
Default value is: true
 TextField setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 TextField setHelpId(String value)
          Setter for property helpId
Default value is: ''
 TextField setImeMode(com.sap.ui.core.client.ImeMode value)
          Setter for property imeMode
Default value is: Auto
 TextField setMaxLength(int value)
          Setter for property maxLength
Default value is: 0
 TextField setRequired(boolean value)
          Setter for property required
Default value is: false
 TextField setTextAlign(com.sap.ui.core.client.TextAlign value)
          Setter for property textAlign
Default value is: Begin
 TextField setTextDirection(com.sap.ui.core.client.TextDirection value)
          Setter for property textDirection
Default value is: Inherit
 TextField setValue(String value)
          Setter for property value
Default value is: ''
 TextField setValueState(com.sap.ui.core.client.ValueState value)
          Setter for property valueState
Default value is: None
 TextField setVisible(boolean value)
          Setter for property visible
Default value is: true
 TextField setWidth(String value)
          Setter for property width
 TextField unbindValue()
          Unbinder for property value.
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextField

protected TextField()
constructs the class TextField
hidden due to JavaScriptObject restriction

Method Detail

create

public static TextField create()
creates a new instance of the class TextField


create

public static TextField create(String idOrConfig)
creates a new instance of the class TextField

Parameters:
id - id of the TextField or configuration JSON string

create

public static TextField create(String id,
                               String config)
creates a new instance of the class TextField

Parameters:
id - id of the TextField
config - configuration JSON string

getValue

public final String getValue()
Getter for property value Text inside the textfield

Returns:
the value of property value

setValue

public final TextField setValue(String value)
Setter for property value
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

bindValue

public final TextField bindValue(String path)
Binder for property value.

Parameters:
path - path to a property in the model
Returns:
this to allow method chaining

bindValue

public final TextField bindValue(String path,
                                 com.sap.ui.core.client.Formatter formatter)
Binder for property value.

Parameters:
path - path to a property in the model
formatter - an optional Formatter function for the value
Returns:
this to allow method chaining

unbindValue

public final TextField unbindValue()
Unbinder for property value.

Returns:
this to allow method chaining

getTextDirection

public final com.sap.ui.core.client.TextDirection getTextDirection()
Getter for property textDirection Direction of the text. Possible values: rtl, ltr.

Returns:
the value of property textDirection

setTextDirection

public final TextField setTextDirection(com.sap.ui.core.client.TextDirection value)
Setter for property textDirection
Default value is: Inherit

Parameters:
value - com.sap.ui.core.client.TextDirection
Returns:
this to allow method chaining

isEnabled

public final boolean isEnabled()
Getter for property enabled Switches enabled state of the control. Disabled fields have different colors, and can not be focused.

Returns:
the value of property enabled

setEnabled

public final TextField setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isEditable

public final boolean isEditable()
Getter for property editable Switches edit state of the control. Read-only fields have different colors, depending on customer setting.

Returns:
the value of property editable

setEditable

public final TextField setEditable(boolean value)
Setter for property editable
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isVisible

public final boolean isVisible()
Getter for property visible Invisible controls are not rendered.

Returns:
the value of property visible

setVisible

public final TextField setVisible(boolean value)
Setter for property visible
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isRequired

public final boolean isRequired()
Getter for property required Depending on theme the TextField is shown as required.

Returns:
the value of property required

setRequired

public final TextField setRequired(boolean value)
Setter for property required
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width 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.

Returns:
the value of property width

setWidth

public final TextField setWidth(String value)
Setter for property width

Parameters:
value - String
Returns:
this to allow method chaining

getMaxLength

public final int getMaxLength()
Getter for property maxLength Maximum number of characters. Value '0' means the feature is switched off.

Returns:
the value of property maxLength

setMaxLength

public final TextField setMaxLength(int value)
Setter for property maxLength
Default value is: 0

Parameters:
value - int
Returns:
this to allow method chaining

getValueState

public final com.sap.ui.core.client.ValueState getValueState()
Getter for property valueState Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success.

Returns:
the value of property valueState

setValueState

public final TextField setValueState(com.sap.ui.core.client.ValueState value)
Setter for property valueState
Default value is: None

Parameters:
value - com.sap.ui.core.client.ValueState
Returns:
this to allow method chaining

getTextAlign

public final com.sap.ui.core.client.TextAlign getTextAlign()
Getter for property textAlign Sets the horizontal alignment of the text.

Returns:
the value of property textAlign

setTextAlign

public final TextField setTextAlign(com.sap.ui.core.client.TextAlign value)
Setter for property textAlign
Default value is: Begin

Parameters:
value - com.sap.ui.core.client.TextAlign
Returns:
this to allow method chaining

getImeMode

public final com.sap.ui.core.client.ImeMode getImeMode()
Getter for property imeMode State of the Input Method Editor (IME).

Returns:
the value of property imeMode

setImeMode

public final TextField setImeMode(com.sap.ui.core.client.ImeMode value)
Setter for property imeMode
Default value is: Auto

Parameters:
value - com.sap.ui.core.client.ImeMode
Returns:
this to allow method chaining

getDesign

public final com.sap.ui.core.client.Design getDesign()
Getter for property design Font type. Standard, Monospace

Returns:
the value of property design

setDesign

public final TextField setDesign(com.sap.ui.core.client.Design value)
Setter for property design
Default value is: Standard

Parameters:
value - com.sap.ui.core.client.Design
Returns:
this to allow method chaining

getHelpId

public final String getHelpId()
Getter for property helpId Unique identifier used for help service.

Returns:
the value of property helpId

setHelpId

public final TextField setHelpId(String value)
Setter for property helpId
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

getAccessibleRole

public final com.sap.ui.core.client.AccessibleRole getAccessibleRole()
Getter for property accessibleRole Accessibility role for the text field.

Returns:
the value of property accessibleRole

setAccessibleRole

public final TextField setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
Setter for property accessibleRole
Default value is: Textbox

Parameters:
value - com.sap.ui.core.client.AccessibleRole
Returns:
this to allow method chaining

getAccessibleDescription

public final String getAccessibleDescription()
Getter for property accessibleDescription Accessibility description for the text field.

Returns:
the value of property accessibleDescription

setAccessibleDescription

public final TextField setAccessibleDescription(String value)
Setter for property accessibleDescription
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

getAccessibleName

public final String getAccessibleName()
Getter for property accessibleName Accessibility name for the text field.

Returns:
the value of property accessibleName

setAccessibleName

public final TextField setAccessibleName(String value)
Setter for property accessibleName
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

attachChangeEvent

public final TextField attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
Event Parameters:
{string} newValue The new / changed value of the textfield.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachChangeEvent

public final TextField detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

focus

public final void focus()
Puts the focus to this control.



Copyright © 2011 SAP. All Rights Reserved.