[
https://jira.jboss.org/browse/WELDX-115?page=com.atlassian.jira.plugin.sy...
]
Adam Warski commented on WELDX-115:
-----------------------------------
I extended Dan's code a little to make creating JSF and non-JSF based EL evaluators
transprently:
http://github.com/adamw/cdiext/tree/master/cdi/src/main/java/pl/softwarem...
It is usable like this:
2. Injectable EL Evaluator
--------------------------
Usage:
@Inject
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