I have a commandLink in pageBlockTable. When I click it, I want the dataTable in the same pageBlockTable to render.

At present I can render all records when I click on the commandLink. My requirement is to render just that particular record's dataTable.

Here is my VF page.

<apex:page controller="repeatcontroller1" sidebar="false">
<apex:form >
    <apex:pageBlock >
        <apex:pageBlockTable value="{!CallplanAccounts}" var="status" border="0" cellpadding="6"    cellspacing="13" columnsWidth="3">

            <apex:column headerValue="Name">

            <apex:column headerValue="Status">

            <apex:column >
                <apex:commandLink action="{!Callstatus}" id="renderit" >
                    CallString<apex:param name="cmid" value="{!status.acc.id}" assignTo="{!approveid}" />
                </apex:commandLink> <br/>

                <apex:pageblocksection collapsible="false" rendered="{!visible_comment =='show'}" >

                    <apex:dataTable value="{!status.acc.Call__r}" var="cm" >
                        <apex:column headerValue="Callstring name" >

                        <apex:column headerValue="Origianl values" >

                        <apex:column headerValue="Updated values" >
                            <apex:outputField value="{!cm.Updated_Call__c }" >
                                <apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton" / >

  • 3
    I feel you are going to have to extend your question with more detail and code samples to stand a chance of getting some answers to it. Can you be more clear as to what you want to achieve when clicking the commandLink please. Feb 4, 2013 at 6:43

2 Answers 2


It really all depends on the list that is being used to render the datatable. At present you are using status.acc.call__r. This, presumably, is unaffected by the specific commandLink that is clicked (status.acc.id).

Instead, consider using a custom list that is generated by the controller specifically in response to the controller's approveid variable (to which status.acc.id is bound). Then, you would simply populate this list in the CallStatus action method.


Given that you'd need to specify a unique ID for the rerender I think you're out of luck with this one. The only real way to achieve the result you want would be to use a different architecture for the page, rolling your own version of the page block table where you can control the rendering.

One option that could work well here is javascript remoting, where you could replace/update the specific entry for the updated record when the call to the apex method completes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.