I have code much like the following:
<apex:component>
<apex:attribute name="fields" type="String[]" />
<apex:repeat value="{!fields}" var="field">
console.log('{!field}');
</apex:repeat>
</apex:component>
When this is placed in a page like this:
<c:MyCustomComponent fields="A,B,C">
The output is just A,B,C (a single value). Enclosing the field names with square brackets does not help, nor does using single quotes. Is there a way to pass an array into a component so that apex:repeat will work on it? (I am aware that this could be done through the controller; I am hoping for a solution that preserves the component interface).