Dynamic Header

LANSA Web Functions

Dynamic Header

LANSA for the Web provides support for dynamic display of buttons in the Standard Header.

This means that you can define all the buttons used in your applications in the Standard Header component. By encapsulating each of these buttons with the <RDML BUTTON> tag, LANSA for the Web will dynamically enable or disable the particular button, according to its status in your application.

<img src="<RDML MERGE="*LW3CPYLOGO">" alt="Logo" /><br />

<RDML BUTTON="&WEBEVENT">

<script type="text/javascript" language="javascript">

//<![CDATA[

function ButtonClick(button)

{

   document.LANSA._BUTTON.value=button; document.LANSA.submit();

}

//]]>

</script>

</RDML>

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

<tr valign="bottom">

   <td width="470" height="21" nowrap="nowrap">

<RDML BUTTON="&EXIT">

   <a href="javascript:ButtonClick('HOME');"><img src="/IMAGES/TB_HOME.GIF" alt="Home" border="0" width="55" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&CANCEL">

   <a href="javascript:ButtonClick('MENU')"><img src="/IMAGES/TB_MENU.GIF" alt="Menu" border="0" width="55" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&WEBEVENT">

   <a href="javascript:ButtonClick('OK')"><img src="/IMAGES/TB_NEXT.GIF" alt="Next" border="0" width="55" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&CANCEL">

   <a href="javascript:ButtonClick('CANCEL')"><img src="/IMAGES/TB_BACK.GIF" alt="Back" border="0" width="55" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&ADD">

   <a href="javascript:ButtonClick('ADD')"><img src="/IMAGES/TB_ADD.GIF" alt="Add" border="0" width="45" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&CHANGE">

   <a href="javascript:ButtonClick('CHANGE')"><img src="/IMAGES/TB_CHG.GIF" alt="Change" border="0" width="65" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&DELETE">

   <a href="javascript:ButtonClick('DELETE')"><img src="/IMAGES/TB_DLT.GIF" alt="Delete" border="0" width="65" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&PROMPT">

   <a href="javascript:ButtonClick('PROMPT')"><img src="/IMAGES/TB_SRCH.GIF" alt="Search" border="0" width="70" height="21" hspace="0" vspace="0" align="left" /></a>

</RDML>

<RDML BUTTON="&WEBEVENT">

   <a href="javascript:GetHelp()"><img src="/IMAGES/TB_HELP.GIF" alt="Help" border="0" width="55" height="21" hspace="0" vspace="0" /></a>

</RDML>

   </td>

</tr>

</tbody></table><br clear="all" /><br />

 

Dynamic headers are very powerful as the buttons shown in the header, when the function is executed, are the buttons that are enabled for the function. This is unlike static headers, where the displayed buttons may not be valid for the function.

For example, in one of your functions, you have disabled the Exit key. This will be detected in dynamic headers and the Exit key (and hence the Home button) will not be displayed. However, in static headers, the Exit key (and hence the Home button) will still be displayed if the Exit key was defined in your static header.

Dynamic headers allow you to define all the buttons used in your application in a single Web component, the STDHEADER component. LANSA for the Web will then determine the status of each button in the component dynamically.

It is recommended that you incorporate the dynamic buttons support provided as the default header style in LANSA Web function applications.

 

The dynamic header style page shipped with LANSA for the Web uses a Tool Bar to display the buttons. The trend in Web applications is to use Tool Bars instead of images to represent actions.

LANSA for the Web provides you with a collection of images in GIF format. These images are used to build the Tool Bar in the STDHEADER component. These images are prefixed with 'TB_'. LANSA for the Web also provides you with templates of images that can be used to create your own set of images for the Tool Bar. The images were created using Paint Shop Pro.

This is the default header style in LANSA for the Web. This style page is also contained in the STDHEADER_STYLE2 page in your system.

If you have changed the header style and you want to restore the default header style, then copy the STDHEADER_STYLE2 page to be the STDHEADER page in your system.