The
constants.jsp
file sets global variables that can be
used in any other page in the application.
It is a good practice to add global variables for handling the displaying of the terms dimension and the clusters. Doing so will allow you to easily change display characteristics in one central file.
The following Java code is an example of a section that can be added to the constants.jsp file:
// Dimension name of the Term Discovery dimension. // Make it null if you do NOT want term processing. private static final String relTermsDimName = "Terms"; //Display name of the Term Discovery dimension. private static final String relTermsDisplayString = "Term Discovery"; //The rootId of the Term Discovery dimension. //Make it -1 if you do NOT want terms processing. private static final long relTermsRootId = 2l; // Handling for the all-terms property. // Ignored if String is null. private static final String P_AllTerms = "P_AllTerms"; // if true, a More... link shows after the term's short list. // Should be false in production. private static final boolean showTermsMore = false; // If true, TD dimension and property show in record display // Should be false in production. private static final boolean showTermsInRecord = false;
The code sets up the following variables. These constants will be used in most of the JSP pages listed above.
Global Variable |
Purpose |
---|---|
relTermsDimName |
Sets the name of the Guided Search dimension for Term Discovery. |
relTermsDisplayString |
Sets the name that will be displayed in application pages for the Term Discovery dimension. |
relTermsRootId |
Sets the root ID of the Term Discovery dimension. |
P_AllTerms |
Sets the name of the Guided Search property that contains all the terms. |
showRelTermsMore |
Sets whether a More... link is shown for terms. |