cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown by key

Former Member
0 Kudos
49

Hi Experts,

I am using drop down by key, when the user select data from drop down , I need the corresponding Key and Value .

when I print the context attribute refering to the dropdown by key it is printing the key but I require the corresponding value even.

I s it posible to get it?

Regards,

Venki.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi..

You can use these method..

public void setSelectedKey(String value)

This property must be bound to the context.It Sets property selectedKey to the new value.

value - the new value of the selectedKey property

public String getSelectedKey()

This property must be bound to the context. It returns the value of the selectedKey property. The key from the value set that defines the drop-down list's selection.

Regards,

Alamelu

Former Member
0 Kudos

hi,

IWDAttributeInfo attributeInfo=wdContext.node<Node>().getNodeInfo().getAttribute("<attributename>");

ISimpleValueSet values=attributeInfo.getSimpleType().getSVServices().getValues();

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

{

String text = values.getText(i);

}

Regards

Jayapriya

monalisa_biswal
Contributor
0 Kudos

hi,

Yes, you can get text for the key from the value set linked to the attribute.

IWDAttributeInfo attributeInfo=

wdContext.node<Node>().getNodeInfo().getAttribute("<attributename>");

ISimpleValueSet values=attributeInfo.getSimpleType().getSVServices().getValues();

String text = values.getText(key);

Hope this helps!

Monalisa