cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown in Webdynpro

Former Member
0 Kudos

Hi all,

I am facing a problem with dropdown in webdynpro. I want to display a dropdown hardcoded and passe the text to an atribute with is located inside a node , so i can use it with adobeforms. The node where the atribute is located has cardinality 1..1

Can anyone help me out.

Regards,

Nirali

Accepted Solutions (0)

Answers (2)

Answers (2)

udaykumar_kanike
Active Contributor
0 Kudos

Hi Nirali,

Try creating a simple data type with enumeration type filled with hard coded values. try assigning this simple data type to the dropdown input field properties, "value ".

This should solve your problem.

Hope it helps or let me know further in detail of your requirement.

Regards

Uday

Qualiture
Active Contributor
0 Kudos

Hi,

Assuming you have your key-value pairs already available in a Map, use the following to create a dropdown for your field's attributeInfo:

IWDAttributeInfo attrInfo = wdContext.node<YourNode>().getNodeInfo().getAttribute(IPrivate<YourView>.I<ViewElement>Element.<YourField>;
IModifiableSimpleValueSet svSet = attrInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
svSet.clear();
	  	
for (Iterator i = map.entrySet().iterator(); i.hasNext();) {
	Map.Entry entry = (Map.Entry) i.next();
	svSet.put(entry.getKey(), (String)entry.getValue());
}

Former Member
0 Kudos

Hi,

I got it solved by another way.

DATA:

s_element type WDR_CONTEXT_ATTR_VALUE,

it_inst type table of WDR_CONTEXT_ATTR_VALUE,

clear s_element.

s_element-text = 'text1'.

s_element-value = '1'.

APPEND s_element to it_inst.

clear s_element.

s_element-text = 'text2'.

s_element-value = '2'.

APPEND s_element to it_inst.

clear s_element.

s_element-text = 'text3'.

s_element-value = '3'.

APPEND s_element to it_inst.

NODE_INFO->SET_ATTRIBUTE_VALUE_SET(

NAME =name of attribute

VALUE_SET = it_inst ).

Thks for the reply!

udaykumar_kanike
Active Contributor
0 Kudos

Hi Nirali,

This is from RFC perspective but u can follow my procedure to get the output from portal end as well. try your hands on both the ways.

Regards

Uday

Former Member
0 Kudos

Hi,

It works in both ways! Thanks for helping me solve out the problem.

Regards,

Nirali

Edited by: Nirali on Jan 5, 2012 11:15 AM