@Override
    public SimpleSelectionItemWrapper<T> wrap(final T item) {
        if (item == null) {
            if (nonSelectItem != null) {
                return nonSelectItem;
            }
            return null;
        } else {
            final String displayValue;
            if (displayValueFunction != null) {
                displayValue = displayValueFunction.apply(item);
            } else if (item instanceof HasDisplayValue) {
                displayValue = ((HasDisplayValue) item).getDisplayValue();
            } else if (item instanceof String) {
                displayValue = (String) item;
            } else {
                displayValue = item.toString();
            }
            if (renderFunction != null) {
                return new SimpleSelectionItemWrapper<>(displayValue, item, (label, item1) ->
                        renderFunction.apply(item));
            } else {
                return new SimpleSelectionItemWrapper<>(displayValue, item);
            }
        }
    }
This function will be used to optionally provide a rendered form of the item instead of plain text.
If not set then it will fall back on displayValueFunction, {@link HasDisplayValue} or
{@link Object#toString()}.
stroom-core-client-widget/src/main/java/stroom/item/client/SimpleSelectionListModel.java