First page Back Continue Last page Text

oracle adf workshop


Using Named Bind Variables at Run Time

You may have named bind variables in your view object whose value you want to assign at run time. You can use the setNamedWhereClauseParam() method to assign a value to any named bind variable, as shown in the first example in the slide.

If there is no design-time bind variable defined, you can add a bind variable at run time and assign its value programmatically. The second example in the slide shows adding a bind variable to a view object’s WHERE clause and then defining the bind variable by using the defineNamedWhereClauseParam() method. In this example, the value is first set to STAFF, so records for employees are queried and processed. Next, the value for the bind variable is reset to CUST, and then customer records are queried and processed.