cancel
Showing results for 
Search instead for 
Did you mean: 

values not displayed properly in webdynpro table

lakshmi_narayana2
Active Participant
0 Kudos

Hi all

My code in the view goes like this

for(int j=0;j<=productLevel.size();j++)

{

IPrivateTierStatus.ITierStatusElement TS = wdContext.nodeTierStatus().createTierStatusElement();

Map tsmap=(Map)productLevel.get(j);

bpType = (String)tsmap.get("BPTYPE");

plPerOUnit=(String)tsmap.get("PLOUNIT");

System.out.println("Bp Type in 2nd for loop nowww11111::"+bpType);

System.out.println("Pl Per OUnit in 2nd for loop nowwww11111::"+plPerOUnit);

TS.setTSBPTYPE(bpType);

TS.setTSPLPEROUNIT(plPerOUnit);

wdContext.nodeTierStatus().addElement(TS);

}

productLevel.size() value is 3 and matches with no.of records in the backend

System.out.println("Bp Type in 2nd for loop nowww11111::"+bpType);

System.out.println("Pl Per OUnit in 2nd for loop nowwww11111::"+plPerOUnit);

The above 2 print statements prints 3 times and gives 3 different values which also match with my backend values.

Everything is fine upto this.

But in the webdynpro screen, only one record is displayed

My Context details

-


TierStatus (Value Node)

TSBPID (Value attribiutes)

TSPLPOUNIT (Value attribiutes)

TSBPTYPE (Value attribiutes)

cardinality 0...n

collecType list

initializeLeadSelection true

selection 0...1

singleton true

typeaccessreq true

pl let me know why am getting only one record instead of 3 records.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
for(int j = 0; j <b><=</b> productLevel.size(); j++)
{
...
}

Why are you including index productLevel.size()?

Armin

lakshmi_narayana2
Active Participant
0 Kudos

am getting my map values based on that index.

Former Member
0 Kudos

But you wrote that the result set has 3 entries and you loop over 4?

And which value have the properties "visibleRowCount" and "firstVisibleRow" of the Table UI element?

Armin

lakshmi_narayana2
Active Participant
0 Kudos

Armin

In the backend i have 3 records and am looping for 3values

in the for loop int j has values 0,1,2 (3)

Former Member
0 Kudos
for (int j = 0; j <= 3; ++j)

loops over the <b>4</b> indices 0, 1, 2 and 3.

What about my other questions?

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

Have u given the movenext to the node. If not try this code in ur implementation

wdContext.nodeTierStatus().moveNext();

Regards,

Rathna

lakshmi_narayana2
Active Participant
0 Kudos

implemented moveNext() method in my code

i included the following line of code after the line

wdContext.nodeTierStatus().addElement(TS);

wdContext.nodeTierStatus().moveNext();

But no luck.Still am getting only one row of data dsiplayed.

Former Member
0 Kudos

Steve,

Check the size of the node after you have added the elements (wdContext.nodeTierStatus().size()).

Also, when is this code being processed? Is the element being displayed the last one added?

-Cindy

Message was edited by: Cindy Herrman

lakshmi_narayana2
Active Participant
0 Kudos

yes the element displayed is the last element added and i printed out the size its value is

"size of the node after adding elemnts is:3"

3 matches th no of records in the backend.

i think we are close to the solution!!!

lakshmi_narayana2
Active Participant
0 Kudos

sorry one correction!!!

the element displayed is the first element added.