webtier@glassfish.java.net

Re: [webtier] how to use an ELResolver "by hand"?

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Tue, 11 Nov 2008 09:19:03 -0800

webtier_at_javadesktop.org wrote:
> I need to do this:
> in a JSF table a text component with an attribute like:
>
> text="#{currentRow.value['area'].descr}"
>
> Now I need to use the same expression against an object defined in my java
> code
>
> I would like something like
> ELResolver.resolve("#{currentRow.value['area'].descr}", "currentRow",
> myObject)
>
> to evaluate the expression using myObject for the value of "currentRow"
>
> How can this be achieved? I think it's quite easy, but I cannot find the
> right way
>
You can obtain the ELResolver from the ELContext:

  ELResolver resolver =
FacesContext.getCurrentInstance().getELContext().getELResolver();

> [Message sent by forum member 'autozoom' (autozoom)]
>
> http://forums.java.net/jive/thread.jspa?messageID=315975
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>