Saturday, September 12, 2015

ADF ListView Component

ADF ListView Component

ADF ListView component displays a List of Items based on rows of a collection model.If you are working in Jdeveloper11g(11.1.1.7) version then you would notice that when you try to drop in a collection onto a page then the same does not show List View component to select from.Same is available from the component palette for selection seems to be an issue with Jdeveloper.

Jdeveloper11g(11.1.1.7)
















Do not see an issue with Jdeveloper12c.

Jdeveloper12c












This component works pretty much like a Table component when it comes to the binding level.How to use this component in 11g as we need to drop this component from the component palette and then provide the property values manually.Easy way for the same is to first drop your collection as a table component (would prefer a read only table component) then drop in the list view component.Now add a list item component into the list view as shown below










Now copy the value available in Table component value property and provide the same into the list view components value property as below,also provide the selection listener value as similar to Table component value to the list view component.Also make the selection property for list view component as Single.















Similarly provide the binding values for the list item component as the value is available in the output text component under column of the table component value would be something like this - #{row.EmployeeId} i have copied it to the output text as #{item.EmployeeId} just to differentiate that this is a list items value the way it happens in 12c.












Now it show a warning in the output text component as the variable item is yet to be defined.Define the same at the listview level var property














Delete the table component which was used as basis for setting the properties of the list view component.After all the property are set list view item is now ready to use which will be rendered as below















Reference - https://www.youtube.com/watch?v=9aLLn_NIrZI

1 comment:

  1. Hey there! This post couldn't be written any better! Reading through this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing! conex for sale

    ReplyDelete