How to fetch enumaraion values for plug form dropdown.
Hi,
i want to display custom enumaration values into my plugin form. How can i fetch all the enumaration values from my project area. Thanks, Glory |
3 answers
Hi,
I have designed plugin form for create workitem. i have few query. 1. How to get values for Planned for combo box. 2. How to get values for Filed Against for combo box. 3. How to get values for Release for combo box. Thanks, Glory |
Hi ,
Thank you for your response. I have found the solution for this. Check my code below. public static String[] getEnumarationList(String attributeName) throws TeamRepositoryException { String[] list = null; IProgressMonitor monitor = new NullProgressMonitor(); IAttribute attribute= workItemClient.findAttribute(projectArea,attributeName, monitor ); IEnumeration<ILiteral> enumeration; int i =0; try { enumeration = (IEnumeration<ILiteral>)workItemClient.resolveEnumeration(attribute, null); List<ILiteral> enumerationLiterals = enumeration.getEnumerationLiterals(); list = new String; for (ILiteral literal : enumerationLiterals) { list = literal.getName(); i++; } } catch (TeamRepositoryException e) { } return list; } Thanks , Glory |
Ralph Schoon (63.6k●3●36●47)
| answered Mar 29 '12, 5:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
this might be helpful. In general you can search the PDE and Eclipse in general for things. E.g. if you find return values in the API, select the type and press F3 (search for references) or open the for declarations and search for references there. There are also numerous posts that you can search for examples: https://jazz.net/search_results.jsp?q=#page=0&type=type%3DDocument-ForumThread&q=enumeration%20ILiteral
|
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.