+ Start a Discussion

How do you send a fieldset as an argument to component?



The following component works as expected with the default attribute,  (also as tried with type=object[])



<apex:component >
<apex:attribute name="fieldset" type="string[]" description="VisualforceArrayList" default="{!$ObjectType.Metadata__c.FieldSets.RL_Default}" />

 however when leveraging the component and setting the fieldset I get:



Save error: Literal value is required for attribute fieldset in <c:metadataRelatedListFilter>


		<c:metadataRelatedListFilter metadataList="{!Metadata__c.ReferenceFrom__r}" tabname="childrel" title="Child Relationships" fieldset="{!Metadata__c.FieldSets.RL_SObject_ReferenceFrom}"/>

 Please advise,







I think the literal message is because you have specified a default for an attribute - VF seems to require a literal rather than merge field in that circumstance.