cancel
Showing results for 
Search instead for 
Did you mean: 

dropdownkey -create value dynamically

Former Member
0 Kudos

the below code works fine

but this shows 2 columns instead of 1 column that i bind using SimpleType

what can i do...

in this code, i only want to show the description not the value..

i dont want to use simpleType because, i need to dynamically create the value...


  IWDAttributeInfo attributeInfo =
      wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);
    ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

    // Set field label and populate valueset
    countryType.setFieldLabel("Country");
    IModifiableSimpleValueSet valueSet =
      countryType.getSVServices().getModifiableSimpleValueSet();
    for (int i = 0; i < 40; i++) {
      valueSet.put("Key_" + i, "Country " + i);
    }

    // initialize context value attribute 'Country'
    wdContext.currentContextElement().setCountry("Key_0");

Message was edited by:

yzme yzme

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use DropDownByKeyUI element instead of InputFieldUI !

Former Member
0 Kudos

how to dynamically bind the data into the dropdown key...

i only know how to use the dictionary to bind it....

for(int i=0; i<empPage.size();i++){

//set value for dropdownkey...

}

Message was edited by:

yzme yzme

Former Member
0 Kudos

Map the selectedKey property to country attribute ! And populate countrykey dynamically.. as you are doing now !

Answers (0)