You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Manuel Corrales <ma...@gmail.com> on 2008/06/03 17:26:20 UTC

Css and path issues

Hi, i am starting new wicket application, my first one. I think this is an
awesome framework!!

I am having this issue, i have a css file and i am including it on a pageA,
then i have another pageB (subclass of pageA) that is on another package.
When i navigate to pageB, i have no stlyes because it is looking for it on
the package of the pageB. How can i configure this, so wicket alway look for
the css style on the same place?

Thanks in advance!

Re: Css and path issues

Posted by Manuel Corrales <ma...@gmail.com>.
Hi, i fixed this issue yesterday thanks to the help on the irc channel. My
issue was the way i was defining the css, i was using

add(new StyleSheetReference("pageCSS", *getClass()*, "styles/fenix.css"));

and the getClass() part was the problem. I change that for
nameOfTheClass.class and then the path for the css file is the same no
matter the subclass.

Thanks! Best regards.


On Wed, Jun 4, 2008 at 12:05 AM, Igor Vaynberg <ig...@gmail.com>
wrote:

> you can use something like add(new
> HeaderContributor.forCss(pageA.class, "filename")) on pageA and it
> should work from anywhere.
>
> -igor
>
>
> On Tue, Jun 3, 2008 at 8:26 AM, Manuel Corrales
> <ma...@gmail.com> wrote:
> > Hi, i am starting new wicket application, my first one. I think this is
> an
> > awesome framework!!
> >
> > I am having this issue, i have a css file and i am including it on a
> pageA,
> > then i have another pageB (subclass of pageA) that is on another package.
> > When i navigate to pageB, i have no stlyes because it is looking for it
> on
> > the package of the pageB. How can i configure this, so wicket alway look
> for
> > the css style on the same place?
> >
> > Thanks in advance!
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Css and path issues

Posted by Igor Vaynberg <ig...@gmail.com>.
you can use something like add(new
HeaderContributor.forCss(pageA.class, "filename")) on pageA and it
should work from anywhere.

-igor


On Tue, Jun 3, 2008 at 8:26 AM, Manuel Corrales
<ma...@gmail.com> wrote:
> Hi, i am starting new wicket application, my first one. I think this is an
> awesome framework!!
>
> I am having this issue, i have a css file and i am including it on a pageA,
> then i have another pageB (subclass of pageA) that is on another package.
> When i navigate to pageB, i have no stlyes because it is looking for it on
> the package of the pageB. How can i configure this, so wicket alway look for
> the css style on the same place?
>
> Thanks in advance!
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org