return clientSelectItem;
}
public static void encodeItems(FacesContext facesContext, UIComponent component, List<ClientSelectItem> clientSelectItems,
String itemHtmlElement, String defaultItemCss) throws IOException {
AbstractSelectComponent select = (AbstractSelectComponent) component;
if (clientSelectItems != null && !clientSelectItems.isEmpty()) {
ResponseWriter writer = facesContext.getResponseWriter();
String clientId = component.getClientId(facesContext);
int i = 0;
for (ClientSelectItem clientSelectItem : clientSelectItems) {
String itemClientId = clientId + "Item" + (i++);
clientSelectItem.setClientId(itemClientId);
writer.startElement(itemHtmlElement, select);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, itemClientId, null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
HtmlUtil.concatClasses(defaultItemCss, select.getItemClass()), null);
String label = clientSelectItem.getLabel();
if (label != null && label.trim().length() > 0) {
writer.writeText(label, null);
} else {