[RESOLVED] Set selected value on a list of options

1
0
-1

I have a list of options - type string. Multiple is allowed. It is a list of email addresses:

<

blockquote>

<

p> ["John DoeJohnD@domian.com",Jane DoeJaneD@domain.com","Another Name<AnotherN@domain.com"]

I want to preselect two of the names. I have tried everything I can think of in the "selected value" field.

Does someone know how?

Thanks in advance for your help.

Comments

Submitted by Eric Snyder on Mon, 02/17/2014 - 17:34

Perfect! What I was doing wrong - I was not marking the return type as a list but was using the default string. Thanks for helpoing me past this.

Submitted by Pierre-yves Monnet on Tue, 02/18/2014 - 20:18

You welcom.

Thanks for your return, and don't hesitate to close the question, that's help us to focus on open question.

Submitted by Eric Snyder on Wed, 02/19/2014 - 00:47

Hoe do I close a question?

1 answer

1
0
-1
This one is the BEST answer!

Hello,

In the List widget, you have two item :

Available Values (where you put your list)

Selected value

In the selected, give your selected list as an Array , for example return

["Jane Doe","Another Name"]

Don't forget the change the return type from String to ArrayList.

Click on the pencil, select "script", then give the list below. On the bottom on the pop up, change the Return type to java.util.List.

It's works on 6.1.2

Notifications