private Converter getConverterForValue(FacesContext context, UIComponent component) { Converter converter = ((ValueHolder) component).getConverter(); if (converter == null) { ValueExpression expression = component.getValueExpression("value"); if (expression != null) { Class<?> containerClass = ServiceTracker.getService(context, GenericsIntrospectionService.class) .getContainerClass(context, expression); converter = InputUtils.getConverterForType(context, containerClass); } } return converter; }
@Override protected void doDecode(FacesContext context, UIComponent component) { AbstractAutocomplete autocomplete = (AbstractAutocomplete) component; if (InputUtils.isDisabled(autocomplete)) { return; } Map<String, String> requestParameters = context.getExternalContext().getRequestParameterMap(); String value = requestParameters.get(component.getClientId(context) + "Input"); if (value != null) { autocomplete.setSubmittedValue(value); } if (requestParameters.get(component.getClientId(context) + ".ajax") != null) { PartialViewContext pvc = context.getPartialViewContext(); pvc.getRenderIds() .add( component.getClientId(context) + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR + AbstractAutocomplete.ITEMS_META_COMPONENT_ID); context.renderResponse(); } }