Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The Excel-Mania - Best Ways of Implementing Excel-Like ADF

ThiagoSep 15 2008 — edited Sep 16 2008
Hello people, good afternoon!

I would like to share with you a doubt i have implementing complex, matrix-like forms in ADF. More often than i'd like to hear, users ask for input forms that closely resemble Microsoft Excel, where the dimensions are layered both vertically and horizontally, and the intersection between them must contain an input or output component, allowing themselves to rapidly input the data they need or to create a web version of Oracle Reports' Matrix Report. Some cases are:
1) The user wishes to associate the employees (located in table EMPLOYEES) to the projects (located in table PROJECTS) in a screen that lays out the employees as columns and the projects as rows in a table. The intersection between them must contain a checkbox, which will insert a third record when selected, on a table called EMP_PROJ, which associates the employees to the projects.
2) The user wishes to input a timecard in a time control system. This system must have a screen that shows the days in the week as columns, and the projects the employee is working on as rows. On the intersection, we must provide an input text where he will enter the hours he worked on that specific project on that day.
3) The user wishes to see a screen that shows the Open Auctions they have in a Purchasing system as rows in a table, crossed with the suppliers that have bidded on these (as the columns). The intersection must contain the price each supplier bidded on each Auction.

As you can see, i run across this requirement A LOT =). And, as much as i have polished my "Web-Like-Applications-Are-Not-Like-This" and "You-Are-Not-Working-With-Excel" speeches, our beloved users never learn ;)
Nevertheless, i have been looking for a consistent way to implement this behavior, and i have found some options along the way. I would like to know your impressions on this matter, and if you have any "Best-Practices" that you imagine for this case.

CASE 1: Creating a Dynamic, On-The-Fly View Object by using ADF BC APIs and using af:table component to do the trick on the page
PROS: Less work in the View layer, Preservation of the Table CSS Layout (very nice blue header and light brown cells)
CONS: A LOT of work on the BC layer, creates an awful lot of View Objects, and generates tons of java code on the Application Modules.

CASE 2: Creating the model as usual and working with repeating layouts on ADF Faces (for example, enclosing an af:cellFormat on an af:forEach to repeat each column)
PROS: Simplifies the BC layer, making it much cleaner and maintainable.
CONS: Loses a lot of the declarative wonders of ADF Faces and also the CSS Layouts, since we are using cellFormat, rowLayout and tableLayout instead of table tag we have to manually apply the styles to the columns and rows.

Of course, both implementations take an awful lot of time. Any other implementation styles are quite welcome (ADF Wizards, step in!)
Anyone wants to discuss better ways of doing it?

Best Regards,
Thiago Souza

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 14 2008
Added on Sep 15 2008
3 comments
498 views