cancel
Showing results for 
Search instead for 
Did you mean: 

Preselection in DropDownbyKey

Former Member
0 Kudos

Hello,

I have developed an tool which use a DropDownByKey which is bind to the enumeration of an simpleType. Does anybody knows, how to select an element of the enumeration in the coding?

Thanks,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member185029
Active Contributor
0 Kudos

Hi,

Assign the selected key to the context.

wdContext.currentContextelement().setDDValue("<KEY>");

-Ashutosh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In DoInit() method of View do the following

if example the DropDownByKey UI is bind with attribute country.

the country is of simple type Country.

then by default you can set country you desired using the below statement,

wdContext.setCountry("IND");

here the "IND" is the value and description is INDIA in simple type.

so in DropDownByKey you can see the INDIA.

Regards,

ramesh