I have written an Apex method which sests the value to an automatic property called 'showPopup'.

public boolean showPopup {

public void showWarningPopup(){
        Long remainingSessionTime  = getRemainingSecondsInSession();
        Integer remainingSessionTimeToInt = integer.valueof(remainingSessionTime);
        System.debug('Remaining Session Time------>'+remainingSessionTimeToInt);
            System.debug('--Session is active--');
            showPopup = true;
        } else{
            System.debug('--Session is inactive--');
            showPopup = false;

I have used Action Function to invoke this method and check the value of 'showPopup' property in javascript method of Visualforce Component as below.

 <apex:component controller = "ABCD">
    <apex:actionFunction name="showWarningPopup" action="{!showWarningPopup}" >

      function displayPopup(){
           if (warningTimeOut == 0) {
                             if(dialogCounter < 10){
                                if (dialogCounter < 1) {

This component is being called inside a VF page as below.

<apex:page ..............>
      <c:AutoLogout />

The invocation of controller method from actionfunction inside VF component causes to refresh the entire page. Is there anyway that we can avoid this. I tried passing the apex:outpotPannel id to reRender property of actionFunction. But that stopped invoking the controller method properly. Is there any way that we can stop refresh the page?

1 Answer 1


Try this :

<apex:actionFunction name="showWarningPopup" action="{!showWarningPopup}" reRender="false">

reRender="none" should also work.

refer to this question as well.

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.