How do I hide a radio button's "No value selected" in the Admin UI when we using DataDrivenEnumeration?
Take for example the taxCode field in in SkuImp.
@Column(name = "TAX_CODE") @AdminPresentation(friendlyName = "SkuImpl_Sku_TaxCode", order = 1001, group = GroupName.Financial) @AdminPresentationDataDrivenEnumeration(optionCanEditValues = true, optionHideIfEmpty = true, optionFilterParams = { @OptionFilterParam( param = "type.key", value = "TAX_CODE", paramType = OptionFilterParamType.STRING) }) protected String taxCode;
The "No value selected" radio shows up for DataDrivenEnumeration when the field is NOT required or if it doesn't have a defaultValue set. You can use metadata overrides to set a default value for this field or make it required. This is driven by BasicFieldMetadata#getAllowNoValueEnumOption().
Alternatively, you could set the following property which will cause all DataDrivenEnumeration fields to render as drop-downs.
admin.enum.minCountForDropDown=1