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:


10 comments:

Raju K 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

Andrejus Baranovskis said...

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

Andrejus

tareq alawneh 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

Andrejus Baranovskis 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

Andrejus Baranovskis 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?

Andrejus Baranovskis 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.

Andrejus Baranovskis said...

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

Andrejus