Rating dialog widget parameter reference
You configure rating widget instances by setting the following Javascript parameters.
You can also configure rating widget parameters globally for rating 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 rating widget. They have no corresponding parameters in the CP Configuration Service for tagging and rating.
resourceIDUse this parameter to specify the identifier of the resource for which the rating widget is called. This needs to be unique. For example, for a portal page specify the object ID of that page.
resourcePrivate = falseUse this parameter to pass the "visibility" of the resource for which the rating widget was called, that is whether the resource is marked private or not. Private resources allow only private rating. The default value is false . If a resource is private, it is mandatory that the developer specifies this attribute with the value true .
resourceTitle:Use this parameter to specify the title of the resource for which the rating widget is called. The title is later displayed in the header of the rating widget.
resourceType = NAVIGATION_NODE | CONTENT_NODEUse this parameter to specify the type 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 rating widget. They correspond to similar parameters in the CP Configuration Service.
customLabelCommunityRatingsUse this parameter to specify a custom string that you want to be shown as the header text in the user interface for ratings in the community section. Example: Community ratings for resource XYZ . This parameter has no default value.
customLabelPersonalPrivateRatingsUse this parameter to specify a custom string that you want to be shown 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.
customLabelPersonalPublicRatingsUse this parameter to specify a custom string that you want to be shown as the header text in the user interface for ratings in the personal public section. Example: Personal public ratings for resource XYZ . This parameter has no default value.
defaultView = PUBLICUse this parameter to specify which view tab is preselected by default, Public or Private. The default is PUBLIC . The other possible value is PRIVATE .
deletingEnabled = trueUse this parameter to determine whether a user can delete the user's own personal ratings. Default is true..
displayTabs = trueUse this parameter to determine whether you want the tabs for switching between private and public rating to be displayed to users. The default is true . Change this to false only if you deactivate private rating by setting the parameter com.ibm.wps.cp.rating.dialog.privateTaggingEnabled to false .
messageFadeOutDuration = (1000)Use this parameter to specify the time that the fade-out action of return messages takes in milliseconds. This affects the fade-out after information, warning, or error messages that have been displayed. The default is 1000 milliseconds.
numStars = 5Use this parameter to specify the number of stars or asterisks of which a rating consists. Specify a positive numeric value. The default value is 5 .
privateRatingEnabledInWidget = trueUse this parameter to determine whether users can add private ratings in the dialog rating widget. Default is true.. If you set this parameter to false , users can add only public ratings.
ratingsChangedEvent = (ratingsChanged)Use this parameter to specify the name of the event that is fired when a user adds or deletes a rating in the dialog widget. This event is caught by the inline rating widget or widgets of the same resource. These then update themselves. The default value is ratingsChanged. The event name specified here must be matched by the event name specified for the rating inline widget.
resourceCategories = ["resrc_category_1", "resrc_category_2", . . . "resrc_category_n"]Use this parameter to specify an 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"] .
Parent
Parameter reference for the tag and rating widgets
CP Configuration Service for tagging and rating
Capitalized "s" in JavaScript. Reflected in .dita source.