in tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/SelectManyListRenderer.java [123:161]
private void encodeSelectField(
final FacesContext facesContext, final T component,
final String clientId, final String selectFieldId, final String filterId, final String filter,
final boolean disabled, final boolean expanded, final String title, final Integer tabIndex) throws IOException {
final TobagoResponseWriter writer = getResponseWriter(facesContext);
final Markup markup = component.getMarkup() != null ? component.getMarkup() : Markup.NULL;
writer.startElement(HtmlElements.DIV);
writer.writeIdAttribute(selectFieldId);
writer.writeNameAttribute(clientId);
HtmlRendererUtils.writeDataAttributes(facesContext, writer, component);
writer.writeClassAttribute(
expanded ? BootstrapClass.FORM_CONTROL : BootstrapClass.FORM_SELECT,
expanded && markup.contains(Markup.LARGE) ? BootstrapClass.FORM_CONTROL_LG : null,
expanded && markup.contains(Markup.SMALL) ? BootstrapClass.FORM_CONTROL_SM : null,
!expanded && markup.contains(Markup.LARGE) ? BootstrapClass.FORM_SELECT_LG : null,
!expanded && markup.contains(Markup.SMALL) ? BootstrapClass.FORM_SELECT_SM : null,
TobagoClass.SELECT__FIELD,
expanded ? BootstrapClass.LIST_GROUP_ITEM : BootstrapClass.DROPDOWN_TOGGLE,
expanded ? null : BootstrapClass.borderColor(ComponentUtils.getMaximumSeverity(component)),
component.getCustomClass());
writer.writeAttribute(HtmlAttributes.TITLE, title, true);
writer.writeAttribute(Arias.EXPANDED, Boolean.FALSE.toString(), false);
writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
writer.startElement(HtmlElements.INPUT);
writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.SEARCH);
writer.writeIdAttribute(filterId);
writer.writeClassAttribute(TobagoClass.FILTER, BootstrapClass.FORM_CONTROL);
writer.writeAttribute(HtmlAttributes.AUTOCOMPLETE, "off", false);
writer.writeAttribute(HtmlAttributes.READONLY, filter == null || filter.isEmpty());
writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
renderFocus(clientId, component.isFocus(), component.isError(), facesContext, writer);
writer.endElement(HtmlElements.INPUT);
writer.endElement(HtmlElements.DIV);
}