if (!(parent instanceof MenuItemImpl)) {
throw new UIRuntimeException("parent must have been created by addMenuItem");
}
if (parent.getStyle() != MenuItemImpl.STYLE_MENU) {
throw new UIRuntimeException("parent menu item must have the menu style associated");
}
MenuItemImpl item = new MenuItemImpl((MenuItemImpl)parent, resource_key);
UIManagerImpl.fireEvent( UIManagerEvent.ET_ADD_SUBMENU_ITEM, new Object[] {item, parent});
return item;