This content has been marked as final.
Show 3 replies
-
1. Re: EL and accessing .size or isEmpty
stu2 May 5, 2007 12:38 AM (in response to tony.herstell1)You can use the empty keyword, like this:
#{advertisingCampaign.keywords == null || empty advertisingCampaign.keyword} -
2. Re: EL and accessing .size or isEmpty
hstang May 5, 2007 12:40 AM (in response to tony.herstell1)Use Facelets' built-in Jstl Function library.
<h:outputText value="#{messages.no_keywords}" rendered="#{fn:length(advertisingCampaign.keywords) == 0}"/>
make sure you register the namespace for fn
i.e<html xmlns:fn="http://java.sun.com/jsp/jstl/functions">
-
3. Re: EL and accessing .size or isEmpty
tony.herstell1 May 5, 2007 12:53 AM (in response to tony.herstell1)Thanks guys excellent solutions.
I discovered a workaround which was to use "another" DataModel to to hold these.
Seems overkill as its only for displaying them as text (no buttons, line row selections etc.), so I will refactor to use one of the solutions above.