unfortunately you can not use functions in jsf el expressions.
try to create a new method in your handler which determines if the
list contains only one element.

2005/11/5, Kevin Hale Boyes <[EMAIL PROTECTED]>:
> I have a handler return a list of SelectItems that I use as:
>
> <h:selectOneMenu  ...>
>     <f:selectItems value="#{handler.types}"/>
>    ...
>
>
> But, if there is only one item in the list then I'd like to change it
> to plain output text (and a hidden input)
>
> So, I tried
>
> <h:panelGroup rendered="#{length(handler.types) > 1}">
>     <h:selectOneMenu  ...>
> </h:panelGroup>
> <h:panelGroup rendered="#{length(handler.types) == 1}">
>     <h:inputHidden rendered="true" ...
> </h:panelGroup>
>
>
> but that isn't valid expression syntax.
>
> How do I get the size of my collection (List)?
>
> Thanks,
> Kevin.
>


--
Mathias

Reply via email to