gpt4 book ai didi

sapui5 - 如何将 html 页面包含到页面内容中?

转载 作者:行者123 更新时间:2023-12-02 09:37:06 27 4
gpt4 key购买 nike

我的目标是将文档页面包含到 sap.m.Page 中。我有一个 sap.m.Page 到 XML View :

<Page id="idPageSidebar" title="" showNavButton="false" navButtonPress="doBack">
<content>
//here I want visualize myDocumentation.html page
</content>
</Page>

我将 myDocumentation.html 放入我的项目目录中。如何将其包含到 sap.m.Page 中?

最佳答案

使用core:HTML控件并通过AJAX添加内容这是一个例子: http://jsfiddle.net/C4FW7/

      <App>
<Page title="SAPUI5 App">
<core:HTML id="html" content="hello"/>
</Page>
</App>


sap.ui.controller("my.own.controller", {
onInit: function(){
var that=this;
$.get( "/8rmAU/show/light", function( data ) {
that.getView().byId('html').setContent(data);
});
}
});

关于sapui5 - 如何将 html 页面包含到页面内容中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24508581/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com