Skip to Content
0
Jun 25, 2015 at 02:55 PM

can I place a single object on different places

15 Views

Hi Experts,

I am new for SAPUI5.

I have did something like below which is not working, guide me with the explanation that why and how we can do this??

<!DOCTYPE html>

<html>

<head>

<script src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-libs="sap.ui.commons" data-sap-ui-theme="sap_platinum">

</script>

<meta charset="utf-8">

<title>JS Bin</title>

</head>

<body class="sapUiBody" role="application">

</br></br></br></br>

<div id="content"></div>

</br></br></br></br>

<div id="content2"></div>

</br></br></br></br>

<div id="content3"></div></br></br></br></br>

<div id="content4"></div></br></br></br></br>

<div id="content5"></div>

</body>

</html>

=================

script

====================

var button = new sap.ui.commons.Button("buttonId",{

text: "Press Me!!!",

helpId: "Press Me",

press: function(){

var button2=new sap.ui.commons.Button("buttonId2",{

text: "Press Me too",

helpId:"PressMe Too",

press:function(){

alert("Button2 prssed");

}

});

button2.placeAt("content2");

button2.placeAt("content3");

button2.placeAt("content4");

button2.placeAt("content5");

}

});

button.placeAt("content");

but after running this when I m pressing the first button I can see only one button.

why I am not able to see all four buttons.

Please guide me through this.

---

with kind regards

DJ