Я использую тег JSF h: selectOneMenu для выпадающего списка.
<h:selectOneMenu id="subscriberName" value="#{manageSubscriberInformation.subscriberName}"
<f:selectItem itemValue="" itemLabel="" />
<f:selectItems value="#{manageSubscriberInformation.subList}" />
</h:selectOneMenu>
Объект subList - это список, который я определил в своем классе бинов с помощью методов getter и setters.В моем методе init моего сервлета я заполняю список некоторыми значениями.Но при загрузке страницы я получаю следующую ошибку:
java.lang.IllegalArgumentException: Collection referenced by UISelectItems with binding '#{manageSubscriberInformation.subList}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/manageSubscriber.jsp][Class: javax.faces.component.UINamingContainer,Id: body][Class: javax.faces.component.html.HtmlForm,Id: c][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: subscriberName][Class: javax.faces.component.UISelectItems,Id: _idJsp143]} does not contain Objects of type SelectItem
Не могу понять, что является причиной проблемы.