on 01-30-2015 7:18 AM
Hy everybody,
i'm currently trying to navigate to another fiori application. I would like to use CrossApplicationNavigation Service of sap.ushell.Container. The navigation should be triggerd by a button press in the application.
Now i would like to describe my problem:
In the press="" function of the button (Marked green in the printscreen), i only have sap.ui and sap.m object available.
If i enter this variable (sap) in the console, when the app is loaded, the console shows that ushell_abap, fiori, and ushell are available.
At the moment i don't understand, why the variable sap is different in the press="" method of the button. In the press="" function onNavigateToNextApp, sap.ushell.Container is undefined and i do not realy get why.
This is the printscreen of the chrome console.
If somebody could give me a hint or a tip how to it comes that sap differs in these two spots i would really apreciate that.
Help will be rewarded with points.
Best regards,
Michael
Hi,
you also can get all the system information (user Id, fullname, system, ...) from the config.
sap.ui.require([
'sap/ushell_abap/bootstrap/abap'
], function () {
var sysinfo = window["sap-ushell-config"].services.Container.adapter.config;
console.log(sysinfo.id);
});
Regards,
Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
var hash = oCrossAppNavigator.hrefForExternal({
target: {
semanticObject: "Product",
action: "displayprice&/detail/"+ orderDetail.Kunwe +"/1/1/X/"+ orderLine.Matnr
}
});
var url = window.location.href.split('#')[0] + hash;
sap.m.URLHelper.redirect(url, true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
'sap.ushell.Container' is active only in Fiori Launchpad
But , when ı use navigation service, ı noticed that the data is not cached and when back again , views are re-installed.
At the code below , I called the application on a new tab at browser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
'sap.ushell.Container' is active only in Fiori Launchpad
But , when ı use navigation service, ı noticed that the data is not cached and when back again , views are re-installed.
At the code below , I called the application on a new tab at browser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<script src="resources/sap/ushell_abap/bootstrap/abap.js"></script>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m,sap.ushell,sap.ui.layout,sap.ui.commons"
data-sap-ui-xx-bindingsyntax="complex"
data-sap-ui-theme="sap_bluecrystal"></script>
//-------------------------------------------------------------------------------------------------------------------------------
var navigationService = sap.ushell.Container.getService("CrossApplicationNavigation");
navigationService.toExternal({
target : { semanticObject : "ZSO_ODATA", action: "display" }
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi michael,
please refer below document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Sorry to bring this topic up but I'm having the same problem with cross app navigation between custom SAPUI5 apps on Fiori Launchpad.
Did you solve the problem? If yes, how?
EDIT
OK, I found the reason:
Additional information in pld_cust Launchpad Application was incorrect and thus the application was loaded into an iframe. This resulted in sap. js namespace containing only Component's dependency libraries.
Console logs contained this line:
"Not resolved as "SAPUI5.Component=" or "SAPUI5=" , will attempt to load into iframe"
Best regards,
Kimmo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Please refer following link:
JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ushell
You need to initializes the Unified Shell container. Add following statement before your bootstrap.
<script src="/sap/public/bc/ui5_ui5/resources/sap/ushell_abap/bootstrap/abap.js"></script>
Regards,
Vikram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I past it just before the following code , bootstrap
"(paste the code just here)"
<script
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m, sap.ui.layout, sap.ushell"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-resourceroots='{ "sap.ui.demo.ProjectName": "./" }' >
</script>
the app don't even runs..
What are I(we) missing?
jQuery.sap.require("sap.ushell.Container"); ??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.