Skip to main content
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>

        

   
2 respostas
  1. 30 de ago. de 2017, 15:59

    <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
0/9000