You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Bowers <vi...@gmail.com> on 2005/11/30 00:15:52 UTC

queston on mapped properties

I have a question on JSF in general, and I'm hoping that this list will have
people who would know the answer.

In Struts (and its handy companion, beanutils), you can use mapped
properties in multiple ways:

The expression
bean.value['someString']

could refer to
1) public Object getValue(Object key) { return internalMap.get(key); }
or
2) public Map getValue() {return internalMap;}

When I look at the Bean 1.01 spec, and the JSF 1.1 spec, it looks like only
option 2 is supported.  Apparently option 1 was an enhancement available
only to struts/commons-beanutils.  Option 1 seems very convenient and
powerful in many cases.  Does anyone know if there was a reason why it was
excluded from JSF?  Was it just to maintain consistency with the Java Bean
spec?  Or am I a minority in thinking this is a handy feature?

(For reference on option 1, see
http://struts.apache.org/struts-action/faqs/indexedprops.html).