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
t.deepthi05t.deepthi05 

Passing Parameters

Hi,

 

I have a list of values to be passed to the controller on buttonclick.I used Param tag but i am getting only one value to the controller where the list contains two values.

 

how to pass list of values to the controller using paramtag or by other means.

 

Regards,

Deepthi.T

ShaTShaT
Hi,

Use two param tag instead of one and assign the values to the param.

Thanks
Shailu

t.deepthi05t.deepthi05
If there are 10 records in a list, the values are dynamic.
<apex:param name="vpi" value="{!v.sample_r}" assignTo="{!vpi}"/>

Here v.sample__r contains two ids[axzgd89000334,axzgd89000123]

but only values is displayed in the controller
Avidev9Avidev9

So here is solution.

 

  • Pass a single param
  • Make the param a CSV . So if you need to send n values it should be like 'val1,val2,val3........n' and in the controller split the same and use them.

This is the only way you can do it with param and actionFunction.

t.deepthi05t.deepthi05

Can u explain be in Detail.

 

I have {!v.xyz}  which contain string of values. Which returns id in the following format [abc,xyz,abc,........123] in the controller when I am passing param tag I am getting only 1 value  i.e... abc