Sunday, April 7, 2013

List View - Cool Looking ADF PS6 Component for Collections

I'm very excited about ADF PS6 release, it brings new freshness and coolness feeling to ADF. ADF Faces runtime performance seems to be incomparable faster and much more responsive comparing to previous ADF 11g R1 and even ADF 11g R2 releases. This gives good hopes to expect the same improvements in ADF 12c. There is new ADF Faces component introduced - List View. You can think about it as about much more liberal ADF Faces table component. List View renders data collections but there is much more control and flexibility how data collection is presented visually. If you need to render strict tabular data - ADF Faces table is the most suitable, List View is for something less structured. We could achieve up till now similar layout as List View with custom implementation using ADF Faces iterators or for each tags. Of course it is much easier now to use out of the box List View tag - Displaying a Collection in a List.

Here you can see fragment structure for my sample application with List View usage - ListViewApp.zip:


There are two types of List View implemented here - simple and hierarchical one. Simple List View renders collection in a list, there is option to load more rows from the collection on demand. Hierarchical List View renders Department - Employees master detail data:


Simple list is configured with the same property values as regular ADF Faces table:


Collection row is rendered within List View using List Item tag - this is where actual output or input ADF Faces component is implemented:


List View with editable popup functionality - launched from Edit button. Edited data is synchronized with data rendered in List View immediately:


Hierarchical List View is configured with the same properties as regular ADF Faces tree would be configured - pointing to treeModel instead of collectionModel as for the ADF Faces table. There is groupHeaderStamp facet - it allows to render data grouping:


Second level data is rendered under List Item tag:


In the page definition, there is regular tree collection definition as usual:


Hierarchical List View provides really good view of hierarchical data and it renders fast. Here viewing employees by departments:


One more small thing: I noticed in PS6 after session timeout - screen becomes black, looks good:


15 comments:

Unknown said...

Hi Andrejus,

thanks for the wonderful post.

I have a requirement in BPM where i have to open BPM worklist application from a custom ADF page when a user clicks on a link in the page.

also the worklistapp should display taks specific to the user .

Thanks in advance.
Raju

Andrej Baranovskij said...

This is possible, please check this blog: http://andrejusb.blogspot.com/2013/04/bpm-11g-r1-worklist-integration-hacking.html

Andrejus

Unknown said...

hi Andrejus Baranovskis
thanks for the wonderful topics you post in your blog i got very good skills from your topics.
i have an issue with this example when i downloaded it and try to run it in jdeveloper 11.1.1.6.0 i got lot of error telling me that tags is not recognized one of the tags is af:listViewer
any suggestions
regards

Andrej Baranovskij said...

Hi,

You are using wrong JDEV version, PS6 (Patch Set 6) means 11.1.1.7.0 (release).

Regards,
Andrejus

Ramesh said...

why are these not available in 11.1.2.3? Should we be building apps with R1 or R2. Looks like R1 is getting more updates than R2

Andrej Baranovskij said...

I'm frustrated with this myself. R1 gets more functionality updates because Oracle Fusion Apps still using it. But on other hand ADF Mobile and ADF Essentials are available in R2.

Andrejus

Anonymous said...

Does the list view support Search/Sort and Pagination?

Andrej Baranovskij said...

Keep in mind this is not a table. Pagination is supported. Search can be implemented with View Criteria. Sorting is not supported as far as I can see.

Andrejus

Anonymous said...

When I tried to implement the hierarchial list view, only the infro from the groupHeaderStamp was displayed. The detail regions were not displayed. Any idea what I could be missing here ?Please help.

Andrej Baranovskij said...

You should double check my sample app - as you can see it works there.

Andrejus

Unknown said...

Hi All,

I am facing a kind of cache issue in list view. I select a row in the list view and navigate to some other page and then come back. Even though I have not selected the same row, the same remains highlighted. I want to select the first row always.

Regards,
Subham

Unknown said...

Hi,

In ListView, not all the rows are getting displayed.
the last row is usually cut and displayed half.
Any solution to this? Can a vertical scroll bar be added in listview?
If no, then what else can be done here?

Thanks a lot in advance.

Anonymous said...

Now the app is not available for download. Can you pls help?

Andrej Baranovskij said...

You can download all old samples from Google Archive - https://code.google.com/archive/p/jdevsamples/downloads

Andrejus

Guru Krishnan said...

Hi Andrejus,

Can we convert an application table to a list view ? Application table could be an editable table with form elements. In such case we cannot cache the older records in the client side? Is pagination essential for such cases?


In one blog, I see an editable popup on the click of a button, Without pagination , if there are 1000's of rows, then there would be so much form elements in HTML and leads to a bulky POST. How to handle this?