on 03-12-2017 4:01 PM
Hi everbody,
is there a function/method to get all button ids from a view?
Best regards
Yannick
You may use a jQuery.
var aButtons = $('.sapMBtn');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can follow seufchul idea, meanwhile please find below code for your reference...
var vbox = new sap.m.Vbox({
items: [new sap.m.Button(), new sap.m.Button()..........etc.]
});
//Get all buttons:
vbox.getItems(); // it returns all items inside the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! The code idea from seungchul works for me
no direct api, I think.
for the project you are doing, I got a bit point, but not full picture..
usually you know how many buttons are there in a page, and u know the IDs
when you store the click related data to db, you can also save the view id with it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what's the point?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need all button ids from a view because I want to analyze for every view and every application which ones are the most clicked buttons in a view. It is simple to check which one is the most clicked button because I can save every time the id in a table when a button is clicked.
But when I want to know which one is the less clicked button I need all button ids for a view because I don't know if a button exists when it's not clicked.
I need it for a study project.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.