Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Panel Click

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.


var L3ST70 = new sap.ui.commons.Panel("L3ST70",{applyContentPadding: true, width: "120px", height: "130px", showCollapseIcon: false,

click: function(){alert("clicked");}



Former Member
Former Member replied

i have resolved it myself with following code:

sap.ui.commons.Panel.extend("StationPanel", {

   metadata: {

   events: {

   "press" : {} 


   onmouseup : function(evt) { 



   renderer: {}

var L3ST70 = new StationPanel("L3ST70",{applyContentPadding: true, width: "120px",height: "130px",showCollapseIcon: false,

   press: function(evt) {

   alert("Button " + evt.getSource().getId() + " was hovered.");



1 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question