The filter toolbar is defined as a separate toolbar (see Menus and Toolbars), and is passed to emxForm.jsp as a URL parameter. On a form that uses framesets, any toolbar that includes a drop-down menu must be the bottom toolbar. When passing the toolbars to the form, they show in the order in which they are passed so the toolbar with the menu must be the last toolbar listed. This custom toolbar can use the standard toolbar commands, such as the AEFSeparator, plus the input controls defined in Toolbars. If you want to provide a default value for the filter, use the Default setting on the input control. When the form loads, the default values for the input controls are available in the requestMap to fields defined with a Field Type of program or programHTMLOutput. The command names are used as the parameter names in the requestMap. The default values are also available to a specified JPO using an embedded table using the Field Type = emxTable. To apply the filtering, use href= applyFormFilter(), provided as part of the JavaScript API for the framework. The API posts the values entered in the filter input controls, plus the original set of input parameters, to emxForm.jsp. Based on these values, the form output can be changes for fields defined with a Field Type of program or programHTMLOutput. For an embedded table, the new values are retrieved from the requestMap. In this example, the filter toolbar includes 2 input controls: one for the Plant Name and one for the submit button (labelled Filter). The Plant Name control is defined with these settings:
The submit button is defined with these settings:
When the form is loaded, the default value of Unassigned is used to populate the form. If the user selects a different value and clicks the Filter button, the form is updated with the values for the selected Plant Name. |