Tag dialog widget parameter reference
You configure tag widget instances by setting the following JavaScript parameters.
You 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 above this topic.
Mandatory parameters
The following parameters are mandatory for the tag widget. They have no corresponding parameters in the CP Configuration Service for tagging and rating.
resourceIDIdentifier 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 of that page.
resourcePrivate = falseVisibility of the resource for which the widget was called, that is whether the resource is marked private or not. Private resources allow only private tagging. The default value is false . If a resource is private, it is mandatory that the developer specifies this attribute with the value true .
resourceTitleTitle 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_NODEType of the resource for which the rating widget is called. This parameter is mandatory 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 = falseWhether the count of each community tag is displayed. The count shows how often the tag has been applied by users. The default value is false . To have the count of each community tag displayed, specify true . The count is then displayed in parentheses.
customLabelAddTagsNon-localized label shown for the text field that users use to add new tags. Example: Type tag here: . Non-localized means that the label does not change with the browser language. This parameter has no default value.
customLabelCommunityTagsHeader text in the user interface for tags in the community section. Example: Community tags for resource XYZ . This parameter has no default value.
customLabelPersonalPrivateTagsHeader 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.
customLabelPersonalPublicTagsHeader 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 = PUBLICWhich view tab is preselected by default, Public or Private. The default is PUBLIC . The other possible value is PRIVATE .
deletingEnabled = trueWhether a user can delete the user's own personal tags. Default is true..
displayTabs = trueWhether 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 verify it is displayed correctly. By default tags are saved under the default locale.
maxCommunityTags = 50Maximum number of community tags shown in the community view. Specify a numeric value. The default value 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 = 50Maximum number of personal tags that can be assigned to one resource. Specify a numeric value. The default value 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 = 1000Time 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|ASCOrder direction for displaying the tags. This parameter is related to the parameter orderMetric . It can take the following values:
DESCDefault.value. It specifies descending order. For example, when the default TAG_SPACE_COUNT_REVERSE_NAME is specified for order metric parameter above, tags with the highest count and the lowest character in the alphabet are listed first.
ASCSpecifies 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_NAMEOrder metric for the order by which the tags are displayed. To determine the actual order use the parameter order . The default value is TAG_SPACE_COUNT_REVERSE_NAME . This default means that 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:
For more details refer to the class com.ibm.portal.cp.Constants.OrderMetric in the portal Javadoc.
- TAG_SPACE_NAME
- TAG_SPACE_COUNT
- TAG_SPACE_CREATION_DATE
- TAG_SPACE_LAST_MODIFIED_DATE
- TAG_SPACE_COUNT_NAME
privateTaggingEnabledInWidget = (true)Add private tags in the dialog tag widget. Default is true.. If you set this parameter to false , users can add only public 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)Name of the event that is 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. The default value 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 that the portal uses to validate the tag names that users type. The default is...
[^/</>/(/)/ [/]:]{1,50}"}
Users can type tag names that are from 1 to 50 characters long and do not contain any angled brackets, parentheses, square brackets, or colons: < > ( ) [ ] : .
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
CP Configuration Service for tagging and rating