A field help used in the FieldHelp
association of controls based on FieldBase that shows a value help dialog.
Constructor for a new FieldValueHelp
.
If a more complex value help is needed, the application can add a table to this field help. As the behavior depends on the used table control in this case, a wrapper is used between the used control and the FieldValueHelp
element.
Note: If a FieldValueHelp
element is connected to a field, it gets the BindingContext
of this field. So the in and out parameters are done in this context. Therefore bind the content table in such a way that that it finds its data also in the BindingContext
of the field.
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.field.FieldValueHelp(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 |
---|---|---|---|
_enableOK | boolean | true | Internal property to bind the OK button to enable or disable it. Visibility: hidden |
caseSensitive | boolean | true | If this property is set to If the used back-end service supports a case-insensitive search, set this property to |
delegate | object | ...see text or source | Defines the module path of the metadata delegate. Visibility: public |
descriptionPath | string | empty string | The path of the description field in the content binding. If a table is used as content, this is the binding path of the description of the items. Visibility: public |
filterFields | string | empty string | The fields based on which the table data is filtered. For filtering the value of the If set to If set to one or more properties, the filters for these properties are used for filtering. These filters are set on the If it is empty, no suggestion is available. Visibility: public |
keyPath | string | empty string | The path of the key field in the content binding. If a table is used as content, this is the binding path of the key of the items. If not set, the FieldPath of the assigned field is used. Visibility: public |
noDialog | boolean | false | If set, the field help doesn't open a value help dialog, but just displays the content. It behaves like in the case of a suggestion but without any search. |
showConditionPanel | boolean | false | Determines if a condition panel is shown. |
title | string | empty string | Title text that appears in the dialog header. |
Name | Type | Default Value | Description |
---|---|---|---|
conditions | object[] | The conditions of the selected items. Note: This property must only be set by the control the Note: A condition must have the structure of ConditionObject. Visibility: public |
|
delegate | object | ...see text or source | Defines the module path of the metadata delegate. Visibility: public |
filterValue | string | empty string | The value by which the help is filtered. Note: This only takes effect if the Note: This property must only be set by the control the |
validateInput | boolean | true | If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs. If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.) |
delegate | object | Path to the |
Default Aggregation: content
Name | Cardinality | Type | Description |
---|---|---|---|
_dialog | 0..1 | sap.m.Dialog |
internal dialog |
_filterBar | 0..1 | sap.ui.mdc.filterbar.FilterBarBase |
Internal |
collectiveSearchItems | 0..n | sap.ui.core.Item |
Items for collective searches. If used, a field to switch value helps will be shown. If the value help is switched, the Note: Icons are not supported. |
content (default) | 0..1 | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
Content of the field help. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from |
dialogContent | 0..1 | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
Content for dialog. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from Note: If no special content for the dialog is provided, the content of the |
filterBar | 0..1 | sap.ui.mdc.filterbar.FilterBarBase |
|
inParameters | 0..n | sap.ui.mdc.field.InParameter |
Sets the in parameters of a field help. If set, the field help reads the data of these entities in the model and uses it to filter in the value help. |
outParameters | 0..n | sap.ui.mdc.field.OutParameter |
Sets the out parameters of a field help. If set, the fields sets the data of these entities in the model based to the selected values. |
suggestContent | 0..1 | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
Content for suggestion. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from Note: If no special content for suggestion is provided, the content of the |
Event | Description |
---|---|
dataRequested |
This event is fired when a description for a key or a key for a description is requested, and no data table with list binding is assigned. This is the case if a |
This event is fired when a description for a key or a key for a description is requested, and no data table with list binding is assigned.
This is the case if a Field
or FilterField
shows the description of the value. and the value is formatted or a new input is parsed.
Since: 1.67.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Method | Description |
---|---|
_getFilterBar |
Returns the relevant filterbar of this valuehelp. |
_getFormatOptions |
Return field-internal information stored in |
_getKeyPath |
Returns the path of the key field inside the content control (for example, table). |
_getTypesForConditions |
Returns a condition type map for the valuehelp filterbar |
addCollectiveSearchItem |
Adds some collectiveSearchItem to the aggregation collectiveSearchItems. |
addInParameter |
Adds some inParameter to the aggregation inParameters. |
addOutParameter |
Adds some outParameter to the aggregation outParameters. |
attachDataRequested |
Attaches event handler When called, the context of the event handler (its This event is fired when a description for a key or a key for a description is requested, and no data table with list binding is assigned. This is the case if a |
destroyCollectiveSearchItems |
Destroys all the collectiveSearchItems in the aggregation collectiveSearchItems. |
destroyContent |
Destroys the content in the aggregation content. |
destroyDialogContent |
Destroys the dialogContent in the aggregation dialogContent. |
destroyFilterBar |
Destroys the filterBar in the aggregation filterBar. |
destroyInParameters |
Destroys all the inParameters in the aggregation inParameters. |
destroyOutParameters |
Destroys all the outParameters in the aggregation outParameters. |
destroySuggestContent |
Destroys the suggestContent in the aggregation suggestContent. |
detachDataRequested |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.mdc.field.FieldValueHelp.extend |
Creates a new subclass of class sap.ui.mdc.field.FieldValueHelp with name
|
fireDataRequested |
Fires event dataRequested to attached listeners. |
getCaseSensitive |
Gets current value of property caseSensitive. If this property is set to If the used back-end service supports a case-insensitive search, set this property to Default value is |
getCollectiveSearchItems |
Gets content of aggregation collectiveSearchItems. Items for collective searches. If used, a field to switch value helps will be shown. If the value help is switched, the Note: Icons are not supported. |
getContent |
Gets content of aggregation content. Content of the field help. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from |
getDelegate |
Gets current value of property delegate. Defines the module path of the metadata delegate. Default value is |
getDescriptionPath |
Gets current value of property descriptionPath. The path of the description field in the content binding. If a table is used as content, this is the binding path of the description of the items. Default value is |
getDialogContent |
Gets content of aggregation dialogContent. Content for dialog. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from Note: If no special content for the dialog is provided, the content of the |
getFilterBar |
Gets content of aggregation filterBar.
|
getFilterFields |
Gets current value of property filterFields. The fields based on which the table data is filtered. For filtering the value of the If set to If set to one or more properties, the filters for these properties are used for filtering. These filters are set on the If it is empty, no suggestion is available. Default value is |
getInParameters |
Gets content of aggregation inParameters. Sets the in parameters of a field help. If set, the field help reads the data of these entities in the model and uses it to filter in the value help. |
getKeyPath |
Gets current value of property keyPath. The path of the key field in the content binding. If a table is used as content, this is the binding path of the key of the items. If not set, the FieldPath of the assigned field is used. Default value is |
sap.ui.mdc.field.FieldValueHelp.getMetadata |
Returns a metadata object for class sap.ui.mdc.field.FieldValueHelp. |
getNoDialog |
Gets current value of property noDialog. If set, the field help doesn't open a value help dialog, but just displays the content. It behaves like in the case of a suggestion but without any search. Default value is |
getOutParameters |
Gets content of aggregation outParameters. Sets the out parameters of a field help. If set, the fields sets the data of these entities in the model based to the selected values. |
getShowConditionPanel |
Gets current value of property showConditionPanel. Determines if a condition panel is shown. Default value is |
getSuggestContent |
Gets content of aggregation suggestContent. Content for suggestion. To support different types of content (for example The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from Note: If no special content for suggestion is provided, the content of the |
getTitle |
Gets current value of property title. Title text that appears in the dialog header. Default value is |
indexOfCollectiveSearchItem |
Checks for the provided |
indexOfInParameter |
Checks for the provided |
indexOfOutParameter |
Checks for the provided |
insertCollectiveSearchItem |
Inserts a collectiveSearchItem into the aggregation collectiveSearchItems. |
insertInParameter |
Inserts a inParameter into the aggregation inParameters. |
insertOutParameter |
Inserts a outParameter into the aggregation outParameters. |
removeAllCollectiveSearchItems |
Removes all the controls from the aggregation collectiveSearchItems. Additionally, it unregisters them from the hosting UIArea. |
removeAllInParameters |
Removes all the controls from the aggregation inParameters. Additionally, it unregisters them from the hosting UIArea. |
removeAllOutParameters |
Removes all the controls from the aggregation outParameters. Additionally, it unregisters them from the hosting UIArea. |
removeCollectiveSearchItem |
Removes a collectiveSearchItem from the aggregation collectiveSearchItems. |
removeInParameter |
Removes a inParameter from the aggregation inParameters. |
removeOutParameter |
Removes a outParameter from the aggregation outParameters. |
setCaseSensitive |
Sets a new value for property caseSensitive. If this property is set to If the used back-end service supports a case-insensitive search, set this property to When called with a value of Default value is |
setContent |
Sets the aggregated content. |
setDelegate |
Sets a new value for property delegate. Defines the module path of the metadata delegate. When called with a value of Default value is |
setDescriptionPath |
Sets a new value for property descriptionPath. The path of the description field in the content binding. If a table is used as content, this is the binding path of the description of the items. When called with a value of Default value is |
setDialogContent |
Sets the aggregated dialogContent. |
setFilterBar |
Sets the aggregated filterBar. |
setFilterFields |
Sets a new value for property filterFields. The fields based on which the table data is filtered. For filtering the value of the If set to If set to one or more properties, the filters for these properties are used for filtering. These filters are set on the If it is empty, no suggestion is available. When called with a value of Default value is |
setKeyPath |
Sets a new value for property keyPath. The path of the key field in the content binding. If a table is used as content, this is the binding path of the key of the items. If not set, the FieldPath of the assigned field is used. When called with a value of Default value is |
setNoDialog |
Sets a new value for property noDialog. If set, the field help doesn't open a value help dialog, but just displays the content. It behaves like in the case of a suggestion but without any search. When called with a value of Default value is |
setShowConditionPanel |
Sets a new value for property showConditionPanel. Determines if a condition panel is shown. When called with a value of Default value is |
setSuggestContent |
Sets the aggregated suggestContent. |
setTitle |
Sets a new value for property title. Title text that appears in the dialog header. When called with a value of Default value is |
Adds some collectiveSearchItem to the aggregation collectiveSearchItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCollectiveSearchItem | sap.ui.core.Item |
The collectiveSearchItem to add; if empty, nothing is inserted |
Adds some inParameter to the aggregation inParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oInParameter | sap.ui.mdc.field.InParameter |
The inParameter to add; if empty, nothing is inserted |
Adds some outParameter to the aggregation outParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOutParameter | sap.ui.mdc.field.OutParameter |
The outParameter to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the dataRequested event of this sap.ui.mdc.field.FieldValueHelp
.
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.field.FieldValueHelp
itself.
This event is fired when a description for a key or a key for a description is requested, and no data table with list binding is assigned.
This is the case if a Field
or FilterField
shows the description of the value. and the value is formatted or a new input is parsed.
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 |
Destroys all the collectiveSearchItems in the aggregation collectiveSearchItems.
Detaches event handler fnFunction
from the dataRequested event of this sap.ui.mdc.field.FieldValueHelp
.
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.field.FieldValueHelp 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.mdc.field.FieldHelpBase.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 dataRequested to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property caseSensitive.
If this property is set to true
, the filtering for user input is always case-sensitive. Otherwise user input is checked case-insensitively. If $search
is used, this property has no effect on the $search
request.
If the used back-end service supports a case-insensitive search, set this property to false
.
Default value is true
.
Gets content of aggregation collectiveSearchItems.
Items for collective searches.
If used, a field to switch value helps will be shown. If the value help is switched, the contentRequest
function of the delegate is called and the chosen key is provided.
Note: Icons are not supported.
Gets content of aggregation content.
Content of the field help.
To support different types of content (for example sap.m.Table
), a specific wrapper is used to map the functionality of the content control to the field help. The content control is assigned to the wrapper.
The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from FilterBar
). (If FilterBar
is in LiveMode
and in parameters are used, this also triggers filtering.)
Gets current value of property delegate.
Defines the module path of the metadata delegate.
Default value is ...see text or source
.
Gets current value of property descriptionPath.
The path of the description field in the content binding. If a table is used as content, this is the binding path of the description of the items.
Default value is empty string
.
Gets content of aggregation dialogContent.
Content for dialog.
To support different types of content (for example sap.m.Table
), a specific wrapper is used to map the functionality of the content control to the field help. The content control is assigned to the wrapper.
The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from FilterBar
). (If FilterBar
is in LiveMode
and in parameters are used, this also triggers filtering.)
Note: If no special content for the dialog is provided, the content of the content
aggregation is used.
Gets current value of property filterFields.
The fields based on which the table data is filtered. For filtering the value of the filterValue
property is used.
If set to $search
and the used binding supports search requests, a $search request is used for filtering.
If set to one or more properties, the filters for these properties are used for filtering. These filters are set on the ListBinding
used. The properties need to be separated by commas and enclosed by "*" characters. ("*Property1,Property2*"
)
If it is empty, no suggestion is available.
Default value is empty string
.
Gets content of aggregation inParameters.
Sets the in parameters of a field help.
If set, the field help reads the data of these entities in the model and uses it to filter in the value help.
Gets current value of property keyPath.
The path of the key field in the content binding. If a table is used as content, this is the binding path of the key of the items.
If not set, the FieldPath of the assigned field is used.
Default value is empty string
.
Returns a metadata object for class sap.ui.mdc.field.FieldValueHelp.
Gets current value of property noDialog.
If set, the field help doesn't open a value help dialog, but just displays the content. It behaves like in the case of a suggestion but without any search.
Default value is false
.
Gets content of aggregation outParameters.
Sets the out parameters of a field help.
If set, the fields sets the data of these entities in the model based to the selected values.
Gets current value of property showConditionPanel.
Determines if a condition panel is shown.
Default value is false
.
Gets content of aggregation suggestContent.
Content for suggestion.
To support different types of content (for example sap.m.Table
), a specific wrapper is used to map the functionality of the content control to the field help. The content control is assigned to the wrapper.
The filter logic must be implemented in the wrapper control. The filtering is triggered by user interaction (type-ahead, search request, or search from FilterBar
). (If FilterBar
is in LiveMode
and in parameters are used, this also triggers filtering.)
Note: If no special content for suggestion is provided, the content of the content
aggregation is used.
Gets current value of property title.
Title text that appears in the dialog header.
Default value is empty string
.
Checks for the provided sap.ui.core.Item
in the aggregation collectiveSearchItems. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCollectiveSearchItem | sap.ui.core.Item |
The collectiveSearchItem whose index is looked for |
Checks for the provided sap.ui.mdc.field.InParameter
in the aggregation inParameters. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oInParameter | sap.ui.mdc.field.InParameter |
The inParameter whose index is looked for |
Checks for the provided sap.ui.mdc.field.OutParameter
in the aggregation outParameters. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOutParameter | sap.ui.mdc.field.OutParameter |
The outParameter whose index is looked for |
Inserts a collectiveSearchItem into the aggregation collectiveSearchItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCollectiveSearchItem | sap.ui.core.Item |
The collectiveSearchItem to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a inParameter into the aggregation inParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oInParameter | sap.ui.mdc.field.InParameter |
The inParameter to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Inserts a outParameter into the aggregation outParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
oOutParameter | sap.ui.mdc.field.OutParameter |
The outParameter to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation collectiveSearchItems.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation inParameters.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation outParameters.
Additionally, it unregisters them from the hosting UIArea.
Removes a collectiveSearchItem from the aggregation collectiveSearchItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
vCollectiveSearchItem | int string sap.ui.core.Item |
The collectiveSearchItem to remove or its index or id |
Removes a inParameter from the aggregation inParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
vInParameter | int string sap.ui.mdc.field.InParameter |
The inParameter to remove or its index or id |
Removes a outParameter from the aggregation outParameters.
Param | Type | DefaultValue | Description |
---|---|---|---|
vOutParameter | int string sap.ui.mdc.field.OutParameter |
The outParameter to remove or its index or id |
Sets a new value for property caseSensitive.
If this property is set to true
, the filtering for user input is always case-sensitive. Otherwise user input is checked case-insensitively. If $search
is used, this property has no effect on the $search
request.
If the used back-end service supports a case-insensitive search, set this property to false
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bCaseSensitive | boolean | true |
New value for property |
Sets the aggregated content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
The content to set |
Sets a new value for property delegate.
Defines the module path of the metadata delegate.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is ...see text or source
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDelegate | object | ...see text or source |
New value for property |
Sets a new value for property descriptionPath.
The path of the description field in the content binding. If a table is used as content, this is the binding path of the description of the items.
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 |
---|---|---|---|
sDescriptionPath | string | "" |
New value for property |
Sets the aggregated dialogContent.
Param | Type | DefaultValue | Description |
---|---|---|---|
oDialogContent | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
The dialogContent to set |
Sets the aggregated filterBar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilterBar | sap.ui.mdc.filterbar.FilterBarBase |
The filterBar to set |
Sets a new value for property filterFields.
The fields based on which the table data is filtered. For filtering the value of the filterValue
property is used.
If set to $search
and the used binding supports search requests, a $search request is used for filtering.
If set to one or more properties, the filters for these properties are used for filtering. These filters are set on the ListBinding
used. The properties need to be separated by commas and enclosed by "*" characters. ("*Property1,Property2*"
)
If it is empty, no suggestion is available.
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 |
---|---|---|---|
sFilterFields | string | "" |
New value for property |
Sets a new value for property keyPath.
The path of the key field in the content binding. If a table is used as content, this is the binding path of the key of the items.
If not set, the FieldPath of the assigned field is used.
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 |
---|---|---|---|
sKeyPath | string | "" |
New value for property |
Sets a new value for property noDialog.
If set, the field help doesn't open a value help dialog, but just displays the content. It behaves like in the case of a suggestion but without any search.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bNoDialog | boolean | false |
New value for property |
Sets a new value for property showConditionPanel.
Determines if a condition panel is shown.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowConditionPanel | boolean | false |
New value for property |
Sets the aggregated suggestContent.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSuggestContent | sap.ui.mdc.field.FieldValueHelpContentWrapperBase |
The suggestContent to set |
Sets a new value for property title.
Title text that appears in the dialog 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 |