Menu with Sub-menu in XML

Hi, there,

Trying to build a sidebar menu with sub-menu (nested level) by passing the config in XML, instead of JSON.
With the same config in XML I’m getting an inconsistent behavior:

  • menu and contextmenu works
  • sidebar menu displays 1st level only.

Sample XML config for menu, contextmenu:

<data> <item id="11" value=" Select User" > <submenu stack="1"> <item id="17" value="Alex Clark" /> <item id="25" value="Demo User 1" /> <item id="13" value="John Lawson" /> <item id="12" value="Leslie Fischer" /> </submenu> </item> </data>

Btw, for menu and contextmenu the similar question was clarified back in 2014:
https://forum.webix.com/discussion/2126/context-menu-vs-menu-configuration-via-initialization-data

Hello @vagon333 !

Please check the sample: Code Snippet

To init Webix components from XML, you should work with webix.markup class that offers a pattern for markup processing.
You can use parse() method (initializes the component in Webix layout)

Thanks for clarification.
I noticed that for the following controls:

  • ui.contextmenu
  • ui.menu
  • ui.sidemenu (non-standard)
  • ui.submenu

Only ui.sidemenu does not accept “submenu” tag.
Is there a specific reason for this difference in data format requirements?