New year is just 2 days away. It's time for us to plan new things, and carry all the learning from past to face new challenges of tomorrow. I wish you and your family a happy, joyous and prosperous new year 2012 !
In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]
You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates. ViewObject vo = am.findViewObject("EmployeesView1");
vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10));
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)