You need to sign in to do that
Don't have an account?

How to do the action poller component in vf page
Hai,
I want try actionpoller component in vf page but it is not working
vf page code
<apex:page controller="ActionPollar_Controller" showHeader="true" tabStyle="case" sidebar="false">
<apex:form >
<apex:pageBlock >
<h1>Company Details</h1>
<apex:pageBlockTable id="compde" value="{!compdetails}" var="i">
<apex:column headerValue="Name"/>
<apex:outputLink value="/{!i.id}">{!i.Name}</apex:outputLink>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:actionPoller action="{!pollAction}" reRender="compde" interval="10"/>
</apex:form>
</apex:page>
controller
-----------------
public class ActionPollar_Controller
{
public Account[] getCompdetails() {
compdetails = Database.query(query);
return compdetails;
}
Account[] compdetails;
string query = 'select id,name from Account limit 15';
public pagereference pollAction()
{
compdetails = Database.query(query);
return null;
}
}
how can i do .please help me
I want try actionpoller component in vf page but it is not working
vf page code
<apex:page controller="ActionPollar_Controller" showHeader="true" tabStyle="case" sidebar="false">
<apex:form >
<apex:pageBlock >
<h1>Company Details</h1>
<apex:pageBlockTable id="compde" value="{!compdetails}" var="i">
<apex:column headerValue="Name"/>
<apex:outputLink value="/{!i.id}">{!i.Name}</apex:outputLink>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:actionPoller action="{!pollAction}" reRender="compde" interval="10"/>
</apex:form>
</apex:page>
controller
-----------------
public class ActionPollar_Controller
{
public Account[] getCompdetails() {
compdetails = Database.query(query);
return compdetails;
}
Account[] compdetails;
string query = 'select id,name from Account limit 15';
public pagereference pollAction()
{
compdetails = Database.query(query);
return null;
}
}
how can i do .please help me
Hi,
The above code should work for you. I did some changes in VF page.
Please think throgh the logic. Since you are using action pllaer, it queries the object every 10 secs.
All Answers
What is your requirment and what issue you are facing?
Hi,
The above code should work for you. I did some changes in VF page.
Please think throgh the logic. Since you are using action pllaer, it queries the object every 10 secs.