Portlet Factory, Version 6.1.2


 

Contextual Menu builder inputs

This topic describes the inputs for the Contextual Menu builder.

 

General inputs

Table 1. General inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Page location Required. Page or pages on which this builder call acts.
Control Type Required. Specify which page control activates the contextual menu.

  • Portal-style Button

  • Link

  • Image only

  • Hidden (manually invoked)

The default value is Portal-style Button.

Button/Link Text Required. Displayed when you select Portal-style Button or Link as the Control Type input. Specify the text for the button or link, for example, Actions.
Image Required when you select Image only as the Control Type input; optional for other control types. Displayed when you select Portal-style Button, Link, or Image only as the Control Type. Path and file name of the image to be used with the control. The default image is /factory/images/contextualmenu/MenuDropdown.gif.
Menu Content Required. Specify how menu items are generated.

Specify explicitly as builder input

Define the entries and actions as builder inputs.

Indirect Reference

Specify a method to generate the menu items.
Use Compact Notation Set to have the builder generate JavaScript output for the menu instead of HTML output. This option can reduce HTML page size but is not fully compatible with the HTML-based menu implementation.

This input is available if the Menu Content input is set to Indirect Reference.

Menu Items Required. Displayed when you select Indirect Reference as the Menu Content input. Click the ellipses (. . .) to use the reference chooser to specify a method, variable, or data service that is to contain the schema-typed menu data.

 

Menu Item Info

The inputs in this group appear if the Menu Content input is set to Specify explicitly as builder input.

Table 2. Menu Item Info inputs
Input Name Description
Type Required for each row in the Menu Item Info list. The value is one of the following:

Menu Item

Adds an entry to the menu.

Separator

Adds a horizontal line that separates menu items.

The default is Menu Item.

Text for Item Required if you select Specify explicitly as builder input as the Menu Content input. Label for the menu item.
Action Type Defines the behavior of the action. Choose an action type based on the action that will process the onClick event and whether you want to process any form inputs as part of that action.

Submit form and invoke action

Choose this option if the specified action is a method in the model or LJO and that method processes the inputs to the form on which the menu item resides.

Submit form and invoke URL

Choose this option if the specified action that will process the inputs to a form is a URL outside of IBM® WebSphere Portlet Factory Designer. The specified URL receives the form input values as name/value pairs appended to the URL.

Link to an action

Choose this option if the specified action is a method in the model or LJO (including service calls) that acts as a simple link, transferring control directly to the specified URL. The specified action cannot process any form inputs.

Link to a URL

Choose this option if you want to navigate to a non- WebSphere Portlet Factory Designer URL. The URL cannot process any form inputs.

Run a script

Choose this option if you want this action to run some client-side JavaScript when a user clicks a menu item. The script cannot process any form inputs.
Action Optional. Displayed when you select Submit form and invoke action or Link to an action as the Action Type input. Use the action chooser to select which action to perform.
URL Optional. Displayed when you select Submit form and invoke URL or Link to a URL as the Action Type input. Specify the URL to execute when the user clicks the menu item.
Form Name Optional. Displayed when you select Submit form and invoke action or Submit form and invoke URL as the Action Type input. If the builder is in one form or frame and the form to be submitted is in another, enter the name of the form whose inputs you want to submit.
Input Mappings Optional. Displayed when you select Submit form and invoke action, Submit form and invoke URL, Link to an action, or Link to a URL as the Action Type input. You can pass arguments to the specified action by adding argument names and the value to be passed to them. Click the ellipses (...) to use the reference chooser to specify input values or values returned by methods or service calls as the value to be passed to an argument for the specified action.
Evaluate arguments Optional. Displayed when the action you specify takes an argument. Select one of the following:

  • When the action is run

  • As the page is rendered
Script to Execute Optional. Displayed when you select Run a script as the Action Type input. JavaScript to link to when the specified event occurs.

Note: Do not use comments in the script you specify. The script you specify is added as one line, so any code following comments is ignored.

Enable Rule Required. Select one of the listed rules with which to enable the menu item:

Always Enable

The menu item is enabled under all conditions. This is the default value.

Enable when Value is "true"

Enables the menu item when the selected value returns a condition of true.

Enable when Value equals Comparison Value

Enables the menu item when Value and Comparison Value are equal.

Enable when Value does not equal Comparison Value

Enables the menu item when Value and Comparison Value are not equal.

Never Enable (used for profiling)

Disables the menu item.
Value Required. Displayed when you select Enable when Value is "true" as the Enable Rule input. Specify the value to be used or click the ellipses (...) to use the reference chooser to select a value.
Comparison Value Required. Displayed when either Enable when Value equals Comparison Value or Enable when Value does not equal Comparison Value is selected as the Enable Rule input. Enter the value to be used in the compare operation or click the ellipses (...) to use the reference chooser to select a value.

 

Appearance

Table 3. Appearance inputs
Input Name Description
Position of Contextual Menu items Required. Displayed when you select Portal-style Button, Link, or Image only as the Control Type input. Specify where the menu items are to pop up relative to the menu control:

  • Left

  • Right

  • Left Bottom

  • Right Bottom

The default value is Right.

 

Advanced

Table 4. Advanced inputs
Input Name Description
Base HTML File Required. Select a base HTML page that contains the HTML and JavaScript code that is used to generate the contextual menus. The default file is /factory/pages/contextual_menu.jsp.
Stylesheet Optional. Select a style sheet containing custom .CSS classes that define the look and feel of the contextual menu. The default style sheet is /factory/pages/contextual_menu.css.

Parent topic: Contextual Menu builder


Library | Support |