This content has been marked as final. Show 11 replies
Hi,1 person found this helpful
If you are not using business component, you can do this easily by implementing comparable and make a sortingActionListener to do the job for you.
Why do you use an iterator?
Why not an af:table?
That way you get sorting and pagination by default. No additional work.
Edited by: rgouw on Mar 5, 2012 10:45 PM
But, I am using oracle 11g(Oracle Fusion Middleware 22.214.171.124.0)*, by using this version in af:table i am able to do only sorting.
i am unable to paginate, can you just say how to implement pagination in af:table in oracle 11g(+oracle adf 11g+) it would greatly helpful to me.
When your data control produces more rows than that are displayed, you'll get a scrollbar.
Scrolling down the table, the next set of rows will be fetched automatically.
Personally, I like this method 1000 times better than manual pagination.
I think the af:table component has facets in which you can place manual links as well, but I'm not sure how to implement this.
i agree that scroll bar is better..
but, there are certain clients who insists on doing pagination of table.. for this looking for pagination.
thanks Amr Gawish,
i'll try on this
i am unable to sort that..
can you let me no how we can sort.
any reference Doc's or code would be more helpful.
major task : it has to work exactly how it works on af:table*
First let me know if you base your query based on Business Component or not, and then I'll create a blog post for this.
Yes i am using a Business component.
I am using a .CSV file from which data is fetched.
i've paginated by taking the help of "http://www.adftips.com/2010/10/adf-ui-pagination-first-previous-next.html" and "Oracle.JDeveloper.11gR2.Cookbook"
The scenario will be like this...
First you fetch the data of the CSV file into POJOS, say you have Employee Class
Second you implement comparable interface and override the function compare...
Third you will put links to sorting by say Employee name and in the actionListener you can start sorting by using Collections.sort(employeeList) function, and Collections.sort(employeeList, Collections.reverseOrder()) in case of clicking sort twice.
You will have your link to partial submit, and your iterator to partialTriggers the button.
That's the whole story, I don't believe it's that hard..
I'll be creating a blog post about this in the next couple of days if you want to wait and see it in action, with an example application
You can sort a view object in memory by calling its setSortBy() method before calling executeQuery() on it. You can do this in a custom application module method which you bind and call from your paginated table. Take a look at this post which explains this in much more detail: https://blogs.oracle.com/imc/entry/adf_bussiness_components_in_memory. As explained in the post, you want to call setQueryMode() on the view object first, passing ViewObject.QUERY_MODE_SCAN_VIEW_ROWS, so that the rowset is sorted in memory rather than re-fetched from the database.
Hope it helps,