Try OpenEdge Now
skip to main content
Managed Adapters Guide
Database Managed Adapter : Working with the Database Adapter : Configuring the Database Adapter : Displaying multiple rows selection
 
Displaying multiple rows selection
The CachedRowSet object, returned by the adapter when the "Expect Multiple Rows" option is checked, can be displayed on a Web application or BP Server JSP page by using the displayResultSet tag. The dataslot to be displayed should be configured as an Input or Input/Output dataslot for that workstep.
You can edit the JSP page, replacing the following tag
<bizsolo:getDS name="DS_NAME"></bizsolo:getDS>
with
<bizsolo:displayResultSet name="DS_NAME"/>
to display the table.
Note: You can edit only custom JSPs to replace the tag for CachedRowSet object.
Here, DS_NAME is the name of the dataslot containing the CachedRowSet object. The tag generates HTML presentation for the dataslot.
The default look of the table can be modified, by specifying additional attributes to the displayResultSet tag. The full list of attributes is shown below:
<bizsolo:displayResultSet
    name = "DS_NAME"
    tableOptions = "TABLE_OPTIONS"
    headerOptions = "HEADER_OPTIONS"
    bodyOptions = "BODY_OPTIONS"
    altBodyOptions = "ALT_BODY_OPTIONS"
    headerFontOptions = "HFOPTS"
    bodyFontOptions = "BFOPTS"
    headerTags = "HT1,HT2"
    bodyTags = "BT1,BT2"
    columnOptions = "COL_OPT1,COL_OPT3"
    columnNames = "COL1,,COL3"
    startFrom = "START_FROM"
    maxRows = "MAX_ROWS"
/>
Most of these tags are directly related to the HTML that are generated. The attribute values are directly inserted in specific places of the HTML, as shown below:
<TABLE TABLE_OPTIONS>
<TR HEADER_OPTIONS>
    <TD COL_OPT1><HT1><HT2><FONT HFOPTS>COL1</FONT></HT2></HT1>
    </TD>
    <TD COL_OPT3><HT1><HT2><FONT HFOPTS>COL3</FONT></HT2></HT1>
    </TD>
</TR>
<TR BODY_OPTIONS>
    <TD COL_OPT1><BT1><BT2><FONT BFOPTS>data</FONT></BT2></BT1>
    </TD>
    <TD COL_OPT3><BT1><BT2><FONT BFOPTS>data</FONT></BT2></BT1>
    </TD>
</TR>
<TR ALT_BODY_OPTIONS>
    <TD COL_OPT1><BT1><BT2><FONT BFOPTS>data</FONT></BT2></BT1>
    </TD>
    <TD COL_OPT3><BT1><BT2><FONT BFOPTS>data</FONT></BT2></BT1>
    </TD>
</TR>
    ...
</TABLE>
Table 10 describes the attributes used.
Table 10. Attributes used in configuring the Database Adapter
Attribute
Function
name
Specify the name of the dataslot.
columnNames
By default, table header is generated by the names of the database table fields. The columnNames attribute includes a comma-separated list of alternative (human-readable) values, to be used in the table header. Some of the column names can be left empty-this means that the corresponding column is not displayed. For example, assuming that a DB query returns a result set with three fields, COL1, COL2¸ and COL3, setting the columnNames attribute to columnNames = "Column 1, ,Column 3" display only the first and third column, and changes the names displayed in the header from COL1 and COL3 to Column 1 and Column 3.
startFrom maxRows
In case the result set contains a large number of records, these two tags allow you to display only a portion of this result set. With the startFrom attribute you can set the first row to be displayed (starting from 1), while the maxRows attribute limits the maximum number or rows that the table contains. All rows, outside of the section defined with the startFrom and maxRows attributes, are not displayed.
headerTags bodyTags
Tags for controlling the appearance of the data in the cells of the table header and body. Each of these attributes contain a comma-separated list of tag names that are placed in pairs around each value in the header and body. For example, headerTags="B,I" generates the following in each cell of the table header:
<B><I>header data</I></B>
tableOptions headerOptions bodyOptions altBodyOptions header FontOptions bodyFontOptions columnOptions
Additional attributes for modifying the table style. Use standard HTML options for the values of each of these attributes. For example: headerOptions = "bgcolor=red" changes the background color of the table header to "red". Consult the HTML specification for more information.