Viewlet Preference - Custom and Computed Type
While configuring the preference def for a viewlet; we have many types; viz; Integer, String, etc.
Can anybody plz let me know the As in wiki examples are only of String; but I am unable to find any for Custom and Computed type. |
2 answers
Thanks a lot Adam !! :)
It really helped me a lot to understand the Custom/Computed type preferences of viewlet. |
Unfortunately I don't think we have sample code available anywhere for using custom and computed preferences. However, our viewlets are available on jazz.net and they use these options. You can take a look at the live code directly in your browser. See the urls at the bottom of this post to find the code.
For computed preferences take a look at the settingChanging and getPreferenceOptions function in the WorkItemsViewlet. See also the API documentation about these functions here: https://jazz.net/wiki/bin/view/Main/ViewletFunctions#GetPreferenceOptions https://jazz.net/wiki/bin/view/Main/ViewletFunctions#SettingChanging For custom preferences, see the getPreferenceProvider function in the WorkItemsViewlet and the code for the WorkItemQueryPreferenceProvider that it returns (and the WorkItemQueryChooser that the preference provider uses). See also API docs about custom preference providers here: https://jazz.net/wiki/bin/view/Main/ViewletFunctions#GetPreferenceProvider https://jazz.net/wiki/bin/view/Main/CustomPreferenceProviderFunctions WorkItemsViewlet: http://jazz.net/jazz/web/com.ibm.team.workitem.viewlets.web/ui/internal/WorkItemsViewlet.js?debug=true WorkItemQueryPreferenceProvider: http://jazz.net/jazz/web/com.ibm.team.workitem.viewlets.web/ui/internal/utils/WorkItemQueryPreferenceProvider.js?debug=true WorkItemQueryChooser: http://jazz.net/jazz/web/com.ibm.team.workitem.viewlets.web/ui/internal/utils/WorkItemQueryChooser.js?debug=true |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.