Components of a Dynamic GridA dynamic grid matrix is built from:
When calling emxGridTable.jsp, these URL parameters are required:
Table Used for the Dynamic GridThe default table used for a dynamic grid is AEFDynamicGrid. You can clone this table and edit it for your needs, or you can define your own table. If you specify a table, it must include a dynamic column. See Dynamic Columns. Specifically, the dynamic column must have these settings defined:
You must use the exact function and program values shown here. If you want the dynamic grid to be able to search or filter the table data, the table you specify must have a Name column with these settings:
Editable Dynamic Grid TablesDynamic grid tables can be editable. Add the editLink=true URL parameter to make the edit view of a dynamic grid available. When editing a text input field, the user can enter a new value or the delkeyword to delete the intersection. For range-based attributes, one of the range values is **Delete**. Parameters for RowsemxGridTable.jsp accepts several parameters to define the rows in the dynamic grid table. The rowRelationship parameter works similar to the relationship URL parameter for the structure browser (see Expand Objects Using Relationship). The dynamic grid uses the specified relationships (you can pass a comma-separated list of relationships) to determine the rows to include for the context object. As an alternative, you can use a JPO (see rowJPO) to determine the rows for the grid table. The rowDirection parameter works similar to the direction URL parameter for the structure browser. If you use the rowRelationship parameter, this parameter is required. The rowType parameter defines which business object types can be displayed as rows. By default, all business object types are included so that any type supported by the relationship can be included as a row. If you want to limit the types, pass this URL parameter with a comma-separated list of the valid types for the specific dynamic grid. The rowExcludeIntermediateRel parameter allows you to omit intermediate objects. For example, if your data model connects from the context object type to one type (Type A), and then that type to another (Type B), your business process might only need to show rows for Type B objects. This structure is not common. The value of this parameter is usually the first relationship defined by rowRelationship. Only use this parameter if your data includes an intermediate object for every given object that should show in the dynamic grid. The rowBusWhereClause parameter lets you use an MQL select clause to filter which rows show in the dynamic grid. This parameter accepts any valid select clause for the specific business object. If the select clause filters out an object, all children of that object are also filtered out. The rowRelWhereClause parameter lets you use an MQL select clause to filter which rows show in the dynamic grid. This parameter accepts any valid select clause for the specific relationship. The levelsToDeriveRowData parameter lets you limit how many levels of data to add to the dynamic grid. By default, all levels are included. Use the flatView=true parameter if you want the dynamic grid to display as a flat table with no structure. If you use this parameter, emxGridTable.jsp does not show the root object and removes any duplicate rows. Parameters for ColumnsemxGridTable.jsp accepts several parameters to define the columns in the dynamic grid table. The colRelationship parameter defines which objects to use as columns for the dynamic grid. You can specify a comma-separated list of relationship names. If you do not specify this parameter, emxGridTable.jsp defines the columns based on the cellRelationship parameter. For example, if the rows in the grid are people within a company, you could define colRelationship=Division. The dynamic grid includes a column for each division that has a person in the list assigned to it. The cell values would show the intersection between person and division. If you specify a colRelationship parameter, you also need to specify the colDirection parameter to indicate the from/to direction for the indicated relationship. The colType parameter lets you filter which business object types can be used as columns. By default, all types supported by the defined relationships can be used as columns. You can provide a comma-separated list of business object types. The levelsToDeriveColumnData parameter works with the cellRelationship parameter to determine the columns for the dynamic grid. If you use the colRelationship parameter to specify columns, do not specify this parameter. Use the colLabel parameter to define an optional heading for the column. By default, the object Name is used, but you can specify any valid attribute or selectable. If you specify the colLabel parameter, you must use the colLabelType parameter to define if colLabelType is a RelAttr (relationship attribute), TypeAttr (business object attribute), RelBasic (basic property of the relationship) or Basic (basic property of the business object). Use the colGroup and colGroupType parameters to define column group headings. These parameters work the same as colLabel and colLabelType, or you can use a hard-coded label or string resource for the group column heading. Use the colHyperlinkTreeCategory parameter ifyou want to include a hyperlink in the column heading. You can use the keyword Default to indicate the default category for that object, or a specific category name. If you do not use the Name column in the table AND you want to use a Filter or Find command on the toolbar, you must specify the nameSelectable parameter. This parameter requires an MQL expression to use for searching and filtering the data in the dynamic grid. In addition, the Name column for the table must have these settings defined:
Parameters for CellsemxGridTable.jsp accepts several parameters to define the cell values in the dynamic grid table. The cellRelationship parameter identifies the relationship used to determine the value for the cell. By default, the intersection value is shown as an X or the value of the cellLabel parameter, but you can also use the cellValueStyle parameter to specify a text value, the color of the cell, or any other formatting. If you use the cellRelationship parameter, then you must also specify the cellDirection parameter. Use the cellIdRelationship parameter if the value you want to display in the cell is defined by a relationship (rel-to-rel) between the row and column objects. If you use the cellIdRelationship parameter, then you must also use the cellIdDirection parameter. Use the cellLabel parameter to define the value for a cell. By default, X is used to indicate the intersection of the row/column, but you can specify any valid attribute or selectable. If you specify the cellLabel parameter, you must use the cellLabel parameter to define if cellLabel is a RelAttr (relationship attribute), TypeAttr (business object attribute), RelBasic (basic property of the relationship) or Basic (basic property of the business object). User-Selected Rows or Columns emxGridTable.jspYou could have a business need to let your user select the information they want to view in the dynamic grid. These URL parameters can be used to instruct emxGridTable.jsp to use row selections from the originating table or structure browser page as the rows or columns in the grid table. The user can select one or more rows prior to clicking the command for use in the dynamic table, otherwise the command either remains disabled (gray) or uses all rows in the table.
For example, a table (built using emxIndentedTable.jsp) could show a task list. The user could select any number of tasks, and then select a command that calls emxGridTable.jsp and includes the URL parameter useRowSelectionsAsRows=true. The report would list only those tasks, and the columns and intersecting cell data could be defined using other URL parameters. When using these parameters, the command that calls emxGridTable.jsp must include the setting Submit set to true, and optionally define the Row Select setting (accepts values of single or multi or none). ToolbarBy default, the dynamic grid table uses the AEFGridFilterToolbar that includes Find/Filter functions. You can replace this toolbar by passing a specific toolbar to emxGridTable.jsp. If you want to use both the AEFGridFilterToolbar AND a custom toolbar, pass both names to emxGridTable.jsp, the same as you would for any page that has multiple toolbars. For example: toolbar=AEFGridFilterToolbar,MyCustomToolbar The default toolbar looks like this: Cell StylesYou can use URL parameters to define the cell color and text style based on its value. You can specify which style in the Indented Table CSS (emxUIStructureBrowser.css) to use based on either the cell's value or the relationship used to populate the cell. Or, you can provide the style as part of the URL parameter's value. These URL parameters can be used: If you do not specify a style, the default cell style is used. cellValueStyleThis URL parameter determines which style to use based on the cell's value. This URL parameter uses a set of 3 pipe-separated values to define the style for each cell value. cellValueStyle=Value|Short value|Style For example: cellValueStyle=Standard|S|Green|Optional|O|Yellow In this example, a style is specified for when the cell value is either Standard or Optional. Style can be a pre-defined style defined in emxUIStructureBrowser.css, or you can define it here. This code snippet shows a sample of defining the style as part of the URL parameter definition: Standard|S|background-color: lightgreen; text-align:center; font-family: Arial; font-size: 11px; font-weight: bold; cellRelationshipStyleThis URL parameter determines which style to use based on the relationship used to populate the cell value. This URL parameter uses a set of 3 pipe-separated values to define the style for each relationship used to determine a cell's value: cellRelationshipStyle=Relationship|Display|Style For example: cellRelationshipStyle=EBOM|XX|Green|MBOM|ZZ|Blue In this example, a style is specified for when the cell value is determined based on the EBOM or MBOM relationships. The relationships used in the parameter must be defined in the cellRelationship parameter. Style can be a pre-defined style defined in emxUIStructureBrowser.css, or you can define it the same way as for cellValueStyle. JPOs to Define Rows / ColumnsUsually, the URL parameters can be used to completely define the dynamic grid. However, if you need additional functionality, you can use a JPO to determine rows, columns, and cell values. You can use these parameters in conjunction with other URL parameters to design the dynamic grid to support the business process. You can use any of these URL parameters to call JPOs: rowJPOThe rowJPO URL parameter lets you specify a JPO:method to determine the rows and values for the dynamic grid. The JPO must accept these input parameters:
The JPO must return a MapList of key/value pairs with these keys:
colJPOThe colJPO URL parameter lets you specify a JPO:method to determine the column headings for the dynamic grid. The JPO must accept these input parameters:
The JPO must return a MapList of maps where each map represents a column object of key/value pairs with these keys:
cellRangeJPOThe cellRangeJPO URL parameter lets you specify a JPO:method to determine the range values for a cell when in Edit mode. The JPO must return a map of range values. The input and output of the JPO should be based on the column definition and requirements as with any structure browser cell. cellUpdateJPOThe cellUpdateJPO URL parameter lets you specify a JPO:method to modify the cell values when in Edit mode. the JPO must accept these input parameters:
The JPO returns an optional string. For add events, the return is used as the new relId. |