In JSF it's up to the property resolver to choose a strategy. The
default one, AFAIK, first check if it is a List or a Map.. only if
this condition isn't satisfied it tries to get the bean property.

You could write a PropertyResolver decorator to handle things as you
need, for example checking the existence of a property even for the
Collections, before accessing its elements.

Cosma

2006/7/24, David Delbecq <[EMAIL PROTECTED]>:
Hello,

according to expression language in JSP 2.0 specification (which jsf-el
uses) the value of exprA.exprB is the same as exprA[exprB]  and is
evaluated like that:

.....
 if exprA is a List, coerce exprB to an int, if coercion failed, error.

I am in a situation where i have a Collection of items (List) which also
has some proerties (like a name).
However, if i do "theBean.name" expression language tries to convert
name to an int which fail and throws error, but what i want is in
expression to reach "public String getName();" in the bean.

Does someone have a suggestion of expression to reach this property in
my collection? Thanks.


Reply via email to