plugins popupmenu -> ClassCastExeption

Hi,

im currently trying to use the popupmenu-plugin. It seems my problem is, “application.getMethodTriggerElementName();” gives only a NULL back.

When im trying to show the popup, im getting the error “ClassCastExeption”.

What i want is, to show a popup when clicking on a row of a portal. So i placed the method behind “onAction” of the column of the portal.

Here is my method :

var elementName = application.getMethodTriggerElementName();

var menu = new Array(
   plugins.popupmenu.createMenuItem( "Units", testmet ),
   plugins.popupmenu.createMenuItem( "Hours", testmet ),
   plugins.popupmenu.createMenuItem( "Units And Hours", testmet ),
   plugins.popupmenu.createMenuItem( "Neither", testmet )
)

elem   = elements[ elementName ];

plugins.popupmenu.showPopupMenu( elem, menu);

Has anybody any idea how to solve ?

Thanks in advance,

Andre

And the element itself does have a name (property)?

Hi Patrick,

thanks for the fast reply. That was the reason. The component had no name :) But now i getting the next error :(

The poral, which shows the record im clicking on, lies on a tab. When im now clicking on it, im getting “component must be showing on the screen to determine its location”.

Whats the exact meaning of screen ?

Thanks,

Andre

To be honest: I hardly use portals. So this question is for someone else.