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

how to refresh VF page using action attribute for a page tag


I am using Acttion attribute in a page tag. How can I refresh My page with action attribute.Anyone pls help me.
this is my code:

public class RF_Request_DependentPicklistcontroller {

   public Id cobj {get;set;}
   public boolean popup {get;set;}
   public Id ruleId;
   public string ruleName{get;set;}
   public Cerner_Application_Change_Request__c request{get;set;}
public RF_Request_DependentPicklistcontroller(ApexPages.StandardController controller) {
    cobj = controller.getRecord().id;
    if(cobj  != null){
        request= [Select ACI_Staff_Assignee__c,Status__c,name,id,FKLOOKUP_Cerner_App_Rules__c from Cerner_Application_Change_Request__c where id =:cobj];
        ruleId = request.FKLOOKUP_Cerner_App_Rules__c ;
        if(ruleId  != null){
            ruleName = [select id,name from Cerner_Application_Change_Request_Rules__c where id=:ruleId limit 1].name;
            system.debug('ruleName ----'+ruleName );
// for updating status based on Staff   
public void statusCheck(){
    Id loggeduserId = UserInfo.getUserid();
    system.debug('loggeduserId '+loggeduserId +'--request.Status__c--'+request.Status__c+'--request.ACI_Staff_Assignee__c--'+request.ACI_Staff_Assignee__c);
    system.debug('Request before update:'+request);
    if(request.Status__c == 'Pending ACI Review'){
        if(request.ACI_Staff_Assignee__c != null){
          if(loggeduserId == request.ACI_Staff_Assignee__c )
             request.status__c = 'ACI Review In Progress';  
         system.debug('Request after update:'+request);
         update request;
   catch(DMLException e){
       system.debug('Exception while Updating Request with new rule'+e);


<apex:page action="{!statusCheck}" standardController="Cerner_Application_Change_Request__c" extensions="RF_Request_DependentPicklistcontroller" sidebar="false" id="pageid" showHeader="false" rendered="true">
var newWin = null ;
function PopUpWin(url, width, height) {
    var leftPosition, topPosition;
    //Allow for borders.
    leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
    //Allow for title and status bars.
    topPosition = (window.screen.height / 2) - ((height / 2) + 50);
    //Open the window.
    newWin =, "Window2",
    "status=no,height=" + height + ",width=" + width + ",resizable=yes,left="
    + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY="
    + topPosition + ",toolbar=no,menubar=no,scrollbars=yes,location=no,directories=no");
function openUserPopup(objid){
    var url="/apex/RF_Request_Dependentpopuppage?&objectId="+objid;
    PopUpWin(url, 420, 230);

function refresh(objid){
    alert('TEST Parent:'+objid); ='/'+objid;

<apex:form id="formid">
    <apex:panelGrid columns="2">
        <apex:outputPanel >
            <span><font color="#4A4A56"><b>Cerner Application Change Request</b></font></span><br/>
            <span style="float:right"><font color="#4A4A56"><b>Rule</b></font></span>
        <apex:outputPanel style="padding-left:25%">
        <apex:commandlink onclick="openUserPopup('{!cobj }');">
            <apex:outputText value="{!ruleName}"/>
Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
You can do somthing like
<apex:page controller="myClass" action="{!redirect}" >


/****** Controller ****/
public with sharing class myClass{
	public pageReference redirect(){
		PageReference pageRef = new PageReference('/objectId');
		return pageRef;		
Hi NJ,

Actually It is an embedded VFpage in detail page. Already I am having logic for statusCheck method in my code. Am not able to refreshing my page after updating status field.