}
public void encodeEndTobago(FacesContext facesContext,
UIComponent uiComponent) throws IOException {
UISelectBoolean component = (UISelectBoolean) uiComponent;
TobagoResponseWriter writer
= (TobagoResponseWriter) facesContext.getResponseWriter();
UIComponent label = ComponentUtil.provideLabel(facesContext, component);
boolean inline = ComponentUtil.getBooleanAttribute(component, ATTR_INLINE);
if (label != null && !inline) {
writer.startElement("table", component);
writer.writeAttribute("border", "0", null);
writer.writeAttribute("cellspacing", "0", null);
writer.writeAttribute("cellpadding", "0", null);
writer.writeAttribute("summary", "", null);
writer.writeAttribute("title", null, ATTR_TIP);
writer.startElement("tr", null);
writer.startElement("td", null);
}
Boolean currentValue = (Boolean) component.getValue();
boolean checked = currentValue != null && currentValue.booleanValue();
writer.startElement("input", component);
writer.writeAttribute("type", "checkbox", null);
writer.writeAttribute("value", "true", null);
writer.writeAttribute("checked", checked);
writer.writeNameAttribute(component.getClientId(facesContext));
writer.writeComponentClass();
writer.writeIdAttribute(component.getClientId(facesContext));
writer.writeAttribute("disabled",
ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
writer.writeAttribute("title", null, ATTR_TIP);
writer.endElement("input");