1
votes

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

1
Olá Pedro, I already had the same problem. I couldn't change the placeholder input on dialog components. I didn't found no solution, but I didn't try/search a lot to resolve this issue. - solrac
Please Add some of i18n model data - Tuhin
@EOF OrderDate=Data Encomenda OrderDateFilterPlaceholder=Inserir intervalo de datas Keep in mind that any text works fine on the ViewSettingsCustomItem, but the same fails when trying to bind to the input field under the aggregation CustomControl - Pedro Barbosa

1 Answers

0
votes

After several retries and tentative workarounds I decided to open a defect with SAP about this and the issue has been acknowledged.

Follows the link for tracking purposes: https://github.com/SAP/openui5/issues/1068

Regards, Pedro