webtier@glassfish.java.net

Custom ELContext for a Facelet template

From: <webtier_at_javadesktop.org>
Date: Tue, 06 Oct 2009 19:34:00 PDT

I'm cross posting here because I didn't realize this forum existed earlier. Here is the original:
http://forums.sun.com/thread.jspa?threadID=5410482

Hi,

I would like to let users customize facelets templates at runtime in kind of a theme/skin feature. I've already implemented such a thing with Facelets, but I'm not entirely happy with it. I don't want user templates to have access to the regular EL resolver used by JSF which gives access to all kinds of managed beans used as controllers for the UI. I want to create a custom ELContext and provide only objects that a user's custom templates might need, and nothing more. Basically I want to keep users in a "sandbox". Does anyone know where I would start to look to achieve this? I'm guessing facelets or JSF 2.0 source code but I imagine that is huge. Any tips would be appreciated, especially if you know this is not possible.


Thanks,
Ryan
[Message sent by forum member 'rdelaplante' (ryan_at_ijws.com)]

http://forums.java.net/jive/thread.jspa?messageID=367072