for (T choice : choices) {
selection.object();
getProvider().toJson(choice, selection);
selection.endObject();
}
selection.endArray();
} catch (JSONException e) {
throw new RuntimeException("Error converting model object to Json", e);
}
response.render(OnDomReadyHeaderItem.forScript(JQuery.execute("$('#%s').select2('data', %s);", getJquerySafeMarkupId(),