code: @SuppressWarnings("unchecked")
  	protected AutocompleteJson newAutocompleteJson(int id, T obj)
  	{
  
  		boolean thisOneSelected = obj.equals(getModelObject());
  		T objectValue = (T) getChoiceRenderer().getDisplayValue(obj);
  		Class<T> objectClass = (Class<T>) (objectValue == null ? null : objectValue.getClass());
  
  		String displayValue = "";
  		if (objectClass != null && objectClass != String.class)
  		{
  			final IConverter<T> converter = getConverter(objectClass);
  			displayValue = converter.convertToString(objectValue, getLocale());
  		}
  		else if (objectValue != null)
  		{
  			displayValue = objectValue.toString();
  		}
  		final String idValue = getChoiceRenderer().getIdValue(obj, id);
  		if (thisOneSelected)
  		{
  			autocompleteHidden.setModelObject(idValue);
  		}
  
  		return new AutocompleteJson(idValue, displayValue);
  	}
docs: Create an {@link AutocompleteJson}
  
  @param id
  @param obj
  @return a new instance of {@link AutocompleteJson}