<apex:pageBlock id="SortByDirectionBlock" rendered="{!checkHFStatus}">
     <apex:commandLink action="{!saveSelectedMatches}" styleClass="navbar-link"  value="Save Students" reRender="StudentListBlock"  status="waitMsg">
     <apex:param value="{!sortExpression}" ></apex:param>

 <apex:outputPanel id="StudentListBlock" >                             
 <apex:pageBlockTable value="{!engListWrap}" var="item" rendered="{!IF(engListWrap.Size > 0, true, false)}">

I tried everything, but the pageblocktable is not refreshed after save!!!

I know we dont need to use ActionSupport for commandLink. this should work. Did I miss anything?

  • You sure that engListWrap condition is valid and list is not empty?
    – highfive
    May 8 '14 at 10:55
  • Your title says PageBlockTable isn't rendering and the body of the questions says PageBlock isn't rendering.
    – BarCotter
    May 8 '14 at 10:56
  • Yes, the rows in the pageblocktable are displaying. There is a checkbox in one of the columns.. Ideally, I tick one of them. CLick Save. Then the checkbox will be replaced by a text. THe problem is.. after I select 1 row, click Save, the pageblockTable remains same with a ticked checkbox, (the code is working also). And if I refresh the page now, the checkbox is replaced with text. That implies - the pageblocktable is not rendering after I click save. i had to refresh the page everytime to see the checkbox convert to text.
    – sfdcFanBoy
    May 8 '14 at 11:02
  • I edited the subject.. the pageblocktable is not refreshed after save!
    – sfdcFanBoy
    May 8 '14 at 11:04
  • In order to answer properly, we'd need your controller code as well. There might be an issue in order of execution. May 8 '14 at 12:05

I got the solution. At the end of the save method, Im calling the method which fills my pageblocktable again. This way, after the records are saved, im re fetching the data to display. Because on re-render the records are not refreshed even though the pageblocktable is refreshed.

  • do you have the sample code on how you did that?
    – cartman
    Jul 7 '16 at 15:28
  • this is solving the issue.but still not able to find what is the rootcause of rerender not working in commandlink. =(
    – unidha
    Oct 17 '18 at 4:19

Having the controller code would be helpful. I would be curious what your saveSelectedMatches does, how it parses out the wrapper and saves the data, and what the engListWrap list does to get populated and/or cleared.

I would assume that either, your saveSelectedMatches is not pulling back the checkbox selection correctly, or if it is, it is not saving it into your system correctly. If that is not the case, I wonder if your engListWrap is getting cleared and re-queried when you call the getter method.

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.