It's all about the answers!

Ask a question

Viewlet Preference - Custom and Computed Type

Ashutosh Buxi (631) | asked Aug 16 '10, 8:31 a.m.
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.

2 answers

permanent link
Adam Archer (83639) | answered Aug 17 '10, 11:10 a.m.
Unfortunately I don't think we have sample code available anywhere for using custom and computed preferences. However, our viewlets are available on 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:

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:


permanent link
Ashutosh Buxi (631) | answered Aug 18 '10, 4:31 a.m.
Thanks a lot Adam !! :)

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

Your answer

Register or to post your answer.