Toolbar Filters for the Structure Browser

You can define a custom toolbar filter for a structure browser page. The custom toolbar is implemented by passing the toolbar URL parameter to emxIndentedTable.jsp.

See Structure Browser for details).

When defining a command for the custom filter toolbar, the command must be a first-level command. For usability issues, ENOVIA recommends that you do not use more than 5 commands on a toolbar. To define the size of the HTML controls (especially when using multiple controls), use the width setting (defined in pixels).

The toolbar must be defined as a menu that holds the commands that specify HTML controls (Input Type of textbox, combobox, or submit) to show in the toolbar. A date control (textbox with calendar icon) can be implemented using the format=date setting (no other format types are supported for custom filters). The controls are added to the toolbar in the order that the commands are listed in the filter menu. The toolbar can contain regular toolbar commands, such as the AEFSeparator. The command must have the href or Code setting specified that calls a JSP (for the href setting) or JavaScript (for the Code setting) that processes whatever the user entered in the control and updates the structure browser based on that selection.

When using a textbox or combobox, you can also define the Action Label setting. When defined, a submit button is provided following the textbox or combobox using the defined Action Label (which can be a string resource). Use the Label administrative parameter for the command to provide a text label in front of the input control. This figure shows a sample control with the settings required to draw it.

When defining the custom filter as a combobox, you can provide the values to populate the list using one of these settings:


  • Range Function/Range Program
  • Range Values
  • Range Display Values

To provide a default value for the control, use the Default setting. The combobox control requires that the default value be one of the defined values.

The href or code called by the control is executed when:


  • Textbox: pressing Enter
  • Combobox: selecting a value
  • Submit: clicking the button

The href defined for the command must be a JSP file in the web root directory, such as ${COMMON_DIR}/emxFilter.jsp. When a submit event occurs, the href is targeted to the frame specified in the Target Location URL parameter. The structure browser page submits all HTML controls specified in all toolbar menus. The JSP code needs to use the values or ignore as appropriate. The timestamp is also passed that defines where the JSP can retrieve the oids for the page.

This code shows a sample JSP for the href called by a filter command:

// Instantiate table bean (if required)
<jsp:useBean id="tableBean" 
class="com.matrixone.apps.framework.ui.UITable" 
scope="session"/> 
<%
    // Get time stamp id for current table from request
    String timeStamp = emxGetParameter(request, "timeStamp"); 
    // Get object & relationship ids
    HashMap tableData = tableBean.getTableData(timeStamp);
    MapList relBusObjList = tableBean.getObjectList(tableData); 
    // Get user inputs from HTML controls
    String sTextboxValue = emxGetParameter(request, "<Name Of 
the Filter Command Representing text box>");
    String sComboboxValue = emxGetParameter(request, "<Name Of 
the Filter Command Representing combo box>"); 
    /*
    **
    ** The code to filter out Object List and refreshing the 
page will go here
    **
    */
%>

As an alternative to a JSP, you can write JavaScript code and enter it in the Code tab (in Business Modeler) for the command. This code must use JSON object syntax, such as shown in this example:



If the only task you want the button to perform is to refresh the structure browser page, you can use this code:

{
    main:function() {
          filterPage();
          }
}

If both an href and JSON code is defined for a command, the JSON code takes precedence and the href link is ignored.