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 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"); }
@Override protected void encodePanel(FacesContext context, AutoComplete ac) throws IOException { ResponseWriter writer = context.getResponseWriter(); String panelStyle = ac.getPanelStyle(); String panelStyleClass = ac.getPanelStyleClass(); panelStyleClass = (panelStyleClass == null) ? AutoComplete.MOBILE_PANEL_CLASS : AutoComplete.MOBILE_PANEL_CLASS + " " + panelStyleClass; writer.startElement("div", null); writer.writeAttribute("class", panelStyleClass, null); if (panelStyle != null) { writer.writeAttribute("style", panelStyle, null); } writer.startElement("div", null); writer.writeAttribute("class", AutoComplete.MOBILE_ITEM_CONTAINER_CLASS, null); writer.endElement("div"); writer.endElement("div"); }