SAP HTML5 Open UI5 Fiori image link press click action event

 

<html>
<head>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge” />
<meta http-equiv=”Content-Type” content=”text/html;charset=UTF-8″/>

<script src=”https://sapui5.hana.ondemand.com/resources/sap-ui-core.js”
id=”sap-ui-bootstrap”
data-sap-ui-libs=”sap.m,sap.ui.layout,sap.ui.commons”
data-sap-ui-theme=”sap_bluecrystal”
type=”text/javascript”>
</script>

</head>
<body class=”sapUiBody”>
<div id=”sample1″></div>
<div id=”sample2″></div>
<div id=”sample3″></div>
</body>
</html>

<script>

// creates a simple link with an action and property href not set
var oLink1 = new sap.ui.commons.Link({
text: “Bana Tıkla 1”,
tooltip: “Bu bir ui5 link örneğidir”,
press: function() {alert(‘Selam ‘ + oLink1.getText());}});
// attach the link to the DOM
oLink1.placeAt(“sample1”);
var oImage = new sap.ui.commons.Image();
oImage.setSrc(“http://www.sap.com/global/images/SAPLogo.gif”);
oImage.setAlt(“alternative image text for image”);
oImage.attachPress(function () {
alert(“karadere burhan logo”);
});

oImage.placeAt(“sample2”);

var ImageLink = new sap.ui.commons.Image({
src: “http://www.sap.com/global/images/SAPLogo.gif” ,
press: function() {
alert(‘imagelink’);
}

});
ImageLink.placeAt(“sample3”);

 

</script>

 

http://scn.sap.com/community/developer-center/front-end/blog/2015/06/13/ui5-programming-examples

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)