Tag dialog widget parameter reference
You configure tag widget instances by setting the following JavaScript parameters.We can also configure tag widget parameters globally for tag widgets in the portal in the CP configuration service. For information about this and the precedence hierarchy of configuration settings refer to the parent topic immediately preceding this topic.
Mandatary parameters
The following parameters are mandatary for the tag widget. They have no corresponding parameters in the CP Configuration Service for tagging and rating.
- resourceID
- Specify the identifier of the resource for which the widget is called. This needs to be unique.
For example, for a portal page specify the portal object ID on that page.
- resourcePrivate = false
- Use this parameter to pass the "visibility" of the resource for which the widget was calledthat is whether the resource is marked private or not. Private resources allow only private tagging. Default is false. If a resource is private, it is mandatare that the developer specifies this attribute with the value true .
- resourceTitle
- Title of the resource for which the tag widget is called. The title is later displayed in the header of the tag widget.
- resourceType = NAVIGATION_NODE | CONTENT_NODE
- Type of the resource for which the rating widget is called. This parameter is mandatary only for portal resources such as pages or portlets. Valid values are NAVIGATION_NODE or CONTENT_NODE .
Optional parameters
The following parameters are optional for the tag widget. They correspond to similar parameters in the CP Configuration Service.
- countsEnabled = false
- Whether the count of each community tag is displayed. The count shows how often the tag has been applied by users. Default is false. To have the count of each community tag displayed, specify true . The count is then displayed in parentheses.
- customLabelAddTags
- Non-localized label shown for the text field that users use to add new tags. Example: Type your tag here: . Non-localized means that the label does not change with the browser language. This parameter has no default value.
- customLabelCommunityTags
- Custom string to show as the header text in the user interface for tags in the community section. Example: Community tags for resource XYZ . This parameter has no default value.
- customLabelPersonalPrivateTags
- Custom string to show as the header text in the user interface for tags in the personal private section. Example: Personal private tags for resource XYZ . This parameter has no default value.
- customLabelPersonalPublicTags
- Use this parameter to specify a custom string to show as the header text in the user interface for tags in the personal public section. Example: Personal public tags for resource XYZ . This parameter has no default value.
- defaultView = PUBLIC
- Specify which view tab is preselected by default, Public or Private. The default is PUBLIC . The other possible value is PRIVATE .
- deletingEnabled = true
- Whether a user can delete the user's own personal tags Default is true.
- displayTabs = true
- Whether you want the tabs for switching between private and public tagging to be displayed to users. The default is true . Change this to false only if you deactivate private tagging by setting the parameter privateTaggingEnabledInWidget to false .
- localePickerEnabled = (true)
- Whether the locale picker is shown. The default is true . The locale picker is a dropdown button that users can use to determine under which locale they want to save their tag to make sure that it is displayed correctly. By default tags are saved under the default locale.
- maxCommunityTags = 50
- Maximum number of community tags shown in the community view. Specify a numeric value. Default is 50 . This limit is a display limitation of the widget, not a functional limitation.
Increasing this value can impact the performance of the tagging widget.
- maxPersonalTags = 50
- Maximum number of personal tags that can be assigned to one resource. Specify a numeric value. Default is 50 . This limit applies separately to each, personal public and personal private tags. In other words, the default of 50 allows 50 public and 50 private tags per user per resource. This limit is a display limitation of the widget, not a functional limitation.
Increasing this value can impact the performance of the tagging widget.
- messageFadeOutDuration = 1000
- Time that the fade-out action of return messages takes in milliseconds. This affects the fade-out after information, warning, or error messages have been displayed. The default is 1000 milliseconds.
- order = DESC|ASC
- Order direction for displaying the tags. Related to the parameter orderMetric . It can take the following values:
- DESC
- Default. Specifies descending order.
For example, when the default TAG_SPACE_COUNT_REVERSE_NAME is specified for the previous order metric parameter, tags with the highest count and the lowest character in the alphabet are listed first.
- ASC
- Specifies ascending order.
For example, if the order metric parameter is specified as...
orderMetric = TAG_SPACE_COUNT
...tags with the lowest count are listed first.
- orderMetric = TAG_SPACE_COUNT_REVERSE_NAME
- Order metric for the order by which the tags are displayed. To determine the actual order use the parameter order Default is TAG_SPACE_COUNT_REVERSE_NAME . Tags are shown first by the tag count, with resources with more tags shown before resources with fewer tags, then, if resources have the same number of tags, alphabetically. Other possible values are:
- TAG_SPACE_NAME
- TAG_SPACE_COUNT
- TAG_SPACE_CREATION_DATE
- TAG_SPACE_LAST_MODIFIED_DATE
- TAG_SPACE_COUNT_NAME
For more details refer to the class com.ibm.portal.cp.Constants.OrderMetric in the portal Javadoc.
- privateTaggingEnabled = (false)
- Whether users can add private tags in the dialog tag widget. Default is false. If true , users can also add private tags.
- resourceCategories = ["resrc_category_1", "resrc_category_2", . . . "resrc_category_n"]
- Array of categories assigned to the resource for which the widget was called. Represent each category by a string, for example Books or a Web Content Manager category. A typical value is ["books", "action"] .
- tagsChangedEvent = (tagsChanged)
- Event fired when a user adds or deletes a tag in the dialog widget. This event is caught by the inline tag widget or widgets of the same resource. These then update themselves.Default is tagsChanged. The event name specified here must be matched by the event name specified for the tag inline widget.
- validationRegex = [^\<\>\(\)\[\]:]{1,50}
- Regular expression used to validate the tag names that users type. The default is [^\<\>\(\)\[\]:]{1,50}"} . This means that users can type tag names that are from 1 to 50 characters long and do not contain any angled brackets, parentheses, brackets, or colons: < > ( ) [ ] : .
Limitations:
- Angled brackets ( < and > ) are not allowed within tag names. Therefore no matter how you customize the regular expression, angled brackets are not accepted.
- Tag names must contain at least one alphanumeric character. Tag names that consist only of non-alphanumeric characters are not allowed either. Example: "!^#" .
Parent: Parameter reference for the tag and rating widgets
Related reference:
CP Configuration Service for tagging and rating