12-06-2012 4:00 PM
Hi,
I'm a newbie to the SAPUI5 toolkit, I've started to develop some simple pages with code snippets and controls.
I have a small application using SAML for authentication and I want to display to the user in the header of my index.html page (Hello i XX XX XX ) and I didn't know how to do it.
Thanks for helping
Dhia
04-06-2015 3:34 PM
Hi Boufahja,
You can refer the below code. Hope it helps.
var y = "/sap/bc/ui2/start_up";
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
var oUserData = JSON.parse(xmlHttp.responseText);'
//set OUserData in JSON Model and can use that model where you want to bind
console.log(oUserData);
}
};
xmlHttp.open( "GET", y, false );
xmlHttp.send(null);
Thanks,
Vinay