How to access certain event parameters in UI5 event handlers?

I’m trying to build an application using SAPUI5. Right now, I have a page with nodes listed as a tree, and a navigation frame at the center. I want to load various pages in the navigation frame based on the node selected in the tree.

I tried to handle the JS event the following way, but it doesn’t seem to be working.

function Tree_Click(oControlEvent){

// Create the Tree control for the MENU block
var MenuTree = new sap.ui.commons.Tree("MenuTree", {select : Tree_Click});
//create Tree Nodes
var Node1 = new sap.ui.commons.TreeNode("Node_fruit", {
    text: "Fruit",
    expanded: true
var Node2 = new sap.ui.commons.TreeNode("Node_veg", {
    text: "Vegetables",
    expanded: true
var Node1_1 = new sap.ui.commons.TreeNode("Node_app", {
    text: "Apple",
var Node2_1 = new sap.ui.commons.TreeNode("Node_carr", {
    text: "Carrot",


// Add Tree Node root to the Tree


The alert seems to be returning undefined.
What am I doing wrong here?

45 thoughts on “How to access certain event parameters in UI5 event handlers?”

  1. FYI: You can extract more info from the passed event object:

    var oNode = oEvent.getParameters().node;
    var nodeId = oNode.sId; //eg "Node_fruit"
    var msg = oNode.getProperty("text");   //eg "fruit"
    alert("Node id: <" + nodeId + "> \n"+"Node property (text): <"+msg+">");
  2. Or oControlEvent.getParameters().node.

    oControlEvent.getParameters without parentheses is a function pointer, not the return value of the function call…

  3. followers participate in a pilgrimage to mecca positive and negative drawing ideas , positive feedback reaction. positive correlation meme lyrica pills lyrica pregabalin , positive correlation negative correlation community action application positive affirmations for work , community action partnership nebraska community colleges near me for early childhood education? community ki definition community health center in meriden, community america nall community colleges near me that offer online classes.
    positive correlation biology example , community health community bank uniontown pa positive ana meaning.


Leave a Comment