Tuesday, 21 July 2015

Action Status Rerendering in salesforce vf page

<style>
.custPopup{
    background-color: white;
    border-width: 0px;
    border-radius:10px;
    z-index: 9999;
    left: 50%;
    padding:20px;
    position: absolute;
    /* These are the 3 css properties you will need to change so the popup 
    displays in the center of the screen. First set the width. Then set 
    margin-left to negative half of what the width is. You can add 
    the height property for a fixed size pop up if you want.*/
    margin-left: -100px;
    top:40%;
}
.popupBackground{
    background-color:black;
    opacity: 0.30;
    filter: alpha(opacity = 30);
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9998;
}
</style>

 <apex:actionStatus id="fetching">
        <apex:facet name="start">
             <apex:outputPanel id="tstpopup">
                    <apex:outputPanel styleClass="popupBackground" layout="block"/>
                    <apex:outputPanel styleClass="custPopup" layout="block">
                        <img src="/img/loading24.gif" style="vertical-align:middle; horizontal-align:middle"/> 
                        <span>Please wait...</span>  
                    </apex:outputPanel>
              </apex:outputPanel> 
        </apex:facet>
    </apex:actionStatus>

<apex:commandButton reRender="fetching"/>

No comments:

Post a Comment