Jonas created WICKET-6113: ----------------------------- Summary: Improve ResourceStreamResource api Key: WICKET-6113 URL: https://issues.apache.org/jira/browse/WICKET-6113 Project: Wicket Issue Type: Improvement Components: wicket Reporter: Jonas Priority: Minor
I'd like to propose an improvement of org.apache.wicket.request.resource.ResourceStreamResource: it is currently quite hard to determine the IResourceStream inside the #getResourceStream method, as the relevant context (i.e. the Attributes object) isn't available. Of course it is possible to override #newResourceResponse to get access to Attributes, but the resulting code feels quite clumsy. I propose to pass the Attributes from #newResourceResponse into #internalGetResourceStream and finally into #getResourceStream. This of course breaks the current API, so I guess this would be something for Wicket 8. To put this in context, what we're doing is basically described in http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , except we don't extend DynamicImageResource, where you would have to handle mime type etc. in your subclass. By extending ResourceStreamResource, mime type etc. is handled by automatically. (Corresponding mailing list thread: http://apache-wicket.1842946.n4.nabble.com/Improve-ResourceStreamResource-api-td4673761.html ) -- This message was sent by Atlassian JIRA (v6.3.4#6332)