datatable paginator setFirst not working

我怕爱的太早我们不能终老 提交于 2019-12-11 15:58:49

问题


I have the following problem:

In one of my sites I have a Datatable. If i click on an Entry I am getting to a different page. If i go back to the page before I want to have the Datatable be on the same page it was when I clicked the row. I am able to set the page with the page event.

I am also able to get inside a method where I would like to set the page. The code inside looks like this:

final DataTable d = (DataTable) FacesContext.getCurrentInstance()
            .getViewRoot().findComponent("form:persons");
if (d != null) {
    d.setFirst(currentPage);
}

This should do the job I think, but nothing is happening to the datatable. Am I doing anything wrong? In what phase should I set the page?

来源:https://stackoverflow.com/questions/18765343/datatable-paginator-setfirst-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!