public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
final UISuggest suggest = (UISuggest) component;
final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
final String id = suggest.getClientId(facesContext);
final UIIn in = (UIIn) suggest.getParent();
final MethodExpression suggestMethodExpression = suggest.getSuggestMethodExpression();
final AutoSuggestItems items
= createAutoSuggestItems(suggestMethodExpression.invoke(facesContext.getELContext(), new Object[]{in}));
// todo: declare unused/unsupported stuff deprecated
writer.startElement(HtmlElements.DIV, null);
writer.writeClassAttribute(Classes.create(suggest));
writer.writeIdAttribute(id);
writer.writeAttribute(DataAttributes.FOR, in.getClientId(facesContext), false);
writer.writeAttribute(DataAttributes.SUGGEST_MIN_CHARS, suggest.getMinimumCharacters());
writer.writeAttribute(DataAttributes.SUGGEST_DELAY, suggest.getDelay());
writer.writeAttribute(DataAttributes.SUGGEST_MAX_ITEMS, suggest.getMaximumItems());
writer.writeAttribute(DataAttributes.SUGGEST_UPDATE, Boolean.toString(suggest.isUpdate()), false);
int totalCount = suggest.getTotalCount();