Web Accordion Menu

Web Accordion Menu

This template will allow you to use a framed menu screen, which uses an Accordion Menu and loads menu functions into a ChildSite.

1) In your eclipse workspace, save WebMenuFrame-page.wcli file (ZIP attached in this article with the files) to your Custom Template Project.

2) In your obclient.properties, create an entry similar to this: "webclient.topAppMode=one". The value for this can also be set to "many". If the value is "one", then only one child panel can be open at a time. If it tries to load another child panel, any open ones will close. If it is set to "many", then any number of children can be left open.

3) In your CSS file that your are using for your application, please make sure that you have the following entries

  1. body, div, dl, dt, dd, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
  2. margin: 0;
  3. padding: 0;
  4. }

  5. html {
  6. height: 100%;
  7. width: 100%;
  8. }

  9. body{
  10.   overflow: hidden;
  11.   height: 100%;
  12.   width: 100%;
  13. }

  14. body form {
  15.   height: 100%;
  16.   width: 100%;
  17. }
  18. #container{
  19. height: 100%;
  20. width: 100%;
  21. background: none;
  22. }

  23. #titlebar{
  24. width: 100%;
  25. height: 68px;
  26. background: white url("../images/header-deco.gif") repeat-x 0% 0%;
  27. border: 1px solid #99BBE8;
  28. }

  29. #titlebar h1{
  30. text-align: center;
  31. padding-top: 10px;
  32. font-family: Helvetica;
  33. color: #15428B;
  34. }

  35. #navigationbar{
  36. height: 25px;
  37. width: 100%;
  38. background: #D0DEF0 url("../images/bg.gif");
  39. border: 1px solid #A9BFD3;
  40. }
  41. #navigationbar DIV{
  42. float: right;
  43. padding-right: 5px;
  44. }

  45. #navigationbar SPAN{
  46. padding-left: 2px;
  47. position: relative;
  48. top: -4px;
  49. }

  50. #footerbar{
  51. height: 20px;
  52. background: #D0DEF0 url("../images/bg.gif");
  53. border: 1px solid #A9BFD3;
  54. }
  55. #about{
  56. height: 16px;
  57. width: 16px;
  58. margin-top: 4px;
  59. }

  60. #leftcontainer{
  61. width: 250px;
  62. border: 1px solid #99BBE8;
  63. background: white;
  64. }

  65. #gridbottom{
  66. height: 30px;
  67. background: #D0DEF0 url("../images/bg.gif");
  68. border: 1px solid #A9BFD3;
  69. }

  70. #gridbottom BUTTON{
  71. margin-top: -5px;
  72. }

  73. #functiontitle{
  74. height: 25px;
  75. background: url("../images/white-top-bottom.gif") repeat-x;
  76. font-weight: bold;
  77. color: #15428B;
  78. font-size: 11px;
  79. font-family: tahoma, arial, verdana, sans-serif;
  80. }

  81. #functiontitle SPAN{
  82. position: relative;
  83. top: 6px;
  84. left: 5px;
  85. }
  86. /*
  87. .titlearea{
  88. height: 25px;
  89. background: url("../images/white-top-bottom.gif") repeat-x;
  90. font-weight: bold;
  91. color: #15428B;
  92. font-size: 11px;
  93. font-family: tahoma, arial, verdana, sans-serif;
  94. width: 250px;
  95. }

  96. .titlearea SPAN{
  97. position: relative;
  98. top: 6px;
  99. left: 5px;
  100. }
  101. */
  102. #split{
  103. width: 5px;
  104. background-color: #D0DEF0;
  105. }
  106. #accContainer{
  107. /*height: 100%;*/
  108. overflow-y: auto;
  109. overflow-x: hidden;
  110. }


  111. .tabcontainer{
  112. width: 100%;
  113. height: 100%;
  114. }

  115. .childcontainer{
  116. height: 100%;
  117. width: 100%;
  118. }

  119. .childbottom{
  120. height: 1px;
  121. background: #D0DEF0 url("../images/bg.gif") no-repeat;
  122. background-size: 100%;
  123. border: 1px solid #A9BFD3;
  124. }

  125. .claro .childbottom BUTTON{
  126. margin-top: 3px;
  127. }

  128. .childdetail{
  129. height: 1px;
  130. background: #D0DEF0 url("../images/bg.gif") no-repeat;
  131. background-size: 100%;
  132. border: 1px solid #A9BFD3;
  133. }

  134. .claro .childdetail BUTTON{
  135. margin-top: 3px;
  136. }

  137. .childtop{
  138. height: 50px;
  139. }

  140. .companylogo{
  141. background: url("../images/dsi.png") no-repeat;
  142. width:160px;
  143. height:68px;
  144. }

  145. .statusmessage{
  146. text-align: right;
  147. }


  148. .dijitTextBoxError .dijitValidationIcon
  149. {
  150.       width: 0px;
  151. }

  152. .claro .dijitValidationIcon
  153. {
  154.       width: 0px;
  155. }

  156. .exporticon {
  157. background-image: url("../images/export.png");
  158. width: 16px;
  159. height: 16px;
  160. }

  161. .dijitButtonNode {
  162. z-index: 2;
  163. }

  164. .loadingSpinner{
  165.        width: 100%;
  166.        height: 100%;
  167.        background: transparent url("../images/busy.gif") no-repeat center;
  168.        position: absolute;
  169.        z-index: 10000;
  170. }

  171. .loadShow .LoadScreen{
  172.        display: none;
  173. }

  174. .LoadScreen{
  175. width: 100%;
  176. height: 100%;
  177. background: transparent url("../images/busy.gif") no-repeat center;
  178. position: absolute;
  179. z-index: 10000;
  180. }

  181. .menubar{
  182. visibility: hidden;
  183. }

  184. #titlebar h1{
  185. color:red !important;
  186. }

  187. .dijitInputField input{
  188. padding-left:5px;
  189. }

