on 02-11-2009 12:54 PM
Hi
can you please tell me how to populate values in to dropdown by index from model(backend)
Thnaks
rahul
Hi Rahul,
Welcome to SDN!
Not much needed for this. Just create a table with two fields key and value in the RFC and popualte values in it. Bind the texts property of the DDI to the value attribute of the table.
Remember you will have to use table under the Output node.
To get currently slected key,
you can use this code.
wdContext.current<DDItable>Element().get<key>();
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
just bind the "texts" property of the DropDownByIndex with the attribute of the output node the rfc have.
execute the rfc in Doinit method of the view.
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
You can do it by using slightly different method also.
Below is the code given.
IPrivateInbevecc_compView1.IVn_PlantElement plantElement = null;
for(int i=0;i<arrayList.size;i++){
plantElement = wdContext.nodeVn_Plant().createVn_PlantElement();
plantElement.setVa_Plant(arrayList.get(i).toString());
wdContext.nodeVn_Plant().addElement (plantElement);
}
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
Take the output from backend in a arrayList. Now use the below code to populate the drop down.
I have created a node of name node Vn_Plant and its attribute as Va_Plant
IPrivateInbevecc_compView1.IVn_PlantElement plantElement = null;
ArrayList testList = new ArrayList();
for(int i=0;i<arrayList.size;i++){
plantElement = wdContext.nodeVn_Plant().createVn_PlantElement();
plantElement.setVa_Plant(arrayList.get(i).toString());
testList .add(plantElement);
}
wdContext.nodeVn_Plant().bind(testList );
Please revert if you require more info.
Regards
Narendra
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.