Forum Discussion
Hi ShrutiS,
that´s a very good question! I myself searched two years for this one until I was able to find the most obvious solution:
Innovator inn = this.getInnovator();
return inn.newError("This call comes from " + this.getAction());
Hi Angela,
Thanks for the response, for some response when I tried this.getAction() it returned the method name and not the Action name.
I then switched to the CUI menu item and I am now able to get the resp menu button name in the inArgs parameter [emoticon:c4563cd7d5574777a71c318021cbbcc8]
Regards
- AngelaIp5 years agoIdeator I
CUI is the choice of the real professional![emoticon:1435ff2429184e17bc948e4f19178e1e][emoticon:c4563cd7d5574777a71c318021cbbcc8]
Haven´t tried this one with CUI so far, so your inArgs hint is also useful for myself. Not sure if I was really right with my Action solution. I think I mixed it up with a different issue. I checked my Actions again -> in reality I used small Methods that call the main Method with "dummy" property to indicate the calling Action. Your CUI solution is more elegant.
- AngelaIp5 years agoIdeator I
Hi Shruti,
I right now want to build a similar CUI Menu with buttons like you did in this post a few month ago.
Can you give me some hints regarding getting the Action or CUI Menu Button name with inArgs?
I thought I could use inArgs.commandId or inArgs.control.getId() to get the calling element.
But none of my variants I tried so far did contain anything. Not sure what is missing. Would be great if you could tell me how you did it :-D .
Thanks!
Angela
- ShrutiS5 years agoIdeator I
Hi Angela,
inArgs.control.id is what got me the button name [emoticon:c4563cd7d5574777a71c318021cbbcc8]
Thanks,
Shruti Suresh
- AngelaIp5 years agoIdeator I
Hi Shruti!
Thanks for the hint! Works excellent! The ability to get the calling element is really a big pro argument for CUI elements.
Have a happy week!
Angela