CSS reference order

classic Classic list List threaded Threaded
3 messages Options
mac
Reply | Threaded
Open this post in threaded view
|

CSS reference order

mac
I have integrated in my application wicket-bootstrap library. I also have my own bootstrap-override.css which is added in renderHead method as a CssHeaderItem.
Wicket renders bootstrap-override reference first in a head section. How can I change the reference order that my file will be loaded as the last one?

Thanks,
mac
Reply | Threaded
Open this post in threaded view
|

Re: CSS reference order

Martin Grigorov-4
Hi,

Override ResourceReference#getDependencies() for the reference that
contribute bootstrap-override.css.
It should depend on
CssHeaderItem.forRefernce(de.agilecoders.wicket.core.markup.html.themes.bootstrap.BootstrapCssReference)
See http://wicketinaction.com/2012/07/wicket-6-resource-management/


On Mon, Nov 18, 2013 at 2:31 PM, mac <[hidden email]> wrote:

> I have integrated in my application wicket-bootstrap library. I also have
> my
> own bootstrap-override.css which is added in renderHead method as a
> CssHeaderItem.
> Wicket renders bootstrap-override reference first in a head section. How
> can
> I change the reference order that my file will be loaded as the last one?
>
> Thanks,
> mac
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/CSS-reference-order-tp4662495.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
mac
Reply | Threaded
Open this post in threaded view
|

Re: CSS reference order

mac
I have created my own reference and added this inside getDependencies method:

List<HeaderItem> dependencies = new ArrayList<>();
dependencies.add( CssHeaderItem.forReference( BootstrapCssReference.instance() ) );
return dependencies;

and it works.

Thanks for advice.