cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown by key

Former Member
0 Kudos

Hi

I want to set the values of the dropdownbyKey UI element during runtime. Can anyone hep me to complete this?

Thanks

Radha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can user ISimpleTypeModifiable class do populate the dropdownbykey UI element

Kishore

Former Member
0 Kudos

Hi

Can you explain with an example?

Thanx

Radha

Former Member
0 Kudos

Hi

Here is the example

IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(<attribute name>);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

countryType.setFieldLabel("Country");

IModifiableSimpleValueSet valueSet = countryType.getSVServices().getModifiableSimpleValueSet();

valueSet.put("DE","Germany");

valueSet.put("GB","Great Britain");

valueSet.put("US","United States");

Kishore

Message was edited by: NagaKishore Vankayala

Former Member
0 Kudos

Hi

Thanx for the detailed example.

I shall get back to you incase of further information.

Thanx

Radha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Cosider you have valueAttribute "MyCity" of type "City" where City is a simpletype.

Consider you have values "Delhi","Bagalore" in the simpletype.

You can use

wdContext.currentContextElement().setMyCicy("Bangalore");

to set the value to "Bagalore"

Regards, VIP