+ Start a Discussion
salesforcequestions123salesforcequestions123 

List of records from visualforce page to controller

HI 

 

I used apex param function to transfer single string values from visualforce page to controller on a button click but what i want is to transfer a list of values from visualforce page to controller how ccould i do that

gautam_singhgautam_singh

Hi

 

Take a look at the code below , I had the same requirement wherin I had to send 2 values to apex first the value of SignType and second whether it is checked or not and I did it through this .

<apex:actionFunction name="changeonCheck1" action="{!changeonCheck}" reRender="rnderOP" >
      <apex:param name="xyz" value=""  assignTo="{!Sign}"/>
      <apex:param name="xyzz" value="" assignTo="{!Check}"/>
</apex:actionFunction>



<center>
	<apex:selectRadio onchange="getchkValue(this)"><br/>
       		<apex:selectOptions value="{!SignType}"/><br/> 
        </apex:selectRadio><br/>
 </center>



<script>
    function getchkValue(aa)
      {
      
 if(aa.checked){
   document.getElementById('{!$Component.frm.thePageBlock.section.savebutton}').style.display="inline";
   
  }
      changeonCheck1(aa.value,aa.checked);
       
      }
  </script>

 Moreover you can read this awesome blog and this thread for precise information .



Important :

Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.

Thank You .

salesforcequestions123salesforcequestions123
Hi

I dint understand exactly what u did in u r code but for me i have to transfer all the account ids from visaul force page to controller.rIGHT NOW i am able to transfer one id at a time because I had to give apex:param in repeat tag.