Advanced Customization > Info*Engine User’s Guide > Display Webject Reference > Display Webjects for HTML > Display-Table
  
Display-Table
DESCRIPTION
Displays an Info*Engine group as an HTML table.
SYNTAX
<ie:webject name="Display-Table" type="DSP">
  <ie:param name="ATTRIBUTE" data="attribute"/>
  <ie:param name="BORDER" data="[pixels | 1]"/>
  <ie:param name="FOOTER" data="anytext"/>
  <ie:param name="GROUP_IN" data="group_name"/>
  <ie:param name="HEADER" data="[header_text | NONE]"/>
  <ie:param name="HYPER_VALUE" data="attribute_value"/>
  <ie:param name="HYPERLINK" data="[attribute | NONE]"/>
  <ie:param name="MAX" data="maximum"/>
  <ie:param name="PATH_INFO" data="attribute_value"/>
  <ie:param name="START" data="starting_element"/>
  <ie:param name="TEMPLATE_URL" data="url"/>
  <ie:param name="WIDTH" data="[character_width | 11]"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
HYPERLINK
ATTRIBUTE
HYPER_VALUE
BORDER
PATH_INFO
FOOTER
TEMPLATE_URL
GROUP_IN
HEADER
WIDTH
MAX
START
ATTRIBUTE
Specifies the name of the database attributes you want to display. The HEADER parameter takes precedence over ATTRIBUTE when determining the header titles displayed above each column. The default for this parameter is to display all attributes contained in the first element of the GROUP_IN parameter. If the first element doesn't contain the desired column, multiple ATTRIBUTE parameters must be used to specify the columns to display. Multiple values can be specified for this parameter. This parameter is optional.
BORDER
Determines the width, in pixels, of the HTML table border around the entire group of information to be displayed. If BORDER is specified, lines and rows are created. If BORDER is specified with a value of "", no border is drawn. If BORDER is not specified, the default value is 1. This parameter is optional.
FOOTER
Specifies the information to be displayed at the bottom of the table. If specified, the value of this parameter can be anytext. The default behavior for this parameter is that no footer is displayed. This parameter is optional.
GROUP_IN
Identifies the name of the group to be used as an input source. The group can be a VDB group or a Context group. For further information about groups, see Info*Engine Data Management.
The default for this parameter is to use the last group defined in the VDB. This parameter is optional.
HEADER
Specifies the header title or list of header titles to be displayed above each column. This parameter takes precedence over the attribute name in determining the header titles. If HEADER is set to NONE, then no headers are displayed.
While multiple values can be specified for this parameter, the number of HEADER values must match the number of ATTRIBUTE values. This parameter is optional.
HYPER_VALUE
Specifies the attributes used to generate CGI-data for the hyperlinks that are generated for the attributes specified by the HYPERLINK parameter. All the attributes are added to all the hyperlink values generated. Multiple values can be specified. If no values are specified, the default is to use the attributes specified by the HYPERLINK parameter. Specifying an attribute causes a CGI-data string to be added to the generated hyperlink of the form <attribute_name>=<attribute_value>. HYPERLINK must be specified in order to use this parameter.
HYPERLINK
Specifies a list of attributes that should have hyperlinks generated for them. If any HYPERLINK parameters are specified, you must specify a TEMPLATE_URL for each attribute specified by this parameter.
The default for this parameter is that no hyperlinks are generated. Multiple values can be specified for this parameter.
MAX
Defines the maximum number of elements to display. Specifying a value for this parameter allows control over how much data is returned through the webject.
By using parameter value substitution for the MAX and START parameters, a series of webjects can be coded that allow the data in any group to be displayed in manageable result sets. For more information, see Dynamic Parameter Value Substitution.
The default for this parameter is to display all remaining elements in the group, starting with the element identified in the START parameter. This parameter is optional.
PATH_INFO
Specifies additional path information to insert at the end of a URL specified with the TEMPLATE_URL parameter. This string must be manually CGI-encoded to prevent the generation of invalid URLs. If no values are specified, no additional text is added to the generated URLs. The number of values specified for this parameter must equal the number of attributes specified with the HYPERLINK parameter. An empty string can be specified. The values of this parameter are associated with the HYPERLINK parameter values in the order encountered. HYPERLINK must be specified in order to use this parameter. Multiple values can be specified for this parameter.
START
Specifies the number of the first element in the group to display. Use this parameter in conjunction with the MAX parameter to control how much data is returned through the webject.
By using parameter value substitution for the MAX and START parameters, a series of webjects can be coded that allow the data in any group to be displayed in manageable result sets. For more information, see Dynamic Parameter Value Substitution.
The default for this parameter is to start with the first record in the group. This parameter is optional.
TEMPLATE_URL
Specifies the base URL or list of base URLs to be used when generating hyperlinks for the attributes specified with the HYPERLINK parameter. There must be a URL for every attribute specified with the HYPERLINK parameter. The values of this parameter are associated with the HYPERLINK parameter values in the order encountered. If a TEMPLATE_URL parameter value contains the string “mailto:”, then the associated HYPERLINK parameter value is assumed to be an email address, and an HTML mailto URL is constructed.
HYPERLINK must be specified in order to use this parameter. Multiple values can be specified for this parameter.
WIDTH
Specifies a list of the widths of each attribute column. Unless you use a pre-formatted text table, HTML does not allow a length longer than the longest data. The default value of this optional parameter is 11 characters. Multiple values can be specified for this parameter. This parameter is optional.
EXAMPLES
The following Display-Table webject examples assume an input group containing multiple elements; each with a name, address and email attribute value:
DEFAULT DISPLAY
In the following example, all of the information is displayed using the default values for the table:
Webject
<ie:webject name="Display-Table" type="DSP"/>
Output
Generated HTML
<table border=1>
  <tr><th>NAME </th><th>ADDRESS </th><th>EMAIL</th></tr>
  <tr><td>Sam Johnson</td><td>1234 Main
                   St.</td><td>sjohnson@somewhere.com</td></tr>
  <tr><td>Harvy Anderson</td><td>1234 Amber
                  St.</td><td>handerson@somewhere.com</td></tr>
  <tr><td>James O'Connor</td><td>775 Main
                                   St.</td><td>&nbsp;</td></tr>
  <tr><td>Harvey Hampton</td><td>775 Main
                   St.</td><td>hhampton@somewhere.com</td></tr>
