Hi, I didn't use this style, but I leave my css in resources folder, and use
the following code
here:add(CSSPackageResource.getHeaderContribution(AbstractWebPage.class,
"resources/base.css"));

everything works well.



On Tue, Aug 18, 2009 at 3:58 PM, Per Newgro <per.new...@gmx.ch> wrote:

> Hi *,
>
> i would like to add a css-class to my div to display a background image. So
> i've added this to css
>
> my.css
> div.myimg {
>   background: url("navi_items.gif") no-repeat;
>   width: 12px;
>   height: 10px;
>   cursor: pointer;
> }
>
> The navi_items.gif is located in
> - webapp
>   - WEB-INF
>   - webresources
>      - my.css
>      - navi_items.gif
>
>
> If i add this to my HomePage.html
>       <link rel="stylesheet" href="webresources/my.css" type="text/css"
> media="all" />
> everything works fine.
>
> But with the following code in my HomePage i get the error message below
>
> HomePage.java
> public HomePage() {
>  // add .. for every package level of Application to come to application
> root
>  add(HeaderContributor.forCss(new
> CompressedResourceReference("../../../webresources/my.css")));
> }
>
> error-message
> ERROR - SharedResources            -
> ----------------------------------------------------------------------------------------
> ERROR - SharedResources            - Your path looks like:
> ../../../webresources/my.css
> ERROR - SharedResources            - For security reasons moving up '../'
> is disabled by default. Please see
> ERROR - SharedResources            -
> IResourceSettings.getParentFolderPlaceholder() and PackageResourceGuard for
> more details
> ERROR - SharedResources            -
> ----------------------------------------------------------------------------------------
> WARN  - PackageResource            - Unable to find package resource [path
> = webresources/my.css, style = null, locale = null]
>
> Setting the parentFolderPlaceholder to $up$ and use
> "$up$/$up$/$up$/webresources/my.css" solved the error message display but
> the css
> is still not loaded.
>
> This was formerly working (wicket1.3.6). With wicket-1992 and wicket1.3.7
> it was disabled. But how can i load my css now?
>
> Cheers
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
------------------
Enjoy. Thanks!

Haulyn Microproduction

Mobile: +086-15864011231
email: saharab...@gmail.com,
         hmp.hau...@foxmail.com
website: http://haulynjason.net
gtalk: saharab...@gmail.com
yahoo: jia_hao...@yahoo.com
msn: saharab...@gmail.com
skype: saharabear
QQ: 378606292

Haulyn Jason

Reply via email to