Hi I have committed an alternative solution for this issue. There exists a class called org.apache.myfaces.view.facelets.tag.composite.CompositeComponentRule that is responsible for set ValueExpressions for a composite component. If CompositeComponentAttributesMapWrapper.put() is right, the one who's wrong is CompositeComponentRule. A composite component holds all its attributes on its internal attribute map (note this idea could be wrong, because it is possible to define componentType attribute on composite:interface, but this is valid on most cases (anyway I'll try to fix this case later) ). So, we have to call getAttributes().put() instead setValueExpression() in this case.
I'm not tested it on that example, so it could be good if you can confirm this solution works. regards Leonardo Uribe 2009/9/4 Curtiss Howard <[email protected]> > Leonardo, > > Actually, the reason I saw the spec makes no sense is because > CompositeComponentELResolver.CompositeComponentAttributesMapWrapper.put() > _is_ working correctly. This is what the spec says about that method, > section 5.6.2.3: > > "put(): call get() on the attributes map, using the > argument key to put() as the argument to get(). If > the result is a ValueExpression, call setValue() on > the ValueExpression, passing the value argument to > put() as the second argument to setValue()." > > Notice that it says to call get on the "attributes map", i.e., the > component's attributes map. This would be fine, but where it breaks > down is in the definition of the component's attribute map's get() > method, section 3.1.11: > > "If no entry exists in the internal data-structure, see if there is a > ValueExpression for this > attribute name by calling getValueExpression(), passing the > attribute name as the key. If a > ValueExpression exists, call getValue() on it, returning the result." > > The problem is that the component's attributes map will _always_ call > getValue() on a ValueExpression if it's available, meaning the CC > attributes map wrapper will never get a ValueExpression in the first > place! > > Thanks, > > > Curtiss Howard >
