Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts -- Cannot find bean under name indexedWorkInProgressVO

 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a jsp page which displays valus by reading a list objects. it workd fine when the list has values. but when the list is empty, I see below error message.




I have a drop down also there in my code to display ...can some one have a look at my code and see why it is even going into the loop when the size is zero (0)?


Here is the code





even i tried having a 'IF' condition saying enter the 'for' loop only when the list size is more than zero. I dont see the print out statement in the 'IF' loop when the list size is zero but i get the error saying 'indexedWorkInProgressVO' cant be find. I am guessing this is something to do with the drop down list? <html:select>? can any one give me some guidence to how to go about?

Thanks,
Ugender
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use <logic :p resent tag, instead of if .. else statement

here is how ,



You can use <logic:notPresent , to show "no data found" error !
[ September 30, 2008: Message edited by: Sagar Rohankar ]
 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar,

It worked. Thanks.

I used if statement inside the for loop. I am sure you also meant that way only.



Thanks.
Ugender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic