I am trying to dynamically populate a list of custom fields into my plugin input page. I have the following code fragment
<select name="customFields">
#set ($customFields = $customFieldManager.getCustomFieldObjects())
<option>$customFields.size()</option>
#foreach($customField in $customFields)
<option>$customField.getFieldName() - $customField.getCustomFieldType().getName()</option>
#end
</select>
The result is a single option with the number 0 - indicating that the customFields list is empty. Why?