[ 
https://issues.apache.org/jira/browse/WICKET-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-3902.
-------------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 1.5-RC6)

I reverted the changes for this ticket.
Testing for RC6 I saw that some wicket-examples -> images were broken.

The resource reference needs to be registered in the resource reference 
registry so that the Url generated by ResourceReferenceMapper can found it 
later when the resource is requested.

> Don't bind the image's resource reference in the shared resources
> -----------------------------------------------------------------
>
>                 Key: WICKET-3902
>                 URL: https://issues.apache.org/jira/browse/WICKET-3902
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-core
>    Affects Versions: 1.5-RC5.1
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>
> Currently LocalizedImageResource tries to bind the resource reference (i.e. 
> to add it in the application-scoped ResourceReferenceRegistry) no matter what 
> is the type of the resource reference.
> With the introduction of 
> org.apache.wicket.request.resource.SharedResourceReference in 1.5 this is no 
> more needed.
> Now the developer can register the resource with:
> MyApp#init() {
>   super.init();
>   getSharedResources().add(key, resource);
> }
> and reference it with:
> MyPanel.java:
> add(new Image("imgId", new SharedResourceReference(key));
> Even when the resource is not added previously in the 
> ResourceReferenceRegistry using:
> add(new Image("imgId", new SharedResourceReference(Some.class, "someName"));
> will register the PackageResource in the registry if such resource exists.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to