Controlling the updatability of view object attributes programmatically
In ADF, there are a number of ways to control whether a view object attribute can be updated or not. It can be done declaratively in the Attributes tab via the Updatable combo, or on the frontend ViewController layer by setting the disabled
or readOnly
attributes of the JSF page component. Programmatically, it can be done either on a backing bean, or if you are utilizing ADF business components, on a custom view object row implementation class. This recipe demonstrates the latter case. For our example, we will disable updating any of the Department
attributes specifically for departments that have more than a specified number of employees.
Getting ready
Get Oracle JDeveloper 11gR2 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.