Wednesday, 23 January 2013

reRender Functionality Using Action poller:- 


Here we have a scenario.. Increment the counter automatically based on interval time..

<apex:page Controller="Actionpollar1">
    <apex:form >
        <apex:pageBlock >
            <apex:outputText value="{!Increment}" id="Test"/>
            <apex:actionPoller action="{!IncrementValue}" interval="5" reRender="Test"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>


public class Actionpollar1
{
    public String getIncrement() {
        return null;
    }
    public Integer Increment { get; set; }
     public Actionpollar1()
        {
            Increment =0;
        }
    public void IncrementValue() {
       
       Increment=Increment+1;
    }
}

No comments:

Post a Comment