</table>
NO BORDERS, NO HEADERS
Webject
<ie:webject name="Display-Table" type="DSP">
  <ie:param name="BORDER" data=""/>
  <ie:param name="HEADER" data="none"/>
</ie:webject>
Output
Generated HTML
<pre>
Sam Johnson
1234 Main St.
sjohnson@somewhere.com
Harvy Anderson
1234 Amber St.
handerson@somewhere.com
James O'Connor
775 Main St.
&nbsp;
Harvey Hampton
775 Main St.
hhampton@somewhere.com
</pre>
MULTIPLE COLUMNS
The following example shows a table with multiple columns. The ATTRIBUTE parameter specifies the information to display with a comma serving as the delimiter. The BORDER parameter overrides the default value.
Webject
<ie:webject name="Display-Table" type="DSP">
  <ie:param name="BORDER" data="10"/>
  <ie:param name="ATTRIBUTE" data="email,address" delim=","/>
</ie:webject>
Output
MULTIPLE COLUMNS WITH ALTERNATE NAMES
The following example shows the header with a different name. The WIDTH parameter overrides the default. A comma is used as a delimiter, and FOOTER text follows the table.
Webject
<ie:webject name="Display-Table" type="DSP">
  <ie:param name="ATTRIBUTE" data="address,email" delim=","/>
  <ie:param name="HEADER"
            data="Email Address,Home Address" delim=","/>
  <ie:param name="WIDTH" data="20,20" delim=","/>
  <ie:param name="FOOTER" data="email address and home address"/>
</ie:webject>
Output
HYPERLINKED COLUMNS
In the following example, the HYPERLINK parameter identifies the columns that contain hyperlinks. The WIDTH parameter overrides the default.
Webject
<ie:webject name="Display-Table" type="DSP">
  <ie:param name="HYPERLINK" data="email"/>
  <ie:param name="HYPERLINK" data="name"/>
  <ie:param name="TEMPLATE_URL"
                            data="mailto:abc@somecompany.com"/>
  <ie:param name="TEMPLATE_URL"
                       data="http://machine/somecompany.html"/>
  <ie:param name="PATH_INFO" data=""/>
  <ie:param name="PATH_INFO" data="class=employees"/>
  <ie:param name="HYPER_VALUE" data="Name,Address,Email"
                                                    delim=","/>
</ie:webject>
Output