Rating dialog widget parameter reference
You configure rating widget instances by setting the following Javascript parameters.We 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 preceding this topic.
Mandatary parameters
The following parameters are mandatary for the rating 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 rating widget is called. This needs to be unique.
For example, for a portal page specify the object ID on that page.
- resourcePrivate = false
- Use this parameter to pass the "visibility" of the resource for which the rating widget was calledthat 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 mandatare that the developer specifies this attribute with the value true .
- resourceTitle:
- 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_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 rating widget. They correspond to similar parameters in the CP Configuration Service.
- customLabelCommunityRatings
- Custom string to show 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.
- customLabelPersonalPrivateRatings
- 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.
- customLabelPersonalPublicRatings
- Use this parameter to specify a custom string to show 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 = 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 ratings Default is true.
- displayTabs = true
- 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)
- 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 = 5
- Number of stars or asterisks of which a rating consists. Specify a positive numeric value. Default is 5 .
- privateRatingEnabled = (false)
- Whether users can add private ratings in the dialog rating widget. Default is false. If true , users can also add private ratings.
- ratingsChangedEvent = (ratingsChanged)
- Event 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. Default is ratingsChanged. The event name specified here must be matched by the event name specified for the rating inline widget.
Parent: Parameter reference for the tag and rating widgets
Related reference:
CP Configuration Service for tagging and rating