today i practiced poll component. i go with blog post.
all of the functionality working fine. but where i stuck up in this step
but data reloaded is seems to be always 1.
i do the changes 3 or four times in db.i can able to see the changes. but the data reloaded showing me always 1.
public class Mbeans {
private RichActiveOutputText activeoutputtext;
private String refreshinfo;
private int i = 0;
private RichPanelCollection pcl;
public Mbeans() {
}
public void setActiveoutputtext(RichActiveOutputText activeoutputtext) {
this.activeoutputtext = activeoutputtext;
}
public RichActiveOutputText getActiveoutputtext() {
return activeoutputtext;
}
public void polllistener(PollEvent pollEvent) {
// Add event code here...
BindingContext bindingContext = BindingContext.getCurrent();
DCDataControl dc = bindingContext.findDataControl("AppModuleDataControl");
AppModuleImpl am = (AppModuleImpl)dc.getDataProvider();
am.getEmployeesView1().executeQuery();
i = i+1;
refreshinfo = "Data Reloaded-" + i+" Total Row-->"+am.getEmployeesView1().getRowCount();
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(pcl);
adfFacesContext.addPartialTarget(activeoutputtext);
}
public void setRefreshinfo(String refreshinfo) {
this.refreshinfo = refreshinfo;
}
public String getRefreshinfo() {
return refreshinfo;
}
public void setPcl(RichPanelCollection pcl) {
this.pcl = pcl;
}
public RichPanelCollection getPcl() {
return pcl;
}
public void setI(int i) {
this.i = i;
}
public int getI() {
return i;
}
}