salesforce - VisualForce: Pass a parameter to a custom component inside a repeater -
i can't figure out why isn't working:
<apex:repeat value="{!mycontacts}" var="c" > <c:contactrowcomponent contactlastname="{!c.lastname}"/> </apex:repeat>
(where on main controller mycontacts returns array of contact objects, , on component contactlastname defined string attribute)
this gives me error:
literal value required attribute contactlastname in <c:contactrowcomponent> @ line 25 column 27
it seems saying literal value required , not formula? trying impossible, or doing wrong?
i have come across issue well. in case because specified default attribute in component attribute can't on fields use formula reason.
for instance produce error described when passing in formula value:
<apex:attribute type="string" name="value" default="sometext" description="some name value" />
so if remove default attribute error resolved. let me know if solves particular use case.
Comments
Post a Comment