return true;
}
public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {
TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
UISelectOne component = (UISelectOne) uiComponent;
List<SelectItem> items = ComponentUtil.getSelectItems(component);
if (LOG.isDebugEnabled()) {
LOG.debug("items.size() = '" + items.size() + "'");
}
String title = HtmlRendererUtil.getTitleFromTipAndMessages(facesContext, component);
boolean disabled = items.size() == 0
|| ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)
|| ComponentUtil.getBooleanAttribute(component, ATTR_READONLY);
writer.startElement(HtmlConstants.SELECT, component);
writer.writeNameAttribute(component.getClientId(facesContext));
writer.writeIdAttribute(component.getClientId(facesContext));
writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
writer.writeStyleAttribute();
writer.writeClassAttribute();
if (title != null) {
writer.writeAttribute(HtmlAttributes.TITLE, title, true);
}
String onchange = HtmlUtils.generateOnchange(component, facesContext);
if (onchange != null) {
writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, true);
}
Object[] values = {component.getValue()};
HtmlRendererUtil.renderSelectItems(component, items, values, writer, facesContext);
writer.endElement(HtmlConstants.SELECT);
super.encodeEnd(facesContext, component);