+ Start a Discussion
s_macs_mac 

passing parameter from vf page to controller

I have a vf page listing accounts,on clicking on the account name field(link) account related contacts to be displayed dynamically I am trying to pass the account(clicked) from page to controller but in the debug logs I dnt see any value its null.

<apex:pageBlockTable value="{!accnts}" var="acc" >
     <apex:column >
        <apex:actionRegion >
           <apex:outputLink >
             <apex:outputField value="{!acc.Name}"> 
              <apex:actionSupport event="onclick" action="{!show}" reRender="panel">
               <apex:param assignTo="{!accName}" value="{!acc.Name}"/>
              </apex:actionSupport> 
             </apex:outputField> 
           </apex:outputLink>
        </apex:actionRegion>
     </apex:column>
</apex:pageBlockTable>
        
   
Dushyant SonwarDushyant Sonwar
Try Changing below line
<apex:param assignTo="{!accName}" value="{!acc.Name}"/>
to this
<apex:param assignTo="{!accName}" value="{!acc.Name}" name="arg1"/>

Hope this helps.
Nayana KNayana K
<apex:outputPanel id="panel">
    <apex:pageBlockTable value="{!accnts}" var="acc" >
         <apex:column > 
             <apex:commandLink action="{!show}" value="{!acc.Name}" reRender="panel">
                   <apex:param name="accName" assignTo="{!accName}" value="{!acc.Name}"/>
             </apex:commandLink>
         </apex:column>
    </apex:pageBlockTable>
</apex:outputPanel>

Try this once