Hi,
first of all... it works exactly the way you describe. I jsut tested with BUTTONMENU and MENUTITEM + no problem! Maybe you made a typo in "accessiblename"? ;-) I added my code below.
But...: do not "mis-use" the attribute ACCESSIBLENAME...! I would strongly recommend to use the two attributes which are specially prepared for this: REFERENCE and COMMENT. For these attributes there are prepared methods in BaseActionEvent:
getSourceReference()
and getSourceComment()
Regards! Björn
Code:
public void onAction(ActionEvent event)
{
BaseActionEvent e = (BaseActionEvent)event;
Statusbar.outputAlert("Action: " + e.getSourceReference() + "/" +
((BaseComponent)e.getSource()).getAttributeString("accessiblename"));
}