Skip to main content

Adding Components to the Composite Menu

Next we add the following elements to the <composite> element within the XData Contents block:

  • One <html> element. The content of the element is “Zen Contacts”.

  • One <hmenu> element. The value of its width attribute is 100%.

  • One <menuItem> element. Add this to the <hmenu> element. Add the following attributes and values to the element:

    • id=“m1”

    • caption=“Home”

    • link=“ZenTutorial.HomePage.cls”

  • Two additional <menuItem> elements. Add these to <hmenu>. Their id attributes should have the values “m2” and “m3” respectively. For both assign the caption attribute the value “TBA”. These menu items are simply placeholders for future pages of the application.

Here is the completed XData Contents block:


XData Contents [XMLNamespace="http://www.intersystems.com/zen"]
{
  <composite>
    <html id="title" enclosingClass="title">ZEN Contacts</html>
    <hmenu width="100%">
      <menuItem id="m1" caption="Home" link="ZenTutorial.HomePage.cls"
      help="Go to display page" />
      <menuItem id="m2" caption="TBA" link="" help="To Be Added" />
      <menuItem id="m3" caption="TBA" link="" help="To Be Added" />
    </hmenu>
  </composite>
}
Note:

A composite component cannot be viewed in a Web page on its own outside of any Zen page class.

FeedbackOpens in a new tab