I've doing some examples to improve my knowledge in SAPUI5 and came across a very strange behaviour when using the ViewSettingsDialog component, particularly when using as filter a ViewSettingsCustomItem component.
I'm launching my Dialog on the controller as such:
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 made sure I'm adding the dialog as a child of the main view so the models are accessible on the dialog. On my dialog view (built on a fragment) I have the following code:
<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>
Now the strange behaviour is that {i18n>OrderDate} as the filter name is showing up as expected, meaning the model is available, however the placeholder {i18n>OrderDateFilterPlaceholder} used on the DateRangeSelection object is not.
I tried this with other components such as input and the same is happening. Also, if the exact same code is placed outside the dialog it works perfectly.
Anything wrong here or a potential bug on this component?
Thanks for your feeedback,
Regards, Pedro