9.2 Add configurations in the Metadata Tables
The report generation system relies on the following metadata tables
DIGX_CM_TABLE_METADATAStores information about each table.
Table 9-1 Field Description
Property Description TABLE_CODEUnique identifier for each table. SUPPORTED_DOWNLOAD_TYPESMedia types supported for download. Supported values are ‘pdf’ and ‘csv’. PAGINATION_TYPEThe type of pagination supported. Supported values are ‘S’ and ‘V’. Static (‘S’) refers to a one time fetching of all records. Virtual (‘V’) refers to virtual fetching of records. ACTION_COMPONENTThe path of the UI component present in channel folder for which gets loaded on click of a row. TABLE_HEADERComma Separated Values for Report and UI Screen Headers. Please note headings are NLS supported. The file name should be <TABLE_CODE>.properties and maintain at location “config/resources/nls/tablemetadata” with the keys and values. Example: BrandManagement, ManageBrand
Here the BrandMangement header key will be used for reports and ManageBrand will be used for UI screen.
Incase the second value is missing. The UI screen won’t show the header.
Example: BrandManagementTABLE_HEADERThe heading to show on the table. Please note headings are NLS supported. The file name should be <TABLE_CODE>.properties and maintain at location “config/resources/nls/tablemetadata” with the keys and values. ROW_IDUnique identifier for each record in a table. SERIAL_NUMBER_REQUIREDFlag to enable serial numbers on the user interface. Supported values are ‘Y’ to enable and ‘N’ to disable. MAX_COLUMNSProperty to limit the number of columns a PDF can show. Default is 6 which can be changed by updating this property. Example
Insert into DIGX_CM_TABLE_METADATA (TABLE_CODE,SUPPORTED_DOWNLOAD_TYPES,PAGINATION_TYPE,ACTION_COMPONENT,TABLE_HEADER,ROW_ID, SERIAL_NUMBER_REQUIRED,MAX_COLUMNS) values ('ManageBrandBrand','csv,pdf','S','theme-config/review-theme', 'brand,brand','brandId',null,4);
Description of the illustration consistent-ui-download3.pngDIGX_CM_COLUMN_METADATAStores information about columns available for a given table.
Table 9-2 Field Description
Property Description TABLE_METADATA_IDUnique identifier for each table. Many to one relationship to DIGX_CM_TABLE_METADATA table and TABLE_CODE column. NAMEThe name of the column with NLS support. Maintain the file with the name "<TABLE_CODE>.properties" at the location "config/resources/nls/tablemetadata" along with the corresponding keys and values. Avoid creating duplicate files, as this file already contains the TABLE_HEADER for the DIGX_CM_TABLE_METADATA table. COMPONENT_IDCustom component created for user interface. Used to add custom formatting for specific columns. Default value is ‘null’. DATATYPEThe supported datatypes are String, Number, Date, Currency and Complex. Similar to COMPONENT_ID, which is purely use for UI rendering; Datatypes is for report generation. PATHFor value fetching, use the data path. The root path of a record is represented by the dot operator ('.'). Use the root path if the entire data object is required. Alternatively, use specific JSON paths when only specific values are required, example "Person.name", here we read name from the Person object. FIXEDTo view column on some condition, Supported values are ‘Y’ to enable and ‘N’ to disable. SORTABLEFlag to enable serial numbers on the user interface. Supported values are ‘Y’ to enable and ‘N’ to disable. DOWNLOADABLEThe column support for download. Supported values are ‘Y’ to enable and ‘N’ to disable. MIN_WIDTHThe minimum width of the column. MAX_WIDTHThe maximum width of the column. SEQUENCE_NOThe position of the column in the table. LENGTHThe width of the column. The sum of all column lengths for a table code should be 100 to avoid overflow and underflow of table content. If not mentioned framework will auto size the widths. Example
Insert into DIGX_CM_TABLE_METADATA (ID,TABLE_METADATA_ID,NAME,COMPONENT_ID,DATATYPE,PATH,FIXED,SORTABLE,DOWNLOADABLE,SEQUENCE_NO,LENGTH) values ('ManageBrandBrandthemeName','ManageBrandBrand','themeName',null,'String','brandName','Y','Y','Y',1,null);Insert into DIGX_CM_TABLE_METADATA (ID,TABLE_METADATA_ID,NAME,COMPONENT_ID,DATATYPE,PATH,FIXED,SORTABLE,DOWNLOADABLE,SEQUENCE_NO,LENGTH) values ('ManageBrandBrandthemeDesc','ManageBrandBrand','themeDesc',null,'String','brandDescription','N','Y','Y',2,null);Insert into DIGX_CM_TABLE_METADATA (ID,TABLE_METADATA_ID,NAME,COMPONENT_ID,DATATYPE,PATH,FIXED,SORTABLE,DOWNLOADABLE,SEQUENCE_NO,LENGTH) values ('ManageBrandBranddateCreated','ManageBrandBrand','dateCreated','formattedDate','Date','creationDate','Y','Y','Y',3,40);Insert into DIGX_CM_TABLE_METADATA (ID,TABLE_METADATA_ID,NAME,COMPONENT_ID,DATATYPE,PATH,FIXED,SORTABLE,DOWNLOADABLE,SEQUENCE_NO,LENGTH) values ('ManageBrandBrandactions','ManageBrandBrand','actions','theme-config/theme-actions','String','brandId','N','Y','Y',4,null);
Description of the illustration consistent-ui-download4.png
Parent topic: Consistent UI Download