Replying to self: I spoke too soon.
Maybe we should split these last posts off to a new topic?
I do not see a noticeable difference when priming the select2 widget with the vocabulary url. Either with or without this, I see the following:
first row: ajaxselect does not trigger
second row: ajaxselect is being used
Edit to add: if I leave auto_append on in my DG field factory for the subform, and make the retourmenge field optional, then the select2 widget appears (without priming).
@adapter(schema.interfaces.IField, z3c.form.interfaces)
@implementer(z3c.form.interfaces.IFieldWidget)
def ResultsDataGridFieldFactory(field, request):
"""
A special widget constructor setting up widget parameters for DGF.
"""
widget = DataGridFieldFactory(field, request)
widget.allow_insert = False
widget.allow_delete = False
widget.allow_reorder = False
#widget.auto_append = False
return widget
Almost perfect, but for the unwanted "no value".