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

Rerender not working with command button

<apex:commandButton action="{!save}" reRender="tableApp"  value="Save"/>

 I have a save button in Vf page and when the reRender tag is given the button doesnt seem to work. It would nt perform the save operation. When i remove the reRender tag it works fine.


I want a pageblock to be rerendered after the record is saved.


Any ideas?


for standard actions u can't rerender the components... go for custom action and save it in the controller.. then it will works for u 


I am not sure if i understood what you said.


I do have the save method in the controller and in the action i am calling the method called save in the controller.

Chamil MadusankaChamil Madusanka



Try this,


<apex:commandLink action="{!save}"> 
<apex:commandButton  value="Save"/>

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Kevin SwiggumKevin Swiggum

Is the pageBlock you're trying to re-render the same page block that holds the Save commandButton? If that's the case, you might want to try re-defining the area to re-rerender by putting an <apex:outputPanel id="tableApp"> around the pageBlockSections that you want to re-render...and keep the commandButton outside that outputPanel section. 


It might also help to check your browser's javascript console to see if you're getting any errors.


No, its not the block where we have the save button, i am rerendering a different block .

Kevin SwiggumKevin Swiggum

hmm. Does your save() method return null? Or is it returning something else? I've seen other posts where returning null works rather than returning the current page reference.




Save method returns null.