on 10-17-2006 3:39 PM
Hi,
I have a code like this:
for(int i=0;i<resbTableSize;i++){
po_ResbInput.setErfme(wdContext.nodeTable1_Resb ().getTable1_ResbElementAt(i).getErfme());
po_ResbInput.setErfmg(wdContext.nodeTable1_Resb().getTable1_ResbElementAt(i).getErfmg());
poReceiptInput.addT_Resb(po_ResbInput);
Problem here is, though I am setting all the values, model Input(poReceiptInput) is taking only the last element. Can you please tell whats wrong?.
I have 11 rows in the table. When I print, I can see that I am setting all the 11 rows correctly. But in ST05, I observed that it is taking only the last row of the table and setting for the 11 rows of model input.
Thanks,
Sunita.
Message was edited by: sunita
Hi sunita,
You have to create instance for every row:
for(int i=0;i<resbTableSize;i++){
... po_ResbInput = new ...();//<--!!!!!!!
po_ResbInput.setErfme( wdContext.nodeTable1_Resb ().getTable1_ResbElementAt(i).getErfme());
po_ResbInput.setErfmg( wdContext.nodeTable1_Resb().getTable1_ResbElementAt(i).getErfmg());
poReceiptInput.addT_Resb(po_ResbInput);
}
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.