title: how to refresh a VF page?
body: <p>I have created a VF page for an object Merchandise,which consists of 3 fields - name,price and quantity.when ever I create a new record and click save button , new record is saved in tat object (Merchandise) but the values in the fields are not refreshed. </p>
  
  <p>What has to be added to the code, which is given below:</p>
  
  <pre><code>public with sharing class mdetailcon {   
  public Merchandise__c mer{set;get;}  
  public mdetailcon(){
  mer = new Merchandise__c();     
  public PageReference save() {  
  insert mer; 
  return null;  
   }      }
  
  &lt;apex:page sidebar="false" showHeader="false" controller="mdetailcon"&gt;     
  &lt;apex:form &gt;
  &lt;apex:pageBlock &gt; 
  &lt;apex:pageBlockSection columns="1" &gt; 
  &lt;apex:inputField value="{!mer.name}" label="Name"/&gt; 
  &lt;apex:inputField value="{!mer.Price__c}" label="Price"/&gt;    
  &lt;apex:inputField value="{!mer.Q__c}" label="Quantity"/&gt;    
  &lt;/apex:pageBlockSection&gt;    
  &lt;apex:commandButton value="save" action="{!save}"/   
   &lt;/apex:pageBlock&gt;  
   &lt;/apex:form&gt;    
    &lt;/apex:page&gt;
  </code></pre>