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

Display Message on PageBlockTable

Hi, I've created a custom, VF Page. It is having two pageBlockTables inside it. When I click a button "Get Records" the two tables should get refreshed. I am trying to refresh my entire page Block but that's not working n my case. I am attaching my page here along with a screenshot of my page.
 <apex:page standardController="Account" extensions="newWrapperClass">
    <apex:form >
        <apex:pageBlock id="block">
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Get Records" action="{!processedRecords}" reRender="table1,table2"/>
                <apex:commandButton value="Send Email" action="{!sendEmail}"/>
            <apex:pageBlockSection title="Detail Records">
                <apex:pageBlockTable value="{!wrapperTaskList}" var="wrap" id="table1">
                <apex:column >
                    <apex:inputCheckbox value="{!wrap.selected}"/>
                <apex:column value="{!wrap.chg.Name}" headerValue="Name"/>
                <apex:column value="{!wrap.chg.Phone__c}" headerValue="Phone"/>
                <apex:pageBlockTable value="{!existingRecords}" var="sel" id="table2">
                    <apex:column value="{!sel.Name}" headerValue="Name"/>
                    <apex:column value="{!sel.Phone__c}" headerValue="Phone"/>
</apex:page>User-added image
Suraj MakandarSuraj Makandar
Hi Sai,

You need to reRender the either <apex:pageBlock> or  <apex:pageBlockSection tag instead of tables.

So update your "Get Records" button with either of below lines:

<apex:commandButton value="Get Records" action="{!processedRecords}" reRender="block"/>

Assign some id to your <apex:pageblocksection> like:
<apex:pageBlockSection title="Detail Records" id= "SECTIONID">
And the use this ID in your "Get Records button as below:
<apex:commandButton value="Get Records" action="{!processedRecords}" reRender ="SECTIONID"/>

Hope this helps!

I tried reRendering the page block & page block section but no luck. Can you tell me another possible