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
N.AhmedN.Ahmed 

System.VisualforceException: Invalid value for property action: argument type mismatch

iam having the following issue in dynamic binding of event for commandLink object and getting the above error.

the google search does not return any result on this, please help!. Thanks.

 

 

Code:

 

public Component.Apex.OutputPanel getCreateDynamicLinkButton(){

Component.Apex.OutputPanel dynOutPanel= new Component.Apex.OutputPanel();

Component.Apex.commandLink cmd = new Component.Apex.commandLink();

ApexPages.Action cEvent = new ApexPages.Action('{!clickMe}');
cmd.action = cEvent ;
cmd.value = 'Click Me';

return dynOutPanel;

}

public void clickMe(){

}

 

N.AhmedN.Ahmed

i figure it out. highlight in bold.

public Component.Apex.OutputPanel getCreateDynamicLinkButton(){

Component.Apex.OutputPanel dynOutPanel= new Component.Apex.OutputPanel();

Component.Apex.commandLink cmd = new Component.Apex.commandLink();

cmd.expressions.action = '{!clickMe}';
cmd.value = 'Click Me';

return dynOutPanel;

}

public void clickMe(){

}

 

Aphinya PhansawangAphinya Phansawang
Thank you for your solution. You saved my life.