Hi

While implementing the new attributes of f:selectItems (var, itemValue,
itemLabel, ...) I got stuck at the last one.

The problem is that the mojarra javadoc lists itemLabelEscaped twice, but
with two totally different descriptions. Looking at the example in the
description of value, I found out that the name of the last attribute has to
be noSelectionValue (which would also fit to the description).

Then while testing noSelectionValue on mojarra 2.0.1, I found out that it
simply ignores it, BUT it does take the value of noSelectionOption into
account, which, according to the javadoc, is an attribute of f:selectItem,
but not of f:selectItems.

noSelectionOption evaluates to a boolean and tells me, if the current
SelectItem should be marked as a "no selection" option while
noSelectionValue (according to my interpretation of the javadoc) points to
an object which is the "no selection" option.

So these two statements should be equal (var="currentOption"):

noSelectionValue="#{bean.selectOptions[0]}"
noSelectionOption="#{currentOption == bean.selectOptions[0]}"

Now to my question: Should noSelectionValue or noSelectionOption be
implemented on f:selectItems?

Thanks in advance.

Regards

Jakob Korherr

Reply via email to