// attribute will be rendered as one of the "pass thru" attributes
Iterator<SelectItem> items = RenderKitUtils.getSelectItems(context, component);
// render the options to a buffer now so that we can determine
// the size
FastStringWriter bufferedWriter = new FastStringWriter(128);
context.setResponseWriter(writer.cloneWithWriter(bufferedWriter));
int count = renderOptions(context, component, items);
context.setResponseWriter(writer);
// If "size" is *not* set explicitly, we have to default it correctly
Integer size = (Integer) component.getAttributes().get("size");
if (size == null || size == Integer.MIN_VALUE) {
size = count;
}
writeDefaultSize(writer, size);
RenderKitUtils.renderPassThruAttributes(context,
writer,
component,
ATTRIBUTES,
getNonOnChangeBehaviors(component));
RenderKitUtils.renderXHTMLStyleBooleanAttributes(writer,
component);
RenderKitUtils.renderOnchange(context, component, false);
// Now, write the buffered option content
writer.write(bufferedWriter.toString());
writer.endElement("select");
}