on 10-21-2015 4:44 PM
Hi All,
I have created a panel and shows up corrrectly.
What i want is ability to click on Panel and alert box shows up. But this is not happening.
I need user's to click on this and get an alert.
Code:
var L3ST70 = new sap.ui.commons.Panel("L3ST70",{applyContentPadding: true, width: "120px", height: "130px", showCollapseIcon: false,
click: function(){alert("clicked");}
});
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have extended the panel with press event, it is not working :
the code is below :
sap.ui.commons.Panel.extend("StationPanel", {
metadata: {
events: {
"press" : {}
}
},
onmousepress : function(evt) {
this.firePress();
},
renderer: {}
});
var L3ST70 = new StationPanel("L3ST70",{applyContentPadding: true, width: "120px", height: "130px",showCollapseIcon: false,
press: function(evt) {
alert("Button " + evt.getSource().getId() + " was hovered.");
}
});
But if i use hover it works.
please advise what to do with this code.
i have resolved it myself with following code:
sap.ui.commons.Panel.extend("StationPanel", {
metadata: {
events: {
"press" : {}
}
},
onmouseup : function(evt) {
this.firePress();
},
renderer: {}
});
var L3ST70 = new StationPanel("L3ST70",{applyContentPadding: true, width: "120px",height: "130px",showCollapseIcon: false,
press: function(evt) {
alert("Button " + evt.getSource().getId() + " was hovered.");
}
});
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
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.