wood burning stoves
The moose likes Struts and the fly likes Logic Iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Logic Iterate" Watch "Logic Iterate" New topic

Logic Iterate

Jay Richards
Ranch Hand

Joined: Jan 16, 2003
Posts: 58
I've been using Logic iterate to show my list.
But i want to be able to show a "No record found"
just in case login:iterate did no do any iteration. is that possible?
thanks a log everyone!
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
you can either write a custom tag, or you can use the logic:equal tag against the collection. If your collection is a List, you can use
<logic:equal name="myBean" property="myProperty"
No rows returned.

"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
Matthew Marquand
Ranch Hand

Joined: Dec 19, 2002
Posts: 32
Take a look at the logic:empty, logic:present, and the bean:size tags. You can use those depending on which version of struts you are using and if your list is null or just empty.
Good luck.
[ February 24, 2003: Message edited by: Thomas Paul ]
Jay Richards
Ranch Hand

Joined: Jan 16, 2003
Posts: 58
I agree. Here's the link: http://aspose.com/file-tools
subject: Logic Iterate
It's not a secret anymore!