I've added example number 71 to my examples page, illustrating how to to implement an editable ADF Faces table containing a dropdown list (selectOneChoice) control whose set of available choices is different per-row, based on some value of an attribute in each row.
In the process, the example also illustrates some other useful techniques:
- A backing bean trick to invoke a method with a single argument from an EL expression in the page.
- Use of the QUERY_MODE_SCAN_VIEW_ROWS query mode for the list of values view object to query all of the choices (for all departments) and then perform in-memory filtering on that rowset to return only the employees for a particular department as needed without ever re-visiting the database.
And last but not least, the example is setup to allow you as the developer considering implementing this idea, to experiment with the difference between using an entity-based view object and a read-only view object for your list of values query. See section 7.9 Summary of Difference Between Entity-Based View Objects and Read-Only View Objects in the ADF Developer's Guide for Forms/4GL Developers for more information on this topic.
11:52:43 AM
|