cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownListByKey

Former Member
0 Kudos

Hi,

I have a DropDownListByKey based on SVS. I would like that on the white space of the combo-box, instead of default value or while space, it will be written 'Select' and the user will select one of the values of within the combo box.

What I can do is to add the value 'Select' to the values list and set this value as the default value.

Is there any other way to do this such that the 'select' value will <u>not</u> appear as a value that can be selected in the combo-box?

Thanks in advance,

Aviad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aviad,

try like this

ISimpleTypeModifiable lists=wdThis.wdGetAPI().getContext().

getModifiableTypeOf("Your Context attribute");

IModifiableSimpleValueSet listValues=list.getSVServices().getModifiableSimpleValueSet();

listValues.put("","Select");

wdContext.current"<DROPDOWN >"Element().set"<CONTEXT>"("");

Let me know if it works...

regards,

Sujesh

Former Member
0 Kudos

Hi Aviad,

Write in init

wdContext.currentContextElement().setattribute1("<Select>");

Where attribute1 is the attribute bound to the selectedkey in dropdown

This is to fill the other values

IWDAttributeInfo attinfo = wdContext.getNodeInfo().getAttribute("attribute1");

ISimpleTypeModifiable modinfo = attinfo.getModifiableSimpleType(); IModifiableSimpleValueSet valset = modinfo.getSVServices().getModifiableSimpleValueSet();

valset.put(key,text)

Regards

Rohit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aviad,

When building your SVS list, add the "Select" element as the first element in the list. By default, the combo-box always displays the first element in the list (with the white-space element above it).

You can not make the "Select" element (or any other element in a drop-down) non-selectable, but you can check on the server-side whether a user tried to select that element and then take appropriate action.

Regards,

Walter