On 5/31/07, Al Maw <[EMAIL PROTECTED]> wrote:

As far as I can see, the only reasons not to lower-case stuff
automatically are that it's too magic and/or too expensive to check all
the attribute modifiers.


it isn't about the attribute modifiers..
if you create one like this: new AttributeModifier("onClick",xxxx)
then we do internally always just toLowerCase() on it  (based on setting?)
that doesn't matter to much

The problem is the tag.getAttributes() map. so those comming from the markup
if we lower case the attribute modifier always and then we also lowercase
all the keys
that are in the attribute map of a tag that comes from the markup then the
problem is gone
And that lowercasing of all the tags attributes map is only done once
(loading the markup)
so that is not a problem.

ofcourse we could make this a setting:

boolan Settings.getLowerCaseAttributes() default = true

then we lower case all the attribute modifiers that are made and all the
markup attributes that we get from the markup.



As a slight aside, but related to the magic, I've long been confused by
AttributeModifier silently throwing things away if you omit the boolean
constructor param. It seems to confuse fresh Wicket developers. Does
anyone have a use-case for this? Why is it like that?


yeah that was something for way back.
thats why igor did make the SimpleAttributeModifier i think.
It is that markup can't be changed by the developer if the markup doesn't
specify it.
But i think this is just bogus. Developers want to do that a designer
doesn't have to
think about what a developer maybe want to do

So we can make that boolean by default true?

johan

Reply via email to