You need to sign in to do that
Don't have an account?

Pass a parameter to a custom component inside a repeater
I can't figure out why this isn't working:
<apex:repeat value="{!MyContacts}" var="c" >
<c:ContactRowComponent contactLastName="{!c.LastName}"/>
</apex:repeat>
(where on the main controller MyContacts returns an array of Contact objects, and on the component contactLastName is defined as a String attribute)
This gives me error:
Literal value is required for attribute contactLastName in <c:ContactRowComponent> at line 25 column 27
It seems to be saying that a literal value is required and not a formula? Is what I am trying to do impossible, or am I doing it wrong?
I can't figure out why this isn't working:
<apex:repeat value="{!MyContacts}" var="c" > <c:ContactRowComponent contactLastName="{!c.LastName}"/> </apex:repeat>
(where on the main controller MyContacts returns an array of Contact objects, and on the component contactLastName is defined as a String attribute)
This gives me error:
Literal value is required for attribute contactLastName in <c:ContactRowComponent> at line 25 column 27
It seems to be saying that a literal value is required and not a formula? Is what I am trying to do impossible, or am I doing it wrong?
This question also at StackOverflow if you want to get some StackOverflow points : )
What you are doin is possible.
I did found in other posts that changing the parameter contactLastName attribute required from false to true will solve this.
How is your component defined?
Ignacio
I have the same issue, I tried imuino2 suggestion, but still having the error message.
Error: Literal value is required for attribute
Anyone?