on 05-16-2019 11:36 AM
Dear Experts,
we developed a custom SAPUI5-App with one main view and two fragments. We have three i18n-files for different languages.
If I test the i18n translations in my local WebIDE everything is fine. But after we deployed the app in our Fiori launchpad an error occured while loading the i18n files.
If I open the app in the launchpad the main view is loading the correct i18n files and the labels are translated. But if I open the fragments, F12 says that it cannot load the i18n files. When I was analyzing the Network requests I noticed, that the main view is calling the correct path of the i18n file but the fragments are calling another path wich is wrong and after that there is a 404 error (not found).
I tried many things:
Nothing works. And again: It works in my local test environment.
Inside the launchpad the main view is calling the correct path: https://XXX/sap/bc/ui5_ui5/sap/zindivsel_nmf/~A511A000B4A95D2839F3719D216182DE~5/i18n/i18n_it.proper...
Inside the launchpad the fragments are calling the wrong path: https://XXX/sap/bc/ui5_ui5/ui2/ushell/shells/abap/i18n/i18n_it.properties
Did somebody know why this happens and how can I fix it?
Regards,
Tim
Dear Experts,
thanks a lot for your ideas and help. I solved the problem now.
In my case the solution was that I have to put the "addDependent" statement not inside my "createViewSettingsDialog" method rather then in my button event method if I`m clicking the filter / sort button.
So finally it was only one line of code to solve the problem 🙂
Here also my Code for all who have the same issue:
// Create the Dialog
createViewSettingsDialog: function(sDialogFragmentName) {
var oDialog = this._mViewSettingsDialogs[sDialogFragmentName];
if (!oDialog) {
oDialog = sap.ui.xmlfragment(sDialogFragmentName, this);
this._mViewSettingsDialogs[sDialogFragmentName] = oDialog;
}
return oDialog;
},
// Button-Event for Sort
handleSortButtonPressed: function() {
this.getView().addDependent(this.createViewSettingsDialog("zindivsel_nmf.view.SortDialog"));
this.createViewSettingsDialog("zindivsel_nmf.view.SortDialog").open();
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.