How to implement multi-select value attributes and fields?
![]()
Morten Madsen (305●29●47)
| asked Nov 07 '12, 10:30 a.m.
edited Nov 07 '12, 10:34 a.m. by Ralph Schoon (62.3k●3●36●43)
Hi,
since RTC 2.0 we have been trying to implement multi-selection fields in a proper way. We basically want to do the following: 1. Work items should be marked in some way with the business unit (customer) that this work item is relevant to. It can be relevant to many customers at once. 2. In RTC 3 we tried to used the way of "small string" attribute which would use a multi selection box presentation fed with business unit enumeration values. So far so good. But the queries would display BusinessUnitEnum.literal1 .... or something like that, so this was not working for getting an overview. 3. In RTC 4 I've played with the HTTP filtered value set and a String List attribute, which seems to work nicely. One drawback is that you can click "new..." and add any string what so ever. Can you in some way disable that "New..." button, add a validator or in some way ensure that this value is ONLY from the value set provided by HTTP XML source? Any other comment or ideas how to solve this? Any comments appreciated! In advance, thanks a lot :-). |
Accepted answer
![]()
Millard Ellingsworth (2.5k●1●24●31)
| answered Nov 07 '12, 7:49 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
I spent some time this afternoon looking for an answer (and actually hacked a way that worked, at least for the web ui) but that won't actually help you at the moment (sorry).
The StringList picker widget has a method that answers the question (should I show the New... button?) -- and it is currently hard-coded to say "yes". I hacked that in my development environment and I got a picker that only allows Select. This hack did not provide the same functionality in the Eclipse UI (though I expect a similar one would).
I was hoping that there would be a property on the String List editor presentation (something like showNew or allowUserSupplied) that you could set to false but there does not seem to be. I have filed Enhancement Request 240267 to add this feature. Feel free to comment there and +1 it if you like.
Millard
RTC Dev Team
Morten Madsen selected this answer as the correct answer
|
4 other answers
![]()
correct, you would have to make reusable individual queries.. nice touch!
|
![]()
If you plan on removing the new feature, can you also ensure the edit feature is gone too. If you click on edit you can essentially make a new string. Maybe under the hood they both share the same new code, but just in case I wanted to mention it.
|