Hi
1) I'm using a Value Help DDL which is populated from WD. So far, the DDL works but I would like to have the first item displayed in the list field when the form is initially rendered. Actually the field is empty and I have to select a value from the the list.
2) Whenever the value of the DDL is being changed I need to determine the index of the selected list entry in order to retrieve other data.
Any hint to these concerns would be appreciated.
René
Hello Rene,
For example, if you have a context structure as follows:
Context
DDLBData (datasource node)
ValueHelpDDLB (context attribute mapped to DDL)
then you can default a value immediately after the population of the DDL as follows:
wdContext.nodeDDLBData().currentDDLBDataElement().setValueHelpDDLB(key);
About the second question, you do not have any automatic way to get the index of the selected item. But you can easily do it just by employing your own mechanism. Maybe, by maintaining a HashMap or some other mechanism. In Web Dynpro you have DropDownByIndex DDL but there is no such DDL in Adobe forms.
Hope that helps.
Thanks,
Krishanu
Hi ,
Is this is developed in webDynpro Adobe in Java ?
Are you using the following code to fill the Drop Down list box ?
Code in wdInit()
===========
IWDAttributeInfo attInfo =wdContext.nodeContext().getNodeInfo().getAttribute("Name");
ISimpleTypeModifiable attType = attInfo.getModifiableSimpleType();
IModifiableSimpleValueSet attValueSet =attType.getSVServices().getModifiableSimpleValueSet();
attValueSet.put("0","Value");
In Enter event of drop down list
========================
var jsToExecute = "event.target.SAPValueHelp(\"" + this.somExpression + "\");";
app.eval(jsToExecute);
For this when you select any value from drop down list box you can get the index of selection using the following code
int cnt
cnt =Integer.parseInt( wdContext .nodeContext().currentContext() .getName());
It gives you the index of the selection.
Please let me know if you need any info .
Regards,
Nanda
Hi
Thanks for your contributions. Setting the initial value of the DDL now works fine. Maybe my problem description was a little bit confusing. The DDL is part of an interactive form and its list data is provided by the underlying WD/Java. So what I need is to determine the index of the selection within the script of the change or exit event of the interactive form. This index should be used to retrieve further data fom another list in context data of the interactive form.
Any suggestion to resolve this requirement would be appreciated.
René
Add a comment