cancel
Showing results for 
Search instead for 
Did you mean: 

To avoid duplicate values in DrowpDownByIndex

Former Member
0 Kudos
52

hi

Iam calling an RFC ,it's output is as following

column 1 column2

A 2

A 3

A 42

B 34

B 3

B 11

B 0

Iam displaying these values in two combo box. But my requirement is as following in first combobox if i select A ,only those values in column 2 which are mapped to A ie(2,3,42) should see in the combobox two.So pls help me i don't know how to do this iam a beginner in webdynprofor java.

I'll give points.......

View Entire Topic
Former Member
0 Kudos

Hi,

You can loop through the node of combo box1:

List attrList = new ArrayList();

IPrivate<VIEW NAME>.I<NODE NAME>Element ele = null;

for(int i = 0;i<wdContext.node<NAME>.size();i++){

if(wdContext.node<NAME>().get<NAME>elementAt(i).get<ATTR_NAME1>().startWith("A")){

// ATTR_NAME1 is the attribute mapped to checkbox1.

// create element of another attribute which should be mapped to checkbox2.

ele = wdContext.create<NODE NAME>Element();

ele.set<ATTR NAME2>(wdContext.node<NAME>().get<NAME>elementAt(i).get<ATTR_NAME1>());

// ATTR_NAME1 is the attribute mapped to checkbox1.

attrList.add(ele);

}

}

wdContext.node<NAME>.bind(attrList);

Hope this will solve your problem.

thanks & regards,

Manoj