290 total views, 10 views today

Create an ADF table from ArrayList

In this section, we have created an ADF table from ArrayList the backing bean class. The backing bean has an ArrayList object holds country objects.The Country is a bean class having Name, Currency, Population in 2015, and population in 2030 attributes and its relevant setter,  getter methods. The table component in the JSF page referring the ArrayList in its value attribute and the column component referring the country bean attributes to display the values.

Steps

1. Create a Country Bean class

2. Construct a list of country object in the backing Bean class. The final class is similar to below. It has a getter method which returns the ArrayList

3. Drop an <af:table> component into the JSF  page and refer the array list object in the value attribute. Point the attribute var to a value(row) and use that value as a reference in the column element. The final table component is like below

Output:

062916_2132_CreateanADF1 Create an ADF table from ArrayList

govindan Create an ADF table from ArrayList
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
govindan Create an ADF table from ArrayList
Connect me
Like us on Facebook.
Connect!