displayInfo and displayAttribute Tags
Description
This feature allows you to display global attributes of your choice on the datasets page in the Information row.
Usage Instructions
These tags can only be used with the Sax parser. To enable and use them, follow these steps:
-
Enable the SAX Parser: Add the following line to your
setup.xmlfile:<useSaxParser>true</useSaxParser> -
Add Tags in
datasets.xml: In thedatasets.xmlfile, include two top-level tags:<displayInfo></displayInfo>
<displayAttribute></displayAttribute> -
Default Behavior:
- If these tags are not added or left empty in the
datasets.xmlfile, the default values are applied as follows:displayInfo:Summary,LicensedisplayAttribute:summary,license
- If these tags are not added or left empty in the
-
Ensure Consistency: The number of comma-separated values in both
displayInfoanddisplayAttributetags must be the same.
How It Works
- The
displayAttributetag specifies global attributes (defined within the <addAttributes> tag) to be displayed for each dataset. - The corresponding values in the
displayInfotag are displayed as labels in theInformationrow of the UI. - When the user hovers over the displayed labels, a tooltip will appear, showing the value of the global attribute.
Example
<displayInfo>Display1,Display2</displayInfo>
<displayAttribute>att1,att2</displayAttribute>
Dataset Global Attributes Example:
<att name="att1">This is att1</att>
<att name="att2">This is att2</att>
UI Behavior:
- The words
Display1andDisplay2will be displayed in theInformationrow on the UI. - When hovered, tooltips will display the corresponding attribute values:
Display1: Tooltip shows This is att1Display2: Tooltip shows This is att2
Notes
- Ensure the attribute names specified in the
displayAttributetag match the global attributes defined in the dataset. - Incorrect or missing attributes will log error messages.
By following these steps, you can customize the Information row on the datasets page to display relevant global attributes with corresponding tooltips.