現在、私はFIORIアプリケーションのフロントエンド側を確保しています。公式のドキュメントを読むと、信頼できるドメイン上のフレームにFIORIアプリケーションを読み込むことが可能であることがわかりました。そのためには、ホワイトリストを実装する必要があります。公式ドキュメントは、次の手順を実装する必要があることを規定している:フレームオプションにホワイトリストを使用する方法
コールサービス:
<meta name="sap.whitelistService" content="Whitelist.js">
設定し、信頼
にframeOptionsを設定するホワイトリストjQuery.sap.addUrlWhitelist(undefined, "https://webide-ad232er4.dispatcher.hana.ondemand.com/"); jQuery.sap.validateUrl("https://webide-ad232er4.dispatcher.hana.ondemand.com/");
data-sap-ui-frameOptions="trusted"
公式文書に記載されている手順をすべて実行した後、SAP Web IDEを使用してアプリケーションをフレームで起動し、通常はすべての処理を実行できます。しかし、これは事実ではありません。実行できるアクションはなく、ホワイトリストサービスが自分のドメインを認識していないようです。
誰かがこれを正しく実装する方法についてガイダンスを提供できますか?
P.S:これは私が使用した公式ドキュメントです:https://help.sap.com/saphelp_uiaddon10/helpdata/en/62/d9c4d8f5ad49aa914624af9551beb7/content.htm
EDIT
Index.htmlと
<!DOCTYPE HTML>
<html>
<!-- Copyright (c) 2014 SAP AG, All Rights Reserved -->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="sap.whitelistService" content="ui.2sp.mm.purchorder.approve.uis2pmmpurchorderapproveExtension.Whitelist.js" />
<title>Extension Project in UShell Sandbox</title>
<script type="text/javascript">
window["sap-ushell-config"] = {
defaultRenderer : "fiorisandbox",
services: {
NavTargetResolution: {
// navigation target resolution service is configured to resolve the empty location hash to the application
config : {
resolveLocal : [ {
"linkId" : "",
resolveTo : {
additionalInformation : "SAPUI5.Component=ui.s2p.mm.purchorder.approve.uis2pmmpurchorderapproveExtension",
applicationType : "URL",
url : "./" + window.location.search // pass URL query parameters to application
}
}]
}
}
}
};
</script>
<script src="test-resources/sap/ushell/bootstrap/sandbox.js" id="sap-ushell-bootstrap"></script>
<script id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-compatVersion="1.16"
data-sap-ui-frameOptions="trusted"
data-sap-ui-resourceroots='{"ui.s2p.mm.purchorder.approve.uis2pmmpurchorderapproveExtension": "./"}'>
</script>
<!-- Create the unified shell default renderer control and add it to the page -->
<script type="text/javascript">
sap.ui.getCore().attachInitEvent(function() {
sap.ushell.Container.createRenderer().placeAt("content");
});
</script>
</head>
<!-- UI Content -->
<body class="sapUiBody" id="content">
</body>
</html>
Whitelist.js
のjQuery.sap.addUrlWhitelist("https", "uis2pmmpurchorderapproveextens-ad232er4.dispatcher.hana.ondemand.com/?hc_reset");
jQuery.sap.validateUrl("uis2pmmpurchorderapproveextens-ad232er4.dispatcher.hana.ondemand.com/?hc_reset");
種類のよろしく、
ザカリア
タイトルのUI5の言及をもう一度削除しました。 UI5への参照は、使用されたタグのためにかなり明確です。 – matbtt
完璧、心配する必要はありません!誰かがこのトピックについてさらに助けてくれることを願っています。 –