cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown help

Former Member
0 Kudos

I should display 3 text values in dropdown which will come from backend rfc and when user select anyone of the text,It should pass keys instead of test values.

which type of dropdown is good for this type of scenario?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Obviously DropdownByKey, craft some Key-Value Pairs and assign them to the attribute you are working with.


IModifiableSimpleValueSet ValueSet= wdContext.getNodeInfo().getChild("NodeName").
							getAttribute("AttributeName").getModifiableSimpleType().getSVServices().
							getModifiableSimpleValueSet();
//Populate dropdownbykey
	ValueSet.put("Key_A","Value_A");
	ValueSet.put("Key_B","Value_B");
	ValueSet.put("Key_C","Value_C");
	ValueSet.put("Key_D","Value_D");
	

also.. u can achieve it this way too:


IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.ATTRIBNAME);
	ISimpleTypeModifiable attribNameType = attributeInfo.getModifiableSimpleType();

	IModifiableSimpleValueSet valueSet = attribNameType.getSVServices().getModifiableSimpleValueSet();
	//Delete previous data (if needed and there was data, in case of refresh views)
	valueSet.clear();
	for (int i = 0; i <= 400; i++)
	{
		valueSet.put("Key_"+i,"Text "+i);
	}

Regards!

Julio Herrera

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Koti,

Dropdown By key suits best to your requirement

Regards

Amita