There are times when you need to programmatically set the value of a bind variable used in the view object query. One way to accomplish this task is by overriding the view object method bindParametersForCollection()
and explicitly specifying the value for the particular bind variable. This technique comes handy when the bind variable values cannot be specified in a declarative way, or the bind variable value source changes dynamically at runtime.
This recipe will show how to provide a default value for a bind variable used in the view object query if a value has not already been specified for it.
You will need to have access to the shared components workspace that was developed in the Breaking up the application in multiple workspaces recipe in Chapter 1, Pre-requisites to Success: ADF Project Setup and Foundations. Additional functionality will be added to the ExtViewObjectImpl
and ExtApplicationModuleImpl...