How can I create a JSF composite component that binds a Collection to both an h:selectOneMenu and h:selectManyListbox?
问题 I'm trying to create a composite component that will allow the user to toggle between a h:singleSelectMenu and h:selectManyListbox. I have it working sort of. It works as long as the value field points to a Collection...it does NOT work if the value field is null. singleMultiSelect.xhtml <?xml version="1.0" encoding="US-ASCII"?> <!DOCTYPE html> <ui:composition xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:cc=