myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Smoak" <wsm...@gmail.com>
Subject Re: Solved, but not happy with solution Re: question about BackingBeans and POJO's
Date Wed, 01 Nov 2006 19:09:26 GMT
On 11/1/06, Jeff Bischoff <jbischoff@klkurz.com> wrote:
>  >> EL expressions use the same syntax for variable references that
>  >> JavaScript
>  >> expressions do.  Thus, "#{ foo.bar}" and "#{foo[bar]}" and
>  >> "#{foo['bar']}"
>  >> are all equivalent.
>
> If they are equivalent, then why didn't his original syntax work? I've
> seen the pattern you suggested used in the Tomahawk examples and
> elsewhere, but I never knew why it was necessary.

The original example had three parts: "messages.label.firstName".

In this case, I think it's necessary to use brackets so you get
something like messages.get( "label.firstName" ) and not
messages.getLabel().getFirstName().

-- 
Wendy

Mime
View raw message