Progress
ADM 2 Reference
addColumnLink (wbtable.p)
Specifies that a column in the HTML table is to appear with a hyperlink. The necessary attributes to make this happen are specified in the other input parameters.
Parameters:INPUT pcColumn
AS CHARACTER
The name of the column that will be hyperlinked.
INPUT pcURL AS CHARACTER
The linked object. Must be a valid URL reference.
INPUT pcTarget AS CHARACTER
The HTML frame reference that will receive the response.
“
_self”
specifies that the current HTML frame should be used.INPUT pcMouseOver AS CHARACTER
A function that returns a character string that will be displayed on the mouseOver event in the HTML page.
INPUT pcJoinParam AS CHARACTER
Specifies which parameters must be added to the URL in order to join this data-source to the linked object’s data-source. Valid values are:
"
ROWID"
— Adds the parameters
“
ExternalRowids”
with the current rowids as data to the URL, as well as“
ExternalTables”
with the Table property as data.- blank — No join needs to take place and no parameters except the default
“
BackRowids”
are added to the URL. Usually used to return to the calling object.Returns: LOGICALNotes:
- The Wizard creates a link for one selected column, but the function is able to add links to all the columns in the object.
- The Embedded SpeedScript (.htm) files created by the Report wizard show examples of this function call in use.
- The actual HTML code to generate the link is in urlLink with the logic that adds join parameters in urlJoinParams. If the linked object (pcURL) is unspecified, the link will not be generated in the HTML code.
- The parameters ExternalTables and BackRowids are always added to the specified URL, while ExternalObject is added when the data-source is a SmartDataObject.
- The Wizard creates a link for one selected column, but the function is able to add links to all the columns in the object.
- The Embedded SpeedScript (.htm) files created by the Report wizard show examples of this function call in use.
- The actual HTML code to generate the link is in urlLink with the logic that adds join parameters in urlJoinParams. If the linked object (pcURL) is unspecified, the link will not be generated in the HTML code.
- The parameters ExternalTables and BackRowids are always added to the specified URL, while ExternalObject is added when the data-source is a SmartDataObject.
- The linked object must be able to interpret the data specified in the pcJoinParams. This is usually done by specifying that the linked object should be able to use this object’s data-source as an
“
External table or object”
when the object is created in the Wizard. This will generate a comma-separated ExternalTableList property in the linked object, with either a matching pipe-separated ForeignFieldList or two ExternalWhereList and ExternalJoinList properties. The ForeignFieldList property must have an entry that defines a ForeignFields property for the columns that are passed on this link, while the two others have matching entries that specify how the external tables are joined to the query.- The list of columns is the only way to link objects that have SmartDataObjects as data-sources, but can also be used for database queries.
- When the
“
ROWID”
option is used, the external tables are physically added to the receiving dynamic query if they are not already present, and the query–prepare is changed to use the corresponding rowids in the WHERE clause for these tables.- The pcMouseOver needs to reference a function so that the mouse-over text can show current values for the actual row. This can be achieved by letting the function call columnProps in the data-source. The wizard will generate this function to return the text that is specified in the
“
Status”
field in the wizard. You can refer to functions or properties in the actual data-source in this field inside a pair of back-ticks. The code generator will generate this into a valid run-time expression.- All the URL link parameters, including the list of columns, will be added to the linked object’s contextFields property. This guarantees that the linked object stays joined on subsequent requests to perform navigation, transaction, or search.
- All the parameters passed to this function will be added to internal properties that will be used when the HTML code is generated. The column name will be added to the LinkColumns, which is a comma-separated property that holds the name of all the linked columns. The other parameter passed to this function is added to other internal properties the LinkURLs, LinkTargets, LinkTexts, and LinkJoins respectively. All of them are comma-separated except the last one, which is CHR(1)-separated.
Examples:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |