Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is wrong with above prepend and append approach?  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have a question in my mind
this is my code


problem is one extra row is adding on my code means if I have 10 Objects in my database then it will add 11 rows last 2 rows are 10,10
and If I have 5 objects in session then it will add 6 rows last 2 rows has Id of 5,5 with same data

what is wrong with my approach?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you counting the hard coded row above the forEach?

You have a header, test row and then the real rows. The header and real rows look intentionial. The test row looks like it was let over from earlier.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!