]
Pete Muir closed JBSEAM-3596.
-----------------------------
Resolution: Rejected
Add @SelectItems for exporting a list or hash to a
List<SelectItem> context variable
------------------------------------------------------------------------------------
Key: JBSEAM-3596
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3596
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.0.CR1
Reporter: Dan Allen
Priority: Minor
Fix For: 2.1.1.CR1
Original Estimate: 4 hours
Remaining Estimate: 4 hours
There are times when the UI needs a collection of SelectItem objects, yet the business
logic does not need to be aware of this requirement. Thus, we have a similar situation as
with JSF data models.
It would be helpful to have an annotation counterpart to @DataModel named @SelectItems
that outjects a list or hash as a list of SelectItem objects. If the property's type
is a list, the label is assumed to be the same as the value. If the property's type is
a hash, the entry's key is the option value and the entry's value is the option
label.
@SelectItems
List<String> options;
@SelectItems
Hash<String, String> options;
In the case of a list, we could allow a label to be defined using path notation in an
annotation property named labelPath.
@SelectItems(labelPath = "name")
List<User> users;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: