Hi Dan,
Right, I agree with you. I'm saying that this is silly behavior.
Either it
should leave null alone or choose to convert it only *if* the expected-type
is a primitive (in this case a primitive boolean).
Yes, I agree, this is the way it should be - the way it currently
works is really causing pain for users.
What we could do is leave out the expected type when we create
value-expressions. However, in many cases, existing applications (and
components) will rely on the implicit conversion of e.g. String to
Boolean (especially as more complex EL expressions will AFAIK often
evaluate to a String). So this is really not a good solution either.
What we could do is wrap the ValueExpressions we create, not pass on
the expected type, and do the coercion ourselves (in the wrapped
Value-Expression). Does that sound reasonable? Is this implementation
specific or something which should end up in the spec?
And - has really no one of you run into this problem before? There is
some open issues in the MyFaces issue trackers with regards to this -
well, not much we can do about it.
regards,
Martin