It's all about the answers!

Ask a question

How to set value of an attribute with type "string list" using rtc-sdk


silencehill wu (5022732) | asked Oct 18 '15, 1:03 p.m.
edited Oct 18 '15, 11:49 p.m.

I need a UI field to list multiple string value dynamic. I configurate a filed with type "stringlist", and I can add string in RTC UI. But when I using setAttriubute API to set a arrayList to a stringlist field, a exception will throw out.

I have ever using IProjectAreaHandlerList in RTC UI, the ArrayList<IProjectArea> can be set using setAttribute(id, arrayListValue), why it is not valid when use Stringlist.

Please give me an advise,  any example to set "string  list" type field value using RTC-SDK will be better.

Thanks!!

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Oct 19 '15, 8:20 a.m.
I think stringlist is strings separated by comma ','
silencehill wu selected this answer as the correct answer

Comments
Ralph Schoon commented Oct 19 '15, 9:28 a.m. | edited Oct 19 '15, 9:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

That was for up to 3.x. Now it is a List/collection (i.e. ArrayList of String Objects). Surprising!
There is code in https://rsjazz.wordpress.com/2015/02/09/a-rtc-workitem-command-line-version-2/


Ralph Schoon commented Oct 19 '15, 9:29 a.m. | edited Oct 19 '15, 9:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Actually, this is discussed here: https://rsjazz.wordpress.com/2015/02/24/extending-the-workitem-command-line-with-new-commands/


List<object> results = new ArrayList<object>()

Your answer


Register or 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.