The remainder of these changes will be in Plex.

4) Make sure the Variant for the WebClient Advanced Controls group model is set to "WebClient".

5) Create the following 2 functions to act as Page Templates using Plex Triples:

~WebMenuFrame
impl name NME
WebMenuFrame
~WebAlert
impl name NME
WebAlert

6) Create a function that will be your accordion menu function. Have it inherit from "_Abstract.~TreeView", "~WebShell", "~WebAlert", and "~WebMenuFrame", in that order.

7) Add a region to the panel of your menu function called "ChildSiteP".

8) In the panel editor for your menu function, for ChildSiteP, set the following:
           Control Name = ChildSiteP:DetailArea
           Type = Site

9) In the panel editor for your menu function, for TreeView, set the following:
           Java Bean Class = WebAccordionTree
           Control Name = PVTree1
           Control Type = PVTree Bean Control

10) In the action diagram for your menu function, in the Pre Point Start Initialize, you will need to set ChildSiteP as your child site. The code will look like this:



The field mapping in the API call will look like this:


11) In the action diagram for your menu function, in the Pre Point Process Options, you will need to add your TreeView parent and child nodes. This is done the same as a normal TreeView in Plex. After this is done, you will need to do a "Go Sub TreeView Refresh".

12) Just as with a normal Plex TreeView, you will need to add code in the "TreeView Node Clicked" subroutine to call the necessary function when a node is clicked.

13) For functions that you would like to load into the child site, they DO NOT need to inherit from the normal Plex Parent/Child patterns. Instead, they will need to inherit from "~WebShell" and have their Window Type set to "Top Application".


    • Related Articles

    • Web Controls

      What Are the Different Types of Controls? Include files (*.inc)   are evaluated within the referencing template and can be useful for repeated blocks of code. They can have parameters, such as :nc (do not evaluate comments) or :parameterName=pValue ...
    • Dynamic Tree Menu Implementation

      This article describes you how to create a dynamic tree menu in WebClient, this menu generate its nodes according to the data defined in a database table. Considerations: Before continue this guide you should read the following manuals: Web Accordion ...
    • MENU

      CM EvolveIT allows users to edit the application Menu.  This feature is useful to define the application Menu structure. Menu is implemented outside of the Plex Model. Menu is dynamic such as data-driven. Main Menu Function exists but Call graph ...
    • TrafficCam for Web

      Watch the Walkthrough We are going to develop a web application with CA Plex and CM First's WebClient templates. The application will allow us to access a network of real-time traffic cameras around the State of Maryland, view their live video feeds, ...
    • Incident Reporter for Web

      Video Walkthrough Pattern Functions All functions will be under "Patterns.Web". GoogleMap This pattern is a simple UIBasicShell.  It displays a single field: GoogleMap for GoogleMap.  This field has a Control Name of ...