f:selectItems value="#{myMap}" underspecified
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
The documentation of UISelectItems says:
Map - The keys of this object (once converted to Strings) are assumed to be
labels, and the values of this object (once converted to Strings) are assumed to
be values, of SelectItem instances that will be constructed dynamically and
added to the set of available options for the parent component, in the order
provided by an iterator over the keys.
This behavior comes from jsf 1.1, but in jsf 2.0 it was added some new
attributes (from f:selectItems tlddoc):
Version 2 of the specification introduces several new attributes, described
below. These are: var, itemValue, itemLabel, itemDescription, itemDisabled, and
itemLabelEscaped.
Now, what happen if some user do something like this:
```
```
It just does not work, because there is no clear definition about what should
f:selectItems do in this case.
The proposal for solve this one is if var property is set and value implements
Map interface, use the entry object as var, so the user can choose between the
key and some attribute on the item value.
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[2.0]
Contributor guide
Research direction
Start by reading the UISelectItems documentation and the f:selectItems TLD documentation, then compare the JSF 1.1 Map behavior with the JSF 2.0 attributes described in the issue. Done means the behavior for a Map used with var, itemLabel, and itemValue is clearly specified and the proposed key/value handling is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100