Just wanted to make sure I was clear. The reason why I am scared of
changing this in JSF is because I already experience problems when
mixing JSTL and JSF tags. For example, since I cannot figure out how
to register the new Fancy JEE6 EL with the servlet container, <c:if>
behaves differently than the <blah:tag rendered=""> attribute. I
haven't spent a lot of time figuring out why, but I've been avoiding
mixing them with composite components for certain.
The differences between JSF EL and JSTL EL behavior has already caught
me off guard, so there's another side to the principle of least
surprise that needs to be considered.
--Lincoln
On Sun, Oct 18, 2009 at 7:32 AM, Martin Marinschek
<mmarinschek(a)apache.org> wrote:
Hi Lincoln,
On 10/16/09, Lincoln Baxter, III <lincolnbaxter(a)gmail.com> wrote:
> I'm concerned... what implications does this have? Why is this
> something we should be fixing? This is a potentially dangerous thing
> to be tampering with IMO.
I think I explained why this is a problem - it is against the
"principle of least suprise": I don't expect, if I pass a null into an
EL expression in the managed-bean, to have a "false" coming out in the
attribute in my component. I expect the component author to be able to
pick a sensible default value if I pass null. Same with a string - I
don't expect an empty string if I pass null.
What happens now is that people are not passing nulls from EL
expressions, instead picking a default value themselves. It is most
certainly not a decent solution to place the burden of picking default
values on the web-app developer...
regards,
Martin