if(select2Field == null) {
entityLink.setRequired(getModel().isRequired());
select2Field = Select2ChoiceUtil.newSelect2Choice(ID_AUTO_COMPLETE, model, getModel());
setProviderAndCurrAndPending(select2Field, getModel().getActionArgsHint());
if(!getModel().hasChoices()) {
final Settings settings = select2Field.getSettings();
final int minLength = getModel().getAutoCompleteMinLength();
settings.setMinimumInputLength(minLength);
settings.setPlaceholder(getModel().getName());
}
entityLink.addOrReplace(select2Field);
} else {
//
// the select2Field already exists, so the widget has been rendered before. If it is