on 04-25-2013 4:14 PM
Hi,
I am new to SAPUI5. I created a small html page with two text fields and a submit button.
When i tried to access this page i am getting the error 'Object expected'. It seems it unable to find sap.ui.localResources.
What should i do? And also, when i modified the code and accessing this index.html, i can't see the updated code (view source) in explorer/chrome.
any idea?
- --------- Index.html code-----
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="./resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons"
data-sap-ui-theme="sap_goldreflection" >
</script>
<!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
<script>
sap.ui.localResources("demoui5");
var view = sap.ui.view({id:"iddemo1", viewName:"demoui5.demo", type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
-------------------------------------------- End -------------
Thanks,
naresh
Hi Jibin & sandip,
Thanks for the responses.
I see two issues here.
1. When i do the changes to html and tried to access the page, i am not seeing the changes immediately. I think some cache issues.
Atatched is the index.html.
2. I am getting different error after i added functions to it. Atatched is the screenshot of chrome.
Appreciate your help.
Thanks,
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jibin. That worked.
I got into another problem, this time the response is not showing in the html page once i click submit on index.html.
Once i click Submit button, it suppose to delete the record from table and show the response as "Number of records updated:"+Count.
But from index.html, its not moving to the response page at all.
In my xsjs i am using the below statements.
$.response.contentType= "text/html";
$.response.setBody("Number of records updated:"+count);
$.response.status=$.net.http.OK;
Thanks for the help.
Naresh
double check the path to your UI5 libs
<script src="./resources/sap-ui-core.js"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh ,
use FireFox firebug tool to figure the error detail if possible can u post me screen shot for that error ..
Regards,
Jibin Joy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.