Samstag, Dezember 18, 2004

 

How to evaluate any parameter in ADF-Actions

You can easiely evaluate any parameter including servlet, request or ADF binding parameters with the Expression Language Syntax (EL).


/** Evaluate an EL (expression language) Expression and return the result
* @param expression EL Expression to evaluate
* @param ctx The DataAction context.
* @return The object identified by the EL expression
*/
public Object evalEL(String expression, DataActionContext ctx) {
Evaluator eval = Evaluator.getEvaluator(ctx);
return eval.getValue(expression); }


An example to retrive a request parameter into an adf action:
...

String myImputParam = (String)evalEL(ctx, "${param.myInputParam}");






<< Home

This page is powered by Blogger. Isn't yours?