日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

通过 url 参数 parameters 和 script tag 属性来配置 SAP UI5 运行时

發布時間:2023/12/19 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 通过 url 参数 parameters 和 script tag 属性来配置 SAP UI5 运行时 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Configuration of the SAPUI5 Runtime using URL parameters

新建一個 SAP UI5 應用,index.html 實現如下圖所示:

<!DOCTYPE HTML> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv='Content-Type' content='text/html;charset=UTF-8' /><scriptsrc="resources/sap-ui-core.js" id="sap-ui-bootstrap"data-sap-ui-libs="sap.m"> </script><script>// Set the log level to INFOjQuery.sap.log.setLevel(jQuery.sap.log.Level.INFO);// Get reference the Core objectvar oCore = sap.ui.getCore();// Read Corevar oLibMap = oCore.getLoadedLibraries();for (key in oLibMap) {jQuery.sap.log.info("Loaded Library name", key);}jQuery.sap.log.info("Has model?", oCore.hasModel().toString());jQuery.sap.log.info("Is mobile?", oCore.isMobile().toString());// Read Configuration object from the Corevar oConfig = oCore.getConfiguration();jQuery.sap.log.info("Accessibility", oConfig.getAccessibility().toString());jQuery.sap.log.info("Debug", oConfig.getDebug().toString());jQuery.sap.log.info("Language", oConfig.getLanguage());jQuery.sap.log.info("Locale", oConfig.getLocale());jQuery.sap.log.info("Version of SAPUI5 Framework", oConfig.getVersion());jQuery.sap.log.info("Theme", oConfig.getTheme());jQuery.sap.log.info("User agent", navigator.userAgent);// Reset the log level to default of ERROR jQuery.sap.log.setLevel(jQuery.sap.log.Level.ERROR); </script></head> <body class="sapUiBody" role="application"><div id="content"></div> </body> </html>

使用如下的 url 進行測試:

http://localhost:8080/sapui5.configurl.demo?sap-ui-accessibility=false&sap-ui-debug=false&sap-ui-language=de&sap-ui-theme=sap_bluecrystal&data-sap-ui-xx-fakeOS=ios

請根據您的服務器配置使用端口號。 加載 index.html 將在開發者工具控制臺中打印日志。 該 URL 包含多個配置參數(格式為 sap-ui-PARAMETER-NAME = ”value”),由第二個腳本區域中的代碼讀取。 日志級別從默認的 ERROR 更改為 INFO 并返回以打印 jQuery.sap.log.info () 語句。

Configuration of the SAPUI5 Runtime using script tag attributes

index.html:

<!DOCTYPE HTML> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv='Content-Type' content='text/html;charset=UTF-8' /><scriptsrc="resources/sap-ui-core.js" id="sap-ui-bootstrap"data-sap-ui-libs="sap.m" data-sap-ui-accessibility="false"data-sap-ui-debug="false"data-sap-ui-language="de"data-sap-ui-theme="sap_bluecrystal" data-sap-ui-xx-fakeOS="ios"> </script><script>// Set the log level to INFOjQuery.sap.log.setLevel(jQuery.sap.log.Level.INFO);// Get reference the Core objectvar oCore = sap.ui.getCore();// Read Corevar oLibMap = oCore.getLoadedLibraries();for (key in oLibMap) {jQuery.sap.log.info("Loaded Library name", key);}jQuery.sap.log.info("Has model?", oCore.hasModel().toString());jQuery.sap.log.info("Is mobile?", oCore.isMobile().toString());// Read Configuration object from the Corevar oConfig = oCore.getConfiguration();jQuery.sap.log.info("Accessibility", oConfig.getAccessibility().toString());jQuery.sap.log.info("Debug", oConfig.getDebug().toString());jQuery.sap.log.info("Language", oConfig.getLanguage());jQuery.sap.log.info("Locale", oConfig.getLocale());jQuery.sap.log.info("Version of SAPUI5 Framework", oConfig.getVersion());jQuery.sap.log.info("Theme", oConfig.getTheme());jQuery.sap.log.info("User agent", navigator.userAgent);// Reset the log level to default of ERROR jQuery.sap.log.setLevel(jQuery.sap.log.Level.ERROR); </script></head> <body class="sapUiBody" role="application"><div id="content"></div> </body> </html>

在瀏覽器中打開如下網址 http://localhost:8080/sapui5.config.demo/
請根據您的服務器配置使用端口號。 加載 index.html 將在開發者工具控制臺中打印日志。 第一個腳本區域(也稱為 Bootstrap)中的代碼包含多個配置參數(格式為 data-sap-ui-PARAMETER-NAME = ”value”),由第二個腳本區域中的代碼讀取。 日志級別從默認的 ERROR 更改為 INFO 并返回以打印 jQuery.sap.log.info () 語句。

更多Jerry的原創文章,盡在:“汪子熙”:

總結

以上是生活随笔為你收集整理的通过 url 参数 parameters 和 script tag 属性来配置 SAP UI5 运行时的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。