Skip to Content
0

list of parameters in event object in sapui5

Dec 13, 2016 at 11:19 AM

577

avatar image
Former Member

Hi UI5 champions,

Please forgive me if this is the wrong group or its a repeated question. While I was trying out some example programs like writing event handlers in controller, we use the event Object. If the event object is oEvent(say), we usually use method oEvent.getParameter("<param_name>").

Can you please help me to find out the list of possible parameters that can be used here. I tried hard to find out from the API, but couldn't find the information.

Please help me with information.

Thanks and Regards,

Harinadh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Dec 13, 2016 at 01:25 PM
0

It depends what control you are using. For example sap.m.SearchField has an event 'search' and its parameters are described here. You can access the following parameters:

oEvent.getParameter("query");
oEvent.getParameter("suggestionItem");
oEvent.getParameter("refreshButtonPressed");
oEvent.getParameter("clearButtonPressed");
Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Radek,

Thank you very much for the valuable information as I didn't notice it and it really helped.

I was working on an example from opensap ui5 where in sap.m.ObjectListItem was used with event "press" and in controller code oEvent.getParameter("listItem") was used. Though it didn't work in my browser( could be mine is outdated chrome version...not sure...but worked with oEvent.getSource() and further regular approach), I had this doubt if there are any default parameters globally across all controls. I checked the link to press event of sap.m.objectlistitem

But couldn't find "listItem" in it. So just had that doubt if there are any default parameters across all controls in event object.

Thanks a lot .

Thanks

Harinadh

0
Former Member
Former Member

When you click on the item of a list it fires selectionChange event and its properties you can check here. So oEvent.getParameter("listItem") makes sense.

0
Former Member
Former Member

i couldn't find the "listItem" as parameter for press event of sap.m.ObjectListItem . I think I have to use to handle item press event on sap.m.Listsap.m.List. The information you shared, helped me to check on event parameters on API. Thanks a lot.

0
Former Member

Thank you very much for helping me with useful information

0
avatar image
Former Member Dec 13, 2016 at 02:39 PM
0

Hi Harinadh Bhupathi

I think you are asking what are the properties for the event......?
If yes then just place a break point after clicking on the list then in the console you can get the event parameters...

In the below image you can observe triggering the break point after clicking on the list

in this image u can observe i am using the console to find the properties of event...

just type the event.(dot) in the console then u can check all the properties of that event.

Hope you got it.....

If this is not your doubt please revert back.

Thanks,

Deepak Raj.


capture1.png (152.4 kB)
capture2.png (127.9 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Deepak,

Thanks a lot. I was looking for parameters to be used when we call getParameter() method on event object.

1
avatar image
Former Member Feb 16 at 04:38 PM
0

Try to "https://sapui5.hana.ondemand.com/sdk/#/api".

Check out events.

Share
10 |10000 characters needed characters left characters exceeded