Creating a custom tag for use with ADF data bindings
Here’s how you can create custom tags that support JSTL’s expression language. This example applies to JSP 1.2. In JSP 2.0 is has become a lot easier, as JSP 2.0 already supports EL, so you don’t need JSTL for that.
I wanted to create a tag that can be used with ADF’s data bindings, for example:
<taglib1:Tag1 attr1="${bindings.TabDonorView1}" ></taglib1:Tag1>
In you tag implementation code you’ll need to import apache jstl’s ExpressionEvaluatorManager. Here’s how you can use it:
import oracle.adf.model.binding.DCControlBinding;
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
...
binding = (DCControlBinding) ExpressionEvaluatorManager.evaluate("attr1",attr1,Object.class,this,pageContext);