On 6/24/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
Igor,
Thanks for the solution! I'll go that route for now.
However, I'm not convinced that supporting alternate stylesheets is
outside the scope of wicket core. Mozilla browsers support switching
to alternate stylesheets from a menu option:
http://www.w3.org/Style/Examples/007/alternatives.html
That alone is probably not a good enough incentive to include it in
core. But my use case is to improve accessibility. The site I'm
making is for senior citizens, so I'm providing them with a way to
easily scale the size of the font displayed on the site by clicking
font size icons on the page. This technique is explained here:
http://alistapart.com/stories/alternate/
This solution uses javascript to activate and deactivate the alternate
stylesheets. I prefer to utilize javascript for quick stylesheet
changes rather than a round-trip to the server. I realize I could
accomplish the same thing with server round-trips and not need any
custom HeaderContributor.
Lastly, it is possible to group stylesheets together and activate or
deactivate them all at once if they have the same title. Adding that
attribute would make it more robust.
Regardless, as you have shown, it isn't hard to implement my own
IHeaderContributor. I just wasn't sure how to go about it, and now I
am. So perhaps you are right in that it is best left out of core.
Thanks again!
Tauren
i didnt say your usecase was in any way flawed. all i meant is that it is a
very rare case that people use the title attribute of the link tag. so if we
build in support for it that means most of these contributors will have an
empty field which will incur a memory penalty unless we roll a different
subclass for that particular contributor altogether. it is pretty easy to
write a custom one like ive showed, so i just dont know if we should bother
supporting it in core.
-igor
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user