Still not clear what I did wrong. 
With wicket 1.4 my code was:

public final class PageHeaderComponent extends WebComponent {

     public PageHeaderComponent(final String id, final String
changeDestination) {
        super(id);
        add(CSSPackageResource.getHeaderContribution("/css/header.css"));
    }
(...)
}

and it created what I needed
<link rel="stylesheet" type="text/css" href="/css/header.css" />

Now with wicket 1.5, my code is:

public final class PageHeaderComponent extends WebComponent {

     public PageHeaderComponent(final String id, final String
changeDestination) {
        super(id);
        add(new Behavior() {
            private final ResourceReference headerCss = new
PackageResourceReference("/css/header.css");

            @Override
            public void renderHead(Component component, IHeaderResponse
response) {
                response.renderCSSReference(headerCss);
            }
        });
    }
(...)
}

and it creates: 
<link rel="stylesheet" type="text/css"
href="wicket/resource/org.apache.wicket.Application/css/header-ver-F274BBEF68106E265B1DB7EE2B7DF144.css"
/>

The warning being logged is: 

WARNING: Asked to auto-create a ResourceReference, but
ResourceReferenceRegistry
.createDefaultResourceReference() return null.  [scope:
org.apache.wicket.Application; name: css/header.css; locale: null; style:
null; variation: null]



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

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

Reply via email to