myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Cudennec <>
Subject Re: Expression language, testing size of collections
Date Thu, 28 Jun 2007 09:28:58 GMT
Hi David,

try this EL-Expression:

rendered="#{not empty yourCollectionName}"



David Delbecq schrieb:
> Hello,
> i'm facing an issue with EL in JSF. I have a collection of items. I want
> to render them as a table header followed by content (using tomahawk
> datalist). However, i'd like to skip full table rendering if collection
> is empty or null. Problem is that collections in java do not follow the
> getters mecanism (size instead of getSize). Are there clean suggested
> ways to do it, or will i have to create a pseudo map that does the trick
> (rendered ="#{pseudoMapBean.size[bean.someCollection] >0}") ?
> Thanks for suggestions.

View raw message