This blog we will see how to reset the af:table pagination to predefine page.
Sometimes due to MDS the last visited page number will persist. we need to reset the old page number and set the new page number.
You can use the below code for rest the pagination
Thanks...
Sometimes due to MDS the last visited page number will persist. we need to reset the old page number and set the new page number.
You can use the below code for rest the pagination
DCIteratorBinding dcIter =
(DCIteratorBinding)(BindingContext.getCurrent().getCurrentBindingsEntry()).get("your
iterrator Name");
int taskIndex = 1; // It will
navigate to the page where 1st element exist.
int range =
dcIter.getRangeSize();
int oldStart =
dcIter.getRangeStart();
int newStart =
taskIndex-(taskIndex % range);
dcIter.getRowSetIterator().setRangeStart(newStart);
dcIter.setRangeStart(newStart);
RangeChangeEvent event = new
RangeChangeEvent(tableBinding, oldStart, oldStart+range, newStart,
newStart+range);
tableBinding.broadcast(event);
dcIter.getRowSetIterator().setCurrentRowAtRangeIndex(taskIndex
% range);
dcIter.setCurrentRowIndexInRange(taskIndex
% range);
AdfFacesContext.getCurrentInstance().addPartialTarget(tableBinding);
|
Thanks...
Where we need to write this method..
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhat is tableBinding here? While using this code I'm getting error at that word. Dow we need to replace with table binding?
ReplyDeleteThanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle ADF .
ReplyDeleteActually, I was looking for the same information on internet for
Oracle ADF Interview Questions and Answers/Tips and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
Thanks for sharing this blog. The content is beneficial and useful. Very informative post. Visit here to learn more about Data Mining companies and Data analytics Companies.
ReplyDelete