I think that if we never have to pass arguments from HTML to
Wicket, then "wicket-componentID" is the right way to go. However, I
think you run into problems when you try adding this support using the
"wicket-" approach and I dare say even the "wicket-[new:className]"
approach will run into problems mostly because it is likely impossible
to refer to such components from Javascript (the brackets, colons, etc
are not valid in variable names).
As soon as we begin considering adding these new capabilities
(HTML -> Wicket parameter passing) it might actually be safer/cleaner
to do something like this:
<span wicket:id="componentID"/>
and
<span wicket:new="className"/>
and
<span wicket:key1="value1" wicket:key2="value2"/> etc...
Eelco's major concern with the original approach of <wicket>
tags is that he likes binding Wicket attributes directly to the tag
he's trying to modify (rightfully so). With this new approach, we get
the best of both worlds.
PRO:
- Readable, extensible, previewable
- Explicit separation between Wicket and HTML namespace (no problems
accessing our tag elements from Javascript or namespace collision with
new HTML changes as they occur)
CON:
- DreamWeaver complains about unsupported attributes and these errors
have to be disabled by right-clicked on them and selecting "add to
exception list". If anyone know how to disable warnings for all
attributes with a given namespace, please let me know.
Personally I wish DreamWeaver wouldn't issue these errors but I
don't think there is an approach which allows us to both avoid
DreamWeaver warnings and still retain the ability to reference our tags
from within Javascript. Personally I view Javascript interoperability
as being more important than DreamWeaver error messages. I think
separation of concerns between HTML and Wicket is important to have.
What do you think?
Gili
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user