Forum Discussion
angela
7 years agoCatalyst II
It´s somehow not so easy to differentiate the CUI elements from the rest.
"window" is always present, I don´t know how to use this one for differentiation. The itm sometimes already contains the selected items, sometimes just an Object Element.
I tried the following ones:
itm.constructor.name == "Element" -> in case when Method is called from a Form (CUI twt + Action)
itm.getItemCount(); -> Is -1 for CUI mwt calls and >0 for Action calls. But throws an error for CUI twt elements.
Are there additional parameters passed that could be helpful?