[weld-issues] [JBoss JIRA] Commented: (WELDX-115) Add the ability to evaluate el from weld-extensions

Adam Warski (JIRA) jira-events at lists.jboss.org
Mon Jul 19 08:08:53 EDT 2010

    [ https://jira.jboss.org/browse/WELDX-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12539877#action_12539877 ] 

Adam Warski commented on WELDX-115:

I extended Dan's code a little to make creating JSF and non-JSF based EL evaluators transprently:

It is usable like this:

2. Injectable EL Evaluator


private ELEvaluator elEvaluator;

void someMethod() {
    // ...
    Integer result = elEvaluator.evaluate("#{testParam1 + 10 + testParam2}", Integer.class, params);
    // ...

The evaluator is a request-scoped bean. It can be injected and used both when a web request is active, and when
not (e.g. during an MDB invocation). The third parameter is optional and is a map of parameters, which will be put
in the EL context for the duration of the evaluation.

If there's anything of value in my evaluator, you can of course freely use the code in there.

> Add the ability to evaluate el from weld-extensions
> ---------------------------------------------------
>                 Key: WELDX-115
>                 URL: https://jira.jboss.org/browse/WELDX-115
>             Project: Weld Extensions
>          Issue Type: Feature Request
>            Reporter: Stuart Douglas
> Dans classes at http://community.jboss.org/thread/148045?tstart=0 are a good starting point

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the weld-issues mailing list