@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
super.encodeBegin(context, component);
Resources.renderJSLinkIfNeeded(context, Resources.utilJsURL(context));
Resources.renderJSLinkIfNeeded(context, Resources.filtersJsURL(context));
TextSearchFilter filter = (TextSearchFilter) component;
UIInput inputComponent = (UIInput) filter.getSearchComponent();
inputComponent.setConverter(filter.getConverter());
ExpressionFilterCriterion filterCriterion = (ExpressionFilterCriterion) filter.getValue();
inputComponent.setValue(filterCriterion != null ? filterCriterion.getArg1() : null);
configureInputComponent(context, filter, inputComponent);
configureInputFromFilter(filter, inputComponent);
inputComponent.encodeAll(context);