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
- body, div, dl, dt, dd, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
- margin: 0;
- padding: 0;
- }
- html {
- height: 100%;
- width: 100%;
- }
- body{
- overflow: hidden;
- height: 100%;
- width: 100%;
- }
- body form {
- height: 100%;
- width: 100%;
- }
-
- #container{
- height: 100%;
- width: 100%;
- background: none;
- }
- #titlebar{
- width: 100%;
- height: 68px;
- background: white url("../images/header-deco.gif") repeat-x 0% 0%;
- border: 1px solid #99BBE8;
- }
- #titlebar h1{
- text-align: center;
- padding-top: 10px;
- font-family: Helvetica;
- color: #15428B;
- }
- #navigationbar{
- height: 25px;
- width: 100%;
- background: #D0DEF0 url("../images/bg.gif");
- border: 1px solid #A9BFD3;
- }
- #navigationbar DIV{
- float: right;
- padding-right: 5px;
- }
- #navigationbar SPAN{
- padding-left: 2px;
- position: relative;
- top: -4px;
- }
- #footerbar{
- height: 20px;
- background: #D0DEF0 url("../images/bg.gif");
- border: 1px solid #A9BFD3;
- }
-
- #about{
- height: 16px;
- width: 16px;
- margin-top: 4px;
- }
- #leftcontainer{
- width: 250px;
- border: 1px solid #99BBE8;
- background: white;
- }
- #gridbottom{
- height: 30px;
- background: #D0DEF0 url("../images/bg.gif");
- border: 1px solid #A9BFD3;
- }
- #gridbottom BUTTON{
- margin-top: -5px;
- }
- #functiontitle{
- height: 25px;
- background: url("../images/white-top-bottom.gif") repeat-x;
- font-weight: bold;
- color: #15428B;
- font-size: 11px;
- font-family: tahoma, arial, verdana, sans-serif;
- }
- #functiontitle SPAN{
- position: relative;
- top: 6px;
- left: 5px;
- }
- /*
- .titlearea{
- height: 25px;
- background: url("../images/white-top-bottom.gif") repeat-x;
- font-weight: bold;
- color: #15428B;
- font-size: 11px;
- font-family: tahoma, arial, verdana, sans-serif;
- width: 250px;
- }
- .titlearea SPAN{
- position: relative;
- top: 6px;
- left: 5px;
- }
- */
- #split{
- width: 5px;
- background-color: #D0DEF0;
- }
- #accContainer{
- /*height: 100%;*/
- overflow-y: auto;
- overflow-x: hidden;
- }
- .tabcontainer{
- width: 100%;
- height: 100%;
- }
- .childcontainer{
- height: 100%;
- width: 100%;
- }
- .childbottom{
- height: 1px;
- background: #D0DEF0 url("../images/bg.gif") no-repeat;
- background-size: 100%;
- border: 1px solid #A9BFD3;
- }
- .claro .childbottom BUTTON{
- margin-top: 3px;
- }
- .childdetail{
- height: 1px;
- background: #D0DEF0 url("../images/bg.gif") no-repeat;
- background-size: 100%;
- border: 1px solid #A9BFD3;
- }
- .claro .childdetail BUTTON{
- margin-top: 3px;
- }
- .childtop{
- height: 50px;
- }
- .companylogo{
- background: url("../images/dsi.png") no-repeat;
- width:160px;
- height:68px;
- }
- .statusmessage{
- text-align: right;
- }
- .dijitTextBoxError .dijitValidationIcon
- {
- width: 0px;
- }
- .claro .dijitValidationIcon
- {
- width: 0px;
- }
- .exporticon {
- background-image: url("../images/export.png");
- width: 16px;
- height: 16px;
- }
- .dijitButtonNode {
- z-index: 2;
- }
- .loadingSpinner{
- width: 100%;
- height: 100%;
- background: transparent url("../images/busy.gif") no-repeat center;
- position: absolute;
- z-index: 10000;
- }
- .loadShow .LoadScreen{
- display: none;
- }
- .LoadScreen{
- width: 100%;
- height: 100%;
- background: transparent url("../images/busy.gif") no-repeat center;
- position: absolute;
- z-index: 10000;
- }
- .menubar{
- visibility: hidden;
- }
- #titlebar h1{
- color:red !important;
- }
- .dijitInputField input{
- padding-left:5px;
- }
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".