I really don't see what the problem is with allowing one to pass an Application reference into StaticResource. You wrote: "In fact, a
StaticResourceReference CANNOT be static and must be
created within a request to allow the resource to bind
to the application" but this isn't really true, because if you look at the source-code, there is nothing preventing you from passing in the Application if you have a reference to it. Both StaticResource.java and StaticResourceReference.java simply make use of the Session or RequestCycle variables to get at the application, which is fine and good for ease of use, but why not add an extra constructor which allows the Application to be specified explicitly?
And what does that gain?
If you can add an applicaiton object. Then most likely you have it from the RequestCycle.


As for the naming, I prefer the original name of StaticResource*. It has always been quite clear to me that what StaticResource meant and PackageResource is definately not as clear. If anything, I would refactor the other way: ensure that Resource has two subclasses, StaticResource and DynamicResource and then DynamicImageResource extends DynamicResource. It is quite clear looking at the Javadoc of WebResource what is meant by each one. Just my 2 cents...

So again, back to the original problem, is it technically possible to create a link to an image from within the Application so it can be hit without any Page construction? You only mentioned dynamic images in your last reply.

Yes add the all youre static/package images at for hand (in the init of youre application)
But this is not always doable i know


johan



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to