Hi, <wicket:header-items> should be helpful too: http://wicketinaction.com/2014/03/header-contributions-positioning/
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 18, 2015 at 3:56 PM, Ephraim Rosenfeld <erosenf...@knoa.com> wrote: > This is helpful, thank you! > > -----Original Message----- > From: Francois Meillet [mailto:francois.meil...@gmail.com] > Sent: Thursday, September 17, 2015 3:56 PM > To: users@wicket.apache.org > Subject: Re: Adding css from my webapp directory > > PriorityHeaderItem renders at the beginning of the header > response.render(new PriorityHeaderItem(CssHeaderItem.forReference(CSS))); > > François > > > > > > Le 17 sept. 2015 à 21:47, Ephraim Rosenfeld <erosenf...@knoa.com> a écrit > : > > > Hello Team Wicket: > > > > I have the following situation: > > > > I have a web application with its own .css files that I add to the > markup of my Base page: > > <html> > > <head> > > <link rel="sylesheet" type="text/css" href="css/my-styles.css"> > > </head> > > //etc. > > <html> > > > > I one particular page I am using the Wicket framework to dynamically add > .css: > > public class MyTheme extend Behavior { > > private static final ResourceReference CSS = new > > CssResourceReference(MyTheme.class, "themes/mytheme.css"); > > > > @Override > > public void renderHead(Component component, > IHeaderResponse response) { > > > response.render(CssHeaderItem.forReference(CSS)); > > } > > > > } > > > > The problem is that this dynamic css is overriding my static .css. When > I load the page the dynamic .css is referenced lower down in <head> tag > than my static .css <link> tag. > > > > To get around this issue I would like to use the same CssHeaderItem > functionality to add the .css file from my 'webapp' directory to override > the dynamic .css that I am adding via Java. > > > > How can I reference a .css file within my 'webapp' directory to add it > dynamically via Java to my page? > > > > Thank you in advance, > > > > - Ephraim > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >