cancel
Showing results for 
Search instead for 
Did you mean: 

how to use valuehelpdropdownlist

junwu
Active Contributor
0 Kudos

Hi Expert;

I search a lot of docs, but no tutorial deal with this element.

Can anyone share some experience of how to use this element?

my scenario is:

there are two two drop down list A, B. B's list entry is based on the selection of A. so I have to dynamically retrieve B list. how can I achieve this?

Best regards,

John

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi John,

Since values of drop down list B depends on value selected of drop down list A, please

1) create simple type of B's drop down list in local dictionary and populate with generic list(all values)

2) Alter B's list using IWDSimpleTypeModifiable option based on selection of A's drop downlist on event.

IWDNodeInfo selValsNodeInfo = wdContext.nodeSelectionValues()

.getNodeInfo();

IWDAttributeInfo attrInfo = selValsNodeInfo.getAttribute("Colours");

ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();

msType.setFieldLabel("Alt Colours");

IModifiableSimpleValueSet valueSet = msType.getSVServices()

.getModifiableSimpleValueSet();

valueSet.put("Colour_10", "Pink");

valueSet.put("Colour_11", "Tan");

valueSet.put("Colour_12", "Saffron");

valueSet.put("Colour_13", "Lime");

valueSet.put("Colour_14", "Sky Blue");

valueSet.put("Colour_15", "Turquoise");

valueSet.put("Colour_16", "Purple");

Regards,

Ganga.

junwu
Active Contributor
0 Kudos

Hi Gangadharayya;

Thanks for reply:)

when the selection is changed, is there any event handler in webdynpro controller where i can place these code?

IWDNodeInfo selValsNodeInfo = wdContext.nodeSelectionValues()

.getNodeInfo();

IWDAttributeInfo attrInfo = selValsNodeInfo.getAttribute("Colours");

ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();

msType.setFieldLabel("Alt Colours");

IModifiableSimpleValueSet valueSet = msType.getSVServices()

.getModifiableSimpleValueSet();

valueSet.put("Colour_10", "Pink");

valueSet.put("Colour_11", "Tan");

valueSet.put("Colour_12", "Saffron");

valueSet.put("Colour_13", "Lime");

valueSet.put("Colour_14", "Sky Blue");

valueSet.put("Colour_15", "Turquoise");

valueSet.put("Colour_16", "Purple");

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi John,

Hope I have understood your problem.

You have to write the code in the OnSelect event of the first dropdown. Go to UI Element -> Properties of First dropdown control.. and there you have to define one new method for OnSelect Event and there you have to write the code.

Regards

Satya

junwu
Active Contributor
0 Kudos

Hi Satyabrata

I think you get wrong,

I am talking about interactive form. not webdypro UI.

Thanks

john

i042339
Product and Topic Expert
Product and Topic Expert
0 Kudos

But according to the previous post it seems it is Web Dynpro UI.

Ok, If it is Interactive form, Can you please let me know do you really need to get the dynamic data from the database or those can be static means you have fix number of value for dropdown B for each value in Drppdown A.

If this is the case you can handle that using Java scripts. One advantages of this you can use the form offline aswell.

This is the simplest solution but depeneds upon your excat requirement.

Regards

Satya

junwu
Active Contributor
0 Kudos

Hi Satyabrata;

There are two dropdownlist, one for selection of company, another is for selection of cost center which is based on the selection of company.

I am not very clear about how adobe form works.

Could you tell me :

how the context node data can go into adobe form?

then how I can use javascript to access those data?

Best regards,

John