We need to convert row data to column data dynamically in a viewobject or in an adf table and how can we use this data in the adf page.
JDeveloper Version 11.1.1.7.0
A view object has to be created dynamically from a query which will convert row data into columns.
Given Data:
| Column1 | Column2 |
|---|
| loc1 | 1 |
| loc2 | 2 |
| loc3 | 3 |
| ..... | .... |
| locn | n |
There are 2 columns and n rows in the table.
So my new view object will show data like below
Converted Data:
| loc1 | loc2 | loc3 | .... | locn |
|---|
| 1 | 2 | 3 | .... | n |
So now there is 1 row and n columns in the table and the column names are now 1st columns value so the user can edit the data in the row and the same is persisted to the database table.
Requirement is that these columns should come dynamically based on how many rows are there and we should be able to update the data in the columns as well.
How to achieve the above requirement in java/adf and how can we use these new columns in the jsf/jjsff pages?
TIA, Pankaj