See org.apache.wicket.markup.html.image.Image#Image(java.lang.String, org.apache.wicket.request.resource.ResourceReference, org.apache.wicket.request.mapper.parameter.PageParameters, org.apache.wicket.request.resource.ResourceReference...)
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Jun 9, 2016 at 2:34 PM, Davids Patrick <p.dav...@healthag.de> wrote: > Hi Martin, > but how do I put the particular parameter into the Image src which makes > it static? > I'm not able to manually call > > getRequestCycle().urlFor(imagesResourceReference, imageParameters); > > What I do is add(new Image, new > PersonImageResourceReference(personInstance)); > > How can I provide a parameter personNumer=1234 > (personInstance.getNumber()) to the url the Image create for its own src > attribute? > > Best regards > Patrick > > -----Ursprüngliche Nachricht----- > Von: Martin Grigorov [mailto:mgrigo...@apache.org] > Gesendet: Dienstag, 7. Juni 2016 17:05 > An: users@wicket.apache.org > Betreff: Re: Conditional (static) dynamic resources / ;-) > > Hi, > > I would use mounted resource reference that serves the images. > Check wicketinaction.com. There is a blog article explaining how to do it. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, Jun 7, 2016 at 4:57 PM, Davids Patrick <p.dav...@healthag.de> > wrote: > > > Hi all, > > I have a quite tricky usecase here and I don't know how to handle that. > > > > Our system allows to upload user pictures to profiles. > > So, when the user profile picture is displayed it is read from > > database and delivered by DynamicImageResource. > > > > If the user did not upload any pictures yet an fallback image is > > delivered (generic male and female). > > > > To have them cached/static I thought I can handle this by setting the > > lastModified flag, but in my case I revoke the behavior, because I am > > in a refreshing view which re-creates my components, due to that also > > a new DynamicImageResource is created and my lastModified date > > information is lost. > > > > What could be the best practice to achieve a "conditional caching" for > > (Dynamic)ImageResources? > > > > Kind regards > > Patrick > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > >