Can i make the design of app menu in hierarchical way ? Right now it shows

Can i make the design of app menu in hierarchical way ?

Right now it shows all menu without any spacing.

I need the design like following

item

     submenu →

          submenu →

item2

     submenu →

Have you tried wrapping Submenus? It should work as expected.

Yes i already wrap into the SubMenus.

I see you are missing the margin on the left side. Try adding some custom padding to the submenus.

sumbmenu1.getStyle().set("padding-left","...px");
sumbmenu2.getStyle().set("padding-left","...px");
...