Overview
In some business requirements, you need to add a line number to the data displayed in the form of a table to make the display clearer. This article describes how to easily automatically generate a line number in the ADF.
Implementation
1. Create an ADF application, create entity object and view object in the model project based on the departments table in the HR schema, and then create the application module, add the newly created view object instance to the data model Panel of the application module.
2. Create the main. jspx page in viewcontroller project, drag the VO instance corresponding to the parameters from the "Data Controls" panel to the page, create a table, and check the "filtering" option.
3. Use panel collection outside the table for layout. Filter rows are hidden by default.
4. In the table attribute, you can see that there is an attribute named "varstatus", in which the default value is
5. Add a new column to the table created above as the column occupied by the row number, drag the output text to the column, and fill in the value of the output text as # {. index + 1}
6. Save the application and run the project
This article is transferred from Oracle Seeker: http://oracleseeker.com/2010/01/21/adf_auto_row_number/