[ 
https://issues.apache.org/jira/browse/WICKET-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065129#comment-13065129
 ] 

Martin Grigorov commented on WICKET-3902:
-----------------------------------------

Mail thread: http://markmail.org/thread/4bhytv357cklznvs

> 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