The Split Button Control is a composite control that consists of a default-action Button and a Menu Button control. The default-action button control represents a simple push button. It is used for initiating actions, such as save or print. It can contain some text, an icon, or both; the order of the two can be configured. The action initiated by this button is considered to be the default action for the control, and it must be one of the selections defined in the Menu Button menu. The Menu Button control is a button that opens a menu upon user's click. MenuButton is a composition of the Menu control and the Button control and thus inheriting all features. When a menu item is selected by the user, MenuButton throws an event called itemSelected. The event transfers the itemId of the selected item. As an alternative, the button press event can be used which has a similar behavior.
Deprecated API:Since version 1.34. Deprecated. Not Fiori.
Method Summary
sap.suite.ui.commons.SplitButton.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.SplitButton with name sClassName
and enriches it with the information contained in oClassInfo
. setEnabled(bEnabled)set enabled property for the control setIcon(sIcon)set icon (image) to be displayed in action button setIconFirst(bIconFirst)set if the icon for the action button be displayed before or after text setLite(bLite)set lite property for the control setMenu(oMenu, oMenuItem)Set the menu to the button and set menu item for the action button. setStyle(oStyle)set style for the control setStyled(bStyled)set if the control is styled or not setText(sText)set text for the action button addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.suite.ui.commons.SplitButton(sId?, mSettings?)
Constructor for a new SplitButton.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers.
If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).
The supported settings are:
- Properties
- visible : boolean (default: true)
- enabled : boolean (default: true)
- lite : boolean (default: false)
- style : sap.ui.commons.ButtonStyle (default: sap.ui.commons.ButtonStyle.Default)
- styled : boolean (default: true)
- iconFirst : boolean (default: true)
- text : string (default: '')
- icon : sap.ui.core.URI (default: '')
- Aggregations
- menu : sap.ui.commons.Menu
- Associations
- Events
Parameters:
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
- Deprecated:
- Since version 1.34. Deprecated. Not Fiori.
Method Detail
sap.suite.ui.commons.SplitButton.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.suite.ui.commons.SplitButton with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of informations as described in Element.extend.
Parameters:
{string} | sClassName | name of the class to be created |
{object} | oClassInfo? | object literal with informations about the class |
{function} | FNMetaImpl? | constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata. |
Returns:
{function} | the created class / constructor function |
Returns a metadata object for class sap.suite.ui.commons.SplitButton.
Returns:
Destroy the menu.
Returns:
getEnabled(): boolean
Getter for property
enabled
. Boolean property to enable the control (default is true). Buttons that are disabled have other colors than enabled ones, depending on custom settings.
Default value is true
Returns:
{boolean} | the value of property enabled |
Getter for property
icon
. Icon to be displayed as graphical element within the action button.
Default value is ''
Returns:
getIconFirst(): boolean
Getter for property
iconFirst
. If set to true (default), the display sequence is 1. icon 2. control text .
Default value is true
Returns:
{boolean} | the value of property iconFirst |
getLite(): boolean
Getter for property
lite
. The split button is rendered as lite split button.
Default value is false
Returns:
{boolean} | the value of property lite |
Return the menu.
Returns:
Getter for property
style
. Style of the control (e.g. emphasized, accept)
Default value is sap.ui.commons.ButtonStyle.Default
Returns:
getStyled(): boolean
Getter for property
styled
. Indicatied if the button is styled. If not it is rendered as native HTML-button. In this case a custom styling can be added usig addStyleClass.
Default value is true
Returns:
{boolean} | the value of property styled |
getText(): string
Getter for property
text
. Text to be displayed for the action button.
Default value is ''
Returns:
{string} | the value of property text |
getVisible(): boolean
Getter for property
visible
. Invisible split buttons are not rendered
Default value is true
Returns:
{boolean} | the value of property visible |
setEnabled(bEnabled)
set enabled property for the control
Parameters:
setIcon(sIcon)
set icon (image) to be displayed in action button
Parameters:
setIconFirst(bIconFirst)
set if the icon for the action button be displayed before or after text
Parameters:
setLite(bLite)
set lite property for the control
Parameters:
Set the menu to the button and set menu item for the action button. The menu item for action button must exist in the menu. If it doesn't exist the first menu item is set by default.
Parameters:
Returns:
setStyle(oStyle)
set style for the control
Parameters:
setStyled(bStyled)
set if the control is styled or not
Parameters:
setText(sText)
set text for the action button
Parameters:
Setter for property
visible
.
Default value is true
Parameters:
{boolean} | bVisible | new value for property visible |
Returns: