[jsr-314-open] Coercion in the EL

Martin Marinschek mmarinschek at apache.org
Tue Oct 13 17:03:35 EDT 2009


Hi all,

I don't know if we discussed this already, but today the coercion
issue in the EL made me loose a few hours again. I've had this before,
but seemingly forgot about it - time to follow up on this.

The issue in short: collapsed="#{bb.collapsed}"

Boolean getCollapsed() {
return null;
}

will lead to a value of "false" for the collapsed attribute if
java.lang.Boolean is set as the expected type of the corresponding
value-expression, according to the EL spec. Hrmmpf.

You can read more in this blog-entry:
http://www.irian.at/blog/blogid/unifiedElCoercion/#unifiedElCoercion

Are we going to say that for JSF 2.0 Facelets we will never set the
expected-type? Or are existing EL implementations not following the
spec and this is not a problem in reality (however, at least the one
that I use does follow the spec)?

regards,

Martin

-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces




More information about the jsr-314-open-mirror mailing list