I guess it depends on the mount path of your page. Most probably it is /wicket/bookmarkable/... On Mar 14, 2015 7:37 PM, "Bruce Lombardi" <[email protected]> wrote:
> Interesting, > > When I run your code I see that the url is as you say: > > ./wicket/resource/org.apache.wicket.Application/pdfProducer > > Whereas in my working code (wicket version 6.12) it is: > > ./resource/org.apache.wicket.Application/pdfProducer > > And in my non-working code (wicket versions 6.13 - 6.19) it is: > > ../resource/org.apache.wicket.Application/pdfProducer > > If I remove the first dot from the url with the debuggerthen run from > there the pdf appears as it should. > > I wonder why they are different in the two projects and why I'm getting .. > with later versions. > > I'm also wondering if there is another library that is somehow > incompatible with later versions of Wicket. > > I think the only library we use that interacts with Wicket is wicket > bootstrap - currently as below (but I've tried other version): > <dependency> > <groupId>de.agilecoders.wicket</groupId> > <artifactId>wicket-bootstrap-core</artifactId> > <version>0.9.8</version> > </dependency> > > <dependency> > <groupId>de.agilecoders.wicket</groupId> > > <artifactId>wicket-bootstrap-extensions</artifactId> > <version>0.9.8</version> > </dependency> > > I will add these dependencies to your quickstart and see if it makes a > difference. > > Bruce > > -----Original Message----- > From: Andrea Del Bene [mailto:[email protected]] > Sent: Saturday, March 14, 2015 11:58 AM > To: [email protected] > Subject: Re: PDF viewed in panel via ResourceReference works in 6.12 but > not in 6.13 > > Hi, > > I've created a quickstart based on your code but I can't reproduce the > issue. I've shared it on Dropbox: > https://www.dropbox.com/s/qmolvzvp9a0xplf/ResourceIssue.tar.gz?dl=0 > The only thing I've noted is that your resource url doesn't have starting > segment 'wicket', i.e my resource url is: > > ./wicket/resource/org.apache.wicket.Application/pdfProducer > > Maybe you have some custom setting for wicket segments ('wicket', > 'bookmark', etc...)? > > The problem (which I think is a bug) is in the way the url is produced. > > > > The line > > String url = (String)RequestCycle.get().urlFor(resourceReference, > > null); > > > > Produces the url to use for the resource ref. > > > > In the non-working version it returns: > > > > ../resource/org.apache.wicket.Application/pdfProducer > > > > If I set a breakpoint just after this line and I manually remove the > first dot in the string using the debugger to get: > > > > ./resource/org.apache.wicket.Application/pdfProducer > > > > and then let the code continue to run, my pdf appears correctly. > > > > The debug trace also shows the correct uri. > > > > 2015-03-13 17:59:30,292 DEBUG - ServletWebRequest - > Calculating context relative path from: context path '', filterPrefix '', > uri '/wicket/resource/org.apache.wicket.Application/pdfProducer' > > 2015-03-13 17:59:30,298 DEBUG - ServletWebRequest - > Calculating context relative path from: context path '', filterPrefix '', > uri '/wicket/resource/org.apache.wicket.Application/pdfProducer' > > 2015-03-13 17:59:30,301 DEBUG - ServletWebRequest - > Calculating context relative path from: context path '', filterPrefix '', > uri '/wicket/resource/org.apache.wicket.Application/pdfProducer' > > 2015-03-13 17:59:30,305 DEBUG - CompoundRequestMapper - One > compatible mapper found for URL > 'wicket/resource/org.apache.wicket.Application/pdfProducer' -> 'Mapper: > org.apache.wicket.core.request.mapper.ResourceReferenceMapper; Score: 1' > > > > Maybe someone knows how to fix this? I could strip the first dot as a > workaround in the mean time. > > > > Bruce > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
