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.

Reply via email to