protected void encodePanel(FacesContext context, AutoComplete ac) throws IOException { ResponseWriter writer = context.getResponseWriter(); String styleClass = ac.getPanelStyleClass(); styleClass = styleClass == null ? AutoComplete.PANEL_CLASS : AutoComplete.PANEL_CLASS + " " + styleClass; writer.startElement("span", null); writer.writeAttribute("id", ac.getClientId(context) + "_panel", null); writer.writeAttribute("class", styleClass, null); writer.writeAttribute("role", "listbox", null); if (ac.getPanelStyle() != null) { writer.writeAttribute("style", ac.getPanelStyle(), null); } if (ac.isDynamic() && ac.isDynamicLoadRequest(context)) { Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String query = params.get(ac.getClientId(context) + "_query"); encodeResults(context, ac, query); } writer.endElement("span"); }
protected void encodeSingleMarkup(FacesContext context, AutoComplete ac) throws IOException { ResponseWriter writer = context.getResponseWriter(); String clientId = ac.getClientId(context); String styleClass = ac.getStyleClass(); styleClass = styleClass == null ? AutoComplete.STYLE_CLASS : AutoComplete.STYLE_CLASS + " " + styleClass; writer.startElement("span", null); writer.writeAttribute("id", clientId, null); writer.writeAttribute("class", styleClass, null); if (ac.getStyle() != null) { writer.writeAttribute("style", ac.getStyle(), null); } encodeInput(context, ac, clientId); if (ac.getVar() != null) { encodeHiddenInput(context, ac, clientId); } if (ac.isDropdown()) { encodeDropDown(context, ac); } if (!ac.isDynamic()) { encodePanel(context, ac); } writer.endElement("span"); }
protected void encodePanel(FacesContext context, AutoComplete ac) throws IOException { ResponseWriter writer = context.getResponseWriter(); String styleClass = ac.getPanelStyleClass(); styleClass = styleClass == null ? AutoComplete.PANEL_CLASS : AutoComplete.PANEL_CLASS + " " + styleClass; writer.startElement("span", null); writer.writeAttribute("id", ac.getClientId(context) + "_panel", null); writer.writeAttribute("class", styleClass, null); writer.writeAttribute("role", "listbox", null); if (ac.getPanelStyle() != null) { writer.writeAttribute("style", ac.getPanelStyle(), null); } if (ac.isDynamic() && ac.isDynamicLoadRequest(context)) { Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String query = params.get(ac.getClientId(context) + "_query"); encodeResults(context, ac, query); } writer.endElement("span"); }
if (!ac.isDynamic()) { encodePanel(context, ac);
.attr("active", ac.isActive(), true) .attr("unique", ac.isUnique(), false) .attr("dynamic", ac.isDynamic(), false) .attr("autoSelection", ac.isAutoSelection(), true);
protected void encodeSingleMarkup(FacesContext context, AutoComplete ac) throws IOException { ResponseWriter writer = context.getResponseWriter(); String clientId = ac.getClientId(context); String styleClass = ac.getStyleClass(); styleClass = styleClass == null ? AutoComplete.STYLE_CLASS : AutoComplete.STYLE_CLASS + " " + styleClass; writer.startElement("span", null); writer.writeAttribute("id", clientId, null); writer.writeAttribute("class", styleClass, null); if (ac.getStyle() != null) { writer.writeAttribute("style", ac.getStyle(), null); } encodeInput(context, ac, clientId); if (ac.getVar() != null) { encodeHiddenInput(context, ac, clientId); } if (ac.isDropdown()) { encodeDropDown(context, ac); } if (!ac.isDynamic()) { encodePanel(context, ac); } writer.endElement("span"); }
if (!ac.isDynamic()) { encodePanel(context, ac);
.attr("active", ac.isActive(), true) .attr("unique", ac.isUnique(), false) .attr("dynamic", ac.isDynamic(), false) .attr("autoSelection", ac.isAutoSelection(), true);