Exploring examples to enhance my SAPUI5 knowledge, I encountered an unusual behavior when utilizing the ViewSettingsDialog component with a ViewSettingsCustomItem filter.
In my controller, I initiate the Dialog in this manner:
onOrdersFilterPress: function(oEvent){
// Open the Table Setting dialog
if(!this._oDialog) {
this._oDialog = sap.ui.xmlfragment("pbarbosa.mom.view.OrdersFilter", this);
this.getView().addDependent(this._oDialog);
}
this._oDialog.open();
},
I have verified that I am adding the dialog as a child of the main view to ensure accessibility to models within the dialog. Within my dialog view (constructed as a fragment), the following code is present:
<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
<ViewSettingsDialog confirm="handleFilterConfirm">
<filterItems>
<ViewSettingsCustomItem id="idOrderDateFilterItem" text="{i18n>OrderDate}" key="OrderDateFilter">
<customControl>
<DateRangeSelection id="OrderDateRangeFilter" placeholder="{i18n>OrderDateFilterPlaceholder}"/>
</customControl>
</ViewSettingsCustomItem>
</filterItems>
</ViewSettingsDialog>
The issue arises where {i18n>OrderDate} displays correctly as the filter name, indicating model availability. However, the placeholder {i18n>OrderDateFilterPlaceholder} used within the DateRangeSelection object does not show.
I have tested this with other components like inputs, resulting in the same dilemma. Interestingly, placing the identical code outside the dialog functions flawlessly.
Is there an error in my approach or could this be a potential bug within the component?
Appreciate your insight,
Best regards, Pedro