Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using af:poll to refresh and push data in page and databound table in ADF

svn123Sep 26 2013 — edited Sep 26 2013

Hi all,

  today i practiced poll component. i go with blog post.

Jdeveloper,Oracle ADF & Java: Using af:poll to refresh and push data in page and databound table in ADF

all of the functionality working fine. but where i stuck up in this step

  • Run your application, and do changes from Database and see updated UI at every 4 sec.

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;

    }

}

Thanks,

This post has been answered by Timo Hahn on Sep 26 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2013
Added on Sep 26 2013
4 comments
671 views