Container for the ValueHelp
element.
Constructor for a new Container
.
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.mdc.valuehelp.base.Container(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 |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_container | 0..1 | sap.ui.core.Element |
Used container element. (e.g. Popover or Dialog) |
content | 0..n | sap.ui.mdc.valuehelp.base.Content |
Content of the container. This aggregation holds the actual controls enabling the user to select items or create conditions (e.g. tables or condition panels) |
Event | Description |
---|---|
cancel |
Fired if the change is cancelled. |
closed |
Fired if the value help is closed. |
confirm |
Fired if a change on the value help is confirmed |
navigated |
Fired if a navigation was executed in the content of the container |
opened |
Fired if the value help is opened. |
requestDelegateContent |
Fired if the Container requests the delegate content. |
requestSwitchToDialog |
Fired if the value help should switch to dialog mode. |
select |
Fired if the selected condition changed. |
Fired if the change is cancelled.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Fired if the value help is closed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Fired if a change on the value help is confirmed
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
close | boolean |
True if the value help needs to be closed |
Fired if the value help is opened.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Fired if the Container requests the delegate content.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
container | sap.ui.mdc.valuehelp.base.Container |
Fired if the value help should switch to dialog mode.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Fired if the selected condition changed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
type | sap.ui.mdc.enum.SelectType |
Type of the selection change (add, remove) |
conditions | object[] |
Changed conditions Note: A condition must have the structure of ConditionObject. |
Method | Description |
---|---|
addContent |
Adds some content to the aggregation content. |
attachCancel |
Attaches event handler When called, the context of the event handler (its Fired if the change is cancelled. |
attachClosed |
Attaches event handler When called, the context of the event handler (its Fired if the value help is closed. |
attachConfirm |
Attaches event handler When called, the context of the event handler (its Fired if a change on the value help is confirmed |
attachNavigated |
Attaches event handler When called, the context of the event handler (its Fired if a navigation was executed in the content of the container |
attachOpened |
Attaches event handler When called, the context of the event handler (its Fired if the value help is opened. |
attachRequestDelegateContent |
Attaches event handler When called, the context of the event handler (its Fired if the Container requests the delegate content. |
attachRequestSwitchToDialog |
Attaches event handler When called, the context of the event handler (its Fired if the value help should switch to dialog mode. |
attachSelect |
Attaches event handler When called, the context of the event handler (its Fired if the selected condition changed. |
awaitValueHelpDelegate |
Provides access to the delegate initialization Note: This function is used by the container and content and must not be used from outside |
close |
Closes the container |
destroyContent |
Destroys all the content in the aggregation content. |
detachCancel |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachClosed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachConfirm |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachNavigated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachOpened |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachRequestDelegateContent |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachRequestSwitchToDialog |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelect |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.mdc.valuehelp.base.Container.extend |
Creates a new subclass of class sap.ui.mdc.valuehelp.base.Container with name
|
fireCancel |
Fires event cancel to attached listeners. |
fireClosed |
Fires event closed to attached listeners. |
fireConfirm |
Fires event confirm to attached listeners. |
fireNavigated |
Fires event navigated to attached listeners. |
fireOpened |
Fires event opened to attached listeners. |
fireRequestDelegateContent |
Fires event requestDelegateContent to attached listeners. |
fireRequestSwitchToDialog |
Fires event requestSwitchToDialog to attached listeners. |
fireSelect |
Fires event select to attached listeners. |
getAriaAttributes |
Returns the aria attributes the field needs from the value help |
getContent |
Gets content of aggregation content. Content of the container. This aggregation holds the actual controls enabling the user to select items or create conditions (e.g. tables or condition panels) |
getItemForValue |
Determines the item (key and description) for a given value. The container checks if there is an item with a key or description that fits this value. Note: This function must only be called by the |
sap.ui.mdc.valuehelp.base.Container.getMetadata |
Returns a metadata object for class sap.ui.mdc.valuehelp.base.Container. |
getTitle |
Gets current value of property title. Title text that appears in the dialog or tab header. Default value is |
getUseAsValueHelp |
If the container is used for type-ahead it might be wanted that the same content should also be shown as valuehelp. If not, the field should not show a valuehelp icon. Note This function needs only to be implemented for |
getValueHelpDelegate |
Determines the delegate of the value help Note: This function is used by the container and content and must not be used from outside |
getValueHelpDelegatePayload |
Determines the delegate payload of the value help Note: This function is used by the container and content and must not be used from outside |
getValueHelpIcon |
Return the value help icon that should be used for the field. |
indexOfContent |
Checks for the provided |
insertContent |
Inserts a content into the aggregation content. |
isFocusInHelp |
Determines if the focus is set in the value help or stays in the calling control. |
isMultiSelect |
Determines if multiselection is active. |
isOpen |
Determines if the container is open. Note: This function must only be called by the |
isOpening |
Determines if the container is opening. Note: This function must only be called by the |
isTypeahead |
Determines if the container is used as typeahead inside the value help Note: This function is used by the container and content and must not be used from outside |
isValidationSupported |
Defines if the content of the container can be used for input validation. |
isValueHelpDelegateInitialized |
Determines if delegate of the value help is initialized Note: This function is used by the container and content and must not be used from outside |
navigate |
Triggers navigation in the content of the container. As this could be asynchronous in case additional data needs to be loaded a promise is returned. Note: This function must only be called by the |
open |
Opens the container |
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. |
removeFocus |
The focus visualization of the field help needs to be removed as the user starts typing into the field. |
setTitle |
Sets a new value for property title. Title text that appears in the dialog or tab header. When called with a value of Default value is |
shouldOpenOnClick |
Determines if the value help should be opened when the user clicks into the connected control. |
shouldOpenOnNavigate |
Determines if the value help should be opened when the user used the arrow keys. |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.mdc.valuehelp.base.Content |
The content to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the cancel event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the change is cancelled.
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 |
Attaches event handler fnFunction
to the closed event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the value help is closed.
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 |
Attaches event handler fnFunction
to the confirm event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if a change on the value help is confirmed
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 |
Attaches event handler fnFunction
to the opened event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the value help is opened.
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 |
Attaches event handler fnFunction
to the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the Container requests the delegate content.
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 |
Attaches event handler fnFunction
to the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the value help should switch to dialog mode.
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 |
Attaches event handler fnFunction
to the select event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container
itself.
Fired if the selected condition changed.
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 |
Provides access to the delegate initialization Promise
of the value help.
Note: This function is used by the container and content and must not be used from outside
Detaches event handler fnFunction
from the cancel event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the closed event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the confirm event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the opened event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Container
.
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 |
Detaches event handler fnFunction
from the select event of this sap.ui.mdc.valuehelp.base.Container
.
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.mdc.valuehelp.base.Container 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 cancel to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event closed to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event confirm to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
close | boolean |
True if the value help needs to be closed |
Fires event opened to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event requestDelegateContent to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
container | sap.ui.mdc.valuehelp.base.Container |
Fires event requestSwitchToDialog to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event select to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
type | sap.ui.mdc.enum.SelectType |
Type of the selection change (add, remove) |
|
conditions | object[] |
Changed conditions Note: A condition must have the structure of ConditionObject. |
Returns the aria attributes the field needs from the value help
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxConditions | int |
maximal conditions allowed (as FieldHelp might not be connected to a field) |
Gets content of aggregation content.
Content of the container. This aggregation holds the actual controls enabling the user to select items or create conditions (e.g. tables or condition panels)
Determines the item (key and description) for a given value.
The container checks if there is an item with a key or description that fits this value.
Note: This function must only be called by the ValueHelp
element.
Param | Type | DefaultValue | Description |
---|---|---|---|
oConfig | object |
Configuration |
|
value | any |
Value as entered by user |
|
parsedValue | any |
Value parsed by type to fit the data type of the key |
|
inParameters | object |
In parameters for the key (as a key must not be unique.) |
|
outParameters | object |
Out parameters for the key (as a key must not be unique.) |
|
bindingContext | sap.ui.model.Context |
|
|
checkKeyFirst | boolean |
If set, the container checks first if the value fits a key // TODO: not longer needed? |
|
checkKey | boolean |
If set, the container checks only if there is an item with the given key. This is set to |
|
checkDescription | boolean |
If set, the container checks only if there is an item with the given description. This is set to |
|
conditionModel | sap.ui.mdc.condition.ConditionModel |
|
|
conditionModelName | string |
Name of the |
|
caseSensitive | boolean |
If set, the check is done case sensitive |
Returns a metadata object for class sap.ui.mdc.valuehelp.base.Container.
Gets current value of property title.
Title text that appears in the dialog or tab header.
Default value is empty string
.
If the container is used for type-ahead it might be wanted that the same content should also be shown as valuehelp. If not, the field should not show a valuehelp icon.
Note This function needs only to be implemented for Container
implementing the sap.ui.mdc.valuehelp.container.ITypeahead
interface.
Determines the delegate of the value help
Note: This function is used by the container and content and must not be used from outside
Determines the delegate payload of the value help
Note: This function is used by the container and content and must not be used from outside
Checks for the provided sap.ui.mdc.valuehelp.base.Content
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.mdc.valuehelp.base.Content |
The content whose index is looked for |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.mdc.valuehelp.base.Content |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Determines if the container is open.
Note: This function must only be called by the ValueHelp
element.
Determines if the container is opening.
Note: This function must only be called by the ValueHelp
element.
Determines if the container is used as typeahead inside the value help
Note: This function is used by the container and content and must not be used from outside
Determines if delegate of the value help is initialized
Note: This function is used by the container and content and must not be used from outside
Opens the container
Param | Type | DefaultValue | Description |
---|---|---|---|
oValueHelpContentPromise | Promise |
Promise for content request |
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.mdc.valuehelp.base.Content |
The content to remove or its index or id |
The focus visualization of the field help needs to be removed as the user starts typing into the field.
Sets a new value for property title.
Title text that appears in the dialog or tab header.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string | "" |
New value for property |