on 03-26-2008 3:08 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koti,
Dropdown By key suits best to your requirement
Regards
Amita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.