Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

multi-select enumerations

Is there anyway to get an IEnumeration directly without having an attribute of that enumeration type (Not calling resolveEnumeration) in the Java API?

Basically, what I have is an attribute on a work item that should be a multi select attribute. To set this up I created an attribute of type string, and added a presentation editor that attaches an enumeration to the custom attribute.

When multiple values of the enumeration are selected, the string value of the custom work item is something like "test.multiselect.enumeration.l1,test.multiselect.enumeration.l2" and I need a way of first knowing that this custom attribute of type string is actually a multi select, and second translating the values of the enumeration literals to the display names.

Thanks for any help,
-ryan

1

1 vote



2 answers

Permanent link
well, and enumeration is an ordered array of values. always..

in some uses of the values of the enumeration could be a single or multi-select field.. but the enumeration itself is not multi-anything.. just an ordered array of values.

so, the field defines what to do.. can we see the field definition?

you can get the literals of an enumeration from the enumeration.

I would guess that l1 is literal 1, l2 is literal 2, etc..

If u get them all, then u would know how many values there were and could match..
enumeration.getEnumerationLiterals(false)l returns only the current active values. in a List<>

but I'd still like to see this string variable, with a multiselect list UI.

Sam

0 votes


Permanent link
Right, I understand that the enumeration is just an array of values.

The problem is I can't get a handle on the IEnumeration associated with my attribute, because the attribute is of type String.

If I setup the custom attribute to have type enumeration, then that attribute can only hold one literal from the enumeration.

To make the custom attribute, I made it of type string, and then added UI presentation to make editing that attribute use the backing enumeration as a multi-select checkbox list.

Is there anyway to get a handle on the IEnumeration that I can call getEnumerationLiterals on if I only know the enumeration's ID?

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
× 10,985

Question asked: Dec 14 '11, 4:37 p.m.

Question was seen: 6,280 times

Last updated: Jul 23 '12, 8:53 a.m.

Confirmation Cancel Confirm