they locale and style are used to search for it yes
they are not forced.. What do you mean with that?
If the file with that style and locale isn't there it will fallback
johan
On Nov 7, 2007 10:50 PM, German Morales <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm having trouble with localized and styled CSSs.
>
> Everything works alright with HTML. For example, wicket finds
> MyPage_mystyle.html instead of MyPage.html if i've called
> session.setStyle("mystyle"). But for CSS i can't get it working.
>
> i've tried different approaches like:
>
> // inside the page constructor
> add(HeaderContributor.forCss(new ResourceReference(MyPage.class,
> "style.css")));
>
>
> // inside renderHead
> cResponse.getHeaderResponse().renderCSSReference(new
> ResourceReference(MyPage.class, "style.css"));
>
>
> None of this worked for me. However, it works if I call the full
> constructor of ResourceReference:
>
> new ResourceReference(MyPage.class, "style.css", getLocale(), getStyle())
>
> But i'm not supposed to do that, because then the Locale and Style are
> forced, and i want this only if the file is present. I know some
> ResourceStreamLocator should be involved in the process, but i don't know
> how. I see in the ResourceReference javadoc that the framework should be
> calling the setStyle() method, but i debugged it and it doesn't happen.
>
> What am i doing wrong?
>
> Thanks in advance,
>
> German
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>