You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by grazia <Gr...@gmail.com> on 2012/03/15 20:20:20 UTC

URL in css problem

I have a mouseovermenu.css file that includes references to images as below: 

.mouseovermenuitem .item_itembody .item_itemdetail .icon_page
{
	background:transparent URL(../images/mouseovermenu/page.gif) no-repeat top
left;
}

I have added the mouseovermenu.css as a shared resource in
myApplication.init as follows:

getSharedResources().add("cssmouseover", new
ContextRelativeResource("/css/mouseovermenu.css"));
      
Then, I have included that resource in a page header component as below:

 add(new Behavior() {

            @Override
            public void renderHead(Component component, IHeaderResponse
response) {
                response.renderCSSReference(new
SharedResourceReference("cssmouseover"));
            }
        });

But wicket 1.5 is expecting to find
wicket/resource/images/mouseovermenu/page.gif and it ovisouly does not
exist, so I get the error:

Mar 15, 2012 11:43:39 AM org.apache.wicket.util.lang.WicketObjects
resolveClass
WARNING: Could not resolve class [images]
java.lang.ClassNotFoundException: images
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1680)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1526)
     (....)

When the page is rendered, then I see in its source that the .css file is 
<link rel="stylesheet" type="text/css"
href="wicket/resource/org.apache.wicket.Application/cssmouseover-ver-CDB3EE537C4A56387DDB56323FF91CB8"
/>

Where is the href coming from ? What do all its parts mean ?
I am rather confused about how to manage resources that are not in
classpath. 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/URL-in-css-problem-tp4476092p4476092.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: URL in css problem

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

See  http://mail-archives.apache.org/mod_mbox/wicket-users/201104.mbox/%3Cop.vujch70qn8mdop@vfgrl10a-cxyrg.vf-gr.internal.vodafone.com%3E

On Thu, Mar 15, 2012 at 9:20 PM, grazia <Gr...@gmail.com> wrote:
> I have a mouseovermenu.css file that includes references to images as below:
>
> .mouseovermenuitem .item_itembody .item_itemdetail .icon_page
> {
>        background:transparent URL(../images/mouseovermenu/page.gif) no-repeat top
> left;
> }
>
> I have added the mouseovermenu.css as a shared resource in
> myApplication.init as follows:
>
> getSharedResources().add("cssmouseover", new
> ContextRelativeResource("/css/mouseovermenu.css"));
>
> Then, I have included that resource in a page header component as below:
>
>  add(new Behavior() {
>
>            @Override
>            public void renderHead(Component component, IHeaderResponse
> response) {
>                response.renderCSSReference(new
> SharedResourceReference("cssmouseover"));
>            }
>        });
>
> But wicket 1.5 is expecting to find
> wicket/resource/images/mouseovermenu/page.gif and it ovisouly does not
> exist, so I get the error:
>
> Mar 15, 2012 11:43:39 AM org.apache.wicket.util.lang.WicketObjects
> resolveClass
> WARNING: Could not resolve class [images]
> java.lang.ClassNotFoundException: images
>        at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> der.java:1680)
>        at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
> der.java:1526)
>     (....)
>
> When the page is rendered, then I see in its source that the .css file is
> <link rel="stylesheet" type="text/css"
> href="wicket/resource/org.apache.wicket.Application/cssmouseover-ver-CDB3EE537C4A56387DDB56323FF91CB8"
> />
>
> Where is the href coming from ? What do all its parts mean ?
> I am rather confused about how to manage resources that are not in
> classpath.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/URL-in-css-problem-tp4476092p4476092.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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