-
1. Re: Question on Seam Annotataion with JSF-EL language interp
pmuir Sep 11, 2007 5:40 AM (in response to gbc1)No idea what you are asking. You can use Seam interceptors at the class level as described in the docs?
-
2. Re: Question on Seam Annotataion with JSF-EL language interp
gbc1 Sep 11, 2007 6:50 AM (in response to gbc1)Sorry for not clearing my issue right...
What I mean is that the Expression "#{identity.loggedIn}" is resolved at runtime and substituted by the correct value (true or false).
I would like to use this substitution feature for my own Annotation (e.g. @Property) thus using injected values instead of fixed strings, e.g.@Property("#{currentUser.name}") private String someProperty;
instead of@Property("fixedName") private String someProperty;
without parsing and evaluating "#{currentUser.name}" manually. Seam should provide the correct value and look through the Contexts.
I hope it's understandable. I'm using an interceptor right now for injecting Properties from external Properties files into my classes. But in some situations, properties depend on runtime values (like currentUser) that can be different, e.g. when each user should have its own name.properties file.
Greetz GHad -
3. Re: Question on Seam Annotataion with JSF-EL language interp
pmuir Sep 13, 2007 6:21 AM (in response to gbc1)Just use Expressions.instance().createValueExpression(property) to evaluate a EL expression.
-
4. Re: Question on Seam Annotataion with JSF-EL language interp
gbc1 Sep 14, 2007 9:10 AM (in response to gbc1)Thanks for your reply! Seems exactly what i looked for...
I'll give it a try over the weekend and report here...
Greetz, GHad -
5. Re: Question on Seam Annotataion with JSF-EL language interp
gbc1 Sep 17, 2007 6:52 AM (in response to gbc1)Thank you again,
this works wonderful, one just needs to look for reentrant calls to the interceptor when executing a method via JSF EL (should't go to the same class, because the interceptor gets invoked by the interceptor gets invoked by the interceptor...)
Greetz GHad