Hi Kočičák, 1) and 2) I guess UISelectItem(s) is considered a POJO and thus doesn't provide this method(s). Furthermore you can have multiple UISelectItem(s) for every component and so you need a way to combine all those! Thus I think this stuff is considered to be done by impl and not be present in api - however the spec tells you how to do it, maybe this part should be more clear!
3) Actually I don't know. I can remember that we added them first, but afterwards discovered that Mojarra's javadocs [1] don't include those methods. Thus, in order to be binary compatible with the Mojarra API, we removed them and used the attribute map. Maybe this is a spec issue, but I really don't know. Regards, Jakob [1] https://javaserverfaces.dev.java.net/nonav/docs/2.0/javadocs/javax/faces/component/UISelectItems.html 2010/11/24 Martin Koci <[email protected]>: > Hi, > > following things are specified by spec, but maybe someone will know > reasons: > > 1) why UISelectOne/Many classes don't have method like > > List<SelectItem> getSelectItems > > currently each renderkit has own method with similar purpose but with > different quality and bugs :) > > for example, myfaces have RendererUtils.getSelectItemList(UISelectMany, > FacesContext) which outputs warning if f:selectItems value= leads to > null, but RichFaces throw an uninformative exception in same situation. > > For user's view it is inconsistent behaviour. > > > > 2) similar question: why UISelectItem/UISelectItems dont have > getSelectItem() resp. getSelectItems() method for creating selections > they represent? > > > 3) why UISelectItem has method like getItemLabel(), > getItemDescription(), but UISelectItems not - it uses only attributes > map. > > > Regards, > > Kočičák > > -- Jakob Korherr blog: http://www.jakobk.com twitter: http://twitter.com/jakobkorherr work: http://www.irian.at
