Well that would be fine if it was possible to call the isEmpty() method on a collection. But since empty is a key word the parser has a problem with "collection.empty".
Why not implement the empty keyword on all collections? The method isEmpty is available in the Collection interface. Was there some sort of argument against that when the spec was defined? --- Shawn Bayern <[EMAIL PROTECTED]> wrote: > On Thu, 13 Feb 2003, Leon Doud wrote: > > > It appears that the empty keyword doesn't always > > function on a collection. I must be missing > something > > obvious.. > > > > The folder object contains a collection of > "content". > > The useBean tag isn't initializing the Folder > object. > > Its there so I can use scriptlet debugging code. > > > > What exactly does empty check to determine if a > collection is empty or > > not? It looks like that "empty" is checking if > the folder.content is > > null or not, not if its size is zero. > > > > Folder.getContent() returns a type of > java.util.Collection. > > The 'empty' operator is specified to work with > java.util.List and > java.util.Map (as well as arrays and strings), not > java.util.Collection in > general. > > -- > Shawn Bayern > "JSTL in Action" http://www.manning.com/bayern > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]