Closed BalusC closed 3 years ago
+1
It's now in Faces 4.0, along with an IT :+1:
@BalusC i currently implement this feature in MyFaces and im not sure if selectItemGroups should inherit from selectItems i would like to implement it without, it feels a bit hacky - at least how its implemented in Mojarra to wrap getValue.
I think i could also implement with inheritance but without that #getValue overload, we dont have to be backward compatible i think.
also i wonder if we shoudlnt add f:selectItemGroup, too?
Existing UISelectOne/UISelectMany components only support UISelectItems/UISelectItem children. Hence UISelectItemGroups really has to extend from one of these. As the value attribute is an array/iterable, it has to be UISelectItems.
f:selectItemGroup isn't terribly useful, but I think you're right, that it should be added too.
yep, or change UISelectOne/Many renderers. Not sure whats better.
Would you like to create a ticket + impl in Mojarra for f:selectItemGroup? I will continue with MyFaces then.
Changing renderers completely breaks backwards compatibility on component libraries.
I'll add ticket.
Reopening; itemLabel
and itemDisabled
attributes are missing in taglib documentation.
There's currently no way to declare
SelectItemGroup
via the view. These have to be manually created in the model.Proposal: introduce
<f:selectItemGroups>
Example implementation: https://showcase.omnifaces.org/components/selectItemGroups
While at it,
SelectItemGroup#setSelectItems()
currently only accepts aSelectItem[]
(pre Java 1.5 approach). Improve it to accept varargs and/or aCollection
.