我正在尝试使用XAMPP在我的本地计算机上安装SAPUI5。我把文件复制到htdocs了。在Chrome中启动本地主机,我会看到SAPUI5开发工具包-演示工具包概述页面。
之后,我将"HowTo in 20秒“代码的示例代码复制到记事本,并将其另存为HTML-Document。
在浏览器中运行此文件只会显示一个白页。
我在Chrome中寻找开发人员工具,看到了如下所示:
“无法预加载'sap.ui.core.library- preload ':找不到- sap.ui.ModuleSystem”
我希望您能帮助我解决这个问题,这样我就可以从SAPUI5开始
发布于 2014-02-05 16:42:12
关于这个主题的有用链接,我可以推荐:
Eclipse
它们都使用来自Github的UI5 SplitApp样板,这是一个示例应用程序,具有基本的应用程序结构:https://github.com/6of5/UI5SplitApp-Boilerplate
也许这可以帮助您开始本地开发
发布于 2015-01-21 14:29:56
打开新的记事本文件。使用html扩展名保存以下代码,例如: helloworld.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>SAPUI5 in 20 Seconds</title>
<!- 1.) Load SAPUI5, select theme and control library ->
<script id="sap-ui-bootstrap"
type="text/javascript"
src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_goldreflection"
data-sap-ui-libs="sap.ui.commons"></script>
<!- 2.) Create a UI5 button and place it onto the page ->
<script>
// create the button instance
var myButton = new sap.ui.commons.Button("btn");
// set properties, e.g. the text
myButton.setText("Hello World!");
// attach an action to the button's "press" event (use jQuery to fade out the button)
myButton.attachPress(function() { $("#btn").fadeOut(); });
// place the button into the HTML element defined below
myButton.placeAt("uiArea");
// an alternative, more jQuery-like notation for the same is:
/*
$(document).ready(function() {
$("#uiArea").sapui("Button", "btn", {
text:"Hello World!",
press: function(){ $("#btn").fadeOut(); }
});
});
*/
</script>
</head>
<body class="sapUiBody">
<!- This is where you place the UI5 button ->
<div id="uiArea"></div>
</body>
</html>现在,使用任何现代浏览器打开该文件。仅供参考,我们不需要任何服务器来测试
发布于 2015-04-15 15:05:41
您可以将Eclipse配置为使用SAPUI5,并在本地环境中工作时使用Apache Tomcat运行您的应用程序。
Apache Tomcat Install Eclipse - http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr2
(安装Eclipse-http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr2
)
在Eclipse中安装SAPUI5工具
Eclipse >帮助>安装新软件url:https://tools.hana.ondemand.com/luna
HTML5 & Select UI Development Toolkit HTML5 (Developer Edition)
在Servers中配置Apache Tomcat
现在你已经准备好了。创建一个新的SAPUI5项目(比如myProject),添加一些代码。要在tomcat上运行它,右键单击项目,run As > Run on Server。选择您的Tomcat服务器,Next & Finish。您的项目将在http://localhost:8080/myProject/的服务器上启动并运行
https://stackoverflow.com/questions/19596975
复制相似问题