5 7 1 Menu Components

Web Functions Wizard

5.7.1 Menu Components

When you press the Build Menu button, the Web Functions Wizard generates an HTML page for the component. If you do not press the Build Menu button, your menu definition will be saved but any existing menu component will not correspond with the defined menu entries.

When you select the Build Menu button, if you are defining a Left Menu component the Web Functions Wizard generates an HTML page named as:

<process name>_LMENU2

where <process name> is the name of the LANSA process.

If it is the Horizontal Menu component, then the page is named <process name>_HMENU2.

This naming convention allows the Wizard to support DHTML menu and standard menu definitions concurrently. You can define both a DHTML menu and a Standard menu for the same menu component. This will allow you to prototype and experiment with DHTML and Standard menus by varying your Layout Features.

The <process name>_LMENU2 component contains the JavaScript definition of your menu. This component in combination with the <process_name>_LMENU and WIZMNUSCR components define a DHTML menu.

When you build a layout presentation, the component <process_name>_LMENU2 and the component WIZMNUSCR (executable JavaScript) are embedded in the layout page just after the body tag. The <process_name>_LMENU component will be embedded in the layout HTML component at the point where the menu will be displayed. This includes a simple table definition to anchor the menu. For more details, refer to Customizing a Presentation Layout – Technically Speaking.

The following HTML code example shows the HTML of a Layout component, which includes a DHTML menu:

<!-- LANSA for Web Functions Editor -->

<RDML SETTMPFLD="10" VALUE="1">

<RDML SETTMPFLD="11" VALUE="1">

<RDML SETTMPFLD="12" VALUE="1">

<RDML SETTMPFLD="13" VALUE="0">

<RDML SETTMPFLD="14" VALUE="0">

<!--  Layout Scheme #4             -->

 

<html>

<head>

<title><RDML MERGE="&FUNCTION"></title>

<RDML MERGE="&HEADER">

<RDML MERGE="&STYLE">

<RDML MERGE="&SCRIPT">

</head>

 

<body leftmargin="0" topmargin="0"  marginwidth="0" marginheight="0"bgcolor="<RDML MERGE="*LW3CLNTCOLOR">" background="<RDML MERGE="*LW3CLNTBKGND">" <RDML COMPONENT="FORMINIT">>

<script type='text/javascript'>function Go(){return}</script>

<RDML PAGE="XXPROC01_HMENU2">

<RDML PAGE="WIZMNUSCR">

<noscript>Your browser does not support script</noscript>

<table border="0" cellpadding="0" cellspacing="0" width="100%">

<RDML NOTCONDITION="*LW3PCLR1_XXPROC01  ">

 <tr height="84" valign="middle" align="center" bgcolor="<RDML MERGE="*LW3COLOR1">" >

</RDML>

<RDML ONCONDITION="*LW3PCLR1_XXPROC01  ">

  <tr height="84" valign="middle" align="center" bgcolor="<RDML MERGE="*LW3PCLR1_XXPROC01  ">" >

</RDML>

     <td width="150" >

<RDML ONCONDITION="&USETMPFLD14" VALUE="1">  

&nbsp;<img border="0" src="<RDML MERGE="*LW3CPYLOGO">">

</RDML>

    &nbsp;</td>

    <td>&nbsp;

<RDML ONCONDITION="&USETMPFLD13" VALUE="1">  

<RDML COMPONENT="STDBANNER">

</RDML>

    </td>

  </tr>

<RDML NOTCONDITION="*LW3PCLR1_XXPROC01  ">

  <tr bgcolor="<RDML MERGE="*LW3COLOR1">" >

</RDML>

<RDML ONCONDITION="*LW3PCLR1_XXPROC01  ">

  <tr bgcolor="<RDML MERGE="*LW3PCLR1_XXPROC01  ">" >

</RDML>

     <td>&nbsp;</td>

     <td align="center">&nbsp;

<RDML ONCONDITION="&USETMPFLD11" VALUE="1">  

<RDML MERGE="&HMENU">

</RDML>

     </td>

  </tr>

  <tr>

    <td valign="top" align="center">

<RDML ONCONDITION="&USETMPFLD10" VALUE="1">

<br /><br /><RDML MERGE="&LMENU">

</RDML>

    </td>

    <td valign="top" align="center">

<RDML ONCONDITION="&USETMPFLD12" VALUE="1">

      <table border="0" cellpadding="0" cellspacing="0" width="100%">

        <tr>

            <td align="center">

</RDML>

         <br /><RDML FUNCTION>

<RDML ONCONDITION="&USETMPFLD12" VALUE="1">

            </td>

            <td width="130" align="right" valign="top"><br /><br /><RDML MERGE="&RMENU"></td>

      </tr>

    </table>

</RDML>

    </td>

  </tr>

</table>

</body>

</html>