登入SAP雲平台,在Services面闆裡找到SAP WebIDE Full-stack服務:
從availability裡發現WebIDE full-stack目前隻有Neo能用,CloudFoundry暫時不可用:
點選Go to Service打開WebIDE:
打開WebIDE後,建立一個項目,environment選成CloudFoundry:
從模闆裡建立一個UI5應用,模闆選擇成SAP UI5 Application:
A new MTA project called mta_FioriDemo containing the FioriDemo HTML5 module now appears in your SAP Web IDE workspace. When developing apps in the Cloud Foundry environment, you create a Multi-Target Application (MTA) file in SAP Web IDE. Each SAP Fiori app is developed as an SAPUI5 module of the MTA.
選中生成的XML視圖,右鍵菜單,用layout editor打開,編輯這個視圖:
從控件庫裡找到Text控件,将其拖拽到視圖區域:
在項目的workspace preferences裡,指定該應用部署到的目标CloudFoundry環境明細:
本地測試可以用Run Configuration菜單實作:
選擇Run as Web Application:
運作的檔案,就選擇index.html:
如果要部署到CloudFoundry,先對這個項目進行build,得到.mtar檔案:
然後使用右鍵菜單部署即可。
本文來自雲栖社群合作夥伴“汪子熙”,了解相關資訊可以關注微信公衆号"汪子熙"。