<object xmlns="http://www.cmobilecom.com/af/objects"
id="menu1" type="menu">
<menuXml>filePath</menuXml>
</object>
/path/conference_agenda.xpg year_2023/ agenda.xmu/path/conference_agenda.xpg:
<object xmlns="http://www.cmobilecom.com/af/objects"
id="agenda_menu_2023" type="menu">
<menuXml>year_2023/agenda.xmu</menuXml>
</object>
A menu in XML consists of a tree of menu items. A MenuNode object will be created for each menu item in XML.
For example,
<menu nameLocalized="true" urlBase="/userGuide" menuStyle="TREE" expandedDepth="2">
<item name="Example1" url="examples/example1.html" />
<item name="Example2" >
<item name="Example2-1" url="examples/example2-1.html" />
<item name="Example2-2" url="examples/example2-2.html" />
</item>
<item name="Example3" url="http://www.cmobilecom.com" target="_blank" />
<item name="Example4" url="/foo/bar.html" />
</menu>
<object xmlns="http://www.cmobilecom.com/af/objects"
id="menu2" type="menu">
<menu nameLocalized="true" urlBase="/userGuide" menuStyle="TREE" expandedDepth="3">
<item name="Example1" url="examples/example1.html" />
<item name="Example2" >
<item name="Example2-1" url="examples/example2-1.html" />
<item name="Example2-2" url="examples/example2-2.html" />
</item>
<item name="Example3" url="http://www.cmobilecom.com" target="_blank" />
<item name="Example4" url="/foo/bar.html" />
</menu>
</object>
The relative URLs of menu items will be resolved by prepending urlBase as followings:
Index (url="/userGuide/index.html") Example1 (url="/userGuide/examples/example1.html") Example2 Example2-1 (url="/userGuide/examples/example2-1.html") Example2-2 (url="/userGuide/examples/example2-2.html") Example3 (url="http://www.cmobilecom.com", target="_blank") Example4 (url="/foo/bar.html")If a resolved URL starts with / (not http or https), it is a URL under contextPath.
https://domain:port/<contextPath>
<object xmlns="http://www.cmobilecom.com/af/objects"
id="book_categories" type="menu">
<entityType>myModule.BKCAT</entityType>
<viewConfig>
<viewType>MENU</viewType>
<menuStyle>TREE</menuStyle>
<menuNode key="hierarchy.entity">
<name>#{entity.name}</name>
<renderStyle>
<styleNumber>16</styleNumber>
</renderStyle>
<outputLink>/listBooks.xpg?category=#{entity.hierarchyId}</outputLink>
</menuNode>
<menuNode key="hierarchy.root">
<name>#{bundle.AllBooks}</name>
<renderStyle>
<styleNumber>16</styleNumber>
</renderStyle>
<outputLink>/allBooks.xpg</outputLink>
</menuNode>
</viewConfig>
</object>
DataType myModule.BKCAT is mapped to BookCategory entity type.
Style number 16 is OUTPUT_LINK (defined in class RenderStyle).
For example, book categories as a tree menu:
AllBooks Science Biology ComputerScience Compiler AI Fictions Arts Literatures