28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<br />

// use alternative bootstrap for testing locally in<br />

// Eclipse during development time<br />

// this is only a helper mechanism during development time<br />

if (!window.sap) {<br />

var oriTag = document.getElementById("sap-ui-bootstrap");<br />

oriTag.id = "wrong";<br />

oriTag.src = "wrong.js";<br />

var script = " " +<br />

"";<br />

document.write(script);<br />

}<br />

<br />

2. If you use requests to backend services, you need to use a suitable URL that points to the backend server and,<br />

to avoid cross-domain issues, you need to use the so-called proxy servlet. Similar to the bootstrap tag, you<br />

can change the respective code manually before submitting, or you can use a code snippet that determines<br />

the URL automatically depending on the context, in which the application runs.<br />

Note: As the server-side logic of an <strong>SAP</strong>UI5 application cannot be executed locally on the developer's<br />

PC, it can only run on the server. Hence, this needs to be committed and activated before it can be<br />

tested.<br />

For more information, see the Demo Kit - <strong>Developer</strong> <strong>Guide</strong> under Testing a <strong>SAP</strong>UI5 Application Enabling<br />

Backend Access for Local Testing .<br />

3. To test your application, choose one of the following options:<br />

○ Open the context menu for the index.html file located in your project's WebContent folder and<br />

choose Run As Web App Preview .<br />

○ To run your application on a server, for example Tomcat, open the context menu of your project, choose<br />

Run As Run on Server and select the respective server.<br />

10.2.2 <strong>SAP</strong>UI5 Runtime Version Comparison<br />

This section describes how to compare the <strong>SAP</strong>UI5 runtime versions installed locally and on <strong>SAP</strong> <strong>HANA</strong>' Web<br />

server.<br />

It is possible that the <strong>SAP</strong>UI5 runtime version installed locally in your Eclipse differs from the <strong>SAP</strong>UI5 runtime<br />

version on <strong>SAP</strong> <strong>HANA</strong>'s Web server.<br />

To verify, which version is installed locally, you can check the <strong>SAP</strong> <strong>HANA</strong> studio Eclipse version via Help About<br />

<strong>SAP</strong> <strong>HANA</strong> Studio Installation Details Features under "<strong>SAP</strong>UI5 Feature"<br />

(com.sap.ui5.uilib.feature).<br />

To find out the <strong>SAP</strong>UI5 runtime version on <strong>SAP</strong> <strong>HANA</strong>'s Web server, open the <strong>SAP</strong> <strong>HANA</strong> modeler perspective in<br />

the <strong>SAP</strong> <strong>HANA</strong> studio Eclipse via Window Open Perspective Modeler . Choose Setup Delivery Units ...<br />

. The version, support package, and patch version of the <strong>SAP</strong>UI5 runtime libs are displayed there. You can also<br />

open the <strong>SAP</strong>UI5 runtime index page under ://:/sap/ui5/1/<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Building UIs with <strong>SAP</strong>UI5<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 233

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!