wood burning stoves 2.0*
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Logic Iterate" Watch "Logic Iterate" New topic
Author

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"
value="[]">
No rows returned.
</logic:equal>


"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
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logic Iterate
 
Similar Threads
Performance hit using "where" clause in the query
logic iterate
3 - level folder display in struts
I need help, with logic:iterate in HashMap
Can we use Logic iterate tag to save data