No matter how often I try, I find the whole side menu thing quite confusing. Until now I have had to avoid right hand side menus because I simply cannot get them to work. Left hand side I have been able to get working using Toolbar, roughly something like this:
if (toolbarForLeftMenu==null)
{
toolbarForLeftMenu = new Toolbar();
}
toolbarForLeftMenu.setHidden(true);
f.setToolbar(toolbarForLeftMenu);
final Container SideMenuLEFT = (Container)this.createContainer(resources, "SideMenuLEFT");
toolbarForLeftMenu.addComponentToSideMenu(SideMenuLEFT);
That works great. However I also need a right menu, which you cannot do with the Toolbar as far as I am aware. So I am trying to add a right menu by using SideMenuBar, this actually opens up the side bar fine but I cannot work out how to actually add my container to it, here is what I am doing, but it always remains empty:
final Container SideMenuRIGHT = (Container)this.createContainer(resources, "SideMenuRIGHT");
if (smbForRightMenu==null)
{
smbForRightMenu = (SideMenuBar) Display.getInstance().getCurrent().getMenuBar();
smbForRightMenu.add(SideMenuRIGHT);
smbForRightMenu.putClientProperty("SideComponent", smbForRightMenu);//revalidate();
_("added content to the right menu...");
}
smbForRightMenu.openMenu(SideMenuBar.COMMAND_PLACEMENT_VALUE_RIGHT);
So basically my question is, why doesnt my container (SideMenuRIGHT) appear on the right menu when it opens up ?