I am just wondering how I can specify a dynamic url for an image src in apache wicket.
I just thought about something like
new StaticResourceReference(“images/buttons/” + filename+ “.gif”)
but I cannot find such a class or apporoach. There seem to be ugly workarounds, like the ones mentioned here.
I really can’t imagine that a popular framework like wicket doesn’t have an easy support for dynamic relative/absolute urls (also think about external ressources/urls..)
Did I missed something?
Thank you!
This document describes two possiblities how to do it in wicket:
I am not 100% happy with the approaches, but it seems to work.