5 3 2 Link Type

Web Functions Wizard

5.3.2 Link Type

The Link Type defines what will happen when a menu item is selected. The Link Type options are identical to those available in Standard menus. A menu item can be used to:

  • Act as a menu heading or separator.
    Select the No link option. This means that the menu item is not a hyperlink. This option is typically used to identify a sub-menu which will expand under this heading.
  • Use a component.
    Select the Component option. This option allows a LANSA component to be when the link is selected. The code within the component is the responsibility of the developer.
    Components used in DHTML menus must be defined as script type components in the Web Function Editor.
  • Link to a static page or another Web site.
    Select the Static page option. The URL to access the page or the Web site is specified in the field. For example, you might enter http://www.lansa.com to access the LANSA Web site.
    You can choose to launch the link in a new window by selecting the Start in New Window option.
  • Link to another LANSA function.
    Select the LANSA function option. The name of the LANSA process and function are specified in the Process and Function fields respectively. The current partition is assumed when invoking the function.

The Reuse Job and Start in New Window options

You can choose to use the HandleEvent JavaScript function to reuse the same LANSA job at the Application Server by selecting the Reuse Job option. If this option is not selected, the menu item uses an anchor block to link to the LANSA function. In other words, it always runs the LANSA function as a new LANSA job at the Application Server.

You can choose to launch the link in a new window by selecting the Start in New Window option.

The Reuse Job and Start in New Window options are mutually exclusive.

The Optional JavaScript option allows extra parameters to be passed before a LANSA function is called. If it is left blank, it is assumed that no parameters are passed. An example of optional JavaScript is:

       document.LANSA.ANEXTACTION.value='ADD'

This will generate the following syntax for the JavaScript:

"JavaScript:document.LANSA.ANEXTACTION.value='ADD' ;HandleEvent('PROCESSNAME', 'FUNCTIONNAME');"

When adding optional JavaScript, it is your responsibility to make sure that the syntax is correct. The syntax is not validated.

If you choose to link to a non-*WEBEVENT function (i.e. procedural function) from a *WEBEVENT function, you should not select the Reuse Job option. You should launch the link in a new window by selecting the Start in New Window option.