نحوه استفاده از کامپوننت af:listView برای نمایش رکوردهای یک ViewObject بصورت یک لیست که مشابه به اندروید و اپل باشد در این حالت با اسکرول صفحه رکورد های بعدی را میبیند.
List View – Cool Looking Component for Collections post by:http://andrejusb.blogspot.com
I’m very excited about ADF 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: