• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

struts -- Cannot find bean under name indexedWorkInProgressVO

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic