-
1. Re: Facelets variable injection?
matt.drees Oct 22, 2007 2:30 PM (in response to paradigmza)Give this a shot.
@In("#{compvar}")
-
2. Re: Facelets variable injection?
paradigmza Oct 23, 2007 8:13 AM (in response to paradigmza)No luck :-(
-
3. Re: Facelets variable injection?
sjmenden Oct 23, 2007 10:12 AM (in response to paradigmza)I've ran into a similar problem as you Sean in a previous problem I was tackling, you will need to create a custom facelet tag to expose the varible in the faceletContext to the facesContext, which then you may be able to bind it a MethodExpression. The solution I came up with was not pretty and hacked the private VariableMapper of the faceletContext, but I'd be happy to share it with you if you'd like.
-Samuel -
4. Re: Facelets variable injection?
pmuir Oct 23, 2007 10:15 AM (in response to paradigmza)You can't and shouldn't do that. Use EL functions.
-
5. Re: Facelets variable injection?
paradigmza Oct 24, 2007 1:09 AM (in response to paradigmza)Hi pete,
I am not quite sure what you mean by use EL functions? can you give an example?
Thanks. -
6. Re: Facelets variable injection?
paradigmza Oct 24, 2007 1:35 AM (in response to paradigmza)Nevermind,
I thougtht there was some special el tag that put a variable onto the session... but I see what you mean now.#{helper.setListToUse(compvar)}
Thanks... so simple... but taken days to figure out (digging into all sort of stuff)
ps. Jboss Tools is awesome. -
7. Re: Facelets variable injection?
pmuir Oct 24, 2007 6:03 AM (in response to paradigmza)No. You should not inject render time variables into your backing beans.
Just do
#{my:compare(var1, var2)} - this is all in the facelets documentation.