On Thu, Apr 2, 2009 at 9:31 PM, Andy Schwartz <andy.schwartz(a)oracle.com>wrote:
I was going to +1 - I like Kito's idea of using a component
author-specified attribute, and I also like Dan's idea of a more generic
"strict" attribute - though then it occurred to me that the arbitrary
attribute behavior isn't just a feature of Facelets compositions - but this
is also the way that Facelets works for any old (Java-based) Faces
component. That is, I believe that:
<h:commandButton foo="bar">
Just ends up stashing the "foo" attribute value in the
<h:commandButton>'s
attribute map. (Or, at least, I think that's what happens.)
Interesting, I never knew that, but it's true. I would assume that is how
Facelets does the local variable assignments from attributes.
So now I am wondering whether there is merit in keeping behavior consistent
between composite and non-composite components in this regard. Would
it be
confusing that arbitrary attributes are pushed into the attribute map for
some types of components, but not for others? Hmm... maybe the benefits of
providing quick feedback in cases where the attribute is known to be invalid
(ie. in the composite component "strict" case) outweigh the drawbacks of the
inconsistency?
I still don't really like the idea of using these random attribute names
because it just destroys tooling. Am I being too rigid?
-Dan
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.