Represents a panel which is a container for other controls. The container does not have any layout function.
Constructor for a new AccordionSection.
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.
new sap.ui.commons.AccordionSection(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 |
Name | Type | Default Value | Description |
---|---|---|---|
collapsed | boolean | false | It is recommended to adjust the settings for the width when the section is set to 'collapsed'. Visibility: public |
enabled | boolean | true | It is required that the used theme supports the control. Visibility: public |
maxHeight | sap.ui.core.CSSSize | When the section content exceeds maxHeight, a vertical scroll bar appears. Visibility: public |
|
title | string | Text for the section header Visibility: public |
Default Aggregation: content
Name | Cardinality | Type | Description |
---|---|---|---|
content (default) | 0..n | sap.ui.core.Control |
Aggregates the controls that are contained in the panel. The control layout is browser-dependent. For a stable content layout, use a layout control as direct single child. When the panel dimensions are set, the child control may have width and height of 100%; when the panel dimensions are not set, the child defines the panel size. |
Method | Description |
---|---|
addContent |
Adds some content to the aggregation content. |
attachScroll |
Attaches event handler When called, the context of the event handler (its Event is fired when the user scrolls the panel |
destroyContent |
Destroys all the content in the aggregation content. |
detachScroll |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.commons.AccordionSection.extend |
Creates a new subclass of class sap.ui.commons.AccordionSection with name
|
fireScroll |
Fires event scroll to attached listeners. |
getCollapsed |
Gets current value of property collapsed. It is recommended to adjust the settings for the width when the section is set to 'collapsed'. Default value is
Since 1.34 Use Accordion's "openedSectionsId" property
|
getContent |
Gets content of aggregation content. Aggregates the controls that are contained in the panel. The control layout is browser-dependent. For a stable content layout, use a layout control as direct single child. When the panel dimensions are set, the child control may have width and height of 100%; when the panel dimensions are not set, the child defines the panel size. |
getEnabled |
Gets current value of property enabled. It is required that the used theme supports the control. Default value is |
getMaxHeight |
Gets current value of property maxHeight. When the section content exceeds maxHeight, a vertical scroll bar appears. |
sap.ui.commons.AccordionSection.getMetadata |
Returns a metadata object for class sap.ui.commons.AccordionSection. |
getTitle |
Gets current value of property title. Text for the section header |
indexOfContent |
Checks for the provided |
insertContent |
Inserts a content into the aggregation content. |
removeAllContent |
Removes all the controls from the aggregation content. Additionally, it unregisters them from the hosting UIArea. |
removeContent |
Removes a content from the aggregation content. |
setCollapsed |
Property setter for the "collapsed" state |
setEnabled |
Property setter for the "enabled" state |
setMaxHeight |
Sets a new value for property maxHeight. When the section content exceeds maxHeight, a vertical scroll bar appears. When called with a value of |
setTitle |
Sets a new value for property title. Text for the section header When called with a value of |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the scroll event of this sap.ui.commons.AccordionSection
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.commons.AccordionSection
itself.
Event is fired when the user scrolls the panel
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the scroll event of this sap.ui.commons.AccordionSection
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.commons.AccordionSection 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.core.Element.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 |
Fires event scroll to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
left | int |
Horizontal scroll position |
|
top | int |
Vertical scroll position |
Gets current value of property collapsed.
It is recommended to adjust the settings for the width when the section is set to 'collapsed'.
Default value is false
.
Gets content of aggregation content.
Aggregates the controls that are contained in the panel. The control layout is browser-dependent. For a stable content layout, use a layout control as direct single child. When the panel dimensions are set, the child control may have width and height of 100%; when the panel dimensions are not set, the child defines the panel size.
Gets current value of property enabled.
It is required that the used theme supports the control.
Default value is true
.
Gets current value of property maxHeight.
When the section content exceeds maxHeight, a vertical scroll bar appears.
Returns a metadata object for class sap.ui.commons.AccordionSection.
Checks for the provided sap.ui.core.Control
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content whose index is looked for |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes a content from the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
vContent | int string sap.ui.core.Control |
The content to remove or its index or id |
Property setter for the "collapsed" state
Param | Type | DefaultValue | Description |
---|---|---|---|
bCollapsed | boolean |
Whether the AccordionSection is collapsed or not |
Property setter for the "enabled" state
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnabled | boolean |
Whether the AccordionSection is enabled or not |
Sets a new value for property maxHeight.
When the section content exceeds maxHeight, a vertical scroll bar appears.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMaxHeight | sap.ui.core.CSSSize |
New value for property |
Sets a new value for property title.
Text for the section header
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string |
New value for property |