com.sap.ui.commons.client
Class ComboBox

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
                  extended by com.sap.ui.commons.client.ComboBox
All Implemented Interfaces:
ToolbarItem
Direct Known Subclasses:
DropdownBox

public class ComboBox
extends TextField
implements ToolbarItem

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

The control provides a field that allows end users to either enter some text, or to choose an entry out of a list of pre-defined items. The choosable items can be provided in the form of complete list boxes, single listbox items, or text strings defined for the current application.

For further parameters see {@link com.sap.ui.commons.client.TextField

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

Constructor Summary
protected ComboBox()
          constructs the class ComboBox
hidden due to JavaScriptObject restriction
 
Method Summary
 ComboBox addItem(com.sap.ui.core.client.ListItem item)
          Appends a item to the aggregation items.
 ComboBox bindItems(String path, com.sap.ui.core.client.Element template)
          Binder for aggregation items.
static ComboBox create()
          creates a new instance of the class ComboBox
static ComboBox create(String idOrConfig)
          creates a new instance of the class ComboBox
static ComboBox create(String id, String config)
          creates a new instance of the class ComboBox
 ComboBox destroyItems()
          Destroys all the items in the Items-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> getItems()
          Getter for aggregation items Getter for aggregation items.
 String getListBox()
          Using this method, you provide a listbox control.
 int getMaxPopupItems()
          Getter for property maxPopupItems Defines the number of items that shall be displayed at once.
 int indexOfItem(com.sap.ui.core.client.ListItem item)
          Checks for the provided com.sap.ui.core.client.ListItem in the items-aggregation and returns its index if found or -1 otherwise.
 ComboBox insertItem(com.sap.ui.core.client.ListItem item, int index)
          Inserts some item into the aggregation named items.
 boolean isDisplaySecondaryValues()
          Getter for property displaySecondaryValues Indicates whether the "additionalText" property that is available for sap.ui.core.ListItem shall be displayed in the list.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem>> removeAllItems()
          Removes all the items in the items-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> removeItem(int index)
          Removes a item from the aggregation named items.
 ComboBox setDisplaySecondaryValues(boolean value)
          Setter for property displaySecondaryValues
Default value is: false
 ComboBox setListBox(ListBox listBox)
          Using this method, you provide a listbox control.
 ComboBox setListBox(String listBox)
          Using this method, you provide a listbox control.
 ComboBox setMaxPopupItems(int value)
          Setter for property maxPopupItems
Default value is: 10
 ComboBox unbindItems()
          Unbinder for aggregation items.
 
Methods inherited from class com.sap.ui.commons.client.TextField
attachChangeEvent, bindValue, bindValue, detachChangeEvent, focus, getAccessibleDescription, getAccessibleName, getAccessibleRole, getDesign, getHelpId, getImeMode, getMaxLength, getTextAlign, getTextDirection, getValue, getValueState, getWidth, isEditable, isEnabled, isRequired, isVisible, setAccessibleDescription, setAccessibleName, setAccessibleRole, setDesign, setEditable, setEnabled, setHelpId, setImeMode, setMaxLength, setRequired, setTextAlign, setTextDirection, setValue, setValueState, setVisible, setWidth, unbindValue
 
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

ComboBox

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

Method Detail

create

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


create

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

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

create

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

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

getMaxPopupItems

public final int getMaxPopupItems()
Getter for property maxPopupItems Defines the number of items that shall be displayed at once. If the overall number of list items is higher than the setting, a scrollbar is provided.

Returns:
the value of property maxPopupItems

setMaxPopupItems

public final ComboBox setMaxPopupItems(int value)
Setter for property maxPopupItems
Default value is: 10

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

isDisplaySecondaryValues

public final boolean isDisplaySecondaryValues()
Getter for property displaySecondaryValues Indicates whether the "additionalText" property that is available for sap.ui.core.ListItem shall be displayed in the list.

Returns:
the value of property displaySecondaryValues

setDisplaySecondaryValues

public final ComboBox setDisplaySecondaryValues(boolean value)
Setter for property displaySecondaryValues
Default value is: false

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

getItems

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> getItems()
Getter for aggregation items Getter for aggregation items. Allows setting ListItems (see sap.ui.core.ListBox) that shall be displayed in the list.

Returns:
com.sap.ui.core.client.ListItem[]

insertItem

public final ComboBox insertItem(com.sap.ui.core.client.ListItem item,
                                 int index)
Inserts some item into the aggregation named items.

Parameters:
item - the item to insert
index - int the 0-based index the item should be inserted at.
Returns:
this to allow method chaining

addItem

public final ComboBox addItem(com.sap.ui.core.client.ListItem item)
Appends a item to the aggregation items.

Parameters:
item - com.sap.ui.core.client.ListItem the item to add
Returns:
this to allow method chaining

removeItem

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> removeItem(int index)
Removes a item from the aggregation named items.

Parameters:
index - int the position of the item to remove.
Returns:
reference to this instance

removeAllItems

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem>> removeAllItems()
Removes all the items in the items-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfItem

public final int indexOfItem(com.sap.ui.core.client.ListItem item)
Checks for the provided com.sap.ui.core.client.ListItem in the items-aggregation and returns its index if found or -1 otherwise.

Parameters:
item - the item whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyItems

public final ComboBox destroyItems()
Destroys all the items in the Items-aggregation.

Returns:
this to allow method chaining

bindItems

public final ComboBox bindItems(String path,
                                com.sap.ui.core.client.Element template)
Binder for aggregation items.

Parameters:
path - path to a list in the model
template - the template Element for this aggregation
Returns:
this to allow method chaining

unbindItems

public final ComboBox unbindItems()
Unbinder for aggregation items.

Returns:
this to allow method chaining

getListBox

public final String getListBox()
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.


setListBox

public final ComboBox setListBox(String listBox)
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.

Parameters:
listBox - id of the associated com.sap.ui.commons.client.ListBox or null
Returns:
this to allow method chaining

setListBox

public final ComboBox setListBox(ListBox listBox)
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.

Parameters:
listBox - An associated com.sap.ui.commons.client.ListBox or null
Returns:
this to allow method chaining


Copyright © 2011 SAP. All Rights Reserved.