> I go back and forth.  Sometimes I put the "no results found" 
> outside of the
> table.  But often it's nice to do it inside (and keep the header) like
> specialist33.  Depends on the layout.
Agreed -- the point I was trying to make, poorly, was that there are use
cases (ex. outside the table) where the template author won't be able to use
the #empty trick. So they will probably have two parallel condition tests,
which is generally not a great idea.

Here's another use case where the expression gives back either a list OR a
single result. 

#if ($Searcher.thereIsOnlyOne)
 Only one result == $Searcher.result.name
#else
 #foreach ($thingy in $Searcher.result)
   $thingy.name
 #end
#end

For this case... #foreach#empty would probably not hit #empty... or maybe it
would because if the Engine tried Searcher.getResult().size() -- it would
probably die.

I have a very unique wheel. <grin>

BTW -- nobody has suggested what happens for $thingy.foo.results when foo is
null (i.e. is the #else rendered because a) list is empty, b) list is null,
or c) the expresstion blows up but has nothing to do remotely with results)

Cheers,
Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to