function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gino BassoGino Basso 

Can't use repeat var in a merge field expression for reRender attribute

The following VF page will not compile with the reRender attribute specified as shown below. The specific error is that cmd is not a property of the standard controller. If I remove the reRender attribute the page compiles successfully. Note that details have been removed for brevity.


<apex:page standardController="MyObj__c" extensions="MyController" > ... <apex:repeat value="{!commands}" var="cmd"> <apex:commandLink action="{!cmd.execute}" value="{!cmd.label}" rendered="{!cmd.enabled}" styleClass="actionLink" title="{!cmd.label}" reRender="{!IF(cmd.isDmlCommand,'myPanel','')}" /> <apex:outputText value=" | " /> </apex:repeat> ... </apex:page> public class MyController {

... public ICommand[] commands {get; set;} } public interface ICommand { String getlabel(); Boolean getenabled(); Boolean getisDmlCommand(); PageReference execute(); }


Message Edited by Gino Basso on 08-17-2009 09:35 AM