Why not just use an attribute modifier?
pixologe wrote:
Dear Wicket devs,
I propose that by default a disabled link should rather (or also) be marked
using a behavior, instead of adding markup before and after.
A word in advance: I know that I can implement my own version of Link which
adds behavior in case of being disabled, and I know how to do it - this is
not a cry for help, just a proposal, how I think the Link component should
behave to fit most common use cases. The current way simple does not feel
right.
Why do I think so? When creating a template, most people tend to display a
disabled status of an element by appending a css class to its tag, you can
see class="disabled" very often, making colors gray or applying
transparency.
IMHO something like this should not be done by changing the DOM hierarchy of
the element.
Example: a Link with an arrow image (CSS background) - quite common. It is
not (at least as easy as it should be) possible to have another image for a
disabled link with this behavior, since there is nothing like an
if-element-has-child-element-selector in CSS.
Besides (I know it is configurable, but...) : I am not sure why one would
want to [em]phasize something that's disabled ;-)
I would love to see a defaultDisabledLinkBehavior property in future
versions, this would make it a lot easier to style disabled links...
Cheers + best regards :)
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]