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

How to open a link in a page block

Hi All,
I have created a visual force page  where all the records of a custom object are displayed in a table based on the parameters
in URL(Using a Custom Controller).
The records are displayed as a command link so that when the user clicks on it, detail page opens.I'm able to open it in a new window or same window but I want to open the detail page of the record in the same page in a page block (all the records should display in top of the window and detail page should be displayed below in a apge block when ever I click on any record).How is that possible.
This is my Controller class:
public class MySecondController {

List<Calls__c> results;

public List<Calls__c> getResults() {
results=(List<Calls__c>) [select id,name,Member_Id__c,Relationship_Id__c from Calls__c
where Member_Id__c = :System.currentPageReference().getParameters().get('memberId')

and Relationship_Id__c = :System.currentPageReference().getParameters().get('relationshipId')];

return results;



My visual force page is
<apex:page controller="MySecondController">
<apex:pageBlock title="Calls">
<apex:pageBlockSection title="Results" id="results" columns="1">
<apex:pageBlockList value="{!results}" var="l" >
<apex:outputLink target="calls12" value="/{!}" id="theLink">{!}</apex:outputLink>
<apex:pageBlock id="calls12" ></apex:pageBlock>


I want to display on calls12 page block when ever a link is clicked.
Any pointers will be of great help.
Thanks in advance.

Message Edited by Jon Mountjoy on 05-27-2008 01:51 PM

Message Edited by Jon Mountjoy on 05-27-2008 01:51 PM
Jon Mountjoy_Jon Mountjoy_
I think what you are looking for is "rerender", which provides Ajax like functionality.   What you can do is modify your link to call back into the controller, which can lookup the details and then update an output field in the pageblock with those details (without even refreshing the page).