SelectItemsIterator failing when getting value for #{}-type EL expressions

From: wazoo999 <>
Date: Fri, 18 Jan 2008 06:54:56 -0800 (PST)

Hi, I'm experiencing very weird issues using the selectItems tag.

The backing bean (OrdersForm) has an instance method getUpdateOptionsMenu()
that returns the List of SelectItem's. The page is rendered and validated
well when using the "#{OrdersForm.updateOptionsMenu}" expression in
f:selectItems value attribute.

That very bean has a method getGet that returns a Map of NamedItem's.
NamedItem is a simple abstract class that can return a List, Object or Map
depending on use.
Pages can retrieve the appropriate NamedItem by supplying the appropriate
String key. I use this approach to reduce the number of getters in the
backing beans.
Example: #{OrdersForm.get['customers'].list} or #{OrdersForm.get.user.item}

Enter the weird issues. When the page is being rendered, the
UISelectItems.getValue() that is called by the
RenderkitUtils.getSelectItems() appears to process the
"#{OrdersForm.get.updateMenu.list}" expression correctly. But when the form
is being submitted and we enter the the ProcessValidationsPhase where the
SelectItemsIterator is used to retrieve the values then
ValueExpression.getValue() returns 'null' for that very expression.

The weirdest thing is that the expression is evaluated well in one phase and
resolves to null in another. Any thoughts on how to fix this? I've traced it
that far, but don't have enough time and knowledge to research it further

View this message in context:
Sent from the javaserverfaces dev mailing list archive at