Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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 example; how to use the Custom and Computed type?

As in wiki examples are only of String; but I am unable to find any for Custom and Computed type.

0 votes



2 answers

Permanent link
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

1 vote


Permanent link
Thanks a lot Adam !! :)

It really helped me a lot to understand the Custom/Computed type preferences of viewlet.

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 16 '10, 8:31 a.m.

Question was seen: 5,964 times

Last updated: Aug 16 '10, 8:31 a.m.

Confirmation Cancel Confirm