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
Romeo MirzacRomeo Mirzac 

Can't Rerender a Second Page Block when Clicking on Outputlink

I'm trying to render a second pageblock table, when a user clicks on a row with an outputlink in the first page block... Any thoughts on how/if I can do this?  I wrote a custom controller, but I can't get anything to display in the second block and the debug log isn't showing any indication that I'm clicking on a row in the first block.  I'm new to VF and having a tough time getting past this.
Best Answer chosen by Romeo Mirzac
Romeo MirzacRomeo Mirzac
Vamshi

Thank you for the code, can you show me what the controller code would look like... not sure how to get the {!acc.id} parameter (from block 1) passed into the method ({!relatedcontact}) in the second block...  

Thanks

All Answers

Sonam_SFDCSonam_SFDC
Hi Romeo,

You should try to use the actionSupport tag to rerender the 2nd pageblocktable you have on the visualforce page.
Go through the doc on the following link as it has the usage of actionsupport together with a sample code:
https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm
vamshi(Nani)vamshi(Nani)

Hi might this code will helpfull to you

<apex:page controller="accext">
   <apex:form >
       <apex:pageblock title="Account with related list">
           <apex:pageBlockTable value="{!accinfor}" var="acc">
               <apex:column >
                   <apex:outputPanel >
                   <apex:actionsupport event="onmouseover" rerender="nani">
                       <apex:param name="cid" value="{!acc.id}"/>
                       {!acc.name}
                   </apex:actionsupport>
                   </apex:outputPanel>
               </apex:column>
           </apex:pageBlockTable>           
       </apex:pageblock>
 
  <apex:outputPanel id="nani">
         <apex:pageBlock >
          <apex:pageblockTable value="{!relatedcontact}" var="rlc">
              <apex:column value="{!rlc.name}"/>
         
          </apex:pageblockTable>
          </apex:pageBlock>
         
         
 
 
  </apex:outputPanel>
  </apex:form>
</apex:page>

Romeo MirzacRomeo Mirzac
Vamshi

Thank you for the code, can you show me what the controller code would look like... not sure how to get the {!acc.id} parameter (from block 1) passed into the method ({!relatedcontact}) in the second block...  

Thanks
This was selected as the best answer