Programatically Evaluate EL Expressions

Sometimes, especially when trying to create generic reusable code, you may want to evaluate an expression (#{mybean.property}) to get a value.

I used this a few times in Seam2 but it doesn’t seem to be readily available in CDI. Thankfully I came across a great post http://4thline.org/articles/Java EL in CDI without JSF.html which gives us this functionality. I will be using it in my SimpleBPM project and no doubt in other places as well.

Code posted below but check out the original post for more details.

 

Leave a Reply