Warning:So you need another, up-to-date way to get your data control.findDataControl(java.lang.String)
inoracle.adf.model.BindingContext
has been deprecated.
Try this:
private static ApplicationModuleImpl getAppModuleImpl(final String dataControlName) { final FacesContext fc = FacesContext.getCurrentInstance(); final ELContext elContext = fc.getELContext(); final ExpressionFactory elFactory = fc.getApplication().getExpressionFactory(); final ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{data." + dataControlName + ".dataProvider}", ApplicationModuleImpl.class); return (ApplicationModuleImpl) valueExp.getValue(elContext); }
Usually, the data control name is like {Application Module name} + "DataControl".
Hard to find? Look into DataBindings.cpx and look for BC4JDataControl elements id attribute.
What's that
data
literal there? That's oracle.adf.model.BindingContext.CONTEXT_ID
hardcoded.
No comments :
Post a Comment