cancel
Showing results for 
Search instead for 
Did you mean: 

dropdownbykey

Former Member
0 Kudos

Dear All!

There is a "dropdownbykey" UI element. It has many

values. One of these values should be defaulted.

That means if the screen is being showed it must be not remain

empty but with a default value in it.

How can it be made ? I have never did it ever before.

regards

sas

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Sas,

Say the node of the attribute that is bound to <u>dropdownbykey</u> is dropDown.

use this this code in wdDoInit();

if(wdContext.nodeDropDown().size()>0)

{

wdContext.nodeDropDown().setLeadSelection(0);

wdContext.currentDropDownElement().set<attributename>("firstkey");

}

regards,

Siva

Message was edited by:

Siva Rama Krushna

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

To remove the first lin e empty, The node bound to the dropdown by key has the Selection property value 1..1

Regards,

Saravanan K

Former Member
0 Kudos

hi,

For this you need to set the atttibute with which it is mapped to the default key value.

wdContext.currentContextElement().setDropDown("TEST");

where TEST is the value of the simpleType of the attribute DropDown which is mapped to your dropDownByKey

Put it in your wdDoInit()

thanks & regards,

Manoj

Message was edited by:

Manoj

Manoj Kumar