Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var igId = 'emp';
- var region = apex.region(igId);
- var actions = region.call('getActions');
- var actionList = [... new Set(actions.list().map(a => a.name))];
- var toInvoke = [];
- var toGetSet = [];
- var toToggle = [];
- for(i in actionList){
- var action = actions.lookup(actionList[i]);
- if(action.action){
- toInvoke.push(action);
- } else if(action.get && action.set && action.choices){
- toGetSet.push(action);
- } else {
- toToggle.push(action);
- }
- }
- // var actions = apex.region(regionId).call('getActions');
- // the following actions can be invoked via:
- // actions.invoke(actionName);
- console.log('actions to invoke', toInvoke);
- // the follwing actions have get and set methods:
- // var value = actions.get(actionName);
- // actions.set(actionName, value);
- console.log('actions to get/set', toGetSet);
- // the following actions can be toggled
- // note they also have getters and setters which accept true/false as parameter
- // actions.toggle(actionName);
- console.log('actions to toggle', toToggle);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement